diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 2051c091..49a3daf0 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -45,6 +45,8 @@ jobs: uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main semver-label-check: + # disable this action + if: false name: Semantic Version label check runs-on: ubuntu-latest timeout-minutes: 1 diff --git a/.licenseignore b/.licenseignore index db42f1da..c72be538 100644 --- a/.licenseignore +++ b/.licenseignore @@ -33,4 +33,7 @@ Package.resolved *.yaml *.yml **/.npmignore -**/*.json \ No newline at end of file +**/*.json +docs/* +.unacceptablelanguageignore +.nojekyll \ No newline at end of file diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/.unacceptablelanguageignore b/.unacceptablelanguageignore new file mode 100644 index 00000000..d8f8d469 --- /dev/null +++ b/.unacceptablelanguageignore @@ -0,0 +1 @@ +docs diff --git a/docs/assets.json b/docs/assets.json new file mode 100644 index 00000000..248cf632 --- /dev/null +++ b/docs/assets.json @@ -0,0 +1 @@ +{"downloads":[],"images":[{"alt":"Swift Icon","identifier":"03-swift_on_lambda.png","type":"image","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/03-swift_on_lambda.png","traits":["1x","light"]}]},{"alt":"Swift on AWS Lambda icons","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/00-swift_on_lambda.png","traits":["1x","light"]}],"identifier":"00-swift_on_lambda.png","type":"image"},{"alt":"A Swift project open in Xcode","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/01-swift_on_lambda.png","traits":["1x","light"]}],"identifier":"01-swift_on_lambda.png","type":"image"},{"type":"image","variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/04-swift_on_lambda.png"}],"identifier":"04-swift_on_lambda.png","alt":"Deploying Swift into AWS Lambda"},{"type":"image","alt":"Console - prepare test event","variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/console-60-prepare-test-event.png"}],"identifier":"console-60-prepare-test-event"},{"variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/console-50-upload-zip.png","traits":["1x","light"]}],"alt":"Console - select zip file","type":"image","identifier":"console-50-upload-zip"},{"variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/console-80-delete-function.png"}],"alt":"Console - delete function","type":"image","identifier":"console-80-delete-function"},{"alt":"Console - select zip file","type":"image","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/console-40-select-zip-file.png","traits":["1x","light"]}],"identifier":"console-40-select-zip-file"},{"identifier":"console-80-delete-role","type":"image","alt":"Console - delete IAM role","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/console-80-delete-role.png","traits":["1x","light"]}]},{"identifier":"console-10-regions","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/console-10-regions.png","traits":["1x","light"]}],"alt":"Console - Select AWS Region","type":"image"},{"alt":"Console - create function","type":"image","variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/console-30-create-function.png"}],"identifier":"console-30-create-function"},{"alt":"Console - Lambda dashboard when there is no function","variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/console-20-dashboard.png"}],"identifier":"console-20-dashboard","type":"image"},{"type":"image","identifier":"04-01-01-docker-started.png","variants":[{"traits":["2x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/04-01-01-docker-started@2x.png"}],"alt":"Docker icon and menu on macOS"},{"identifier":"04-02-09-test-lambda.png","alt":"Create function","type":"image","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-09-test-lambda@2x.png","traits":["2x","light"]},{"traits":["2x","dark"],"url":"\/images\/AWSLambdaRuntimeCore\/04-02-09-test-lambda~dark@2x.png"}]},{"identifier":"04-02-01-console-login.png","variants":[{"traits":["2x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/04-02-01-console-login@2x.png"}],"type":"image","alt":"AWS console login"},{"type":"image","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-10-test-lambda-result@2x.png","traits":["2x","light"]},{"traits":["2x","dark"],"url":"\/images\/AWSLambdaRuntimeCore\/04-02-10-test-lambda-result~dark@2x.png"}],"alt":"Create function","identifier":"04-02-10-test-lambda-result.png"},{"identifier":"04-02-05-create-function.png","type":"image","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-05-create-function@2x.png","traits":["2x","light"]},{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-05-create-function~dark@2x.png","traits":["2x","dark"]}],"alt":"Create function"},{"identifier":"04-02-08-upload-zip.png","type":"image","alt":"Create function","variants":[{"traits":["2x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/04-02-08-upload-zip@2x.png"},{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-08-upload-zip~dark@2x.png","traits":["2x","dark"]}]},{"identifier":"04-02-create-lambda.png","alt":"Create a Lambda function","type":"image","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-create-lambda.png","traits":["1x","light"]}]},{"type":"image","alt":"AWS console login with IAM user","identifier":"04-02-02-console-login.png","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-02-console-login@2x.png","traits":["2x","light"]}]},{"type":"image","identifier":"04-02-03-select-region.png","alt":"AWS console - Select Region","variants":[{"traits":["2x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/04-02-03-select-region@2x.png"}]},{"variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/04-03-invoke-lambda.png"}],"alt":"Invoke a Lambda function","type":"image","identifier":"04-03-invoke-lambda.png"},{"type":"image","alt":"Upload ","identifier":"04-02-07-upload-zip.png","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-07-upload-zip@2x.png","traits":["2x","light"]},{"traits":["2x","dark"],"url":"\/images\/AWSLambdaRuntimeCore\/04-02-07-upload-zip~dark@2x.png"}]},{"type":"image","variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/04-01-compile-for-linux.png"}],"identifier":"04-01-compile-for-linux.png","alt":"Compile for Amazon Linux"},{"variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-04-select-lambda@2x.png","traits":["2x","light"]},{"traits":["2x","dark"],"url":"\/images\/AWSLambdaRuntimeCore\/04-02-04-select-lambda~dark@2x.png"}],"alt":"AWS console - Select Lambda","type":"image","identifier":"04-02-04-select-lambda.png"},{"identifier":"04-02-06-create-function.png","variants":[{"traits":["2x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/04-02-06-create-function@2x.png"},{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-06-create-function~dark@2x.png","traits":["2x","dark"]}],"type":"image","alt":"Create function details"},{"alt":"Icons of succeeded and failed tests","identifier":"03-04-test-locally.png","type":"image","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/03-04-test-locally.png","traits":["1x","light"]}]},{"variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/03-01-terminal-package-init.png"}],"alt":"A Terminal with package init command","identifier":"03-01-terminal-package-init.png","type":"image"},{"identifier":"03-02-swift-package-manager.png","type":"image","variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/03-02-swift-package-manager.png"}],"alt":"Swift Package Manager icon as a box"},{"alt":"Swift code in Xcode","type":"image","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/03-03-swift-code-xcode.png","traits":["1x","light"]}],"identifier":"03-03-swift-code-xcode.png"},{"type":"image","identifier":"03-04-01-compile-run.png","alt":"Compile and run the project","variants":[{"traits":["2x","dark"],"url":"\/images\/AWSLambdaRuntimeCore\/03-04-01-compile-run~dark@2x.png"}]},{"type":"image","identifier":"03-01-xcode.png","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/03-01-xcode@2x.png","traits":["2x","light"]},{"url":"\/images\/AWSLambdaRuntimeCore\/03-01-xcode~dark@2x.png","traits":["2x","dark"]}],"alt":"project open in Xcode"}],"videos":[]} \ No newline at end of file diff --git a/docs/css/866.60f074fd.css b/docs/css/866.60f074fd.css new file mode 100644 index 00000000..1d28cc73 --- /dev/null +++ b/docs/css/866.60f074fd.css @@ -0,0 +1,9 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */aside[data-v-3ccce809]{-moz-column-break-inside:avoid;break-inside:avoid;border-radius:var(--aside-border-radius,var(--border-radius,4px));border-style:var(--aside-border-style,solid);border-width:var(--aside-border-width,0 0 0 6px);padding:.9411764706rem;text-align:start}aside .label[data-v-3ccce809]{font-size:1rem;line-height:1.5294117647;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}aside .label+[data-v-3ccce809]{margin-top:var(--spacing-stacked-margin-small)}aside.deprecated[data-v-3ccce809]{background-color:var(--color-aside-deprecated-background);border-color:var(--color-aside-deprecated-border);box-shadow:0 0 0 0 var(--color-aside-deprecated-border) inset,0 0 0 0 var(--color-aside-deprecated-border)}aside.deprecated .label[data-v-3ccce809]{color:var(--color-aside-deprecated)}aside.experiment[data-v-3ccce809]{background-color:var(--color-aside-experiment-background);border-color:var(--color-aside-experiment-border);box-shadow:0 0 0 0 var(--color-aside-experiment-border) inset,0 0 0 0 var(--color-aside-experiment-border)}aside.experiment .label[data-v-3ccce809]{color:var(--color-aside-experiment)}aside.important[data-v-3ccce809]{background-color:var(--color-aside-important-background);border-color:var(--color-aside-important-border);box-shadow:0 0 0 0 var(--color-aside-important-border) inset,0 0 0 0 var(--color-aside-important-border)}aside.important .label[data-v-3ccce809]{color:var(--color-aside-important)}aside.note[data-v-3ccce809]{background-color:var(--color-aside-note-background);border-color:var(--color-aside-note-border);box-shadow:0 0 0 0 var(--color-aside-note-border) inset,0 0 0 0 var(--color-aside-note-border)}aside.note .label[data-v-3ccce809]{color:var(--color-aside-note)}aside.tip[data-v-3ccce809]{background-color:var(--color-aside-tip-background);border-color:var(--color-aside-tip-border);box-shadow:0 0 0 0 var(--color-aside-tip-border) inset,0 0 0 0 var(--color-aside-tip-border)}aside.tip .label[data-v-3ccce809]{color:var(--color-aside-tip)}aside.warning[data-v-3ccce809]{background-color:var(--color-aside-warning-background);border-color:var(--color-aside-warning-border);box-shadow:0 0 0 0 var(--color-aside-warning-border) inset,0 0 0 0 var(--color-aside-warning-border)}aside.warning .label[data-v-3ccce809]{color:var(--color-aside-warning)}code[data-v-08295b2f]:before{content:attr(data-before-code)}code[data-v-08295b2f]:after{content:attr(data-after-code)}code[data-v-08295b2f]:after,code[data-v-08295b2f]:before{display:block;position:absolute;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(0 0 99.9% 99.9%);clip-path:inset(0 0 99.9% 99.9%);overflow:hidden;height:1px;width:1px;padding:0;border:0}.swift-file-icon.file-icon[data-v-c01a6890]{height:1rem}.file-icon[data-v-7c381064]{position:relative;align-items:flex-end;height:24px;margin:0 .5rem 0 1rem}.filename[data-v-c8c40662]{color:var(--text,var(--colors-secondary-label,var(--color-secondary-label)));font-size:.9411764706rem;line-height:1.1875;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);margin-top:1rem}@media only screen and (max-width:735px){.filename[data-v-c8c40662]{font-size:.8235294118rem;line-height:1.4285714286;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);margin-top:0}}.filename>a[data-v-c8c40662],.filename>span[data-v-c8c40662]{display:flex;align-items:center;line-height:normal}a[data-v-c8c40662]{color:var(--url,var(--color-link))}.code-line-container[data-v-13e6923e]{display:inline-block;width:100%;box-sizing:border-box}.code-number[data-v-13e6923e]{display:inline-block;padding:0 1rem 0 8px;text-align:right;min-width:2em;color:#666;-webkit-user-select:none;-moz-user-select:none;user-select:none}.code-number[data-v-13e6923e]:before{content:attr(data-line-number)}.highlighted[data-v-13e6923e]{background:var(--line-highlight,var(--color-code-line-highlight));border-left:4px solid var(--color-code-line-highlight-border)}.highlighted .code-number[data-v-13e6923e]{padding-left:4px}pre[data-v-13e6923e]{padding:14px 0;display:flex;overflow:unset;-webkit-overflow-scrolling:touch;white-space:pre;word-wrap:normal;height:100%;-moz-tab-size:var(--code-indentationWidth,4);-o-tab-size:var(--code-indentationWidth,4);tab-size:var(--code-indentationWidth,4)}@media only screen and (max-width:735px){pre[data-v-13e6923e]{padding-top:.8235294118rem}}code[data-v-13e6923e]{white-space:pre;word-wrap:normal;flex-grow:9999}.code-listing[data-v-13e6923e],.container-general[data-v-13e6923e]{display:flex}.code-listing[data-v-13e6923e]{flex-direction:column;border-radius:var(--code-border-radius,var(--border-radius,4px));overflow:hidden;filter:blur(0)}.code-listing.single-line[data-v-13e6923e]{border-radius:var(--border-radius,4px)}.container-general[data-v-13e6923e]{overflow:auto}.container-general[data-v-13e6923e],pre[data-v-13e6923e]{flex-grow:1}.header-anchor[data-v-24fddf6a]{color:inherit;text-decoration:none;position:relative;padding-right:23px;display:inline-block}.header-anchor[data-v-24fddf6a]:after{position:absolute;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(0 0 99.9% 99.9%);clip-path:inset(0 0 99.9% 99.9%);overflow:hidden;height:1px;width:1px;padding:0;border:0;content:attr(data-after-text)}.header-anchor .icon[data-v-24fddf6a]{position:absolute;right:0;bottom:.2em;display:none;height:16px;margin-left:7px}.header-anchor:focus .icon[data-v-24fddf6a],.header-anchor:hover .icon[data-v-24fddf6a]{display:inline}code[data-v-05f4a5b7]{speak-punctuation:code}.container-general[data-v-25a17a0e]{display:flex;flex-flow:row wrap}.container-general .code-line[data-v-25a17a0e]{flex:1 0 auto}.code-line-container[data-v-25a17a0e]{width:100%;align-items:center;display:flex;border-left:4px solid transparent;counter-increment:linenumbers;padding-right:14px}.code-number[data-v-25a17a0e]{font-size:.7058823529rem;line-height:1.5;font-weight:400;font-family:var(--typography-html-font-mono,Menlo,monospace);padding:0 1rem 0 8px;text-align:right;min-width:2.01em;-webkit-user-select:none;-moz-user-select:none;user-select:none}.code-number[data-v-25a17a0e]:before{content:counter(linenumbers)}.code-line[data-v-25a17a0e]{display:flex}pre[data-v-25a17a0e]{padding:14px 0;display:flex;flex-flow:row wrap;overflow:auto;-webkit-overflow-scrolling:touch;white-space:pre;word-wrap:normal}@media only screen and (max-width:735px){pre[data-v-25a17a0e]{padding-top:.8235294118rem}}.collapsible-code-listing[data-v-25a17a0e]{background:var(--background,var(--color-code-background));border-color:var(--colors-grid,var(--color-grid));color:var(--text,var(--color-code-plain));border-radius:var(--border-radius,4px);border-style:solid;border-width:1px;counter-reset:linenumbers;font-size:15px}.collapsible-code-listing.single-line[data-v-25a17a0e]{border-radius:var(--border-radius,4px)}.collapsible[data-v-25a17a0e]{background:var(--color-code-collapsible-background);color:var(--color-code-collapsible-text)}.collapsed[data-v-25a17a0e]:before{content:"⋯";display:inline-block;font-family:monospace;font-weight:700;height:100%;line-height:1;text-align:right;width:2.3rem}.collapsed .code-line-container[data-v-25a17a0e]{height:0;visibility:hidden}.row[data-v-be73599c]{box-sizing:border-box;display:flex;flex-flow:row wrap}.col[data-v-2ee3ad8b]{box-sizing:border-box;flex:none}.xlarge-1[data-v-2ee3ad8b]{flex-basis:8.3333333333%;max-width:8.3333333333%}.xlarge-2[data-v-2ee3ad8b]{flex-basis:16.6666666667%;max-width:16.6666666667%}.xlarge-3[data-v-2ee3ad8b]{flex-basis:25%;max-width:25%}.xlarge-4[data-v-2ee3ad8b]{flex-basis:33.3333333333%;max-width:33.3333333333%}.xlarge-5[data-v-2ee3ad8b]{flex-basis:41.6666666667%;max-width:41.6666666667%}.xlarge-6[data-v-2ee3ad8b]{flex-basis:50%;max-width:50%}.xlarge-7[data-v-2ee3ad8b]{flex-basis:58.3333333333%;max-width:58.3333333333%}.xlarge-8[data-v-2ee3ad8b]{flex-basis:66.6666666667%;max-width:66.6666666667%}.xlarge-9[data-v-2ee3ad8b]{flex-basis:75%;max-width:75%}.xlarge-10[data-v-2ee3ad8b]{flex-basis:83.3333333333%;max-width:83.3333333333%}.xlarge-11[data-v-2ee3ad8b]{flex-basis:91.6666666667%;max-width:91.6666666667%}.xlarge-12[data-v-2ee3ad8b]{flex-basis:100%;max-width:100%}.xlarge-centered[data-v-2ee3ad8b]{margin-left:auto;margin-right:auto}.xlarge-uncentered[data-v-2ee3ad8b]{margin-left:0;margin-right:0}.large-1[data-v-2ee3ad8b]{flex-basis:8.3333333333%;max-width:8.3333333333%}.large-2[data-v-2ee3ad8b]{flex-basis:16.6666666667%;max-width:16.6666666667%}.large-3[data-v-2ee3ad8b]{flex-basis:25%;max-width:25%}.large-4[data-v-2ee3ad8b]{flex-basis:33.3333333333%;max-width:33.3333333333%}.large-5[data-v-2ee3ad8b]{flex-basis:41.6666666667%;max-width:41.6666666667%}.large-6[data-v-2ee3ad8b]{flex-basis:50%;max-width:50%}.large-7[data-v-2ee3ad8b]{flex-basis:58.3333333333%;max-width:58.3333333333%}.large-8[data-v-2ee3ad8b]{flex-basis:66.6666666667%;max-width:66.6666666667%}.large-9[data-v-2ee3ad8b]{flex-basis:75%;max-width:75%}.large-10[data-v-2ee3ad8b]{flex-basis:83.3333333333%;max-width:83.3333333333%}.large-11[data-v-2ee3ad8b]{flex-basis:91.6666666667%;max-width:91.6666666667%}.large-12[data-v-2ee3ad8b]{flex-basis:100%;max-width:100%}.large-centered[data-v-2ee3ad8b]{margin-left:auto;margin-right:auto}.large-uncentered[data-v-2ee3ad8b]{margin-left:0;margin-right:0}@media only screen and (max-width:1250px){.medium-1[data-v-2ee3ad8b]{flex-basis:8.3333333333%;max-width:8.3333333333%}.medium-2[data-v-2ee3ad8b]{flex-basis:16.6666666667%;max-width:16.6666666667%}.medium-3[data-v-2ee3ad8b]{flex-basis:25%;max-width:25%}.medium-4[data-v-2ee3ad8b]{flex-basis:33.3333333333%;max-width:33.3333333333%}.medium-5[data-v-2ee3ad8b]{flex-basis:41.6666666667%;max-width:41.6666666667%}.medium-6[data-v-2ee3ad8b]{flex-basis:50%;max-width:50%}.medium-7[data-v-2ee3ad8b]{flex-basis:58.3333333333%;max-width:58.3333333333%}.medium-8[data-v-2ee3ad8b]{flex-basis:66.6666666667%;max-width:66.6666666667%}.medium-9[data-v-2ee3ad8b]{flex-basis:75%;max-width:75%}.medium-10[data-v-2ee3ad8b]{flex-basis:83.3333333333%;max-width:83.3333333333%}.medium-11[data-v-2ee3ad8b]{flex-basis:91.6666666667%;max-width:91.6666666667%}.medium-12[data-v-2ee3ad8b]{flex-basis:100%;max-width:100%}.medium-centered[data-v-2ee3ad8b]{margin-left:auto;margin-right:auto}.medium-uncentered[data-v-2ee3ad8b]{margin-left:0;margin-right:0}}@media only screen and (max-width:735px){.small-1[data-v-2ee3ad8b]{flex-basis:8.3333333333%;max-width:8.3333333333%}.small-2[data-v-2ee3ad8b]{flex-basis:16.6666666667%;max-width:16.6666666667%}.small-3[data-v-2ee3ad8b]{flex-basis:25%;max-width:25%}.small-4[data-v-2ee3ad8b]{flex-basis:33.3333333333%;max-width:33.3333333333%}.small-5[data-v-2ee3ad8b]{flex-basis:41.6666666667%;max-width:41.6666666667%}.small-6[data-v-2ee3ad8b]{flex-basis:50%;max-width:50%}.small-7[data-v-2ee3ad8b]{flex-basis:58.3333333333%;max-width:58.3333333333%}.small-8[data-v-2ee3ad8b]{flex-basis:66.6666666667%;max-width:66.6666666667%}.small-9[data-v-2ee3ad8b]{flex-basis:75%;max-width:75%}.small-10[data-v-2ee3ad8b]{flex-basis:83.3333333333%;max-width:83.3333333333%}.small-11[data-v-2ee3ad8b]{flex-basis:91.6666666667%;max-width:91.6666666667%}.small-12[data-v-2ee3ad8b]{flex-basis:100%;max-width:100%}.small-centered[data-v-2ee3ad8b]{margin-left:auto;margin-right:auto}.small-uncentered[data-v-2ee3ad8b]{margin-left:0;margin-right:0}}@media only screen and (max-width:320px){.xsmall-1[data-v-2ee3ad8b]{flex-basis:8.3333333333%;max-width:8.3333333333%}.xsmall-2[data-v-2ee3ad8b]{flex-basis:16.6666666667%;max-width:16.6666666667%}.xsmall-3[data-v-2ee3ad8b]{flex-basis:25%;max-width:25%}.xsmall-4[data-v-2ee3ad8b]{flex-basis:33.3333333333%;max-width:33.3333333333%}.xsmall-5[data-v-2ee3ad8b]{flex-basis:41.6666666667%;max-width:41.6666666667%}.xsmall-6[data-v-2ee3ad8b]{flex-basis:50%;max-width:50%}.xsmall-7[data-v-2ee3ad8b]{flex-basis:58.3333333333%;max-width:58.3333333333%}.xsmall-8[data-v-2ee3ad8b]{flex-basis:66.6666666667%;max-width:66.6666666667%}.xsmall-9[data-v-2ee3ad8b]{flex-basis:75%;max-width:75%}.xsmall-10[data-v-2ee3ad8b]{flex-basis:83.3333333333%;max-width:83.3333333333%}.xsmall-11[data-v-2ee3ad8b]{flex-basis:91.6666666667%;max-width:91.6666666667%}.xsmall-12[data-v-2ee3ad8b]{flex-basis:100%;max-width:100%}.xsmall-centered[data-v-2ee3ad8b]{margin-left:auto;margin-right:auto}.xsmall-uncentered[data-v-2ee3ad8b]{margin-left:0;margin-right:0}}.tabnav[data-v-5572fe1d]{margin:0 0 1.4705882353rem 0;display:flex}.tabnav--center[data-v-5572fe1d]{justify-content:center}.tabnav--end[data-v-5572fe1d]{justify-content:flex-end}.tabnav--vertical[data-v-5572fe1d]{flex-flow:column wrap}.tabnav--vertical .tabnav-items[data-v-5572fe1d]{flex-flow:column;overflow:hidden}.tabnav--vertical[data-v-5572fe1d] .tabnav-item{padding-left:0}.tabnav--vertical[data-v-5572fe1d] .tabnav-item .tabnav-link{padding-top:8px}.tabnav-items[data-v-5572fe1d]{display:flex;margin:0;text-align:center}.tabnav-item[data-v-6aa9882a]{border-bottom:1px solid;border-color:var(--colors-tabnav-item-border-color,var(--color-tabnav-item-border-color));display:flex;list-style:none;padding-left:1.7647058824rem;margin:0;outline:none}.tabnav-item[data-v-6aa9882a]:first-child{padding-left:0}.tabnav-item[data-v-6aa9882a]:nth-child(n+1){margin:0}.tabnav-link[data-v-6aa9882a]{color:var(--colors-secondary-label,var(--color-secondary-label));font-size:.8235294118rem;line-height:1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);padding:6px 0;margin-top:4px;margin-bottom:4px;text-align:left;text-decoration:none;display:block;position:relative;z-index:0;width:100%}.tabnav-link[data-v-6aa9882a]:hover{text-decoration:none}.tabnav-link[data-v-6aa9882a]:focus{outline-offset:-1px}.tabnav-link[data-v-6aa9882a]:after{content:"";position:absolute;bottom:-5px;left:0;width:100%;border:1px solid transparent}.tabnav-link.active[data-v-6aa9882a]{color:var(--colors-text,var(--color-text));cursor:default;z-index:10}.tabnav-link.active[data-v-6aa9882a]:after{border-bottom-color:var(--colors-text,var(--color-text))}.controls[data-v-c84e62a6]{margin-top:5px;font-size:14px;display:flex;justify-content:flex-end}.controls a[data-v-c84e62a6]{color:var(--colors-text,var(--color-text));display:flex;align-items:center}.controls .control-icon[data-v-c84e62a6]{width:1.05em;margin-right:.3em}.caption[data-v-869c6f6e]{font-size:.8235294118rem;line-height:1.5;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);margin:0 0 var(--spacing-stacked-margin-large) 0}.caption.trailing[data-v-869c6f6e]{margin:var(--spacing-stacked-margin-large) 0 0 0;text-align:center}caption.trailing[data-v-869c6f6e]{caption-side:bottom}[data-v-869c6f6e] p{display:inline-block}[data-v-bf997940] img{max-width:100%}.table-wrapper[data-v-f3322390]{overflow:auto;-webkit-overflow-scrolling:touch}*+.table-wrapper[data-v-f3322390],.table-wrapper[data-v-f3322390]+*{margin-top:var(--spacing-stacked-margin-xlarge)}table[data-v-f3322390]{border-style:hidden}[data-v-f3322390] th{font-weight:600;word-break:keep-all;-webkit-hyphens:auto;hyphens:auto}[data-v-f3322390] td,[data-v-f3322390] th{border-color:var(--color-fill-gray-tertiary);border-style:solid;border-width:var(--table-border-width,1px 1px);padding:.5882352941rem}[data-v-f3322390] td.left-cell,[data-v-f3322390] th.left-cell{text-align:left}[data-v-f3322390] td.right-cell,[data-v-f3322390] th.right-cell{text-align:right}[data-v-f3322390] td.center-cell,[data-v-f3322390] th.center-cell{text-align:center}s[data-v-7fc51673]:before{content:attr(data-before-text)}s[data-v-7fc51673]:after{content:attr(data-after-text)}s[data-v-7fc51673]:after,s[data-v-7fc51673]:before{position:absolute;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(0 0 99.9% 99.9%);clip-path:inset(0 0 99.9% 99.9%);overflow:hidden;height:1px;width:1px;padding:0;border:0}small[data-v-77035f61]{font-size:.8235294118rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-figure-gray)}.device-frame[data-v-c2eac128]{position:relative;width:var(--frame-width);aspect-ratio:var(--frame-aspect);max-width:100%;margin-left:auto;margin-right:auto;overflow:hidden}*+.device-frame[data-v-c2eac128],.device-frame[data-v-c2eac128]+*{margin-top:40px}.device[data-v-c2eac128]{background-image:var(--device-light-url);background-repeat:no-repeat;background-size:100%;width:100%;height:100%;position:relative;pointer-events:none}@media screen{[data-color-scheme=dark] .device[data-v-c2eac128]{background-image:var(--device-dark-url,var(--device-light-url))}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .device[data-v-c2eac128]{background-image:var(--device-dark-url,var(--device-light-url))}}.no-device .device[data-v-c2eac128]{display:none}.device-screen.with-device[data-v-c2eac128]{position:absolute;left:var(--screen-left);top:var(--screen-top);height:var(--screen-height);width:var(--screen-width);display:flex}.device-screen.with-device>[data-v-c2eac128]{flex:1}.device-screen.with-device[data-v-c2eac128] img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;-o-object-position:top;object-position:top;margin:0}.device-screen.with-device[data-v-c2eac128] video{-o-object-fit:contain;object-fit:contain;-o-object-position:top;object-position:top;width:100%;height:auto}.video-replay-container .control-button[data-v-3fb37a97]{display:flex;align-items:center;justify-content:center;cursor:pointer;margin-top:.5rem;-webkit-tap-highlight-color:rgba(0,0,0,0)}.video-replay-container .control-button svg.control-icon[data-v-3fb37a97]{height:12px;width:12px;margin-left:.3em}[data-v-6ab0b718] img,[data-v-6ab0b718] video{display:block;margin-left:auto;margin-right:auto;-o-object-fit:contain;object-fit:contain;max-width:100%}.asset[data-v-4f18340d]{margin-left:auto;margin-right:auto}*+.asset[data-v-4f18340d],.asset[data-v-4f18340d]+*{margin-top:var(--spacing-stacked-margin-xlarge)}[data-v-4f18340d] video{display:block;margin-left:auto;margin-right:auto;-o-object-fit:contain;object-fit:contain;max-width:100%}.column[data-v-0f654188]{grid-column:span var(--col-span);min-width:0}@media only screen and (max-width:735px){.column[data-v-0f654188]{grid-column:span 1}}.row[data-v-1bcb2d0f]{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;grid-gap:var(--col-gap,20px)}@media only screen and (max-width:735px){.row[data-v-1bcb2d0f]{grid-template-columns:1fr;grid-auto-flow:row}}.row.with-columns[data-v-1bcb2d0f]{--col-count:var(--col-count-large);grid-template-columns:repeat(var(--col-count),1fr);grid-auto-flow:row}@media only screen and (max-width:1250px){.row.with-columns[data-v-1bcb2d0f]{--col-count:var(--col-count-medium,var(--col-count-large))}}@media only screen and (max-width:735px){.row.with-columns[data-v-1bcb2d0f]{--col-count:var(--col-count-small)}}*+.TabNavigator[data-v-e671a734],*+.row[data-v-1bcb2d0f],.TabNavigator[data-v-e671a734]+*,.row[data-v-1bcb2d0f]+*{margin-top:var(--spacing-stacked-margin-xlarge)}.TabNavigator .tabnav[data-v-e671a734]{overflow:auto;white-space:nowrap}.TabNavigator .tabs-content-container[data-v-e671a734]{position:relative;overflow:hidden}.tabs--vertical[data-v-e671a734]{display:flex;flex-flow:row-reverse}@media only screen and (max-width:735px){.tabs--vertical[data-v-e671a734]{flex-flow:column-reverse}}.tabs--vertical .tabnav[data-v-e671a734]{width:30%;flex:0 0 auto;white-space:normal;margin:0}@media only screen and (max-width:735px){.tabs--vertical .tabnav[data-v-e671a734]{width:100%}}.tabs--vertical .tabs-content[data-v-e671a734]{flex:1 1 auto;min-width:0;padding-right:var(--spacing-stacked-margin-xlarge)}@media only screen and (max-width:735px){.tabs--vertical .tabs-content[data-v-e671a734]{padding-right:0;padding-bottom:var(--spacing-stacked-margin-large)}}.fade-enter-active[data-v-e671a734],.fade-leave-active[data-v-e671a734]{transition:opacity .2s ease-in-out}.fade-enter[data-v-e671a734],.fade-leave-to[data-v-e671a734]{opacity:0}.fade-leave-active[data-v-e671a734]{position:absolute;top:0;left:0;right:0}.tasklist[data-v-6a56a858]{--checkbox-width:1rem;--indent-width:calc(var(--checkbox-width)/2);--content-margin:var(--indent-width);list-style-type:none;margin-left:var(--indent-width)}p[data-v-6a56a858]{margin-left:var(--content-margin)}p[data-v-6a56a858]:only-child{--content-margin:calc(var(--checkbox-width) + var(--indent-width))}input[type=checkbox]+p[data-v-6a56a858]{display:inline-block}.pager-control[data-v-58c8390a]{align-items:center;background:var(--control-color-fill,var(--color-fill));border:1px solid var(--control-color-fill,var(--color-grid));border-radius:50%;display:flex;height:var(--control-size,1rem);justify-content:center;opacity:1;transition:opacity .15s ease-in-out;width:var(--control-size,1rem)}.pager-control[disabled][data-v-58c8390a]{opacity:.6}@media only screen and (min-width:1251px){.pager-control[disabled][data-v-58c8390a]{opacity:0}.with-compact-controls .pager-control[disabled][data-v-58c8390a]{opacity:.6}}.icon[data-v-58c8390a]{height:var(--control-icon-size,50%);width:var(--control-icon-size,50%)}.pager-control.next .icon[data-v-58c8390a]{transform:scale(1)}.pager-control.previous .icon[data-v-58c8390a]{transform:scaleX(-1)}.pager[data-v-1ed6aae0]{--control-size:3em;--control-color-fill:var(--color-fill-tertiary);--control-color-figure:currentColor;--indicator-size:0.65em;--indicator-color-fill-active:currentColor;--indicator-color-fill-inactive:var(--color-fill-tertiary);--color-svg-icon:currentColor;--gutter-width:80px}.viewport[data-v-1ed6aae0]{display:flex;overflow-x:auto;scroll-behavior:smooth;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch}.viewport[data-v-1ed6aae0]::-webkit-scrollbar{height:0;width:0}.container[data-v-1ed6aae0]{position:relative}.gutter[data-v-1ed6aae0]{align-items:center;display:flex;justify-content:center;position:absolute;height:100%;top:0;width:var(--gutter-width);z-index:42}.with-compact-controls .gutter[data-v-1ed6aae0]{display:none}.gutter.left[data-v-1ed6aae0]{left:calc(var(--gutter-width)*-1)}.gutter.right[data-v-1ed6aae0]{right:calc(var(--gutter-width)*-1)}.page[data-v-1ed6aae0]{flex-shrink:0;margin-right:var(--gutter-width);position:relative;scroll-snap-align:start;transform:scale(1);transform-origin:center center;transition:transform .5s ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}@media(prefers-reduced-motion){.page[data-v-1ed6aae0]{transition:none}}.page.active[data-v-1ed6aae0]{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.gutter .pager-control[data-v-1ed6aae0]{margin-top:calc(var(--control-size)*-1)}.indicators[data-v-1ed6aae0]{display:flex;flex-wrap:wrap;gap:1em;justify-content:center;margin-top:1rem}.with-compact-controls .indicators[data-v-1ed6aae0]{display:none}.indicator[data-v-1ed6aae0]{background:var(--indicator-color-fill-inactive);border:1px solid var(--indicator-color-fill-inactive);border-radius:50%;color:currentColor;display:block;flex:0 0 auto;height:var(--indicator-size);width:var(--indicator-size)}.indicator.active[data-v-1ed6aae0]{background:var(--indicator-color-fill-active);border-color:var(--indicator-color-fill-active)}.compact-controls[data-v-1ed6aae0]{display:none;gap:1em;justify-content:flex-end}.with-compact-controls .compact-controls[data-v-1ed6aae0]{display:flex}.button-cta[data-v-c9c81868]{background:var(--colors-button-light-background,var(--color-button-background));border-color:var(--color-button-border,currentcolor);border-radius:var(--button-border-radius,var(--border-radius,4px));border-style:var(--button-border-style,none);border-width:var(--button-border-width,medium);color:var(--colors-button-text,var(--color-button-text));cursor:pointer;min-width:1.7647058824rem;padding:.2352941176rem .8823529412rem;text-align:center;white-space:nowrap;display:inline-block;font-size:1rem;line-height:1.4705882353;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.button-cta[data-v-c9c81868]:active{background:var(--colors-button-light-backgroundActive,var(--color-button-background-active));outline:none}.button-cta[data-v-c9c81868]:hover:not([disabled]){background:var(--colors-button-light-backgroundHover,var(--color-button-background-hover));text-decoration:none}.button-cta[data-v-c9c81868]:disabled{opacity:.32;cursor:default}.fromkeyboard .button-cta[data-v-c9c81868]:focus{box-shadow:0 0 0 4px var(--color-focus-color);outline:none}.button-cta.is-dark[data-v-c9c81868]{background:var(--colors-button-dark-background,#06f)}.button-cta.is-dark[data-v-c9c81868]:active{background:var(--colors-button-dark-backgroundActive,var(--color-button-background-active))}.button-cta.is-dark[data-v-c9c81868]:hover:not([disabled]){background:var(--colors-button-dark-backgroundHover,var(--color-button-background-hover))}.card-cover-wrap.rounded[data-v-28b14a83]{border-radius:var(--border-radius,4px);overflow:hidden}.card-cover[data-v-28b14a83]{background-color:var(--color-card-background);display:block;height:var(--card-cover-height,180px)}.card-cover.fallback[data-v-28b14a83],.card-cover[data-v-28b14a83] img{width:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;display:block;margin:0}.card-cover[data-v-28b14a83] img{height:100%}.card[data-v-0f7a4f31]{--margin-link:17px;overflow:hidden;display:flex;flex-direction:column;transition:box-shadow,transform .16s ease-out;will-change:box-shadow,transform;backface-visibility:hidden;border-radius:var(--border-radius,4px)}.card.large[data-v-0f7a4f31]{--margin-link:25.5px}.card.large.floating-style[data-v-0f7a4f31]{--margin-link:var(--spacing-stacked-margin-large)}.card[data-v-0f7a4f31]:hover{text-decoration:none}.card:hover .link[data-v-0f7a4f31]{text-decoration:underline}.card[data-v-0f7a4f31]:hover{transform:scale(1.007)}@media(prefers-reduced-motion:reduce){.card[data-v-0f7a4f31]:hover{transform:none}}.card.small[data-v-0f7a4f31]{--card-cover-height:235px}@media only screen and (max-width:1250px){.card.small[data-v-0f7a4f31]{--card-cover-height:163px}}.card.large[data-v-0f7a4f31]{--card-cover-height:359px}@media only screen and (max-width:1250px){.card.large[data-v-0f7a4f31]{--card-cover-height:249px}}.card.floating-style[data-v-0f7a4f31]{--color-card-shadow:transparent}.details[data-v-0f7a4f31]{flex-grow:1;display:flex;flex-direction:column;background-color:var(--color-card-background);padding:17px;position:relative;font-size:.8235294118rem;line-height:1.2857142857}.details[data-v-0f7a4f31],.large .details[data-v-0f7a4f31]{font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.large .details[data-v-0f7a4f31]{font-size:1rem;line-height:1.4705882353}@media only screen and (max-width:1250px){.large .details[data-v-0f7a4f31]{font-size:.8235294118rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.floating-style .details[data-v-0f7a4f31]{--color-card-background:transparent;padding:17px 0}.eyebrow[data-v-0f7a4f31]{color:var(--color-card-eyebrow);display:block;margin-bottom:4px;font-size:.8235294118rem;line-height:1.2857142857}.eyebrow[data-v-0f7a4f31],.large .eyebrow[data-v-0f7a4f31]{font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.large .eyebrow[data-v-0f7a4f31]{font-size:1rem;line-height:1.2352941176}@media only screen and (max-width:1250px){.large .eyebrow[data-v-0f7a4f31]{font-size:.8235294118rem;line-height:1.2857142857;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.title[data-v-0f7a4f31]{color:var(--color-card-content-text);font-size:1rem;line-height:1.2352941176;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){.title[data-v-0f7a4f31]{font-size:.8235294118rem;line-height:1.2857142857;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){.title[data-v-0f7a4f31]{font-size:1rem;line-height:1.2352941176;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.large .title[data-v-0f7a4f31]{font-size:1.2352941176rem;line-height:1.1904761905;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){.large .title[data-v-0f7a4f31]{font-size:1rem;line-height:1.2352941176;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.card-content[data-v-0f7a4f31]{flex-grow:1;color:var(--color-card-content-text);margin-top:4px}.link[data-v-0f7a4f31]{margin-top:var(--margin-link);display:flex;align-items:center}.link .link-icon[data-v-0f7a4f31]{height:.6em;width:.6em;margin-left:.3em}@media only screen and (max-width:735px){.card[data-v-0f7a4f31]{margin-left:auto;margin-right:auto}.card+.card[data-v-0f7a4f31]{margin-bottom:20px;margin-top:20px}.card.large[data-v-0f7a4f31],.card.small[data-v-0f7a4f31]{min-width:280px;--card-cover-height:227px}.card.large .link[data-v-0f7a4f31],.card.small .link[data-v-0f7a4f31]{margin-top:7px;position:relative}}.TopicTypeIcon[data-v-3b1b4787]{width:1em;height:1em;flex:0 0 auto;color:var(--icon-color,var(--color-figure-gray-secondary))}.TopicTypeIcon[data-v-3b1b4787] picture{flex:1}.TopicTypeIcon svg[data-v-3b1b4787],.TopicTypeIcon[data-v-3b1b4787] img{display:block;width:100%;height:100%}.nav-menu-items[data-v-a101abb4]{display:flex;justify-content:flex-end}.nav--in-breakpoint-range .nav-menu-items[data-v-a101abb4]{display:block;opacity:0;padding:1rem 1.8823529412rem 1.6470588235rem 1.8823529412rem;transform:translate3d(0,-50px,0);transition:transform 1s cubic-bezier(.07,1.06,.27,.95) .5s,opacity .7s cubic-bezier(.07,1.06,.27,.95) .2s}.nav--is-open.nav--in-breakpoint-range .nav-menu-items[data-v-a101abb4]{opacity:1;transform:translateZ(0);transition-delay:.2s,.4s}.nav--in-breakpoint-range .nav-menu-items[data-v-a101abb4]:not(:only-child):not(:last-child){padding-bottom:0}.nav--in-breakpoint-range .nav-menu-items[data-v-a101abb4]:not(:only-child):last-child{padding-top:0}.reference-card-grid-item[data-v-87dd3302]{--card-cover-height:auto}.reference-card-grid-item.card.large[data-v-87dd3302]{--card-cover-height:auto;min-width:0;max-width:none}.reference-card-grid-item[data-v-87dd3302] .card-cover{aspect-ratio:16/9}.reference-card-grid-item[data-v-87dd3302] .card-cover-wrap{border:1px solid var(--color-link-block-card-border)}.reference-card-grid-item__image[data-v-87dd3302]{display:flex;align-items:center;justify-content:center;font-size:80px;background-color:var(--color-fill-gray-quaternary)}.reference-card-grid-item__icon[data-v-87dd3302]{margin:0;display:flex;justify-content:center}.reference-card-grid-item__icon[data-v-87dd3302] .icon-inline{flex:1 1 auto}*+.links-block[data-v-b1a75c1c],.links-block[data-v-b1a75c1c]+*{margin-top:var(--spacing-stacked-margin-xlarge)}.topic-link-block[data-v-b1a75c1c]{margin-top:15px}.nav[data-v-40ae4336]{position:sticky;top:0;width:100%;height:3.0588235294rem;z-index:9997;--nav-padding:1.2941176471rem;color:var(--color-nav-color)}@media print{.nav[data-v-40ae4336]{position:relative}}@media only screen and (max-width:767px){.nav[data-v-40ae4336]{--nav-padding:0.9411764706rem;min-width:320px;height:2.8235294118rem}}.theme-dark.nav[data-v-40ae4336]{background:none;color:var(--color-nav-dark-color)}.nav__wrapper[data-v-40ae4336]{position:absolute;top:0;left:0;width:100%;height:auto;min-height:100%;z-index:1}.nav__background[data-v-40ae4336]{position:absolute;left:0;top:0;width:100%;height:100%;z-index:1;transition:background-color 0s ease-in;background-color:var(--color-nav-background,none)}.nav__background[data-v-40ae4336]:after{background-color:var(--color-nav-keyline)}.nav--is-sticking.nav__background[data-v-40ae4336]{background-color:none}.nav--no-bg-transition .nav__background[data-v-40ae4336]{transition:none!important}.nav--solid-background .nav__background[data-v-40ae4336]{background-color:var(--color-nav-solid-background);-webkit-backdrop-filter:none;backdrop-filter:none}.nav--is-open.nav--solid-background .nav__background[data-v-40ae4336],.nav--is-sticking.nav--solid-background .nav__background[data-v-40ae4336]{background-color:var(--color-nav-solid-background)}.nav--is-open.theme-dark.nav--solid-background .nav__background[data-v-40ae4336],.nav--is-sticking.theme-dark.nav--solid-background .nav__background[data-v-40ae4336],.theme-dark.nav--solid-background .nav__background[data-v-40ae4336]{background-color:var(--color-nav-dark-solid-background)}.nav--in-breakpoint-range .nav__background[data-v-40ae4336]{min-height:2.8235294118rem;transition:background-color 0s ease .7s}.nav--is-sticking .nav__background[data-v-40ae4336]{background-color:var(--color-nav-expanded);max-height:none;transition:background-color 0s ease;transition-property:background-color,-webkit-backdrop-filter;transition-property:background-color,backdrop-filter;transition-property:background-color,backdrop-filter,-webkit-backdrop-filter}.nav--is-sticking .nav__background[data-v-40ae4336]:after{background-color:var(--color-nav-sticking-expanded-keyline)}@supports((-webkit-backdrop-filter:initial) or (backdrop-filter:initial)){.nav--is-sticking .nav__background[data-v-40ae4336]{-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);background-color:var(--color-nav-uiblur-stuck)}}.theme-dark.nav--is-sticking .nav__background[data-v-40ae4336]{background-color:var(--color-nav-dark-stuck)}@supports((-webkit-backdrop-filter:initial) or (backdrop-filter:initial)){.theme-dark.nav--is-sticking .nav__background[data-v-40ae4336]{background-color:var(--color-nav-dark-uiblur-stuck)}}.nav--is-open .nav__background[data-v-40ae4336]{background-color:var(--color-nav-expanded);max-height:none;transition:background-color 0s ease;transition-property:background-color,-webkit-backdrop-filter;transition-property:background-color,backdrop-filter;transition-property:background-color,backdrop-filter,-webkit-backdrop-filter}.nav--is-open .nav__background[data-v-40ae4336]:after{background-color:var(--color-nav-sticking-expanded-keyline)}@supports((-webkit-backdrop-filter:initial) or (backdrop-filter:initial)){.nav--is-open .nav__background[data-v-40ae4336]{-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);background-color:var(--color-nav-uiblur-expanded)}}.theme-dark.nav--is-open .nav__background[data-v-40ae4336]{background-color:var(--color-nav-dark-expanded)}@supports((-webkit-backdrop-filter:initial) or (backdrop-filter:initial)){.theme-dark.nav--is-open .nav__background[data-v-40ae4336]{background-color:var(--color-nav-dark-uiblur-expanded)}}.theme-dark .nav__background[data-v-40ae4336]:after{background-color:var(--color-nav-dark-keyline)}.nav--is-open.theme-dark .nav__background[data-v-40ae4336]:after,.nav--is-sticking.theme-dark .nav__background[data-v-40ae4336]:after{background-color:var(--color-nav-dark-sticking-expanded-keyline)}.nav__background[data-v-40ae4336]:after{content:"";display:block;position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:980px;height:1px;z-index:1}@media only screen and (max-width:1023px){.nav__background[data-v-40ae4336]:after{width:100%}}.nav--noborder .nav__background[data-v-40ae4336]:after{display:none}.nav--is-sticking.nav--noborder .nav__background[data-v-40ae4336]:after{display:block}.nav--fullwidth-border .nav__background[data-v-40ae4336]:after,.nav--is-open .nav__background[data-v-40ae4336]:after,.nav--is-sticking .nav__background[data-v-40ae4336]:after,.nav--solid-background .nav__background[data-v-40ae4336]:after{width:100%}.nav-overlay[data-v-40ae4336]{position:fixed;left:0;right:0;top:0;display:block;opacity:0}.nav--is-open .nav-overlay[data-v-40ae4336]{background-color:rgba(51,51,51,.4);transition:opacity .7s cubic-bezier(.07,1.06,.27,.95) .2s;bottom:0;opacity:1}.nav-wrapper[data-v-40ae4336]{position:absolute;top:0;left:0;width:100%;height:auto;min-height:100%;z-index:1}.pre-title[data-v-40ae4336]{display:flex}.nav-content[data-v-40ae4336]{display:flex;padding:0 var(--nav-padding);max-width:980px;margin:0 auto;position:relative;z-index:2;justify-content:space-between}.nav--is-wide-format .nav-content[data-v-40ae4336]{box-sizing:border-box;max-width:1920px;margin-left:auto;margin-right:auto}@supports(padding:calc(max(0px))){.nav-content[data-v-40ae4336]{padding-left:max(var(--nav-padding),env(safe-area-inset-left));padding-right:max(var(--nav-padding),env(safe-area-inset-right))}}.nav--in-breakpoint-range .nav-content[data-v-40ae4336]{display:grid;grid-template-columns:auto 1fr auto;grid-auto-rows:minmax(min-content,max-content);grid-template-areas:"pre-title title actions" "menu menu menu"}.nav-menu[data-v-40ae4336]{font-size:.7058823529rem;line-height:1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);flex:1 1 auto;display:flex;justify-content:flex-end;min-width:0}@media only screen and (max-width:767px){.nav-menu[data-v-40ae4336]{font-size:.8235294118rem;line-height:1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.nav--in-breakpoint-range .nav-menu[data-v-40ae4336]{font-size:.8235294118rem;line-height:1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);grid-area:menu}.nav-menu-tray[data-v-40ae4336]{align-items:center;display:flex;justify-content:space-between}.nav--in-breakpoint-range .nav-menu-tray[data-v-40ae4336]{display:block;overflow:hidden;pointer-events:none;visibility:hidden;max-height:0;transition:max-height .4s ease-in 0s,visibility 0s linear 1s;width:100%}.nav--is-open.nav--in-breakpoint-range .nav-menu-tray[data-v-40ae4336]{max-height:calc(100vh - 5.64706rem);overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:auto;visibility:visible;transition-delay:.2s,0s}.nav--is-transitioning.nav--is-open.nav--in-breakpoint-range .nav-menu-tray[data-v-40ae4336]{overflow-y:hidden}.nav--is-sticking.nav--is-open.nav--in-breakpoint-range .nav-menu-tray[data-v-40ae4336]{max-height:calc(100vh - 2.82353rem)}.nav-actions[data-v-40ae4336]{display:flex;align-items:center}.nav--in-breakpoint-range .nav-actions[data-v-40ae4336]{grid-area:actions;justify-content:flex-end}.nav--in-breakpoint-range .pre-title+.nav-title[data-v-40ae4336]{grid-area:title}.nav--is-wide-format.nav--in-breakpoint-range .pre-title+.nav-title[data-v-40ae4336]{width:100%}.nav-title[data-v-40ae4336]{height:3.0588235294rem;font-size:1.1176470588rem;line-height:1.4210526316;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);display:flex;align-items:center;white-space:nowrap;box-sizing:border-box}@media only screen and (max-width:767px){.nav-title[data-v-40ae4336]{padding-top:0;height:2.8235294118rem;width:90%}}.nav-title[data-v-40ae4336] span{line-height:normal}.nav-title a[data-v-40ae4336]{letter-spacing:inherit;line-height:normal;margin:0;text-decoration:none;white-space:nowrap}.nav-title a[data-v-40ae4336]:hover{text-decoration:none}@media only screen and (max-width:767px){.nav-title a[data-v-40ae4336]{display:flex}}.nav-title a[data-v-40ae4336],.nav-title[data-v-40ae4336]{color:var(--color-figure-gray);transition:color 0s ease-in}.nav--is-open.theme-dark .nav-title a[data-v-40ae4336],.nav--is-open.theme-dark .nav-title[data-v-40ae4336],.nav--is-sticking.theme-dark .nav-title a[data-v-40ae4336],.nav--is-sticking.theme-dark .nav-title[data-v-40ae4336],.theme-dark .nav-title a[data-v-40ae4336],.theme-dark .nav-title[data-v-40ae4336]{color:var(--color-nav-dark-link-color)}.nav-ax-toggle[data-v-40ae4336]{display:none;position:absolute;top:0;left:0;width:1px;height:1px;z-index:10}.nav-ax-toggle[data-v-40ae4336]:focus{outline-offset:-6px;width:100%;height:100%}.nav--in-breakpoint-range .nav-ax-toggle[data-v-40ae4336]{display:block}.nav-menucta[data-v-40ae4336]{cursor:pointer;display:none;align-items:center;overflow:hidden;width:1.1764705882rem;-webkit-tap-highlight-color:rgba(0,0,0,0);height:2.8235294118rem}.nav--in-breakpoint-range .nav-menucta[data-v-40ae4336]{display:flex}.nav-menucta-chevron[data-v-40ae4336]{display:block;position:relative;width:100%;height:.7058823529rem;transition:transform .3s linear}.nav-menucta-chevron[data-v-40ae4336]:after,.nav-menucta-chevron[data-v-40ae4336]:before{content:"";display:block;position:absolute;top:.5882352941rem;width:.7058823529rem;height:.0588235294rem;transition:transform .3s linear;background:var(--color-figure-gray)}.nav-menucta-chevron[data-v-40ae4336]:before{right:50%;border-radius:.5px 0 0 .5px}.nav-menucta-chevron[data-v-40ae4336]:after{left:50%;border-radius:0 .5px .5px 0}.nav-menucta-chevron[data-v-40ae4336]:before{transform-origin:100% 100%;transform:rotate(40deg) scaleY(1.5)}.nav-menucta-chevron[data-v-40ae4336]:after{transform-origin:0 100%;transform:rotate(-40deg) scaleY(1.5)}.nav--is-open .nav-menucta-chevron[data-v-40ae4336]{transform:scaleY(-1)}.theme-dark .nav-menucta-chevron[data-v-40ae4336]:after,.theme-dark .nav-menucta-chevron[data-v-40ae4336]:before{background:var(--color-nav-dark-link-color)}[data-v-40ae4336] .nav-menu-link{color:var(--color-nav-link-color)}[data-v-40ae4336] .nav-menu-link:hover{color:var(--color-nav-link-color-hover);text-decoration:none}.theme-dark[data-v-40ae4336] .nav-menu-link{color:var(--color-nav-dark-link-color)}.theme-dark[data-v-40ae4336] .nav-menu-link:hover{color:var(--color-nav-dark-link-color-hover)}[data-v-40ae4336] .nav-menu-link.current{color:var(--color-nav-current-link);cursor:default}[data-v-40ae4336] .nav-menu-link.current:hover{color:var(--color-nav-current-link)}.theme-dark[data-v-40ae4336] .nav-menu-link.current,.theme-dark[data-v-40ae4336] .nav-menu-link.current:hover{color:var(--color-nav-dark-current-link)}.nav-menu-item[data-v-296e4e0c]{margin-left:1.4117647059rem;list-style:none;min-width:0}.nav--in-breakpoint-range .nav-menu-item[data-v-296e4e0c]{margin-left:0;width:100%;min-height:2.4705882353rem}.nav--in-breakpoint-range .nav-menu-item[data-v-296e4e0c]:first-child .nav-menu-link{border-top:0}.nav--in-breakpoint-range .nav-menu-item--animated[data-v-296e4e0c]{opacity:0;transform:none;transition:.5s ease;transition-property:transform,opacity}.nav--is-open.nav--in-breakpoint-range .nav-menu-item--animated[data-v-296e4e0c]{opacity:1;transform:translateZ(0);transition-delay:0s}.thematic-break[data-v-62d2922a]{border-top-color:var(--color-grid,currentColor);border-top-style:solid;border-width:1px 0 0 0}*+.thematic-break[data-v-62d2922a],.thematic-break[data-v-62d2922a]+*{margin-top:var(--spacing-stacked-margin-xlarge)} \ No newline at end of file diff --git a/docs/css/989.4f123103.css b/docs/css/989.4f123103.css new file mode 100644 index 00000000..cced45bf --- /dev/null +++ b/docs/css/989.4f123103.css @@ -0,0 +1,9 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */.badge[data-v-04624022]{--badge-color:var(--color-badge-default);--badge-dark-color:var(--color-badge-dark-default);font-size:.7058823529rem;line-height:1.3333333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);display:inline-block;padding:2px 4px;white-space:nowrap;border-radius:var(--badge-border-radius,1px);border-style:var(--badge-border-style,none);border-width:var(--badge-border-width,1px);margin:auto;margin-left:5px;color:var(--colors-badge-text,var(--color-badge-text));background-color:var(--badge-color)}@media screen{[data-color-scheme=dark] .badge[data-v-04624022]{background-color:var(--badge-dark-color)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .badge[data-v-04624022]{background-color:var(--badge-dark-color)}}.badge-deprecated[data-v-04624022]{--badge-color:var(--color-badge-deprecated);--badge-dark-color:var(--color-badge-dark-deprecated)}.badge-beta[data-v-04624022]{--badge-color:var(--color-badge-beta);--badge-dark-color:var(--color-badge-dark-beta)}[data-v-3a32ffd0] .code-listing{background:var(--background,var(--color-code-background));color:var(--text,var(--color-code-plain));border-color:var(--colors-grid,var(--color-grid));border-width:var(--code-border-width,1px);border-style:var(--code-border-style,solid)}[data-v-3a32ffd0] .code-listing pre{padding:var(--code-block-style-elements-padding)}[data-v-3a32ffd0] .code-listing pre>code{font-size:.8823529412rem;line-height:1.6666666667;font-weight:400;font-family:var(--typography-html-font-mono,Menlo,monospace)}[data-v-3a32ffd0] *+.code-listing,[data-v-3a32ffd0] *+.endpoint-example,[data-v-3a32ffd0] *+.inline-image-container,[data-v-3a32ffd0] *+aside,[data-v-3a32ffd0] *+figure,[data-v-3a32ffd0] .code-listing+*,[data-v-3a32ffd0] .endpoint-example+*,[data-v-3a32ffd0] .inline-image-container+*,[data-v-3a32ffd0] aside+*,[data-v-3a32ffd0] figure+*{margin-top:var(--spacing-stacked-margin-xlarge)}[data-v-3a32ffd0] *+dl,[data-v-3a32ffd0] dl+*{margin-top:var(--spacing-stacked-margin-large)}[data-v-3a32ffd0] img{display:block;margin:auto;max-width:100%}[data-v-3a32ffd0] ol,[data-v-3a32ffd0] ol li:not(:first-child),[data-v-3a32ffd0] ul,[data-v-3a32ffd0] ul li:not(:first-child){margin-top:var(--spacing-stacked-margin-large)}@media only screen and (max-width:735px){[data-v-3a32ffd0] ol,[data-v-3a32ffd0] ul{margin-left:1.25rem}}[data-v-3a32ffd0] dt:not(:first-child){margin-top:var(--spacing-stacked-margin-large)}[data-v-3a32ffd0] dd{margin-left:2em}.topic-icon-wrapper[data-v-55f9d05d]{display:flex;align-items:center;justify-content:center;height:1.4705882353rem;flex:0 0 1.294rem;width:1.294rem;margin-right:1rem}.topic-icon[data-v-55f9d05d]{height:.8823529412rem;transform:scale(1);-webkit-transform:scale(1);overflow:visible}.topic-icon[data-v-55f9d05d] img{margin:0;display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.topic-icon.curly-brackets-icon[data-v-55f9d05d]{height:1rem}.token-method[data-v-295ad0ff]{font-weight:700}.token-keyword[data-v-295ad0ff]{color:var(--syntax-keyword,var(--color-syntax-keywords))}.token-number[data-v-295ad0ff]{color:var(--syntax-number,var(--color-syntax-numbers))}.token-string[data-v-295ad0ff]{color:var(--syntax-string,var(--color-syntax-strings))}.attribute-link[data-v-295ad0ff],.token-attribute[data-v-295ad0ff]{color:var(--syntax-attribute,var(--color-syntax-keywords))}.token-internalParam[data-v-295ad0ff]{color:var(--color-syntax-param-internal-name)}.type-identifier-link[data-v-295ad0ff]{color:var(--syntax-type,var(--color-syntax-other-type-names))}.token-removed[data-v-295ad0ff]{background-color:var(--color-highlight-red)}.token-added[data-v-295ad0ff]{background-color:var(--color-highlight-green)}.decorator[data-v-17c84f82],.label[data-v-17c84f82]{color:var(--colors-secondary-label,var(--color-secondary-label))}.label[data-v-17c84f82]{font-size:1rem;line-height:1.4705882353;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.empty-token[data-v-17c84f82]{font-size:0}.empty-token[data-v-17c84f82]:after{content:" ";font-size:1rem}.abstract[data-v-0d9c6bcc],.link-block[data-v-0d9c6bcc] .badge{margin-left:2.294rem}.link-block .badge+.badge[data-v-0d9c6bcc]{margin-left:1rem}.link[data-v-0d9c6bcc]{display:flex}.link-block .badge[data-v-0d9c6bcc]{margin-top:.5rem}.link-block.has-inline-element[data-v-0d9c6bcc]{display:flex;align-items:flex-start;flex-flow:row wrap}.link-block.has-inline-element .badge[data-v-0d9c6bcc]{margin-left:1rem;margin-top:0}.link-block .has-adjacent-elements[data-v-0d9c6bcc]{padding-top:5px;padding-bottom:5px;display:inline-flex}.link-block[data-v-0d9c6bcc],.link[data-v-0d9c6bcc]{box-sizing:inherit}.link-block.changed[data-v-0d9c6bcc],.link.changed[data-v-0d9c6bcc]{padding-right:1rem;padding-left:2.1764705882rem;padding-top:8px;padding-bottom:8px;display:inline-flex;width:100%;box-sizing:border-box}.link-block.changed.changed[data-v-0d9c6bcc],.link.changed.changed[data-v-0d9c6bcc]{padding-right:1rem}@media only screen and (max-width:735px){.link-block.changed[data-v-0d9c6bcc],.link.changed[data-v-0d9c6bcc]{padding-left:0;padding-right:0}.link-block.changed.changed[data-v-0d9c6bcc],.link.changed.changed[data-v-0d9c6bcc]{padding-right:17px;padding-left:2.1764705882rem}.link-block.changed[data-v-0d9c6bcc],.link.changed[data-v-0d9c6bcc]{padding-left:0;padding-right:0}}.abstract .topic-required[data-v-0d9c6bcc]:not(:first-child){margin-top:4px}.topic-required[data-v-0d9c6bcc]{font-size:.8em}.deprecated[data-v-0d9c6bcc]{text-decoration:line-through} \ No newline at end of file diff --git a/docs/css/documentation-topic.6413c07b.css b/docs/css/documentation-topic.6413c07b.css new file mode 100644 index 00000000..2a7d6938 --- /dev/null +++ b/docs/css/documentation-topic.6413c07b.css @@ -0,0 +1,9 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */.betainfo[data-v-ba3b3cc0]{font-size:.9411764706rem;padding:3rem 0;background-color:var(--color-fill-secondary)}.full-width-container .betainfo-container[data-v-ba3b3cc0]{max-width:820px;margin-left:auto;margin-right:auto;padding-left:80px;padding-right:80px;box-sizing:border-box}@media print{.full-width-container .betainfo-container[data-v-ba3b3cc0]{padding-left:20px;padding-right:20px;max-width:none}}@media only screen and (min-width:1251px){.full-width-container .betainfo-container[data-v-ba3b3cc0]{max-width:980px}}@media only screen and (min-width:1500px){.full-width-container .betainfo-container[data-v-ba3b3cc0]{max-width:1080px}}@media only screen and (max-width:735px){.full-width-container .betainfo-container[data-v-ba3b3cc0]{width:auto;padding-left:20px;padding-right:20px}}.static-width-container .betainfo-container[data-v-ba3b3cc0]{margin-left:auto;margin-right:auto;width:1536px;width:980px}@media only screen and (max-width:1250px){.static-width-container .betainfo-container[data-v-ba3b3cc0]{width:692px}}@media only screen and (max-width:735px){.static-width-container .betainfo-container[data-v-ba3b3cc0]{width:87.5%}}@media only screen and (max-width:320px){.static-width-container .betainfo-container[data-v-ba3b3cc0]{width:215px}}.betainfo-label[data-v-ba3b3cc0]{font-weight:600;font-size:.9411764706rem}.betainfo-content[data-v-ba3b3cc0] p{margin-bottom:10px}a[data-v-2ca5e993]{text-decoration:underline;color:inherit;font-weight:600}.summary-section[data-v-3aa6f694]:last-of-type{margin-right:0}@media only screen and (max-width:735px){.summary-section[data-v-3aa6f694]{margin-right:0}}.title[data-v-246c819c]{color:var(--colors-text,var(--color-text));font-size:.8235294118rem;margin-right:.5rem;text-rendering:optimizeLegibility}.language[data-v-0e39c0ba]{padding-bottom:10px;justify-content:flex-end}.language-list[data-v-0e39c0ba],.language[data-v-0e39c0ba]{font-size:.8235294118rem;line-height:1.4285714286;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);margin-top:0;display:flex;align-items:center}.language-option.swift[data-v-0e39c0ba]{padding-right:10px;border-right:1px solid var(--colors-secondary-label,var(--color-secondary-label))}.language-option.objc[data-v-0e39c0ba]{padding-left:10px}.view-more-link[data-v-3f54e653]{font-size:.8235294118rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);display:flex;flex-flow:row-reverse;margin-bottom:1.3rem}.documentation-hero[data-v-283b44ff]{color:var(--color-documentation-intro-figure,var(--color-figure-gray));overflow:hidden;text-align:left;position:relative;padding-right:var(--doc-hero-right-offset)}.documentation-hero[data-v-283b44ff]:before{content:"";background:var(--standard-accent-color,var(--color-documentation-intro-fill,var(--color-fill-tertiary)));position:absolute;width:100%;height:100%}.documentation-hero[data-v-283b44ff]:after{background:transparent;opacity:.85;width:100%;position:absolute;content:"";height:100%;left:0;top:0}@media screen{[data-color-scheme=dark] .documentation-hero[data-v-283b44ff]:after{opacity:.55}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .documentation-hero[data-v-283b44ff]:after{opacity:.55}}.documentation-hero .icon[data-v-283b44ff]{position:absolute;margin-top:10px;margin-right:25px;right:0;width:250px;height:calc(100% - 20px);box-sizing:border-box}@media only screen and (max-width:735px){.documentation-hero .icon[data-v-283b44ff]{display:none}}.documentation-hero .background-icon[data-v-283b44ff]{color:var(--color-documentation-intro-accent,var(--color-figure-gray-secondary));display:block;width:250px;height:auto;opacity:.15;mix-blend-mode:normal;position:absolute;top:50%;left:0;transform:translateY(-50%);max-height:100%}.documentation-hero .background-icon[data-v-283b44ff] img,.documentation-hero .background-icon[data-v-283b44ff] svg{width:100%;height:100%}@media screen{[data-color-scheme=dark] .documentation-hero .background-icon[data-v-283b44ff]{mix-blend-mode:normal;opacity:.15}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .documentation-hero .background-icon[data-v-283b44ff]{mix-blend-mode:normal;opacity:.15}}.documentation-hero__content[data-v-283b44ff]:not(.minimized-hero){padding-top:2.3529411765rem;padding-bottom:2.3529411765rem;position:relative;z-index:1}.full-width-container .documentation-hero__content[data-v-283b44ff]:not(.minimized-hero){max-width:820px;margin-left:auto;margin-right:auto;padding-left:80px;padding-right:80px;box-sizing:border-box}@media print{.full-width-container .documentation-hero__content[data-v-283b44ff]:not(.minimized-hero){padding-left:20px;padding-right:20px;max-width:none}}@media only screen and (min-width:1251px){.full-width-container .documentation-hero__content[data-v-283b44ff]:not(.minimized-hero){max-width:980px}}@media only screen and (min-width:1500px){.full-width-container .documentation-hero__content[data-v-283b44ff]:not(.minimized-hero){max-width:1080px}}@media only screen and (max-width:735px){.full-width-container .documentation-hero__content[data-v-283b44ff]:not(.minimized-hero){width:auto;padding-left:20px;padding-right:20px}}.static-width-container .documentation-hero__content[data-v-283b44ff]:not(.minimized-hero){margin-left:auto;margin-right:auto;width:1536px;width:980px}@media only screen and (max-width:1250px){.static-width-container .documentation-hero__content[data-v-283b44ff]:not(.minimized-hero){width:692px}}@media only screen and (max-width:735px){.static-width-container .documentation-hero__content[data-v-283b44ff]:not(.minimized-hero){width:87.5%}}@media only screen and (max-width:320px){.static-width-container .documentation-hero__content[data-v-283b44ff]:not(.minimized-hero){width:215px}}.documentation-hero .minimized-hero[data-v-283b44ff]{padding:1.3em 1.4em;position:relative;z-index:1}.documentation-hero__above-content[data-v-283b44ff]{position:relative;z-index:1}.documentation-hero--disabled[data-v-283b44ff]{background:none;color:var(--colors-text,var(--color-text))}.documentation-hero--disabled[data-v-283b44ff]:after,.documentation-hero--disabled[data-v-283b44ff]:before{content:none}.short-hero[data-v-283b44ff]{padding-top:3.5294117647rem;padding-bottom:3.5294117647rem}.extra-bottom-padding[data-v-283b44ff]{padding-bottom:3.8235294118rem}ul[data-v-068842ec]{list-style-type:none;margin:0}ul li:first-child .base-link[data-v-068842ec]{margin-top:0}.parent-item .base-link[data-v-068842ec]{font-weight:700}.base-link[data-v-068842ec]{color:var(--color-figure-gray-secondary);font-size:.8235294118rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);display:inline-block;margin:5px 0;transition:color .15s ease-in;max-width:100%}.active .base-link[data-v-068842ec]{color:var(--color-text)}[data-v-3a32ffd0] .code-listing{background:var(--background,var(--color-code-background));color:var(--text,var(--color-code-plain));border-color:var(--colors-grid,var(--color-grid));border-width:var(--code-border-width,1px);border-style:var(--code-border-style,solid)}[data-v-3a32ffd0] .code-listing pre{padding:var(--code-block-style-elements-padding)}[data-v-3a32ffd0] .code-listing pre>code{font-size:.8823529412rem;line-height:1.6666666667;font-weight:400;font-family:var(--typography-html-font-mono,Menlo,monospace)}[data-v-3a32ffd0] *+.code-listing,[data-v-3a32ffd0] *+.endpoint-example,[data-v-3a32ffd0] *+.inline-image-container,[data-v-3a32ffd0] *+aside,[data-v-3a32ffd0] *+figure,[data-v-3a32ffd0] .code-listing+*,[data-v-3a32ffd0] .endpoint-example+*,[data-v-3a32ffd0] .inline-image-container+*,[data-v-3a32ffd0] aside+*,[data-v-3a32ffd0] figure+*{margin-top:var(--spacing-stacked-margin-xlarge)}[data-v-3a32ffd0] *+dl,[data-v-3a32ffd0] dl+*{margin-top:var(--spacing-stacked-margin-large)}[data-v-3a32ffd0] img{display:block;margin:auto;max-width:100%}[data-v-3a32ffd0] ol,[data-v-3a32ffd0] ol li:not(:first-child),[data-v-3a32ffd0] ul,[data-v-3a32ffd0] ul li:not(:first-child){margin-top:var(--spacing-stacked-margin-large)}@media only screen and (max-width:735px){[data-v-3a32ffd0] ol,[data-v-3a32ffd0] ul{margin-left:1.25rem}}[data-v-3a32ffd0] dt:not(:first-child){margin-top:var(--spacing-stacked-margin-large)}[data-v-3a32ffd0] dd{margin-left:2em}.conditional-constraints[data-v-4c6f3ed1] code{color:var(--colors-secondary-label,var(--color-secondary-label))}.token-method[data-v-295ad0ff]{font-weight:700}.token-keyword[data-v-295ad0ff]{color:var(--syntax-keyword,var(--color-syntax-keywords))}.token-number[data-v-295ad0ff]{color:var(--syntax-number,var(--color-syntax-numbers))}.token-string[data-v-295ad0ff]{color:var(--syntax-string,var(--color-syntax-strings))}.attribute-link[data-v-295ad0ff],.token-attribute[data-v-295ad0ff]{color:var(--syntax-attribute,var(--color-syntax-keywords))}.token-internalParam[data-v-295ad0ff]{color:var(--color-syntax-param-internal-name)}.type-identifier-link[data-v-295ad0ff]{color:var(--syntax-type,var(--color-syntax-other-type-names))}.token-removed[data-v-295ad0ff]{background-color:var(--color-highlight-red)}.token-added[data-v-295ad0ff]{background-color:var(--color-highlight-green)}.source[data-v-dc9cfb3a]{background:var(--background,var(--color-code-background));border-color:var(--color-grid);color:var(--text,var(--color-code-plain));border-style:solid;border-width:1px;padding:var(--code-block-style-elements-padding);speak:literal-punctuation;line-height:25px;filter:blur(0)}.source.displays-multiple-lines[data-v-dc9cfb3a],.source[data-v-dc9cfb3a]{border-radius:var(--border-radius,4px)}.source>code[data-v-dc9cfb3a]{font-size:.8823529412rem;line-height:1.6666666667;font-weight:400;font-family:var(--typography-html-font-mono,Menlo,monospace);display:block}.platforms[data-v-f961f3da]{font-size:.8235294118rem;line-height:1.4285714286;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);margin-bottom:.45rem;margin-top:var(--spacing-stacked-margin-xlarge)}.changed .platforms[data-v-f961f3da]{padding-left:.588rem}.platforms[data-v-f961f3da]:first-of-type{margin-top:1rem}.source[data-v-f961f3da]{transition:margin .3s linear}.platforms+.source[data-v-f961f3da]{margin:0}.declaration-pill:not(.declaration-pill--expanded) .source[data-v-f961f3da] .highlighted{background:unset;font-weight:400}.declaration-pill--expanded .source[data-v-f961f3da]{border-width:1px}.declaration-pill--expanded .source[data-v-f961f3da] a{pointer-events:none}.declaration-pill--expanded.selected-declaration .source[data-v-f961f3da]{border-color:var(--color-focus-border-color,var(--color-focus-border-color))}.declaration-pill--expanded:not(.selected-declaration) .source[data-v-f961f3da]{background:none}.changed .source[data-v-f961f3da]{background:none;border:none;margin-top:0;margin-bottom:0;margin-left:2.1764705882rem;padding-left:0}.expand-enter-active,.expand-leave-active{transition:height .3s ease-in-out;overflow:hidden}.expand-enter,.expand-leave-to{height:0}.declaration-pill--expanded[data-v-18e7c20c]{transition-timing-function:linear;transition-property:opacity,height;margin:var(--declaration-code-listing-margin)}.declaration-pill--expanded>button[data-v-18e7c20c]{display:block;width:100%}.declaration-pill--expanded.expand-enter[data-v-18e7c20c],.declaration-pill--expanded.expand-leave-to[data-v-18e7c20c]{opacity:0}.declaration-pill--expanded.expand-enter .source[data-v-18e7c20c],.declaration-pill--expanded.expand-leave-to .source[data-v-18e7c20c]{margin:0}.declaration-pill--expanded[data-v-18e7c20c] .highlighted{background:var(--color-syntax-highlighted,mark);font-weight:600;transition:background .3s linear,font-weight .3s linear}.changed.selected-declaration[data-v-18e7c20c],.declaration-diff[data-v-0c2301a5]{background:var(--background,var(--color-code-background))}.declaration-diff-version[data-v-0c2301a5]{padding-left:.588rem;padding-left:2.1764705882rem;font-size:1rem;line-height:1.5294117647;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-figure-gray-secondary);margin:0}.declaration-diff-current[data-v-0c2301a5]{padding-top:8px;padding-bottom:5px}.declaration-diff-previous[data-v-0c2301a5]{padding-top:5px;padding-bottom:8px;background-color:var(--color-changes-modified-previous-background);border-radius:0 0 var(--border-radius,4px) var(--border-radius,4px);position:relative}.declaration-source-link[data-v-5863919c]{font-size:.8235294118rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);display:flex;align-items:center;margin-top:var(--declaration-source-link-margin,var(--spacing-stacked-margin-large))}.declaration-icon[data-v-5863919c]{width:1em;margin-right:5px}.conditional-constraints[data-v-722d45cf],.declaration-list[data-v-722d45cf]:not(:first-child){margin-top:var(--declaration-conditional-constraints-margin,20px)}.abstract[data-v-f3f57cbe]{font-size:1.2352941176rem;line-height:1.380952381;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:735px){.abstract[data-v-f3f57cbe]{font-size:1.1176470588rem;line-height:1.4210526316;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}[data-v-f3f57cbe] p:last-child{margin-bottom:0}.full-width-container .container[data-v-0e6b292c]:not(.minimized-container){max-width:820px;margin-left:auto;margin-right:auto;padding-left:80px;padding-right:80px;box-sizing:border-box}@media print{.full-width-container .container[data-v-0e6b292c]:not(.minimized-container){padding-left:20px;padding-right:20px;max-width:none}}@media only screen and (min-width:1251px){.full-width-container .container[data-v-0e6b292c]:not(.minimized-container){max-width:980px}}@media only screen and (min-width:1500px){.full-width-container .container[data-v-0e6b292c]:not(.minimized-container){max-width:1080px}}@media only screen and (max-width:735px){.full-width-container .container[data-v-0e6b292c]:not(.minimized-container){width:auto;padding-left:20px;padding-right:20px}}.static-width-container .container[data-v-0e6b292c]:not(.minimized-container){margin-left:auto;margin-right:auto;width:1536px;width:980px}@media only screen and (max-width:1250px){.static-width-container .container[data-v-0e6b292c]:not(.minimized-container){width:692px}}@media only screen and (max-width:735px){.static-width-container .container[data-v-0e6b292c]:not(.minimized-container){width:87.5%}}@media only screen and (max-width:320px){.static-width-container .container[data-v-0e6b292c]:not(.minimized-container){width:215px}}.container[data-v-0e6b292c]{--section-spacing-single-side:40px;padding-bottom:var(--section-spacing-single-side)}.container.minimized-container[data-v-0e6b292c]{--section-spacing-single-side:1.5em}.container.minimized-container .contenttable-section[data-v-0e6b292c],.title[data-v-0e6b292c]{padding-top:var(--section-spacing-single-side)}.title[data-v-0e6b292c]{font-size:1.8823529412rem;line-height:1.125;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);border-top-color:var(--color-grid);border-top-style:solid;border-top-width:var(--content-table-title-border-width,1px)}@media only screen and (max-width:1250px){.title[data-v-0e6b292c]{font-size:1.6470588235rem;line-height:1.1428571429;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){.title[data-v-0e6b292c]{font-size:1.4117647059rem;line-height:1.1666666667;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.title+.contenttable-section[data-v-1b0546d9]{margin-top:0}.contenttable-section[data-v-1b0546d9]{align-items:baseline;padding-top:2.353rem}.contenttable-section[data-v-1b0546d9]:last-child{margin-bottom:0}[data-v-1b0546d9] .contenttable-title{font-size:1.4117647059rem;line-height:1.1666666667;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){[data-v-1b0546d9] .contenttable-title{font-size:1.2352941176rem;line-height:1.1904761905;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){.contenttable-section[data-v-1b0546d9]{align-items:unset;border-top:none;display:inherit;margin:0}.section-content[data-v-1b0546d9],.section-title[data-v-1b0546d9]{padding:0}[data-v-1b0546d9] .contenttable-title{margin:0 0 2.353rem 0;padding-bottom:.5rem}}.badge[data-v-04624022]{--badge-color:var(--color-badge-default);--badge-dark-color:var(--color-badge-dark-default);font-size:.7058823529rem;line-height:1.3333333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);display:inline-block;padding:2px 4px;white-space:nowrap;border-radius:var(--badge-border-radius,1px);border-style:var(--badge-border-style,none);border-width:var(--badge-border-width,1px);margin:auto;margin-left:5px;color:var(--colors-badge-text,var(--color-badge-text));background-color:var(--badge-color)}@media screen{[data-color-scheme=dark] .badge[data-v-04624022]{background-color:var(--badge-dark-color)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .badge[data-v-04624022]{background-color:var(--badge-dark-color)}}.badge-deprecated[data-v-04624022]{--badge-color:var(--color-badge-deprecated);--badge-dark-color:var(--color-badge-dark-deprecated)}.badge-beta[data-v-04624022]{--badge-color:var(--color-badge-beta);--badge-dark-color:var(--color-badge-dark-beta)}.topic-icon-wrapper[data-v-55f9d05d]{display:flex;align-items:center;justify-content:center;height:1.4705882353rem;flex:0 0 1.294rem;width:1.294rem;margin-right:1rem}.topic-icon[data-v-55f9d05d]{height:.8823529412rem;transform:scale(1);-webkit-transform:scale(1);overflow:visible}.topic-icon[data-v-55f9d05d] img{margin:0;display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.topic-icon.curly-brackets-icon[data-v-55f9d05d]{height:1rem}.decorator[data-v-17c84f82],.label[data-v-17c84f82]{color:var(--colors-secondary-label,var(--color-secondary-label))}.label[data-v-17c84f82]{font-size:1rem;line-height:1.4705882353;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.empty-token[data-v-17c84f82]{font-size:0}.empty-token[data-v-17c84f82]:after{content:" ";font-size:1rem}.abstract[data-v-0d9c6bcc],.link-block[data-v-0d9c6bcc] .badge{margin-left:2.294rem}.link-block .badge+.badge[data-v-0d9c6bcc]{margin-left:1rem}.link[data-v-0d9c6bcc]{display:flex}.link-block .badge[data-v-0d9c6bcc]{margin-top:.5rem}.link-block.has-inline-element[data-v-0d9c6bcc]{display:flex;align-items:flex-start;flex-flow:row wrap}.link-block.has-inline-element .badge[data-v-0d9c6bcc]{margin-left:1rem;margin-top:0}.link-block .has-adjacent-elements[data-v-0d9c6bcc]{padding-top:5px;padding-bottom:5px;display:inline-flex}.link-block[data-v-0d9c6bcc],.link[data-v-0d9c6bcc]{box-sizing:inherit}.link-block.changed[data-v-0d9c6bcc],.link.changed[data-v-0d9c6bcc]{padding-right:1rem;padding-left:2.1764705882rem;padding-top:8px;padding-bottom:8px;display:inline-flex;width:100%;box-sizing:border-box}.link-block.changed.changed[data-v-0d9c6bcc],.link.changed.changed[data-v-0d9c6bcc]{padding-right:1rem}@media only screen and (max-width:735px){.link-block.changed[data-v-0d9c6bcc],.link.changed[data-v-0d9c6bcc]{padding-left:0;padding-right:0}.link-block.changed.changed[data-v-0d9c6bcc],.link.changed.changed[data-v-0d9c6bcc]{padding-right:17px;padding-left:2.1764705882rem}.link-block.changed[data-v-0d9c6bcc],.link.changed[data-v-0d9c6bcc]{padding-left:0;padding-right:0}}.abstract .topic-required[data-v-0d9c6bcc]:not(:first-child){margin-top:4px}.topic-required[data-v-0d9c6bcc]{font-size:.8em}.deprecated[data-v-0d9c6bcc]{text-decoration:line-through}.section-content>.content[data-v-1c2724f5],.topic[data-v-1c2724f5]{margin-top:15px}.no-title .section-content>.content[data-v-1c2724f5]:first-child,.no-title .topic[data-v-1c2724f5]:first-child{margin-top:0}.property-metadata[data-v-f911f232]{color:var(--color-figure-gray-secondary)}.parameter-attributes[data-v-c0edcb84]{margin-left:1rem}[data-v-c0edcb84] .property-metadata{color:currentColor}.datalist dd{padding-left:2rem}.datalist dt{font-weight:600;padding-left:1rem;padding-top:var(--spacing-param)}.datalist dt:first-of-type{padding-top:0}.type[data-v-791bac44]:first-letter{text-transform:capitalize}.detail-type[data-v-d66cd00c]{font-weight:600;padding-left:1rem;padding-top:var(--spacing-param)}.detail-type[data-v-d66cd00c]:first-child{padding-top:0}@media only screen and (max-width:735px){.detail-type[data-v-d66cd00c]{padding-left:0}}.detail-content[data-v-d66cd00c]{padding-left:2rem}@media only screen and (max-width:735px){.detail-content[data-v-d66cd00c]{padding-left:0}}.param-name[data-v-5ef1227e]{font-weight:600;padding-left:1rem;padding-top:var(--spacing-param)}.param-name[data-v-5ef1227e]:first-child{padding-top:0}@media only screen and (max-width:735px){.param-name[data-v-5ef1227e]{padding-left:0}}.param-content[data-v-5ef1227e]{padding-left:2rem}@media only screen and (max-width:735px){.param-content[data-v-5ef1227e]{padding-left:0}}.param-content[data-v-5ef1227e] dt{font-weight:600}.param-content[data-v-5ef1227e] dd{margin-left:1em}.parameters-table[data-v-eee7e94e] .change-added,.parameters-table[data-v-eee7e94e] .change-removed{display:inline-block;max-width:100%}.parameters-table[data-v-eee7e94e] .change-removed,.parameters-table[data-v-eee7e94e] .token-removed{text-decoration:line-through}.param[data-v-eee7e94e]{font-size:.8823529412rem;box-sizing:border-box}.param.changed[data-v-eee7e94e]{display:flex;flex-flow:row wrap;padding-right:1rem;padding-left:2.1764705882rem;padding-top:8px;padding-bottom:8px;display:inline-flex;width:100%;box-sizing:border-box}.param.changed.changed[data-v-eee7e94e]{padding-right:1rem}@media only screen and (max-width:735px){.param.changed[data-v-eee7e94e]{padding-left:0;padding-right:0}.param.changed.changed[data-v-eee7e94e]{padding-right:17px;padding-left:2.1764705882rem}.param.changed[data-v-eee7e94e]{padding-left:0;padding-right:0}}.param.changed.changed[data-v-eee7e94e]{padding-left:0;padding-right:0}.param.changed+.param.changed[data-v-eee7e94e]{margin-top:calc(var(--spacing-param)/2)}.changed .param-content[data-v-eee7e94e],.changed .param-symbol[data-v-eee7e94e]{padding-top:2px;padding-bottom:2px}@media only screen and (max-width:735px){.changed .param-content[data-v-eee7e94e]{padding-top:0}.changed .param-symbol[data-v-eee7e94e]{padding-bottom:0}}.param-symbol[data-v-eee7e94e]{text-align:right}.changed .param-symbol[data-v-eee7e94e]{padding-left:2.1764705882rem}@media only screen and (max-width:735px){.param-symbol[data-v-eee7e94e]{text-align:left}.changed .param-symbol[data-v-eee7e94e]{padding-left:0}}.param-symbol[data-v-eee7e94e] .type-identifier-link{color:var(--color-link)}.param+.param[data-v-eee7e94e]{margin-top:var(--spacing-param)}.param+.param[data-v-eee7e94e]:first-child{margin-top:0}.param-content[data-v-eee7e94e]{padding-left:1rem;padding-left:2.1764705882rem}.changed .param-content[data-v-eee7e94e]{padding-right:1rem}@media only screen and (max-width:735px){.param-content[data-v-eee7e94e]{padding-left:0;padding-right:0}}.property-text{font-weight:700}.property-metadata[data-v-549ed0a8]{color:var(--color-figure-gray-secondary)}.property-name[data-v-39899ccf]{font-weight:700}.property-name.deprecated[data-v-39899ccf]{text-decoration:line-through}.property-deprecated[data-v-39899ccf]{margin-left:0}.content[data-v-39899ccf],.content[data-v-39899ccf] p:first-child{display:inline}.response-mimetype[data-v-18890a0f]{color:var(--color-figure-gray-secondary)}.part-name[data-v-68facc94]{font-weight:700}.content[data-v-68facc94],.content[data-v-68facc94] p:first-child{display:inline}.param-name[data-v-0d9b752e]{font-weight:700}.param-name.deprecated[data-v-0d9b752e]{text-decoration:line-through}.param-deprecated[data-v-0d9b752e]{margin-left:0}.content[data-v-0d9b752e],.content[data-v-0d9b752e] p:first-child{display:inline}.response-name[data-v-362f5b54],.response-reason[data-v-362f5b54]{font-weight:700}@media only screen and (max-width:735px){.response-reason[data-v-362f5b54]{display:none}}.response-name>code>.reason[data-v-362f5b54]{display:none}@media only screen and (max-width:735px){.response-name>code>.reason[data-v-362f5b54]{display:initial}}.link[data-v-241f4141]{display:flex;margin-bottom:.5rem}.link-block[data-v-241f4141],.link[data-v-241f4141]{box-sizing:inherit}.link-block.changed[data-v-241f4141],.link.changed[data-v-241f4141]{padding-right:1rem;padding-left:2.1764705882rem;padding-top:8px;padding-bottom:8px;display:inline-flex;width:100%;box-sizing:border-box}.link-block.changed.changed[data-v-241f4141],.link.changed.changed[data-v-241f4141]{padding-right:1rem}@media only screen and (max-width:735px){.link-block.changed[data-v-241f4141],.link.changed[data-v-241f4141]{padding-left:0;padding-right:0}.link-block.changed.changed[data-v-241f4141],.link.changed.changed[data-v-241f4141]{padding-right:17px;padding-left:2.1764705882rem}.link-block.changed[data-v-241f4141],.link.changed[data-v-241f4141]{padding-left:0;padding-right:0}}.mention-icon[data-v-241f4141]{margin-right:.25rem}.primary-content.with-border[data-v-65c116be]:before{border-top-color:var(--colors-grid,var(--color-grid));border-top-style:solid;border-top-width:var(--content-table-title-border-width,1px);content:"";display:block}.primary-content[data-v-65c116be]>*{margin-bottom:40px;margin-top:40px}.primary-content[data-v-65c116be]>:first-child{margin-top:2.353rem}.relationships-list[data-v-ba5cad92]{list-style:none}.relationships-list.column[data-v-ba5cad92]{margin-left:0;margin-top:15px}.relationships-list.inline[data-v-ba5cad92]{display:flex;flex-direction:row;flex-wrap:wrap;margin-top:15px;margin-left:0}.relationships-list.inline li[data-v-ba5cad92]:not(:last-child):after{content:", "}.relationships-list.changed[data-v-ba5cad92]{padding-right:1rem;padding-left:2.1764705882rem;padding-top:8px;padding-bottom:8px;display:inline-flex;width:100%;box-sizing:border-box}.relationships-list.changed.changed[data-v-ba5cad92]{padding-right:1rem}@media only screen and (max-width:735px){.relationships-list.changed[data-v-ba5cad92]{padding-left:0;padding-right:0}.relationships-list.changed.changed[data-v-ba5cad92]{padding-right:17px;padding-left:2.1764705882rem}.relationships-list.changed[data-v-ba5cad92]{padding-left:0;padding-right:0}}.relationships-list.changed[data-v-ba5cad92]:after{margin-top:.6176470588rem}.relationships-list.changed.column[data-v-ba5cad92]{display:block;box-sizing:border-box}.relationships-item[data-v-ba5cad92],.relationships-list[data-v-ba5cad92]{box-sizing:inherit}.conditional-constraints[data-v-ba5cad92]{font-size:.8235294118rem;margin:.1764705882rem 0 .5882352941rem 1.1764705882rem}.platform[data-v-3da26baa],.technology[data-v-3da26baa]{display:inline-flex;align-items:center}.tech-icon[data-v-3da26baa]{height:12px;padding-right:5px;--color-svg-icon:var(--color-figure-gray)}.changed[data-v-3da26baa]{padding-left:17px;border:none}.changed[data-v-3da26baa]:after{all:unset}.changed[data-v-3da26baa]:before{background-image:url(../img/modified-icon.efb2697d.svg);background-repeat:no-repeat;bottom:0;content:" ";margin:auto;margin-right:8px;position:absolute;top:0;width:20px;height:20px;margin:0;left:-5px}@media screen{[data-color-scheme=dark] .changed[data-v-3da26baa]:before{background-image:url(../img/modified-icon.efb2697d.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .changed[data-v-3da26baa]:before{background-image:url(../img/modified-icon.efb2697d.svg)}}.changed-added[data-v-3da26baa]:before{background-image:url(../img/added-icon.832a5d2c.svg)}@media screen{[data-color-scheme=dark] .changed-added[data-v-3da26baa]:before{background-image:url(../img/added-icon.832a5d2c.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .changed-added[data-v-3da26baa]:before{background-image:url(../img/added-icon.832a5d2c.svg)}}.changed-deprecated[data-v-3da26baa]:before{background-image:url(../img/deprecated-icon.7bf1740a.svg)}@media screen{[data-color-scheme=dark] .changed-deprecated[data-v-3da26baa]:before{background-image:url(../img/deprecated-icon.7bf1740a.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .changed-deprecated[data-v-3da26baa]:before{background-image:url(../img/deprecated-icon.7bf1740a.svg)}}.availability[data-v-3da26baa]{display:flex;flex-flow:row wrap;gap:10px;margin-top:.8823529412rem;font-size:.8235294118rem;line-height:1.4285714286;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.availability>[data-v-3da26baa]:after{content:"";display:inline-block;width:1px;height:1em;background:currentColor;margin-left:10px}.availability>[data-v-3da26baa]:last-child:after{content:none}.topictitle[data-v-6630a012]{margin-bottom:.7058823529rem}.topictitle[data-v-6630a012]:last-child{margin-bottom:0}@media only screen and (max-width:735px){.topictitle[data-v-6630a012]{margin:0}}.eyebrow[data-v-6630a012]{font-size:1.2352941176rem;line-height:1.1904761905;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-documentation-intro-eyebrow,var(--colors-secondary-label,var(--color-secondary-label)));display:block;margin-bottom:.8823529412rem}@media only screen and (max-width:735px){.eyebrow[data-v-6630a012]{font-size:1.1176470588rem;line-height:1.2105263158;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.title[data-v-6630a012]{font-size:2.3529411765rem;line-height:1.1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-documentation-intro-title,var(--colors-header-text,var(--color-header-text)))}@media only screen and (max-width:1250px){.title[data-v-6630a012]{font-size:1.8823529412rem;line-height:1.125;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){.title[data-v-6630a012]{font-size:1.6470588235rem;line-height:1.1428571429;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}small[data-v-6630a012]{font-size:1.4117647059rem;line-height:1.1666666667;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);padding-left:10px}@media only screen and (max-width:1250px){small[data-v-6630a012]{font-size:1.2352941176rem;line-height:1.1904761905;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}small[data-v-6630a012]:before{content:attr(data-tag-name)}small.Beta[data-v-6630a012]{color:var(--color-badge-beta)}@media screen{[data-color-scheme=dark] small.Beta[data-v-6630a012]{color:var(--color-badge-dark-beta)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] small.Beta[data-v-6630a012]{color:var(--color-badge-dark-beta)}}small.Deprecated[data-v-6630a012]{color:var(--color-badge-deprecated)}@media screen{[data-color-scheme=dark] small.Deprecated[data-v-6630a012]{color:var(--color-badge-dark-deprecated)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] small.Deprecated[data-v-6630a012]{color:var(--color-badge-dark-deprecated)}}.OnThisPageStickyContainer[data-v-39ac6ed0]{margin-top:2.353rem;position:sticky;top:3.8235294118rem;align-self:flex-start;flex:0 0 auto;width:192px;padding-right:1.2941176471rem;box-sizing:border-box;padding-bottom:var(--spacing-stacked-margin-small);max-height:calc(100vh - 3.82353rem);overflow:auto}@media print{.OnThisPageStickyContainer[data-v-39ac6ed0]{display:none}}@media only screen and (max-width:735px){.OnThisPageStickyContainer[data-v-39ac6ed0]{display:none}}.nav-menu-link[data-v-2ad31daf]{display:inline-block;line-height:22px;white-space:nowrap}.nav--in-breakpoint-range .nav-menu-link[data-v-2ad31daf]{line-height:42px;border-top:1px solid;border-color:var(--color-nav-rule);display:flex;flex:1 0 100%;height:100%;align-items:center}.theme-dark.nav--in-breakpoint-range .nav-menu-link[data-v-2ad31daf]{border-color:var(--color-nav-dark-rule)}.hierarchy-collapsed-items[data-v-7b701104]{position:relative;display:inline-flex;align-items:center}.hierarchy-collapsed-items[data-v-7b701104]:before{content:"/";width:.2941176471rem;margin:0 .2941176471rem}.nav--in-breakpoint-range .hierarchy-collapsed-items[data-v-7b701104],:root.no-js .hierarchy-collapsed-items[data-v-7b701104]{display:none}.hierarchy-collapsed-items .toggle[data-v-7b701104]{background:var(--color-nav-hierarchy-collapse-background);border-color:var(--color-nav-hierarchy-collapse-borders);border-radius:var(--border-radius,4px);border-style:solid;border-width:0;font-weight:600;height:1.1176470588rem;text-align:center;width:2.1176470588rem;display:flex;align-items:center;justify-content:center}.theme-dark .hierarchy-collapsed-items .toggle[data-v-7b701104]{background:var(--color-nav-dark-hierarchy-collapse-background)}.hierarchy-collapsed-items .toggle.focused[data-v-7b701104],.hierarchy-collapsed-items .toggle[data-v-7b701104]:active,.hierarchy-collapsed-items .toggle[data-v-7b701104]:focus{box-shadow:0 0 0 4px var(--color-focus-color);outline:none}.indicator[data-v-7b701104]{width:1em;height:1em;display:flex;align-items:center}.indicator .toggle-icon[data-v-7b701104]{width:100%}.dropdown[data-v-7b701104]{background:var(--color-nav-hierarchy-collapse-background);margin:0;list-style-type:none;border-color:var(--color-nav-hierarchy-collapse-borders);border-radius:var(--border-radius,4px);border-style:solid;box-shadow:0 1px 4px -1px var(--color-figure-gray-secondary);border-width:0;padding:0 .5rem;position:absolute;z-index:42;top:calc(100% + .41176rem)}.theme-dark .dropdown[data-v-7b701104]{background:var(--color-nav-dark-hierarchy-collapse-background);border-color:var(--color-nav-dark-hierarchy-collapse-borders)}.dropdown.collapsed[data-v-7b701104]{opacity:0;transform:translate3d(0,-.4117647059rem,0);transition:opacity .25s ease,transform .25s ease,visibility 0s linear .25s;visibility:hidden}.dropdown[data-v-7b701104]:not(.collapsed){opacity:1;transform:none;transition:opacity .25s ease,transform .25s ease,visibility 0s linear 0s;visibility:visible}.nav--in-breakpoint-range .dropdown[data-v-7b701104]:not(.collapsed){display:none}.dropdown[data-v-7b701104]:before{border-bottom-color:var(--color-nav-hierarchy-collapse-background);border-bottom-style:solid;border-bottom-width:.5rem;border-left-color:transparent;border-left-style:solid;border-left-width:.5rem;border-right-color:transparent;border-right-style:solid;border-right-width:.5rem;content:"";left:1.4411764706rem;position:absolute;top:-.4411764706rem}.theme-dark .dropdown[data-v-7b701104]:before{border-bottom-color:var(--color-nav-dark-hierarchy-collapse-background)}.dropdown-item[data-v-7b701104]{border-top-color:var(--color-nav-hierarchy-collapse-borders);border-top-style:solid;border-top-width:1px}.theme-dark .dropdown-item[data-v-7b701104]{border-top-color:var(--color-nav-dark-hierarchy-collapse-borders)}.dropdown-item[data-v-7b701104]:first-child{border-top:none}.nav-menu-link[data-v-7b701104]{max-width:57.6470588235rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;padding:.75rem 1rem}.hierarchy-item[data-v-13293168]{display:flex;align-items:center;margin-left:0}.hierarchy-item[data-v-13293168]:not(:first-child):before{content:"/";width:.2941176471rem;margin:0 .2941176471rem}.nav--in-breakpoint-range .hierarchy-item[data-v-13293168]{border-top:1px solid var(--color-nav-hierarchy-item-borders);display:flex;align-items:center}.theme-dark.nav--in-breakpoint-range .hierarchy-item[data-v-13293168]{border-top-color:var(--color-nav-dark-hierarchy-item-borders)}.nav--in-breakpoint-range .hierarchy-item[data-v-13293168]:first-of-type{border-top:none}.hierarchy-item.collapsed[data-v-13293168]{display:none}:root.no-js .hierarchy-item.collapsed[data-v-13293168]{display:flex}.nav--in-breakpoint-range .hierarchy-item.collapsed[data-v-13293168]{display:inline-block}.item[data-v-13293168]{display:inline-block;vertical-align:middle}.nav--in-breakpoint-range .item[data-v-13293168]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:100%;line-height:2.4705882353rem}@media only screen and (min-width:768px){.hierarchy-item:first-child:last-child .item[data-v-13293168],.hierarchy-item:first-child:last-child~.hierarchy-item .item[data-v-13293168]{max-width:45rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-badge .hierarchy-item:first-child:last-child .item[data-v-13293168],.has-badge .hierarchy-item:first-child:last-child~.hierarchy-item .item[data-v-13293168],.hierarchy-item:first-child:nth-last-child(2) .item[data-v-13293168],.hierarchy-item:first-child:nth-last-child(2)~.hierarchy-item .item[data-v-13293168]{max-width:36rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-badge .hierarchy-item:first-child:nth-last-child(2) .item[data-v-13293168],.has-badge .hierarchy-item:first-child:nth-last-child(2)~.hierarchy-item .item[data-v-13293168]{max-width:28.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hierarchy-item:first-child:nth-last-child(3) .item[data-v-13293168],.hierarchy-item:first-child:nth-last-child(3)~.hierarchy-item .item[data-v-13293168]{max-width:27rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-badge .hierarchy-item:first-child:nth-last-child(3) .item[data-v-13293168],.has-badge .hierarchy-item:first-child:nth-last-child(3)~.hierarchy-item .item[data-v-13293168]{max-width:21.6rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hierarchy-item:first-child:nth-last-child(4) .item[data-v-13293168],.hierarchy-item:first-child:nth-last-child(4)~.hierarchy-item .item[data-v-13293168]{max-width:18rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-badge .hierarchy-item:first-child:nth-last-child(4) .item[data-v-13293168],.has-badge .hierarchy-item:first-child:nth-last-child(4)~.hierarchy-item .item[data-v-13293168]{max-width:14.4rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hierarchy-item:first-child:nth-last-child(5) .item[data-v-13293168],.hierarchy-item:first-child:nth-last-child(5)~.hierarchy-item .item[data-v-13293168]{max-width:9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-badge .hierarchy-item:first-child:nth-last-child(5) .item[data-v-13293168],.has-badge .hierarchy-item:first-child:nth-last-child(5)~.hierarchy-item .item[data-v-13293168]{max-width:7.2rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hierarchy-collapsed-items~.hierarchy-item .item[data-v-13293168]{max-width:10.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hierarchy-collapsed-items~.hierarchy-item:last-child .item[data-v-13293168]{max-width:none}.has-badge .hierarchy-collapsed-items~.hierarchy-item .item[data-v-13293168]{max-width:8.64rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}.hierarchy[data-v-d54f3438]{font-size:.8235294118rem;line-height:1.4285714286;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);justify-content:flex-start;align-items:center;margin:0 0 1.1764705882rem 0;min-width:0}.nav--in-breakpoint-range .hierarchy[data-v-d54f3438]{margin:0}.hierarchy .root-hierarchy .item[data-v-d54f3438]{max-width:10rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-v-d54f3438] a.nav-menu-link{color:inherit;text-decoration:underline}.declaration-list-menu[data-v-7c6f2f58]{position:relative;width:100%}.declaration-list-menu .declaration-list-toggle[data-v-7c6f2f58]{display:flex;flex-direction:row;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:var(--color-other-decl-button);padding:5px 15px;color:var(--colors-link,var(--color-link));z-index:1;gap:5px;white-space:nowrap;align-items:center}.declaration-list-menu .icon[data-v-7c6f2f58]{display:flex}.declaration-list-menu .icon svg[data-v-7c6f2f58]{transition-duration:.4s;transition-timing-function:linear;transition-property:transform;width:15px;height:15px;fill:var(--colors-link,var(--color-link))}.declaration-list-menu .icon svg.expand[data-v-7c6f2f58]{transform:rotate(45deg)}.doc-topic[data-v-7c6f2f58]{display:flex;flex-direction:column;height:100%}.doc-topic.with-on-this-page[data-v-7c6f2f58]{--doc-hero-right-offset:192px}#app-main[data-v-7c6f2f58]{outline-style:none;height:100%}[data-v-7c6f2f58] .minimized-title{margin-bottom:.833rem}[data-v-7c6f2f58] .minimized-title .title{font-size:1.416rem;font-weight:700}[data-v-7c6f2f58] .minimized-title small{font-size:1rem;padding-left:.416rem}.minimized-abstract[data-v-7c6f2f58]{font-size:1rem;line-height:1.4705882353;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.container[data-v-7c6f2f58]:not(.minimized-container){outline-style:none}.full-width-container .container[data-v-7c6f2f58]:not(.minimized-container){max-width:820px;margin-left:auto;margin-right:auto;padding-left:80px;padding-right:80px;box-sizing:border-box}@media print{.full-width-container .container[data-v-7c6f2f58]:not(.minimized-container){padding-left:20px;padding-right:20px;max-width:none}}@media only screen and (min-width:1251px){.full-width-container .container[data-v-7c6f2f58]:not(.minimized-container){max-width:980px}}@media only screen and (min-width:1500px){.full-width-container .container[data-v-7c6f2f58]:not(.minimized-container){max-width:1080px}}@media only screen and (max-width:735px){.full-width-container .container[data-v-7c6f2f58]:not(.minimized-container){width:auto;padding-left:20px;padding-right:20px}}.static-width-container .container[data-v-7c6f2f58]:not(.minimized-container){margin-left:auto;margin-right:auto;width:1536px;width:980px}@media only screen and (max-width:1250px){.static-width-container .container[data-v-7c6f2f58]:not(.minimized-container){width:692px}}@media only screen and (max-width:735px){.static-width-container .container[data-v-7c6f2f58]:not(.minimized-container){width:87.5%}}@media only screen and (max-width:320px){.static-width-container .container[data-v-7c6f2f58]:not(.minimized-container){width:215px}}[data-v-7c6f2f58] .minimized-container{outline-style:none;--spacing-stacked-margin-large:0.667em;--spacing-stacked-margin-xlarge:1em;--declaration-code-listing-margin:1em 0 0 0;--declaration-conditional-constraints-margin:1em;--declaration-source-link-margin:0.833em;--code-block-style-elements-padding:7px 12px;--spacing-param:var(--spacing-stacked-margin-large);--aside-border-radius:6px;--code-border-radius:6px}[data-v-7c6f2f58] .minimized-container:not(.declarations-container){padding-left:1.4rem;padding-right:1.4rem}[data-v-7c6f2f58] .minimized-container .description{margin-bottom:1.5em}[data-v-7c6f2f58] .minimized-container>.primary-content>*{margin-top:1.5em;margin-bottom:1.5em}[data-v-7c6f2f58] .minimized-container .description{margin-top:0}[data-v-7c6f2f58] .minimized-container h1,[data-v-7c6f2f58] .minimized-container h2,[data-v-7c6f2f58] .minimized-container h3,[data-v-7c6f2f58] .minimized-container h4,[data-v-7c6f2f58] .minimized-container h5,[data-v-7c6f2f58] .minimized-container h6{font-size:1rem;font-weight:700}[data-v-7c6f2f58] .minimized-container h2{font-size:1.083rem}[data-v-7c6f2f58] .minimized-container h1{font-size:1.416rem}[data-v-7c6f2f58] .minimized-container aside{padding:.667rem 1rem}[data-v-7c6f2f58] .minimized-container .source{border-radius:var(--code-border-radius);margin:var(--declaration-code-listing-margin)}[data-v-7c6f2f58] .minimized-container .single-line{border-radius:var(--code-border-radius)}.description[data-v-7c6f2f58]{margin-bottom:2.353rem}.description[data-v-7c6f2f58]:empty{display:none}.description.after-enhanced-hero[data-v-7c6f2f58]{margin-top:2.353rem}.description[data-v-7c6f2f58] .content+*{margin-top:var(--spacing-stacked-margin-large)}[data-v-7c6f2f58] .no-primary-content{--content-table-title-border-width:0px}.sample-download[data-v-7c6f2f58]{margin-top:20px}.declarations-container[data-v-7c6f2f58]{margin-top:40px}.declarations-container.minimized-container[data-v-7c6f2f58]{margin-top:0}[data-v-7c6f2f58] h1{font-size:2.3529411765rem;line-height:1.1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){[data-v-7c6f2f58] h1{font-size:1.8823529412rem;line-height:1.125;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){[data-v-7c6f2f58] h1{font-size:1.6470588235rem;line-height:1.1428571429;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}[data-v-7c6f2f58] h2{font-size:1.8823529412rem;line-height:1.125;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){[data-v-7c6f2f58] h2{font-size:1.6470588235rem;line-height:1.1428571429;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){[data-v-7c6f2f58] h2{font-size:1.4117647059rem;line-height:1.1666666667;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}[data-v-7c6f2f58] h3{font-size:1.6470588235rem;line-height:1.1428571429;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){[data-v-7c6f2f58] h3{font-size:1.4117647059rem;line-height:1.1666666667;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){[data-v-7c6f2f58] h3{font-size:1.2352941176rem;line-height:1.1904761905;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}[data-v-7c6f2f58] h4{font-size:1.4117647059rem;line-height:1.1666666667;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){[data-v-7c6f2f58] h4{font-size:1.2352941176rem;line-height:1.1904761905;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}[data-v-7c6f2f58] h5{font-size:1.2941176471rem;line-height:1.1818181818;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){[data-v-7c6f2f58] h5{font-size:1.1764705882rem;line-height:1.2;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){[data-v-7c6f2f58] h5{font-size:1.0588235294rem;line-height:1.4444444444;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}[data-v-7c6f2f58] h6{font-size:1rem;line-height:1.4705882353;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.doc-content-wrapper[data-v-7c6f2f58]{display:flex;justify-content:center}.doc-content-wrapper .doc-content[data-v-7c6f2f58]{min-width:0;width:100%}.doc-content-wrapper .doc-content .container:only-child .declaration-list-menu[data-v-7c6f2f58]:last-child:before{border-top-color:var(--colors-grid,var(--color-grid));border-top-style:solid;border-top-width:var(--content-table-title-border-width,1px);content:"";display:block;margin-bottom:40px}.with-on-this-page .doc-content-wrapper .doc-content[data-v-7c6f2f58]{max-width:820px}@media only screen and (min-width:1251px){.with-on-this-page .doc-content-wrapper .doc-content[data-v-7c6f2f58]{max-width:980px}}@media only screen and (min-width:1500px){.with-on-this-page .doc-content-wrapper .doc-content[data-v-7c6f2f58]{max-width:1080px}}.quick-navigation-open[data-v-96c35eb8]{display:flex;align-items:center;justify-content:center;width:16px;border:1px solid var(--color-grid);height:100%;border-radius:var(--border-radius,4px);transition:background-color .15s;box-sizing:border-box}.quick-navigation-open[data-v-96c35eb8]:hover{background-color:var(--color-fill-tertiary)}@media only screen and (max-width:1023px){.quick-navigation-open[data-v-96c35eb8]{display:none}}.fromkeyboard .quick-navigation-open[data-v-96c35eb8]:focus{box-shadow:0 0 0 4px var(--color-focus-color);outline:none;border-color:var(--color-focus-border-color)}.tag[data-v-7e76f326]{display:inline-block;padding-right:.5882352941rem}.tag[data-v-7e76f326]:focus{outline:none}.tag button[data-v-7e76f326]{color:var(--color-figure-gray);background-color:var(--color-fill-tertiary);font-size:.8235294118rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);border-radius:.8235294118rem;padding:.2352941176rem .5882352941rem;white-space:nowrap;border:1px solid transparent}@media(hover:hover){.tag button[data-v-7e76f326]:hover{transition:background-color .2s,color .2s;background-color:var(--color-fill-blue);color:#fff}}.tag button[data-v-7e76f326]:focus:active{background-color:var(--color-fill-blue);color:#fff}.fromkeyboard .tag button[data-v-7e76f326]:focus,.tag button.focus[data-v-7e76f326],.tag button[data-v-7e76f326]:focus{box-shadow:0 0 0 4px var(--color-focus-color);outline:none;border-color:var(--color-focus-border-color)}.tags[data-v-1f2bd813]{position:relative;margin:0;list-style:none;box-sizing:border-box;transition:padding-right .8s,padding-bottom .8s,max-height 1s,opacity 1s;padding:0}.tags .scroll-wrapper[data-v-1f2bd813]{overflow-x:auto;overflow-y:hidden;-ms-overflow-style:none;scrollbar-color:var(--color-figure-gray-tertiary) transparent;scrollbar-width:thin}.tags .scroll-wrapper[data-v-1f2bd813]::-webkit-scrollbar{height:0}@supports not ((-webkit-touch-callout:none) or (scrollbar-width:none) or (-ms-overflow-style:none)){.tags .scroll-wrapper.scrolling[data-v-1f2bd813]{--scrollbar-height:11px;padding-top:var(--scrollbar-height);height:calc(var(--scroll-target-height) - var(--scrollbar-height));display:flex;align-items:center}}.tags .scroll-wrapper.scrolling[data-v-1f2bd813]::-webkit-scrollbar{height:11px}.tags .scroll-wrapper.scrolling[data-v-1f2bd813]::-webkit-scrollbar-thumb{border-radius:10px;background-color:var(--color-figure-gray-tertiary);border:2px solid transparent;background-clip:padding-box}.tags .scroll-wrapper.scrolling[data-v-1f2bd813]::-webkit-scrollbar-track-piece:end{margin-right:8px}.tags .scroll-wrapper.scrolling[data-v-1f2bd813]::-webkit-scrollbar-track-piece:start{margin-left:8px}.tags ul[data-v-1f2bd813]{margin:0;padding:0;display:flex}.filter[data-v-9ad1ed4c]{--input-vertical-padding:0.7647058824rem;--input-horizontal-spacing:0.5882352941rem;--input-height:1.6470588235rem;--input-border-color:var(--color-fill-gray-secondary);--input-text:var(--color-fill-gray-secondary);position:relative;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:calc(var(--border-radius, 4px) + 1px)}.fromkeyboard .filter[data-v-9ad1ed4c]:focus{outline:none}.filter__top-wrapper[data-v-9ad1ed4c]{display:flex}.filter__filter-button[data-v-9ad1ed4c]{position:relative;z-index:1;cursor:text;margin-left:var(--input-horizontal-spacing);margin-right:.1764705882rem}@media only screen and (max-width:735px){.filter__filter-button[data-v-9ad1ed4c]{margin-right:.4117647059rem}}.filter__filter-button .svg-icon[data-v-9ad1ed4c]{fill:var(--input-text);display:block;height:21px}.filter__filter-button.blue[data-v-9ad1ed4c]>*{fill:var(--color-figure-blue);color:var(--color-figure-blue)}.filter.focus .filter__wrapper[data-v-9ad1ed4c]{box-shadow:0 0 0 3pt var(--color-focus-color);--input-border-color:var(--color-fill-blue)}.filter__wrapper[data-v-9ad1ed4c]{border:1px solid var(--input-border-color);background:var(--color-fill);border-radius:var(--border-radius,4px)}.filter__wrapper--reversed[data-v-9ad1ed4c]{display:flex;flex-direction:column-reverse}.filter__wrapper--no-border-style[data-v-9ad1ed4c]{border:none}.filter__suggested-tags[data-v-9ad1ed4c]{border-top:1px solid var(--color-fill-gray-tertiary);z-index:1;overflow:hidden}.filter__suggested-tags[data-v-9ad1ed4c] ul{padding:var(--input-vertical-padding) .5294117647rem;border:1px solid transparent;border-bottom-left-radius:calc(var(--border-radius, 4px) - 1px);border-bottom-right-radius:calc(var(--border-radius, 4px) - 1px)}.fromkeyboard .filter__suggested-tags[data-v-9ad1ed4c] ul:focus{outline:none;box-shadow:0 0 0 5px var(--color-focus-color)}.filter__wrapper--reversed .filter__suggested-tags[data-v-9ad1ed4c]{border-bottom:1px solid var(--color-fill-gray-tertiary);border-top:none}.filter__selected-tags[data-v-9ad1ed4c]{z-index:1;padding-left:4px;margin:-4px 0}@media only screen and (max-width:735px){.filter__selected-tags[data-v-9ad1ed4c]{padding-left:0}}.filter__selected-tags[data-v-9ad1ed4c] ul{padding:4px}@media only screen and (max-width:735px){.filter__selected-tags[data-v-9ad1ed4c] ul{padding-right:.4117647059rem}}.filter__selected-tags[data-v-9ad1ed4c] ul .tag:last-child{padding-right:0}.filter__delete-button[data-v-9ad1ed4c]{position:relative;margin:0;z-index:1;border-radius:100%}.fromkeyboard .filter__delete-button[data-v-9ad1ed4c]:focus{box-shadow:0 0 0 4px var(--color-focus-color);outline:none}.filter__delete-button .clear-rounded-icon[data-v-9ad1ed4c]{height:.7058823529rem;width:.7058823529rem;fill:var(--input-text);display:block}.filter__delete-button-wrapper[data-v-9ad1ed4c]{display:flex;align-items:center;padding-right:var(--input-horizontal-spacing);padding-left:.1764705882rem;border-top-right-radius:var(--border-radius,4px);border-bottom-right-radius:var(--border-radius,4px)}.filter__input-label[data-v-9ad1ed4c]{position:relative;flex-grow:1;height:var(--input-height);padding:var(--input-vertical-padding) 0}.filter__input-label[data-v-9ad1ed4c]:after{content:attr(data-value);visibility:hidden;width:auto;white-space:nowrap;min-width:130px;display:block;text-indent:.4117647059rem}@media only screen and (max-width:735px){.filter__input-label[data-v-9ad1ed4c]:after{text-indent:.1764705882rem}}.filter__input-box-wrapper[data-v-9ad1ed4c]{overflow-y:hidden;-ms-overflow-style:none;scrollbar-color:var(--color-figure-gray-tertiary) transparent;scrollbar-width:thin;display:flex;overflow-x:auto;align-items:center;cursor:text;flex:1}.filter__input-box-wrapper[data-v-9ad1ed4c]::-webkit-scrollbar{height:0}@supports not ((-webkit-touch-callout:none) or (scrollbar-width:none) or (-ms-overflow-style:none)){.filter__input-box-wrapper.scrolling[data-v-9ad1ed4c]{--scrollbar-height:11px;padding-top:var(--scrollbar-height);height:calc(var(--scroll-target-height) - var(--scrollbar-height));display:flex;align-items:center}}.filter__input-box-wrapper.scrolling[data-v-9ad1ed4c]::-webkit-scrollbar{height:11px}.filter__input-box-wrapper.scrolling[data-v-9ad1ed4c]::-webkit-scrollbar-thumb{border-radius:10px;background-color:var(--color-figure-gray-tertiary);border:2px solid transparent;background-clip:padding-box}.filter__input-box-wrapper.scrolling[data-v-9ad1ed4c]::-webkit-scrollbar-track-piece:end{margin-right:8px}.filter__input-box-wrapper.scrolling[data-v-9ad1ed4c]::-webkit-scrollbar-track-piece:start{margin-left:8px}.filter__input[data-v-9ad1ed4c]{font-size:1.2352941176rem;line-height:1.380952381;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-text);height:var(--input-height);border:none;width:100%;position:absolute;background:transparent;z-index:1;text-indent:.4117647059rem}@media only screen and (max-width:735px){.filter__input[data-v-9ad1ed4c]{font-size:1.1176470588rem;line-height:1.4210526316;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);text-indent:.1764705882rem}}.filter__input[data-v-9ad1ed4c]:focus{outline:none}.filter__input[placeholder][data-v-9ad1ed4c]::-moz-placeholder{color:var(--input-text);opacity:1}.filter__input[placeholder][data-v-9ad1ed4c]::placeholder{color:var(--input-text);opacity:1}.filter__input[placeholder][data-v-9ad1ed4c]:-ms-input-placeholder{color:var(--input-text)}.filter__input[placeholder][data-v-9ad1ed4c]::-ms-input-placeholder{color:var(--input-text)}.generic-modal[data-v-795f7b59]{position:fixed;top:0;left:0;right:0;bottom:0;margin:0;z-index:11000;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;background:none;overflow:auto}.modal-fullscreen[data-v-795f7b59]{align-items:stretch}.modal-fullscreen .container[data-v-795f7b59]{margin:0;flex:1;width:100%;height:100%;padding-top:env(safe-area-inset-top);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left)}.modal-standard[data-v-795f7b59]{padding:20px}.modal-standard .container[data-v-795f7b59]{padding:60px;border-radius:var(--border-radius,4px)}@media screen{[data-color-scheme=dark] .modal-standard .container[data-v-795f7b59]{background:#1d1d1f}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .modal-standard .container[data-v-795f7b59]{background:#1d1d1f}}@media only screen and (max-width:735px){.modal-standard[data-v-795f7b59]{padding:0;align-items:stretch}.modal-standard .container[data-v-795f7b59]{margin:20px 0 0;padding:50px 30px;flex:1;width:100%;border-bottom-left-radius:0;border-bottom-right-radius:0}}.backdrop[data-v-795f7b59]{overflow:auto;background:var(--backdrop-background,rgba(0,0,0,.4));-webkit-overflow-scrolling:touch;width:100%;height:100%;position:fixed}.container[data-v-795f7b59]{margin-left:auto;margin-right:auto;width:1536px;width:980px;background:var(--colors-generic-modal-background,var(--color-generic-modal-background));z-index:1;position:relative;overflow:auto;max-width:100%}@media only screen and (max-width:1250px){.container[data-v-795f7b59]{width:692px}}@media only screen and (max-width:735px){.container[data-v-795f7b59]{width:87.5%}}@media only screen and (max-width:320px){.container[data-v-795f7b59]{width:215px}}.close[data-v-795f7b59]{position:absolute;z-index:9999;top:22px;left:22px;width:17px;height:17px;color:#666;cursor:pointer;background:none;border:0;display:flex;align-items:center}.close .close-icon[data-v-795f7b59]{fill:currentColor;width:100%;height:100%}.theme-dark .container[data-v-795f7b59]{background:#000}.theme-dark .container .close[data-v-795f7b59]{color:#b0b0b0}.theme-code .container[data-v-795f7b59]{background-color:var(--code-background,var(--color-code-background))}.highlight[data-v-4a2ce75d]{display:inline}.highlight[data-v-4a2ce75d] .match{font-weight:600;background:var(--color-fill-light-blue-secondary)}@media only screen and (max-width:735px){.preview[data-v-779b8b01]{display:none}}.unavailable[data-v-779b8b01]{align-items:center;display:flex;height:100%;justify-content:center}.loading[data-v-779b8b01]{padding:20px}.loading-row[data-v-779b8b01]{animation:pulse 2.5s ease;animation-delay:calc(1s + .3s*var(--index));animation-fill-mode:forwards;animation-iteration-count:infinite;background-color:var(--color-fill-gray-tertiary);border-radius:4px;height:12px;margin:20px 0;opacity:0}.loading-row[data-v-779b8b01]:first-of-type{margin-top:0}.loading-row[data-v-779b8b01]:last-of-type{margin-bottom:0}.quick-navigation[data-v-2f89fac2]{--input-border-color:var(--color-grid)}.quick-navigation input[type=text][data-v-2f89fac2]{font-size:1.2352941176rem;line-height:1.380952381;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:735px){.quick-navigation input[type=text][data-v-2f89fac2]{font-size:1.1176470588rem;line-height:1.4210526316;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.quick-navigation__filter[data-v-2f89fac2]{--input-horizontal-spacing:0.8823529412rem}.quick-navigation[data-v-2f89fac2] .filter__wrapper{background-color:var(--color-fill-secondary)}.quick-navigation__container[data-v-2f89fac2]{background-color:var(--color-fill-secondary);border:solid 1px var(--input-border-color);border-radius:var(--border-radius,4px);margin:0 .9411764706rem}.quick-navigation__container>[data-v-2f89fac2]{--input-text:var(--color-figure-gray-secondary)}.quick-navigation__container.focus[data-v-2f89fac2]{box-shadow:0 0 0 4px var(--color-focus-color);outline:none;border-color:var(--color-focus-border-color)}.quick-navigation__container[data-v-2f89fac2] .declaration-list-toggle{background-color:var(--color-fill-secondary)}.quick-navigation__magnifier-icon-container[data-v-2f89fac2]{width:1rem}.quick-navigation__magnifier-icon-container>[data-v-2f89fac2]{width:100%}.quick-navigation__magnifier-icon-container.blue .magnifier-icon[data-v-2f89fac2]{fill:var(--color-figure-blue);color:var(--color-figure-blue)}.quick-navigation__match-list[data-v-2f89fac2]{display:flex;max-height:26.4705882353rem;height:0}.quick-navigation__match-list>[data-v-2f89fac2]{min-width:0}.quick-navigation__match-list.active[data-v-2f89fac2]{height:auto;border-top:1px solid var(--input-border-color)}.quick-navigation__match-list .no-results[data-v-2f89fac2]{margin:.8823529412rem auto;width:-moz-fit-content;width:fit-content}.quick-navigation__refs[data-v-2f89fac2]{flex:1;overflow:auto}.quick-navigation__preview[data-v-2f89fac2]{border-left:1px solid var(--color-grid);flex:0 0 61.8%;overflow:auto;position:sticky;top:0}.quick-navigation__reference[data-v-2f89fac2]{display:block;padding:.5882352941rem .8823529412rem}.quick-navigation__reference[data-v-2f89fac2]:hover{text-decoration:none;background-color:var(--color-navigator-item-hover)}.quick-navigation__reference[data-v-2f89fac2]:focus{margin:0 .2941176471rem;padding:.5882352941rem .5882352941rem;background-color:var(--color-navigator-item-hover)}.quick-navigation__symbol-match[data-v-2f89fac2]{display:flex;height:2.3529411765rem;color:var(--color-figure-gray)}.quick-navigation__symbol-match .symbol-info[data-v-2f89fac2]{margin:auto;width:100%}.quick-navigation__symbol-match .symbol-info .navigator-icon[data-v-2f89fac2]{margin-right:.5882352941rem}.quick-navigation__symbol-match .symbol-info .symbol-name[data-v-2f89fac2]{display:flex}.quick-navigation__symbol-match .symbol-info .symbol-name .symbol-title[data-v-2f89fac2]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.quick-navigation__symbol-match .symbol-info .symbol-path[data-v-2f89fac2]{font-size:.8235294118rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-figure-gray-secondary);display:flex;margin-left:1.5882352941rem;overflow:hidden;white-space:nowrap}.quick-navigation__symbol-match .symbol-info .symbol-path .parent-path[data-v-2f89fac2]{padding-right:.2941176471rem}@media print{.sidebar[data-v-cd7929ee]{display:none}}.adjustable-sidebar-width[data-v-cd7929ee]{display:flex}@media only screen and (max-width:1023px){.adjustable-sidebar-width[data-v-cd7929ee]{display:block;position:relative}}.adjustable-sidebar-width.dragging[data-v-cd7929ee] *{cursor:col-resize!important}.adjustable-sidebar-width.sidebar-hidden.dragging[data-v-cd7929ee] *{cursor:e-resize!important}.sidebar[data-v-cd7929ee]{position:relative}@media only screen and (max-width:1023px){.sidebar[data-v-cd7929ee]{position:static}}.aside[data-v-cd7929ee]{width:250px;position:relative;height:100%;max-width:100vw}.aside.no-transition[data-v-cd7929ee]{transition:none!important}@media only screen and (min-width:1024px){.aside[data-v-cd7929ee]{transition:width .3s ease-in,visibility 0s linear var(--visibility-transition-time,0s)}.aside.dragging[data-v-cd7929ee]:not(.is-opening-on-large):not(.hide-on-large){transition:none}.aside.hide-on-large[data-v-cd7929ee]{width:0!important;visibility:hidden;pointer-events:none;--visibility-transition-time:0.3s}}@media only screen and (max-width:1023px){.aside[data-v-cd7929ee]{width:100%!important;overflow:hidden;min-width:0;max-width:100%;height:calc(var(--app-height) - var(--top-offset-mobile));position:fixed;top:var(--top-offset-mobile);bottom:0;z-index:9998;transform:translateX(-100%);transition:transform .15s ease-in;left:0}.aside[data-v-cd7929ee] .aside-animated-child{opacity:0}.aside.show-on-mobile[data-v-cd7929ee]{transform:translateX(0)}.aside.show-on-mobile[data-v-cd7929ee] .aside-animated-child{--index:0;opacity:1;transition:opacity .15s linear;transition-delay:calc(var(--index)*.15s + .15s)}.aside.has-mobile-top-offset[data-v-cd7929ee]{border-top:1px solid var(--color-fill-gray-tertiary)}}.content[data-v-cd7929ee]{display:flex;flex-flow:column;min-width:0;flex:1 1 auto;height:100%}.resize-handle[data-v-cd7929ee]{position:absolute;cursor:col-resize;top:0;bottom:0;right:0;width:5px;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1;transition:background-color .15s;transform:translateX(50%)}@media only screen and (max-width:1023px){.resize-handle[data-v-cd7929ee]{display:none}}.resize-handle[data-v-cd7929ee]:hover{background:var(--color-fill-gray-tertiary)}.navigator-card-item[data-v-5e71f320]{--nav-head-wrapper-left-space:20px;--nav-head-wrapper-right-space:20px;--head-wrapper-vertical-space:5px;--nav-depth-spacer:20px;--nesting-index:0;display:flex;align-items:stretch;min-height:32px;box-sizing:border-box;padding:0 var(--nav-head-wrapper-right-space) 0 var(--nav-head-wrapper-left-space)}.navigator-card-item.active .head-wrapper[data-v-5e71f320]{background:var(--color-fill-gray-quaternary)}.hover .navigator-card-item:not(.is-group) .head-wrapper[data-v-5e71f320]{background:var(--color-navigator-item-hover)}.depth-spacer[data-v-5e71f320]{width:calc(var(--nesting-index)*15px + var(--nav-depth-spacer));height:100%;position:relative;flex:0 0 auto}.title-container[data-v-5e71f320]{width:100%;min-width:0;display:flex;align-items:center}.navigator-icon-wrapper[data-v-5e71f320]{margin-right:7px}.head-wrapper[data-v-5e71f320]{position:relative;display:flex;align-items:center;flex:1;min-width:0;border-radius:var(--border-radius,4px);padding:var(--head-wrapper-vertical-space) 0}.fromkeyboard .head-wrapper[data-v-5e71f320]:focus-within{outline:4px solid var(--color-focus-color);outline-offset:-4px}@supports(padding:max(0px)){.head-wrapper[data-v-5e71f320]{padding-right:max(var(--nav-head-wrapper-right-space),env(safe-area-inset-right))}}.highlight[data-v-7b81ca08]{display:inline}.highlight[data-v-7b81ca08] .match{font-weight:600;background:var(--color-fill-light-blue-secondary)}.is-group .leaf-link[data-v-5148de22]{color:var(--color-figure-gray-tertiary);font-weight:600}.is-group .leaf-link[data-v-5148de22]:after{display:none}.navigator-icon[data-v-5148de22]{display:flex;flex:0 0 auto}.navigator-icon.changed[data-v-5148de22]{border:none;width:1em;height:1em;z-index:0}.navigator-icon.changed[data-v-5148de22]:after{top:50%;left:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);background-image:url(../img/modified-icon.efb2697d.svg);margin:0}@media screen{[data-color-scheme=dark] .navigator-icon.changed[data-v-5148de22]:after{background-image:url(../img/modified-icon.efb2697d.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .navigator-icon.changed[data-v-5148de22]:after{background-image:url(../img/modified-icon.efb2697d.svg)}}.navigator-icon.changed-added[data-v-5148de22]:after{background-image:url(../img/added-icon.832a5d2c.svg)}@media screen{[data-color-scheme=dark] .navigator-icon.changed-added[data-v-5148de22]:after{background-image:url(../img/added-icon.832a5d2c.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .navigator-icon.changed-added[data-v-5148de22]:after{background-image:url(../img/added-icon.832a5d2c.svg)}}.navigator-icon.changed-deprecated[data-v-5148de22]:after{background-image:url(../img/deprecated-icon.7bf1740a.svg)}@media screen{[data-color-scheme=dark] .navigator-icon.changed-deprecated[data-v-5148de22]:after{background-image:url(../img/deprecated-icon.7bf1740a.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .navigator-icon.changed-deprecated[data-v-5148de22]:after{background-image:url(../img/deprecated-icon.7bf1740a.svg)}}.leaf-link[data-v-5148de22]{color:var(--color-figure-gray);text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:100%;display:inline;vertical-align:middle;font-size:1rem;line-height:1.4705882353;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.fromkeyboard .leaf-link[data-v-5148de22]:focus{outline:none}.leaf-link[data-v-5148de22]:hover{text-decoration:none}.leaf-link.bolded[data-v-5148de22]{font-weight:600}.leaf-link[data-v-5148de22]:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0}.extended-content[data-v-5148de22]{font-size:.8235294118rem;line-height:1.4285714286;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-figure-gray-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tree-toggle[data-v-5148de22]{overflow:hidden;position:absolute;width:100%;height:100%;padding-right:5px;box-sizing:border-box;z-index:1;display:flex;align-items:center;justify-content:flex-end}.chevron[data-v-5148de22]{width:10px}.chevron.animating[data-v-5148de22]{transition:transform .15s ease-in}.chevron.rotate[data-v-5148de22]{transform:rotate(90deg)}.navigator-card[data-v-584a744a]{--card-vertical-spacing:10px;--card-horizontal-spacing:20px;--nav-filter-horizontal-padding:20px;--visibility-delay:1s;display:flex;flex-direction:column;min-height:0;height:calc(var(--app-height) - 3.05882rem);position:sticky;top:3.0588235294rem}@media only screen and (max-width:1023px){.navigator-card[data-v-584a744a]{height:100%;position:static;background:var(--color-fill)}}.navigator-card .navigator-card-full-height[data-v-584a744a]{min-height:0;flex:1 1 auto}.navigator-card .head-inner[data-v-584a744a]{display:none;width:100%;font-size:1.2352941176rem;line-height:1.1904761905;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);height:2.8235294118rem}@media only screen and (max-width:767px){.navigator-card .head-inner[data-v-584a744a]{font-size:1rem;line-height:1;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:1023px){.navigator-card .head-inner[data-v-584a744a]{display:flex;justify-content:flex-end;align-items:center}}.navigator-card .head-inner span[data-v-584a744a],.navigator-card .head-inner>a[data-v-584a744a]{color:var(--color-figure-gray);width:100%}.navigator-card .head-wrapper[data-v-584a744a]{display:flex;justify-content:space-between;flex:1 0 auto}@supports(padding:max(0px)){.navigator-card .head-wrapper[data-v-584a744a]{margin-left:max(var(--card-horizontal-spacing),env(safe-area-inset-left));margin-right:max(var(--card-horizontal-spacing),env(safe-area-inset-right))}}.close-card[data-v-584a744a]{margin:0}.close-card .close-icon[data-v-584a744a]{width:19px;height:19px}[data-v-584a744a] .card-body{display:flex;flex-direction:column;padding-right:0;flex:1 1 auto;min-height:0;height:100%}@media only screen and (max-width:1023px){[data-v-584a744a] .card-body{--card-vertical-spacing:0px}}.navigator-card-inner[data-v-584a744a]{display:flex;flex-flow:column;height:100%;padding-top:10px;box-sizing:border-box}@media only screen and (max-width:1023px){.navigator-card-inner[data-v-584a744a]{padding-top:0}}.filter-on-top .navigator-card-inner[data-v-584a744a]{padding-top:0}.vue-recycle-scroller{position:relative}.vue-recycle-scroller.direction-vertical:not(.page-mode){overflow-y:auto}.vue-recycle-scroller.direction-horizontal:not(.page-mode){overflow-x:auto}.vue-recycle-scroller.direction-horizontal{display:-webkit-box;display:-ms-flexbox;display:flex}.vue-recycle-scroller__slot{-webkit-box-flex:1;-ms-flex:auto 0 0px;flex:auto 0 0}.vue-recycle-scroller__item-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;position:relative}.vue-recycle-scroller.ready .vue-recycle-scroller__item-view{position:absolute;top:0;left:0;will-change:transform}.vue-recycle-scroller.direction-vertical .vue-recycle-scroller__item-wrapper{width:100%}.vue-recycle-scroller.direction-horizontal .vue-recycle-scroller__item-wrapper{height:100%}.vue-recycle-scroller.ready.direction-vertical .vue-recycle-scroller__item-view{width:100%}.vue-recycle-scroller.ready.direction-horizontal .vue-recycle-scroller__item-view{height:100%}.resize-observer[data-v-b329ee4c]{border:none;background-color:transparent;opacity:0}.resize-observer[data-v-b329ee4c],.resize-observer[data-v-b329ee4c] object{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;pointer-events:none;display:block;overflow:hidden}.navigator-card.filter-on-top .filter-wrapper[data-v-d6581240]{order:1;position:static}.navigator-card.filter-on-top .card-body[data-v-d6581240]{order:2}.no-items-wrapper[data-v-d6581240]{overflow:hidden;color:var(--color-figure-gray-tertiary)}.no-items-wrapper .no-items[data-v-d6581240]:not(:empty){font-size:.8235294118rem;line-height:1.4285714286;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);padding:var(--card-vertical-spacing) var(--card-horizontal-spacing);min-width:200px;box-sizing:border-box}.technology-title[data-v-d6581240]{padding:8px 10px;padding-left:20px;background:var(--color-fill);border-radius:var(--border-radius,4px);display:flex;white-space:nowrap}@supports(padding:max(0px)){.technology-title[data-v-d6581240]{margin-left:max(var(--card-horizontal-spacing),env(safe-area-inset-left));margin-right:max(var(--card-horizontal-spacing),env(safe-area-inset-right))}}@media only screen and (max-width:767px){.technology-title[data-v-d6581240]{margin-top:0}}.technology-title .card-link[data-v-d6581240]{color:var(--color-text);font-size:1.1176470588rem;line-height:1.2105263158;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);font-weight:600;overflow:hidden;text-overflow:ellipsis}.technology-title.router-link-exact-active[data-v-d6581240]{background:var(--color-fill-gray-quaternary)}.technology-title[data-v-d6581240]:hover{background:var(--color-navigator-item-hover);text-decoration:none}.navigator-filter[data-v-d6581240]{box-sizing:border-box;padding:15px var(--nav-filter-horizontal-padding);border-top:1px solid var(--color-grid);height:71px;display:flex;align-items:flex-end}.filter-on-top .navigator-filter[data-v-d6581240]{border-top:none;align-items:flex-start}@supports(padding:max(0px)){.navigator-filter[data-v-d6581240]{padding-left:max(var(--nav-filter-horizontal-padding),env(safe-area-inset-left));padding-right:max(var(--nav-filter-horizontal-padding),env(safe-area-inset-right))}}@media only screen and (max-width:1023px){.navigator-filter[data-v-d6581240]{--nav-filter-horizontal-padding:20px;border:none;padding-top:10px;padding-bottom:10px;height:60px}}.navigator-filter .input-wrapper[data-v-d6581240]{position:relative;flex:1;min-width:0}.navigator-filter .filter-component[data-v-d6581240]{--input-vertical-padding:8px;--input-height:22px;--input-border-color:var(--color-grid);--input-text:var(--color-figure-gray-secondary)}.navigator-filter .filter-component[data-v-d6581240] .filter__input{font-size:1rem;line-height:1.4705882353;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.navigator-filter .filter-component[data-v-d6581240] .filter__input-label:after{min-width:70px}.scroller[data-v-d6581240]{height:100%;box-sizing:border-box;padding-bottom:calc(var(--top-offset, 0px) + var(--card-vertical-spacing));transition:padding-bottom .15s ease-in}@media only screen and (max-width:1023px){.scroller[data-v-d6581240]{padding-bottom:10em}}.scroller[data-v-d6581240] .vue-recycle-scroller__item-wrapper{transform:translateZ(0)}.filter-wrapper[data-v-d6581240]{position:sticky;bottom:0;background:var(--color-fill)}.sidebar-transitioning .filter-wrapper[data-v-d6581240]{flex:1 0 71px;overflow:hidden}@media only screen and (max-width:1023px){.sidebar-transitioning .filter-wrapper[data-v-d6581240]{flex-basis:60px}}.loader[data-v-0de29914]{height:.7058823529rem;background-color:var(--color-fill-gray-tertiary);border-radius:4px}.navigator-icon[data-v-0de29914]{width:16px;height:16px;border-radius:2px;background-color:var(--color-fill-gray-tertiary)}.loading-navigator-item[data-v-0de29914]{animation:pulse 2.5s ease;animation-iteration-count:infinite;animation-fill-mode:forwards;opacity:0;animation-delay:calc(var(--visibility-delay) + .3s*var(--index))}.delay-visibility-enter-active[data-v-3b7cf3a4]{transition:visibility var(--visibility-delay);visibility:hidden}.loading-navigator[data-v-3b7cf3a4]{padding-top:10px}.navigator[data-v-5611024b]{height:100%;display:flex;flex-flow:column}@media only screen and (max-width:1023px){.navigator[data-v-5611024b]{position:static;transition:none}}[data-v-5611024b] .nav-title{font-size:inherit;font-weight:inherit;flex-grow:1}.nav-menu-setting-label[data-v-4323807e]{display:inline-block;margin-right:.2941176471rem;white-space:nowrap}.language-container[data-v-4323807e]{flex:1 0 auto}.language-dropdown[data-v-4323807e]{-webkit-text-size-adjust:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background-color:transparent;box-sizing:inherit;padding:0 11px 0 4px;margin-left:-4px;font-size:.8235294118rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);cursor:pointer;position:relative;z-index:1}@media only screen and (max-width:1023px){.language-dropdown[data-v-4323807e]{font-size:.8235294118rem;line-height:1.5;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.language-dropdown[data-v-4323807e]:focus{outline:none}.fromkeyboard .language-dropdown[data-v-4323807e]:focus{outline:4px solid var(--color-focus-color);outline-offset:1px}.language-sizer[data-v-4323807e]{position:absolute;opacity:0;pointer-events:none;padding:0}.language-toggle-container[data-v-4323807e]{display:flex;align-items:center;padding-right:.1764705882rem;position:relative}.nav--in-breakpoint-range .language-toggle-container[data-v-4323807e]{display:none}.language-toggle-container .toggle-icon[data-v-4323807e]{width:.6em;height:.6em;position:absolute;right:7px}.language-toggle-label[data-v-4323807e]{margin-right:2px}.language-toggle.nav-menu-toggle-label[data-v-4323807e]{margin-right:6px}.language-list[data-v-4323807e]{display:inline-block;margin-top:0}.language-list-container[data-v-4323807e]{display:none}.language-list-item[data-v-4323807e],.nav--in-breakpoint-range .language-list-container[data-v-4323807e]{display:inline-block}.language-list-item[data-v-4323807e]:not(:first-child){border-left:1px solid var(--color-grid);margin-left:6px;padding-left:6px}[data-v-6fe78e04] .nav-menu{line-height:1.5}[data-v-6fe78e04] .nav-menu,[data-v-6fe78e04] .nav-menu-settings{font-size:.8235294118rem;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}[data-v-6fe78e04] .nav-menu-settings{min-width:0;gap:.5882352941rem;line-height:1.2857142857}@media only screen and (max-width:1023px){[data-v-6fe78e04] .nav-menu-settings{font-size:.8235294118rem;line-height:1.5;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (min-width:1024px){[data-v-6fe78e04] .nav-menu-settings{margin-left:.5882352941rem}}[data-v-6fe78e04] .nav-menu-settings .nav-menu-setting{display:flex;align-items:center;color:var(--color-nav-current-link);margin-left:0;min-width:0}[data-v-6fe78e04] .nav-menu-settings .nav-menu-setting .nav-menu-link{font-weight:600;text-decoration:underline}.theme-dark[data-v-6fe78e04] .nav-menu-settings .nav-menu-setting{color:var(--color-nav-dark-current-link)}.nav--in-breakpoint-range[data-v-6fe78e04] .nav-menu-settings .nav-menu-setting:not(:first-child){border-top:1px solid var(--color-fill-gray-tertiary)}.documentation-nav[data-v-6fe78e04]{--color-nav-background:var(--color-fill)}.documentation-nav[data-v-6fe78e04] .nav-title{font-size:1.2352941176rem;line-height:1.1904761905;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:767px){.documentation-nav[data-v-6fe78e04] .nav-title{font-size:1rem;line-height:1;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.sidenav-toggle-wrapper[data-v-6fe78e04]{display:flex;margin-top:1px;margin-right:.6470588235rem}.nav--in-breakpoint-range .sidenav-toggle-wrapper[data-v-6fe78e04]{display:flex!important}@media only screen and (min-width:1024px){.sidenav-toggle-enter-active[data-v-6fe78e04],.sidenav-toggle-leave-active[data-v-6fe78e04]{transition:margin .3s ease-in 0s}.sidenav-toggle-enter[data-v-6fe78e04],.sidenav-toggle-leave-to[data-v-6fe78e04]{margin-left:-3.7647058824rem}}.sidenav-toggle[data-v-6fe78e04]{align-self:center;color:var(--color-nav-link-color);position:relative;margin:0 -5px;border-radius:var(--border-radius,4px)}.theme-dark .sidenav-toggle[data-v-6fe78e04]{color:var(--color-nav-dark-link-color)}.sidenav-toggle:hover .sidenav-icon-wrapper[data-v-6fe78e04]{background:var(--color-fill-gray-quaternary)}.theme-dark .sidenav-toggle:hover .sidenav-icon-wrapper[data-v-6fe78e04]{background:#424242}.sidenav-toggle__separator[data-v-6fe78e04]{height:.8em;width:1px;background:var(--color-nav-color);align-self:center;margin:0 1.2941176471rem}.nav--in-breakpoint-range .sidenav-toggle__separator[data-v-6fe78e04]{display:none}.sidenav-icon-wrapper[data-v-6fe78e04]{padding:5px;display:flex;align-items:center;justify-content:center;border-radius:var(--border-radius,4px)}.sidenav-icon[data-v-6fe78e04]{display:flex;width:19px;height:19px}[data-v-33435637] .generic-modal{overflow-y:overlay}[data-v-33435637] .modal-fullscreen>.container{background-color:transparent;height:-moz-fit-content;height:fit-content;flex:auto;margin:9.4117647059rem 0;max-width:47.0588235294rem;overflow:visible}[data-v-33435637] .navigator-filter .quick-navigation-open{margin-left:var(--nav-filter-horizontal-padding);width:calc(var(--nav-filter-horizontal-padding)*2)}.documentation-layout[data-v-33435637]{--delay:1s;display:flex;flex-flow:column;background:var(--colors-text-background,var(--color-text-background))}.documentation-layout .delay-hiding-leave-active[data-v-33435637]{transition:display var(--delay)}.documentation-layout-aside[data-v-33435637]{height:100%;box-sizing:border-box;border-right:1px solid var(--color-grid)}@media only screen and (max-width:1023px){.documentation-layout-aside[data-v-33435637]{background:var(--color-fill);border-right:none}.sidebar-transitioning .documentation-layout-aside[data-v-33435637]{border-right:1px solid var(--color-grid)}}.topic-wrapper[data-v-33435637]{flex:1 1 auto;width:100%}:root.no-js .topic-wrapper[data-v-33435637] .sidebar{display:none}.full-width-container[data-v-33435637]{max-width:1920px;margin-left:auto;margin-right:auto}@media only screen and (min-width:1920px){.full-width-container[data-v-33435637]{border-left:1px solid var(--color-grid);border-right:1px solid var(--color-grid);box-sizing:border-box}} \ No newline at end of file diff --git a/docs/css/index.3a335429.css b/docs/css/index.3a335429.css new file mode 100644 index 00000000..07a87fc9 --- /dev/null +++ b/docs/css/index.3a335429.css @@ -0,0 +1,9 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */.color-scheme-toggle[data-v-0c0360ce]{--toggle-color-fill:var(--color-button-background);--toggle-color-text:var(--color-fill-blue);font-size:.7058823529rem;line-height:1.3333333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);border:1px solid var(--toggle-color-fill);border-radius:var(--toggle-border-radius-outer,var(--border-radius,4px));display:inline-flex;padding:1px}@media screen{[data-color-scheme=dark] .color-scheme-toggle[data-v-0c0360ce]{--toggle-color-text:var(--color-figure-blue)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .color-scheme-toggle[data-v-0c0360ce]{--toggle-color-text:var(--color-figure-blue)}}@media print{.color-scheme-toggle[data-v-0c0360ce]{display:none}}:root.no-js .color-scheme-toggle[data-v-0c0360ce]{visibility:hidden}input[data-v-0c0360ce]{position:absolute;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(0 0 99.9% 99.9%);clip-path:inset(0 0 99.9% 99.9%);overflow:hidden;height:1px;width:1px;padding:0;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.fromkeyboard label[data-v-0c0360ce]:focus-within{outline:4px solid var(--color-focus-color);outline-offset:1px}.text[data-v-0c0360ce]{border:1px solid transparent;border-radius:var(--toggle-border-radius-inner,2px);color:var(--toggle-color-text);display:inline-block;text-align:center;padding:1px 6px;min-width:42px;box-sizing:border-box}.text[data-v-0c0360ce]:hover{cursor:pointer}input:checked+.text[data-v-0c0360ce]{--toggle-color-text:var(--color-button-text);background:var(--toggle-color-fill);border-color:var(--toggle-color-fill)}.footer[data-v-f1d65b2a]{border-top:1px solid var(--color-grid)}.row[data-v-f1d65b2a]{margin-left:auto;margin-right:auto;width:1536px;width:980px;display:flex;flex-direction:row-reverse;margin:20px auto}@media only screen and (max-width:1250px){.row[data-v-f1d65b2a]{width:692px}}@media only screen and (max-width:735px){.row[data-v-f1d65b2a]{width:87.5%}}@media only screen and (max-width:320px){.row[data-v-f1d65b2a]{width:215px}}@media only screen and (max-width:735px){.row[data-v-f1d65b2a]{width:100%;padding:0 .9411764706rem;box-sizing:border-box}}.InitialLoadingPlaceholder[data-v-35c356b6]{background:var(--colors-loading-placeholder-background,var(--color-loading-placeholder-background));height:100vh;width:100%}.svg-icon[data-v-3434f4d2]{fill:var(--colors-svg-icon-fill-light,var(--color-svg-icon));transform:scale(1);-webkit-transform:scale(1);overflow:visible}.theme-dark .svg-icon[data-v-3434f4d2]{fill:var(--colors-svg-icon-fill-dark,var(--color-svg-icon))}@media screen{[data-color-scheme=dark] .svg-icon[data-v-3434f4d2]{fill:var(--colors-svg-icon-fill-dark,var(--color-svg-icon))}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .svg-icon[data-v-3434f4d2]{fill:var(--colors-svg-icon-fill-dark,var(--color-svg-icon))}}.svg-icon.icon-inline[data-v-3434f4d2]{display:inline-block;vertical-align:middle;fill:currentColor}.svg-icon.icon-inline[data-v-3434f4d2] .svg-icon-stroke{stroke:currentColor}[data-v-3434f4d2] .svg-icon-stroke{stroke:var(--colors-svg-icon-fill-light,var(--color-svg-icon))}.theme-dark[data-v-3434f4d2] .svg-icon-stroke{stroke:var(--colors-svg-icon-fill-dark,var(--color-svg-icon))}@media screen{[data-color-scheme=dark][data-v-3434f4d2] .svg-icon-stroke{stroke:var(--colors-svg-icon-fill-dark,var(--color-svg-icon))}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto][data-v-3434f4d2] .svg-icon-stroke{stroke:var(--colors-svg-icon-fill-dark,var(--color-svg-icon))}}.suggest-lang[data-v-c2dca0ae]{background:#000;color:#fff;display:flex;justify-content:center;border-bottom:1px solid var(--color-grid)}.suggest-lang__wrapper[data-v-c2dca0ae]{display:flex;align-items:center;width:100%;max-width:var(--wrapper-max-width,1920px);margin:0 .9411764706rem;position:relative;height:52px}.suggest-lang__link[data-v-c2dca0ae]{font-size:.8235294118rem;line-height:1.4285714286;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);margin:0 auto;color:#09f}.suggest-lang__close-icon-wrapper[data-v-c2dca0ae]{position:absolute;right:-.2352941176rem;top:0;height:100%;box-sizing:border-box;display:flex;align-items:center;z-index:1}.suggest-lang__close-icon-button[data-v-c2dca0ae]{padding:.2352941176rem}.suggest-lang__close-icon-button .close-icon[data-v-c2dca0ae]{width:8px;display:block}.suggest-lang .inline-chevron-right-icon[data-v-c2dca0ae]{padding-left:.2352941176rem;width:8px}select[data-v-d21858a2]{font-size:.7058823529rem;line-height:1.3333333333;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-fill-blue);padding-right:15px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:none;cursor:pointer}select[data-v-d21858a2]:hover{text-decoration:underline}.locale-selector[data-v-d21858a2]{position:relative}.svg-icon.icon-inline[data-v-d21858a2]{position:absolute;fill:var(--color-fill-blue);right:2px;bottom:7px;height:5px}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;background-color:var(--colors-text-background,var(--color-text-background));height:100%}abbr,blockquote,body,button,dd,dl,dt,fieldset,figure,form,h1,h2,h3,h4,h5,h6,hgroup,input,legend,li,ol,p,pre,ul{margin:0;padding:0}address,caption,code,figcaption,pre,th{font-size:1em;font-weight:400;font-style:normal}fieldset,iframe,img{border:0}caption,th{text-align:left}table{border-collapse:collapse;border-spacing:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}button{background:none;border:0;box-sizing:content-box;color:inherit;cursor:pointer;font:inherit;line-height:inherit;overflow:visible;vertical-align:inherit}button:disabled{cursor:default}:focus{outline:4px solid var(--color-focus-color);outline-offset:1px}::-moz-focus-inner{border:0;padding:0}@media print{#app-main,#content,body{color:#000}a,a:link,a:visited{color:#000;text-decoration:none}.hide,.noprint{display:none}}body{height:100%;min-width:320px}html{font:var(--typography-html-font,17px "Helvetica Neue","Helvetica","Arial",sans-serif);quotes:"“" "”"}html:lang(ja-JP){quotes:"「" "」"}body{font-size:1rem;line-height:1.4705882353;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);background-color:var(--color-text-background);color:var(--colors-text,var(--color-text));font-style:normal;word-wrap:break-word;--spacing-stacked-margin-small:0.4em;--spacing-stacked-margin-large:0.8em;--spacing-stacked-margin-xlarge:calc(var(--spacing-stacked-margin-large)*2);--spacing-param:1.6470588235rem;--declaration-code-listing-margin:30px 0 0 0;--code-block-style-elements-padding:8px 14px}body,button,input,select,textarea{font-synthesis:none;-moz-font-feature-settings:"kern";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;direction:ltr;text-align:left}h1,h2,h3,h4,h5,h6{color:var(--colors-header-text,var(--color-header-text))}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:var(--spacing-stacked-margin-large)}ol+h1,ol+h2,ol+h3,ol+h4,ol+h5,ol+h6,p+h1,p+h2,p+h3,p+h4,p+h5,p+h6,ul+h1,ul+h2,ul+h3,ul+h4,ul+h5,ul+h6{margin-top:1.6em}ol+*,p+*,ul+*{margin-top:var(--spacing-stacked-margin-large)}ol,ul{margin-left:1.1764705882em}ol ol,ol ul,ul ol,ul ul{margin-top:0;margin-bottom:0}nav ol,nav ul{margin:0;list-style:none}li li{font-size:1em}a{color:var(--colors-link,var(--color-link))}a:link,a:visited{text-decoration:none}a.inline-link,a:hover{text-decoration:underline}a:active{text-decoration:none}p+a{display:inline-block}b,strong{font-weight:600}cite,dfn,em,i{font-style:italic}sup{font-size:.6em;vertical-align:top;position:relative;bottom:-.2em}h1 sup,h2 sup,h3 sup{font-size:.4em}sup a{vertical-align:inherit;color:inherit}sup a:hover{color:var(--figure-blue);text-decoration:none}sub{line-height:1}abbr{border:0}pre{overflow:auto;-webkit-overflow-scrolling:auto;white-space:pre;word-wrap:normal}code{font-family:var(--typography-html-font-mono,Menlo,monospace);font-weight:inherit;letter-spacing:0}.syntax-addition{color:var(--syntax-addition,var(--color-syntax-addition))}.syntax-comment{color:var(--syntax-comment,var(--color-syntax-comments))}.syntax-quote{color:var(--syntax-quote,var(--color-syntax-comments))}.syntax-deletion{color:var(--syntax-deletion,var(--color-syntax-deletion))}.syntax-keyword{color:var(--syntax-keyword,var(--color-syntax-keywords))}.syntax-literal{color:var(--syntax-literal,var(--color-syntax-keywords))}.syntax-selector-tag{color:var(--syntax-selector-tag,var(--color-syntax-keywords))}.syntax-string{color:var(--syntax-string,var(--color-syntax-strings))}.syntax-bullet{color:var(--syntax-bullet,var(--color-syntax-characters))}.syntax-meta{color:var(--syntax-meta,var(--color-syntax-characters))}.syntax-number{color:var(--syntax-number,var(--color-syntax-characters))}.syntax-symbol{color:var(--syntax-symbol,var(--color-syntax-characters))}.syntax-tag{color:var(--syntax-tag,var(--color-syntax-characters))}.syntax-attr{color:var(--syntax-attr,var(--color-syntax-other-type-names))}.syntax-built_in{color:var(--syntax-built_in,var(--color-syntax-other-type-names))}.syntax-builtin-name{color:var(--syntax-builtin-name,var(--color-syntax-other-type-names))}.syntax-class{color:var(--syntax-class,var(--color-syntax-other-type-names))}.syntax-params{color:var(--syntax-params,var(--color-syntax-other-type-names))}.syntax-section{color:var(--syntax-section,var(--color-syntax-other-type-names))}.syntax-title{color:var(--syntax-title,var(--color-syntax-other-type-names))}.syntax-type{color:var(--syntax-type,var(--color-syntax-other-type-names))}.syntax-attribute{color:var(--syntax-attribute,var(--color-syntax-plain-text))}.syntax-identifier{color:var(--syntax-identifier,var(--color-syntax-plain-text))}.syntax-subst{color:var(--syntax-subst,var(--color-syntax-plain-text))}.syntax-doctag,.syntax-strong{font-weight:700}.syntax-emphasis,.syntax-link{font-style:italic}[data-syntax=swift] .syntax-meta{color:var(--syntax-meta,var(--color-syntax-keywords))}[data-syntax=swift] .syntax-class,[data-syntax=swift] .syntax-keyword+.syntax-params,[data-syntax=swift] .syntax-params+.syntax-params{color:unset}[data-syntax=json] .syntax-attr{color:var(--syntax-attr,var(--color-syntax-strings))}#skip-nav{position:absolute;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(0 0 99.9% 99.9%);clip-path:inset(0 0 99.9% 99.9%);overflow:hidden;height:1px;width:1px;padding:0;border:0}#skip-nav:active,#skip-nav:focus{position:relative;float:left;width:-moz-fit-content;width:fit-content;color:var(--color-figure-blue);font-size:1em;padding:0 10px;z-index:100000;top:0;left:0;height:44px;line-height:44px;-webkit-clip-path:unset;clip-path:unset}.nav--in-breakpoint-range #skip-nav{display:none}.visuallyhidden{position:absolute;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(0 0 99.9% 99.9%);clip-path:inset(0 0 99.9% 99.9%);overflow:hidden;height:1px;width:1px;padding:0;border:0}@keyframes pulse{0%{opacity:0}33%{opacity:1}66%{opacity:1}to{opacity:0}}.changed{border:1px solid var(--color-changes-modified);position:relative}.changed,.changed.displays-multiple-lines,.displays-multiple-lines .changed{border-radius:var(--border-radius,4px)}.changed:after{left:8px;background-image:url(../img/modified-icon.efb2697d.svg);background-repeat:no-repeat;bottom:0;content:" ";margin:auto;margin-right:8px;position:absolute;top:0;width:1.1764705882rem;height:1.1764705882rem;margin-top:.6176470588rem;z-index:2}@media screen{[data-color-scheme=dark] .changed:after{background-image:url(../img/modified-icon.efb2697d.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .changed:after{background-image:url(../img/modified-icon.efb2697d.svg)}}.changed-added{border-color:var(--color-changes-added)}.changed-added:after{background-image:url(../img/added-icon.832a5d2c.svg)}@media screen{[data-color-scheme=dark] .changed-added:after{background-image:url(../img/added-icon.832a5d2c.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .changed-added:after{background-image:url(../img/added-icon.832a5d2c.svg)}}.changed-deprecated{border-color:var(--color-changes-deprecated)}.changed-deprecated:after{background-image:url(../img/deprecated-icon.7bf1740a.svg)}@media screen{[data-color-scheme=dark] .changed-deprecated:after{background-image:url(../img/deprecated-icon.7bf1740a.svg)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .changed-deprecated:after{background-image:url(../img/deprecated-icon.7bf1740a.svg)}}.changed.link-block:after,.changed.relationships-item:after,.link-block .changed:after{margin-top:10px}.change-added,.change-removed{padding:2px 0}.change-removed{background-color:var(--color-highlight-red)}.change-added{background-color:var(--color-highlight-green)}body{color-scheme:light dark}body[data-color-scheme=light]{color-scheme:light}body[data-color-scheme=dark]{color-scheme:dark}body{--color-fill:#fff;--color-fill-secondary:#f7f7f7;--color-fill-tertiary:#f0f0f0;--color-fill-quaternary:#282828;--color-fill-blue:#00f;--color-fill-light-blue-secondary:#d1d1ff;--color-fill-gray:#ccc;--color-fill-gray-secondary:#f5f5f5;--color-fill-gray-tertiary:#f0f0f0;--color-fill-gray-quaternary:#f0f0f0;--color-fill-green-secondary:#f0fff0;--color-fill-orange-secondary:#fffaf6;--color-fill-red-secondary:#fff0f5;--color-figure-blue:#36f;--color-figure-gray:#000;--color-figure-gray-secondary:#666;--color-figure-gray-secondary-alt:#666;--color-figure-gray-tertiary:#666;--color-figure-green:green;--color-figure-light-gray:#666;--color-figure-orange:#c30;--color-figure-red:red;--color-tutorials-teal:#000;--color-article-background:var(--color-fill-tertiary);--color-article-body-background:var(--color-fill);--color-aside-deprecated:var(--color-figure-gray);--color-aside-deprecated-background:var(--color-fill-orange-secondary);--color-aside-deprecated-border:var(--color-figure-orange);--color-aside-experiment:var(--color-figure-gray);--color-aside-experiment-background:var(--color-fill-gray-secondary);--color-aside-experiment-border:var(--color-figure-light-gray);--color-aside-important:var(--color-figure-gray);--color-aside-important-background:var(--color-fill-gray-secondary);--color-aside-important-border:var(--color-figure-light-gray);--color-aside-note:var(--color-figure-gray);--color-aside-note-background:var(--color-fill-gray-secondary);--color-aside-note-border:var(--color-figure-light-gray);--color-aside-tip:var(--color-figure-gray);--color-aside-tip-background:var(--color-fill-gray-secondary);--color-aside-tip-border:var(--color-figure-light-gray);--color-aside-warning:var(--color-figure-gray);--color-aside-warning-background:var(--color-fill-red-secondary);--color-aside-warning-border:var(--color-figure-red);--color-badge-text:#fff;--color-badge-default:var(--color-figure-gray);--color-badge-beta:var(--color-figure-gray-tertiary);--color-badge-deprecated:var(--color-figure-orange);--color-badge-dark-default:#fff;--color-badge-dark-beta:#b0b0b0;--color-badge-dark-deprecated:#f60;--color-button-background:var(--color-fill-blue);--color-button-background-active:#36f;--color-button-background-hover:var(--color-figure-blue);--color-button-text:#fff;--color-call-to-action-background:var(--color-fill-secondary);--color-changes-added:var(--color-figure-light-gray);--color-changes-added-hover:var(--color-figure-light-gray);--color-changes-deprecated:var(--color-figure-light-gray);--color-changes-deprecated-hover:var(--color-figure-light-gray);--color-changes-modified:var(--color-figure-light-gray);--color-changes-modified-hover:var(--color-figure-light-gray);--color-changes-modified-previous-background:var(--color-fill);--color-code-background:var(--color-fill-secondary);--color-code-collapsible-background:var(--color-fill-tertiary);--color-code-collapsible-text:var(--color-figure-gray-secondary-alt);--color-code-line-highlight:rgba(51,102,255,.08);--color-code-line-highlight-border:var(--color-figure-blue);--color-code-plain:var(--color-figure-gray);--color-dropdown-background:hsla(0,0%,100%,.8);--color-dropdown-border:#ccc;--color-dropdown-option-text:#666;--color-dropdown-text:#000;--color-dropdown-dark-background:hsla(0,0%,100%,.1);--color-dropdown-dark-border:hsla(0,0%,94%,.2);--color-dropdown-dark-option-text:#ccc;--color-dropdown-dark-text:#fff;--color-eyebrow:var(--color-figure-gray-secondary);--color-focus-border-color:var(--color-fill-blue);--color-focus-color:rgba(0,125,250,.6);--color-form-error:var(--color-figure-red);--color-form-error-background:var(--color-fill-red-secondary);--color-form-valid:var(--color-figure-green);--color-form-valid-background:var(--color-fill-green-secondary);--color-generic-modal-background:var(--color-fill);--color-grid:var(--color-fill-gray);--color-header-text:var(--color-figure-gray);--color-hero-eyebrow:#ccc;--color-link:var(--color-figure-blue);--color-loading-placeholder-background:var(--color-fill);--color-nav-color:#000;--color-nav-current-link:#000;--color-nav-expanded:#fff;--color-nav-hierarchy-collapse-background:#f0f0f0;--color-nav-hierarchy-collapse-borders:#ccc;--color-nav-hierarchy-item-borders:#ccc;--color-nav-keyline:rgba(0,0,0,.2);--color-nav-link-color:#000;--color-nav-link-color-hover:#36f;--color-nav-outlines:#ccc;--color-nav-rule:hsla(0,0%,94%,.5);--color-nav-solid-background:#fff;--color-nav-sticking-expanded-keyline:rgba(0,0,0,.1);--color-nav-stuck:hsla(0,0%,100%,.9);--color-nav-uiblur-expanded:hsla(0,0%,100%,.9);--color-nav-uiblur-stuck:hsla(0,0%,100%,.7);--color-nav-root-subhead:var(--color-tutorials-teal);--color-nav-dark-border-top-color:hsla(0,0%,100%,.4);--color-nav-dark-color:#fff;--color-nav-dark-current-link:#fff;--color-nav-dark-expanded:#2a2a2a;--color-nav-dark-hierarchy-collapse-background:#424242;--color-nav-dark-hierarchy-collapse-borders:#666;--color-nav-dark-hierarchy-item-borders:#424242;--color-nav-dark-keyline:rgba(66,66,66,.95);--color-nav-dark-link-color:#fff;--color-nav-dark-link-color-hover:#09f;--color-nav-dark-outlines:#575757;--color-nav-dark-rule:#575757;--color-nav-dark-solid-background:#000;--color-nav-dark-sticking-expanded-keyline:rgba(66,66,66,.7);--color-nav-dark-stuck:rgba(42,42,42,.9);--color-nav-dark-uiblur-expanded:rgba(42,42,42,.9);--color-nav-dark-uiblur-stuck:rgba(42,42,42,.7);--color-nav-dark-root-subhead:#fff;--color-other-decl-button:var(--color-text-background);--color-runtime-preview-background:var(--color-fill-tertiary);--color-runtime-preview-disabled-text:hsla(0,0%,40%,.6);--color-runtime-preview-text:var(--color-figure-gray-secondary);--color-secondary-label:var(--color-figure-gray-secondary);--color-step-background:var(--color-fill-secondary);--color-step-caption:var(--color-figure-gray-secondary);--color-step-focused:var(--color-figure-light-gray);--color-step-text:var(--color-figure-gray-secondary);--color-svg-icon:#666;--color-syntax-addition:var(--color-figure-green);--color-syntax-attributes:#947100;--color-syntax-characters:#272ad8;--color-syntax-comments:#707f8c;--color-syntax-deletion:var(--color-figure-red);--color-syntax-documentation-markup:#506375;--color-syntax-documentation-markup-keywords:#506375;--color-syntax-heading:#ba2da2;--color-syntax-highlighted:rgba(0,113,227,.2);--color-syntax-keywords:#ad3da4;--color-syntax-marks:#000;--color-syntax-numbers:#272ad8;--color-syntax-other-class-names:#703daa;--color-syntax-other-constants:#4b21b0;--color-syntax-other-declarations:#047cb0;--color-syntax-other-function-and-method-names:#4b21b0;--color-syntax-other-instance-variables-and-globals:#703daa;--color-syntax-other-preprocessor-macros:#78492a;--color-syntax-other-type-names:#703daa;--color-syntax-param-internal-name:#404040;--color-syntax-plain-text:#000;--color-syntax-preprocessor-statements:#78492a;--color-syntax-project-class-names:#3e8087;--color-syntax-project-constants:#2d6469;--color-syntax-project-function-and-method-names:#2d6469;--color-syntax-project-instance-variables-and-globals:#3e8087;--color-syntax-project-preprocessor-macros:#78492a;--color-syntax-project-type-names:#3e8087;--color-syntax-strings:#d12f1b;--color-syntax-type-declarations:#03638c;--color-syntax-urls:#1337ff;--color-tabnav-item-border-color:var(--color-fill-gray);--color-text:var(--color-figure-gray);--color-text-background:var(--color-fill);--color-tutorial-assessments-background:var(--color-fill-secondary);--color-tutorial-background:var(--color-fill);--color-tutorial-navbar-dropdown-background:var(--color-fill);--color-tutorial-navbar-dropdown-border:var(--color-fill-gray);--color-tutorial-quiz-border-active:var(--color-figure-blue);--color-tutorials-overview-background:#161616;--color-tutorials-overview-content:#fff;--color-tutorials-overview-content-alt:#fff;--color-tutorials-overview-eyebrow:#ccc;--color-tutorials-overview-icon:#b0b0b0;--color-tutorials-overview-link:#09f;--color-tutorials-overview-navigation-link:#ccc;--color-tutorials-overview-navigation-link-active:#fff;--color-tutorials-overview-navigation-link-hover:#fff;--color-tutorial-hero-text:#fff;--color-tutorial-hero-background:#000;--color-navigator-item-hover:rgba(0,0,255,.05);--color-card-background:var(--color-fill);--color-card-content-text:var(--color-figure-gray);--color-card-eyebrow:var(--color-figure-gray-secondary-alt);--color-card-shadow:rgba(0,0,0,.04);--color-link-block-card-border:rgba(0,0,0,.04);--color-standard-red:#ffc2c2;--color-standard-orange:#fc9;--color-standard-yellow:#ffe0a3;--color-standard-blue:#9cf;--color-standard-green:#9cc;--color-standard-purple:#ccf;--color-standard-gray:#f0f0f0}@media screen{body[data-color-scheme=dark]{--color-fill:#000;--color-fill-secondary:#161616;--color-fill-tertiary:#2a2a2a;--color-fill-blue:#06f;--color-fill-light-blue-secondary:#004ec4;--color-fill-gray:#575757;--color-fill-gray-secondary:#222;--color-fill-gray-tertiary:#424242;--color-fill-gray-quaternary:#424242;--color-fill-green-secondary:#030;--color-fill-orange-secondary:#472400;--color-fill-red-secondary:#300;--color-figure-blue:#09f;--color-figure-gray:#fff;--color-figure-gray-secondary:#ccc;--color-figure-gray-secondary-alt:#b0b0b0;--color-figure-gray-tertiary:#b0b0b0;--color-figure-green:#090;--color-figure-light-gray:#b0b0b0;--color-figure-orange:#f60;--color-figure-red:#f33;--color-tutorials-teal:#fff;--color-article-body-background:#111;--color-badge-text:#000;--color-badge-default:var(--color-badge-dark-default);--color-button-background-active:#06f;--color-code-line-highlight:rgba(0,153,255,.08);--color-dropdown-background:var(--color-dropdown-dark-background);--color-dropdown-border:var(--color-dropdown-dark-border);--color-dropdown-option-text:var(--color-dropdown-dark-option-text);--color-dropdown-text:var(--color-dropdown-dark-text);--color-nav-color:var(--color-nav-dark-color);--color-nav-current-link:var(--color-nav-dark-current-link);--color-nav-expanded:var(--color-nav-dark-expanded);--color-nav-hierarchy-collapse-background:var(--color-nav-dark-hierarchy-collapse-background);--color-nav-hierarchy-collapse-borders:var(--color-nav-dark-hierarchy-collapse-borders);--color-nav-hierarchy-item-borders:var(--color-nav-dark-hierarchy-item-borders);--color-nav-keyline:var(--color-nav-dark-keyline);--color-nav-link-color:var(--color-nav-dark-link-color);--color-nav-link-color-hover:var(--color-nav-dark-link-color-hover);--color-nav-outlines:var(--color-nav-dark-outlines);--color-nav-rule:var(--color-nav-dark-rule);--color-nav-solid-background:var(--color-nav-dark-solid-background);--color-nav-sticking-expanded-keyline:var(--color-nav-dark-sticking-expanded-keyline);--color-nav-stuck:var(--color-nav-dark-stuck);--color-nav-uiblur-expanded:var(--color-nav-dark-uiblur-expanded);--color-nav-uiblur-stuck:var(--color-nav-dark-uiblur-stuck);--color-runtime-preview-disabled-text:hsla(0,0%,80%,.6);--color-syntax-attributes:#cc9768;--color-syntax-characters:#d9c97c;--color-syntax-comments:#7f8c98;--color-syntax-documentation-markup:#7f8c98;--color-syntax-documentation-markup-keywords:#a3b1bf;--color-syntax-highlighted:rgba(0,113,227,.6);--color-syntax-keywords:#ff7ab2;--color-syntax-marks:#fff;--color-syntax-numbers:#d9c97c;--color-syntax-other-class-names:#dabaff;--color-syntax-other-constants:#a7ebdd;--color-syntax-other-declarations:#4eb0cc;--color-syntax-other-function-and-method-names:#b281eb;--color-syntax-other-instance-variables-and-globals:#b281eb;--color-syntax-other-preprocessor-macros:#ffa14f;--color-syntax-other-type-names:#dabaff;--color-syntax-param-internal-name:#bfbfbf;--color-syntax-plain-text:#fff;--color-syntax-preprocessor-statements:#ffa14f;--color-syntax-project-class-names:#acf2e4;--color-syntax-project-constants:#78c2b3;--color-syntax-project-function-and-method-names:#78c2b3;--color-syntax-project-instance-variables-and-globals:#78c2b3;--color-syntax-project-preprocessor-macros:#ffa14f;--color-syntax-project-type-names:#acf2e4;--color-syntax-strings:#ff8170;--color-syntax-type-declarations:#6bdfff;--color-syntax-urls:#69f;--color-tutorial-background:var(--color-fill-tertiary);--color-navigator-item-hover:rgba(0,102,255,.5);--color-card-shadow:hsla(0,0%,100%,.04);--color-link-block-card-border:hsla(0,0%,100%,.25);--color-standard-red:#8b0000;--color-standard-orange:#8b4000;--color-standard-yellow:#8f7200;--color-standard-blue:#002d75;--color-standard-green:#023b2d;--color-standard-purple:#512b55;--color-standard-gray:#2a2a2a}}@media screen and (prefers-color-scheme:dark){body[data-color-scheme=auto]{--color-fill:#000;--color-fill-secondary:#161616;--color-fill-tertiary:#2a2a2a;--color-fill-blue:#06f;--color-fill-light-blue-secondary:#004ec4;--color-fill-gray:#575757;--color-fill-gray-secondary:#222;--color-fill-gray-tertiary:#424242;--color-fill-gray-quaternary:#424242;--color-fill-green-secondary:#030;--color-fill-orange-secondary:#472400;--color-fill-red-secondary:#300;--color-figure-blue:#09f;--color-figure-gray:#fff;--color-figure-gray-secondary:#ccc;--color-figure-gray-secondary-alt:#b0b0b0;--color-figure-gray-tertiary:#b0b0b0;--color-figure-green:#090;--color-figure-light-gray:#b0b0b0;--color-figure-orange:#f60;--color-figure-red:#f33;--color-tutorials-teal:#fff;--color-article-body-background:#111;--color-badge-text:#000;--color-badge-default:var(--color-badge-dark-default);--color-button-background-active:#06f;--color-code-line-highlight:rgba(0,153,255,.08);--color-dropdown-background:var(--color-dropdown-dark-background);--color-dropdown-border:var(--color-dropdown-dark-border);--color-dropdown-option-text:var(--color-dropdown-dark-option-text);--color-dropdown-text:var(--color-dropdown-dark-text);--color-nav-color:var(--color-nav-dark-color);--color-nav-current-link:var(--color-nav-dark-current-link);--color-nav-expanded:var(--color-nav-dark-expanded);--color-nav-hierarchy-collapse-background:var(--color-nav-dark-hierarchy-collapse-background);--color-nav-hierarchy-collapse-borders:var(--color-nav-dark-hierarchy-collapse-borders);--color-nav-hierarchy-item-borders:var(--color-nav-dark-hierarchy-item-borders);--color-nav-keyline:var(--color-nav-dark-keyline);--color-nav-link-color:var(--color-nav-dark-link-color);--color-nav-link-color-hover:var(--color-nav-dark-link-color-hover);--color-nav-outlines:var(--color-nav-dark-outlines);--color-nav-rule:var(--color-nav-dark-rule);--color-nav-solid-background:var(--color-nav-dark-solid-background);--color-nav-sticking-expanded-keyline:var(--color-nav-dark-sticking-expanded-keyline);--color-nav-stuck:var(--color-nav-dark-stuck);--color-nav-uiblur-expanded:var(--color-nav-dark-uiblur-expanded);--color-nav-uiblur-stuck:var(--color-nav-dark-uiblur-stuck);--color-runtime-preview-disabled-text:hsla(0,0%,80%,.6);--color-syntax-attributes:#cc9768;--color-syntax-characters:#d9c97c;--color-syntax-comments:#7f8c98;--color-syntax-documentation-markup:#7f8c98;--color-syntax-documentation-markup-keywords:#a3b1bf;--color-syntax-highlighted:rgba(0,113,227,.6);--color-syntax-keywords:#ff7ab2;--color-syntax-marks:#fff;--color-syntax-numbers:#d9c97c;--color-syntax-other-class-names:#dabaff;--color-syntax-other-constants:#a7ebdd;--color-syntax-other-declarations:#4eb0cc;--color-syntax-other-function-and-method-names:#b281eb;--color-syntax-other-instance-variables-and-globals:#b281eb;--color-syntax-other-preprocessor-macros:#ffa14f;--color-syntax-other-type-names:#dabaff;--color-syntax-param-internal-name:#bfbfbf;--color-syntax-plain-text:#fff;--color-syntax-preprocessor-statements:#ffa14f;--color-syntax-project-class-names:#acf2e4;--color-syntax-project-constants:#78c2b3;--color-syntax-project-function-and-method-names:#78c2b3;--color-syntax-project-instance-variables-and-globals:#78c2b3;--color-syntax-project-preprocessor-macros:#ffa14f;--color-syntax-project-type-names:#acf2e4;--color-syntax-strings:#ff8170;--color-syntax-type-declarations:#6bdfff;--color-syntax-urls:#69f;--color-tutorial-background:var(--color-fill-tertiary);--color-navigator-item-hover:rgba(0,102,255,.5);--color-card-shadow:hsla(0,0%,100%,.04);--color-link-block-card-border:hsla(0,0%,100%,.25);--color-standard-red:#8b0000;--color-standard-orange:#8b4000;--color-standard-yellow:#8f7200;--color-standard-blue:#002d75;--color-standard-green:#023b2d;--color-standard-purple:#512b55;--color-standard-gray:#2a2a2a}}#app-main{outline-style:none}:root{--app-height:100vh}[data-v-1fc6db09] :focus:not(input):not(textarea):not(select){outline:none}.fromkeyboard[data-v-1fc6db09] :focus:not(input):not(textarea):not(select){outline:4px solid var(--color-focus-color);outline-offset:1px}#app[data-v-1fc6db09]{display:flex;flex-flow:column;min-height:100%}#app[data-v-1fc6db09]>*{min-width:0}#app .router-content[data-v-1fc6db09]{flex:1}.container[data-v-1f05d9ec]{margin-left:auto;margin-right:auto;width:1536px;width:980px;outline-style:none;margin-top:92px;margin-bottom:140px}@media only screen and (max-width:1250px){.container[data-v-1f05d9ec]{width:692px}}@media only screen and (max-width:735px){.container[data-v-1f05d9ec]{width:87.5%}}@media only screen and (max-width:320px){.container[data-v-1f05d9ec]{width:215px}}.error-content[data-v-1f05d9ec]{box-sizing:border-box;width:502px;margin-left:auto;margin-right:auto;margin-bottom:54px}@media only screen and (max-width:1250px){.error-content[data-v-1f05d9ec]{width:420px;margin-bottom:45px}}@media only screen and (max-width:735px){.error-content[data-v-1f05d9ec]{max-width:330px;width:auto;margin-bottom:35px}}.title[data-v-1f05d9ec]{text-align:center;font-size:2.8235294118rem;line-height:1.0833333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){.title[data-v-1f05d9ec]{font-size:2.3529411765rem;line-height:1.1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){.title[data-v-1f05d9ec]{font-size:1.8823529412rem;line-height:1.125;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}} \ No newline at end of file diff --git a/docs/css/topic.4be8f56d.css b/docs/css/topic.4be8f56d.css new file mode 100644 index 00000000..55300366 --- /dev/null +++ b/docs/css/topic.4be8f56d.css @@ -0,0 +1,9 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */.nav-title-content[data-v-854b4dd6]{max-width:100%}.title[data-v-854b4dd6]{color:var(--color-nav-root-title,currentColor);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:inline-block;vertical-align:top;max-width:296px}@media only screen and (max-width:1023px){.title[data-v-854b4dd6]{max-width:205px}}@media only screen and (max-width:767px){.title[data-v-854b4dd6]{flex-basis:fill;display:initial;vertical-align:initial;max-width:none}}.subhead[data-v-854b4dd6]{color:var(--color-nav-root-subhead)}.theme-dark .subhead[data-v-854b4dd6]{color:var(--color-nav-dark-root-subhead)}.mobile-dropdown[data-v-2c27d339]{box-sizing:border-box}.nav--in-breakpoint-range .mobile-dropdown[data-v-2c27d339]{padding-left:.2352941176rem;padding-right:.2352941176rem}.mobile-dropdown ul[data-v-2c27d339]{list-style:none}.mobile-dropdown .option[data-v-2c27d339]{cursor:pointer;font-size:.7058823529rem;padding:.5rem 0;display:block;text-decoration:none;color:inherit}.mobile-dropdown .option[data-v-2c27d339]:focus{outline-offset:0}.mobile-dropdown .option.depth1[data-v-2c27d339]{padding-left:.4705882353rem}.active[data-v-2c27d339],.tutorial.router-link-active[data-v-2c27d339]{font-weight:600}.active[data-v-2c27d339]:focus,.tutorial.router-link-active[data-v-2c27d339]:focus{outline:none}.chapter-list[data-v-2c27d339]:not(:first-child){margin-top:1rem}.chapter-name[data-v-2c27d339],.tutorial[data-v-2c27d339]{padding:.5rem 0;font-size:1rem;line-height:1.4705882353;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.section-list[data-v-2c27d339],.tutorial-list[data-v-2c27d339]{padding:0 .5882352941rem}.chapter-list:last-child .tutorial-list[data-v-2c27d339]:last-child{padding-bottom:10em}.chapter-list[data-v-2c27d339]{display:inline-block}.form-element[data-v-f934959a]{position:relative}.form-dropdown[data-v-f934959a]{font-size:1rem;line-height:1.2352941176;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);display:block;box-sizing:border-box;width:100%;height:3.3em;color:var(--color-dropdown-text);padding:1.1176470588rem 2.3529411765rem 0 .9411764706rem;text-align:left;border:1px solid var(--color-dropdown-border);border-radius:var(--border-radius,4px);background-clip:padding-box;margin-bottom:.8235294118rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;min-height:32px}.form-dropdown[data-v-f934959a]:focus{box-shadow:0 0 0 4px var(--color-focus-color);outline:none;border-color:var(--color-focus-border-color)}.form-dropdown.no-eyebrow[data-v-f934959a]{padding-top:0}.form-dropdown[data-v-f934959a]:-moz-focusring{color:transparent;text-shadow:0 0 0 var(--color-dropdown-text)}.form-dropdown[data-v-f934959a]::-ms-expand{opacity:0}.form-dropdown~.form-icon[data-v-f934959a]{position:absolute;display:block;pointer-events:none;fill:var(--color-figure-gray-tertiary);right:14px;width:13px;height:auto;top:50%;transform:translateY(-50%)}.is-open .form-dropdown~.form-icon[data-v-f934959a]{transform:translateY(-50%) scale(-1)}@media only screen and (max-width:735px){.form-dropdown~.form-icon[data-v-f934959a]{right:14px}}.form-dropdown~.form-label[data-v-f934959a]{font-size:.7058823529rem;line-height:1.75;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);position:absolute;top:.4705882353rem;left:17px;color:var(--color-figure-gray-secondary);pointer-events:none;padding:0;z-index:1}.form-dropdown[data-v-f934959a] option{color:var(--color-dropdown-text)}.form-dropdown-selectnone[data-v-f934959a]{color:transparent}.form-dropdown-selectnone~.form-label[data-v-f934959a]{font-size:1rem;line-height:1.2352941176;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);top:19px;left:17px;color:var(--color-figure-gray-tertiary)}.form-dropdown-selectnone[data-v-f934959a]:-moz-focusring{text-shadow:none}.form-dropdown-selectnone[data-v-f934959a]::-ms-value{display:none}.theme-dark .form-dropdown[data-v-f934959a]{color:var(--color-dropdown-dark-text);background-color:var(--color-dropdown-dark-background);border-color:var(--color-dropdown-dark-border)}.theme-dark .form-dropdown~.form-label[data-v-f934959a]{color:#ccc}.theme-dark .form-dropdown[data-v-f934959a]:-moz-focusring{color:transparent;text-shadow:0 0 0 var(--color-dropdown-dark-text)}.theme-dark .form-dropdown.form-dropdown-selectnone[data-v-f934959a]{color:transparent}.theme-dark .form-dropdown.form-dropdown-selectnone[data-v-f934959a]:-moz-focusring{text-shadow:none}.theme-dark .form-dropdown-selectnone~.form-label[data-v-f934959a]{color:#b0b0b0}.dropdown-small[data-v-6adda760]{height:30px;display:flex;align-items:center;position:relative;background:var(--color-fill)}.dropdown-small .form-dropdown-toggle[data-v-6adda760]{line-height:1.5;font-size:12px;padding-top:0;padding-bottom:0;padding-left:20px;min-height:unset;height:30px;display:flex;align-items:center}.dropdown-small .form-dropdown-toggle[data-v-6adda760]:focus{box-shadow:none;border-color:var(--color-dropdown-border)}.fromkeyboard .dropdown-small .form-dropdown-toggle[data-v-6adda760]:focus{box-shadow:0 0 0 2px var(--color-focus-color);outline:none;border-color:var(--color-focus-border-color)}.form-dropdown-toggle[data-v-6adda760]{margin:0}.is-open .form-dropdown-toggle[data-v-6adda760]{border-radius:var(--border-radius,4px) var(--border-radius,4px) 0 0;border-bottom:none;padding-bottom:1px}.fromkeyboard .is-open .form-dropdown-toggle[data-v-6adda760]{box-shadow:1px -1px 0 1px var(--color-focus-color),-1px -1px 0 1px var(--color-focus-color);border-color:var(--color-focus-border-color)}.form-dropdown-title[data-v-6adda760]{margin:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dropdown-custom[data-v-6adda760]{border-radius:var(--border-radius,4px)}.dropdown-custom.is-open[data-v-6adda760]{border-radius:var(--border-radius,4px) var(--border-radius,4px) 0 0}.dropdown-custom[data-v-6adda760] .form-dropdown-content{background:var(--color-fill);position:absolute;right:0;left:0;top:100%;border-bottom-left-radius:var(--border-radius,4px);border-bottom-right-radius:var(--border-radius,4px);border:1px solid var(--color-dropdown-border);border-top:none;display:none;overflow-y:auto}.dropdown-custom[data-v-6adda760] .form-dropdown-content.is-open{display:block}.fromkeyboard .dropdown-custom[data-v-6adda760] .form-dropdown-content.is-open{box-shadow:1px 1px 0 1px var(--color-focus-color),-1px 1px 0 1px var(--color-focus-color);border-color:var(--color-focus-border-color);border-top-color:transparent}.nav .dropdown-custom[data-v-6adda760] .form-dropdown-content{max-height:calc(100vh - 116px - 3.05882rem)}.nav--is-sticking.nav .dropdown-custom[data-v-6adda760] .form-dropdown-content{max-height:calc(100vh - 3.05882rem - 72px)}.dropdown-custom[data-v-6adda760] .options{list-style:none;margin:0;padding:0 0 20px}.dropdown-custom[data-v-6adda760] .option{cursor:pointer;padding:5px 20px;font-size:12px;line-height:20px;outline:none}.dropdown-custom[data-v-6adda760] .option:hover{background-color:var(--color-fill-tertiary)}.dropdown-custom[data-v-6adda760] .option.option-active{font-weight:600}.fromkeyboard .dropdown-custom[data-v-6adda760] .option:hover{background-color:transparent}.fromkeyboard .dropdown-custom[data-v-6adda760] .option:focus{background-color:var(--color-fill-tertiary);outline:none}.tutorial-dropdown[data-v-618ff780]{grid-column:3}.section-tracker[data-v-618ff780]{font-size:.7058823529rem;line-height:1.3333333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-figure-gray-secondary);margin-left:15px}.tutorial-dropdown[data-v-03cbd7f7]{grid-column:1/2}.tutorial-dropdown .options[data-v-03cbd7f7]{padding-top:1rem;padding-bottom:0}.tutorial-dropdown .option[data-v-03cbd7f7]{padding:5px 20px 5px 30px}.chapter-list[data-v-03cbd7f7]{padding-bottom:20px}.chapter-name[data-v-03cbd7f7]{margin:0 20px 5px 20px;line-height:normal;color:var(--color-figure-gray-secondary)}.chevron-icon[data-v-1d3fe8ed]{padding:0;color:var(--color-nav-outlines);grid-column:2;height:20px;width:20px;margin:0 4px}@media only screen and (min-width:768px){.nav[data-v-1d3fe8ed] .nav-content{display:grid;grid-template-columns:auto auto 3fr;align-items:center}.nav[data-v-1d3fe8ed] .nav-menu{padding:0;justify-content:flex-start;grid-column:3/5}.nav[data-v-1d3fe8ed] .nav-menu-item{margin:0}}.dropdown-container[data-v-1d3fe8ed]{height:3.0588235294rem;display:grid;grid-template-columns:minmax(230px,285px) auto minmax(230px,1fr);align-items:center}@media only screen and (max-width:1023px){.dropdown-container[data-v-1d3fe8ed]{grid-template-columns:minmax(173px,216px) auto minmax(173px,1fr)}}@media(scripting:none){.dropdown-container[data-v-1d3fe8ed]{display:none}}.separator[data-v-1d3fe8ed]{height:20px;border-right:1px solid;border-color:var(--color-nav-outlines);margin:0 20px;grid-column:2}@media(scripting:none){.separator[data-v-1d3fe8ed]{display:none}}.mobile-dropdown-container[data-v-1d3fe8ed],.nav--in-breakpoint-range.nav .dropdown-container[data-v-1d3fe8ed],.nav--in-breakpoint-range.nav .separator[data-v-1d3fe8ed]{display:none}.nav--in-breakpoint-range.nav .mobile-dropdown-container[data-v-1d3fe8ed]{display:block}.nav--in-breakpoint-range.nav[data-v-1d3fe8ed] .nav-title{grid-area:title}.nav--in-breakpoint-range.nav[data-v-1d3fe8ed] .pre-title{display:none}.nav[data-v-1d3fe8ed] .nav-title{grid-column:1;width:90%;padding-top:0}.primary-dropdown[data-v-1d3fe8ed],.secondary-dropdown[data-v-1d3fe8ed]{background:var(--color-tutorial-navbar-dropdown-background);border-color:var(--color-tutorial-navbar-dropdown-border)}.primary-dropdown[data-v-1d3fe8ed] .form-dropdown,.primary-dropdown[data-v-1d3fe8ed] .form-dropdown:focus,.secondary-dropdown[data-v-1d3fe8ed] .form-dropdown,.secondary-dropdown[data-v-1d3fe8ed] .form-dropdown:focus{border-color:var(--color-tutorial-navbar-dropdown-border)}.primary-dropdown[data-v-1d3fe8ed] .options,.secondary-dropdown[data-v-1d3fe8ed] .options{background:var(--color-tutorial-navbar-dropdown-background);border-color:var(--color-tutorial-navbar-dropdown-border)}[data-v-0861b5be] .code-listing+*,[data-v-0861b5be] aside+*,[data-v-0861b5be] h2+*,[data-v-0861b5be] h3+*,[data-v-0861b5be] ol+*,[data-v-0861b5be] p+*,[data-v-0861b5be] ul+*{margin-top:20px}[data-v-0861b5be] ol ol,[data-v-0861b5be] ol ul,[data-v-0861b5be] ul ol,[data-v-0861b5be] ul ul{margin-top:0}[data-v-0861b5be] h2{font-size:1.8823529412rem;line-height:1.25;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){[data-v-0861b5be] h2{font-size:1.6470588235rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){[data-v-0861b5be] h2{font-size:1.4117647059rem;line-height:1.3333333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}[data-v-0861b5be] h3{font-size:1.4117647059rem;line-height:1.1666666667;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){[data-v-0861b5be] h3{font-size:1.2352941176rem;line-height:1.1904761905;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}[data-v-0861b5be] .code-listing{background:var(--color-code-background);border-color:var(--colors-grid,var(--color-grid));border-style:solid;border-width:1px}[data-v-0861b5be] .code-listing pre{font-size:.7058823529rem;line-height:1.8333333333;font-weight:400;font-family:var(--typography-html-font-mono,Menlo,monospace);padding:20px 0}.columns[data-v-30edf911]{display:grid;grid-template-rows:repeat(2,auto)}.columns.cols-2[data-v-30edf911]{gap:20px 8.3333333333%;grid-template-columns:repeat(2,1fr)}.columns.cols-3[data-v-30edf911]{gap:20px 4.1666666667%;grid-template-columns:repeat(3,1fr)}.asset[data-v-30edf911]{align-self:end;grid-row:1}.content[data-v-30edf911]{grid-row:2}@media only screen and (max-width:735px){.columns.cols-2[data-v-30edf911],.columns.cols-3[data-v-30edf911]{grid-template-columns:unset}.asset[data-v-30edf911],.content[data-v-30edf911]{grid-row:auto}}.content-and-media[data-v-3fa44f9e]{display:flex}.content-and-media.media-leading[data-v-3fa44f9e]{flex-direction:row-reverse}.content-and-media.media-trailing[data-v-3fa44f9e]{flex-direction:row}@media only screen and (min-width:736px){.content-and-media[data-v-3fa44f9e]{align-items:center;justify-content:center}}.content[data-v-3fa44f9e]{width:62.5%}.asset[data-v-3fa44f9e]{width:29.1666666667%}.media-leading .asset[data-v-3fa44f9e]{margin-right:8.3333333333%}.media-trailing .asset[data-v-3fa44f9e]{margin-left:8.3333333333%}@media only screen and (max-width:735px){.content-and-media.media-leading[data-v-3fa44f9e],.content-and-media.media-trailing[data-v-3fa44f9e]{flex-direction:column}.asset[data-v-3fa44f9e],.content[data-v-3fa44f9e]{width:100%}.media-leading .asset[data-v-3fa44f9e],.media-trailing .asset[data-v-3fa44f9e]{margin:20px 0 0 0}}.group[id][data-v-5b4a8b3c]{margin-top:20px;padding-top:20px}[data-v-5b4a8b3c] img,[data-v-5b4a8b3c] video{display:block;margin:0 auto;max-width:100%}.layout+[data-v-4d5a806e]{margin-top:40px}@media only screen and (max-width:735px){.layout[data-v-4d5a806e]:first-child>:not(.group[id]){margin-top:40px}}.body[data-v-20dca692]{background:var(--colors-text-background,var(--color-article-body-background));margin-left:auto;margin-right:auto;width:1536px;width:980px;border-radius:10px;transform:translateY(-120px)}@media only screen and (max-width:1250px){.body[data-v-20dca692]{width:692px}}@media only screen and (max-width:735px){.body[data-v-20dca692]{width:87.5%}}@media only screen and (max-width:320px){.body[data-v-20dca692]{width:215px}}@media only screen and (max-width:735px){.body[data-v-20dca692]{border-radius:0;transform:none}}.body[data-v-20dca692]~*{margin-top:-40px}.body-content[data-v-20dca692]{padding:40px 8.3333333333% 80px 8.3333333333%}@media only screen and (max-width:735px){.body-content[data-v-20dca692]{padding:0 0 40px 0}}.call-to-action[data-v-2bfdf182]{padding:65px 0;background:var(--color-call-to-action-background)}.theme-dark .call-to-action[data-v-2bfdf182]{--color-call-to-action-background:#424242}.row[data-v-2bfdf182]{margin-left:auto;margin-right:auto;width:1536px;width:980px;display:flex;align-items:center}@media only screen and (max-width:1250px){.row[data-v-2bfdf182]{width:692px}}@media only screen and (max-width:735px){.row[data-v-2bfdf182]{width:87.5%}}@media only screen and (max-width:320px){.row[data-v-2bfdf182]{width:215px}}[data-v-2bfdf182] img,[data-v-2bfdf182] video{max-height:560px}h2[data-v-2bfdf182]{font-size:1.8823529412rem;line-height:1.25;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){h2[data-v-2bfdf182]{font-size:1.6470588235rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){h2[data-v-2bfdf182]{font-size:1.4117647059rem;line-height:1.3333333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.label[data-v-2bfdf182]{display:block;font-size:1.2352941176rem;line-height:1.1904761905;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);margin-bottom:var(--spacing-stacked-margin-small);color:var(--color-eyebrow)}@media only screen and (max-width:735px){.label[data-v-2bfdf182]{font-size:1.1176470588rem;line-height:1.2105263158;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.content[data-v-2bfdf182]{margin-bottom:1.5rem}.right-column[data-v-2bfdf182]{margin-left:auto}@media only screen and (max-width:735px){.row[data-v-2bfdf182]{display:block}.col+.col[data-v-2bfdf182]{margin-top:40px}.call-to-action[data-v-426a965c]{margin-top:0}}.headline[data-v-d46a1474]{margin-bottom:var(--spacing-stacked-margin-large)}.heading[data-v-d46a1474]{font-size:2.8235294118rem;line-height:1.0833333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-header-text)}@media only screen and (max-width:1250px){.heading[data-v-d46a1474]{font-size:2.3529411765rem;line-height:1.1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){.heading[data-v-d46a1474]{font-size:1.8823529412rem;line-height:1.125;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.dark .heading[data-v-d46a1474]{color:#fff}.eyebrow[data-v-d46a1474]{font-size:1.4117647059rem;line-height:1.1666666667;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);display:block;margin-bottom:var(--spacing-stacked-margin-small);color:var(--color-eyebrow)}@media only screen and (max-width:1250px){.eyebrow[data-v-d46a1474]{font-size:1.2352941176rem;line-height:1.1904761905;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.generic-modal[data-v-795f7b59]{position:fixed;top:0;left:0;right:0;bottom:0;margin:0;z-index:11000;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;background:none;overflow:auto}.modal-fullscreen[data-v-795f7b59]{align-items:stretch}.modal-fullscreen .container[data-v-795f7b59]{margin:0;flex:1;width:100%;height:100%;padding-top:env(safe-area-inset-top);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left)}.modal-standard[data-v-795f7b59]{padding:20px}.modal-standard .container[data-v-795f7b59]{padding:60px;border-radius:var(--border-radius,4px)}@media screen{[data-color-scheme=dark] .modal-standard .container[data-v-795f7b59]{background:#1d1d1f}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .modal-standard .container[data-v-795f7b59]{background:#1d1d1f}}@media only screen and (max-width:735px){.modal-standard[data-v-795f7b59]{padding:0;align-items:stretch}.modal-standard .container[data-v-795f7b59]{margin:20px 0 0;padding:50px 30px;flex:1;width:100%;border-bottom-left-radius:0;border-bottom-right-radius:0}}.backdrop[data-v-795f7b59]{overflow:auto;background:var(--backdrop-background,rgba(0,0,0,.4));-webkit-overflow-scrolling:touch;width:100%;height:100%;position:fixed}.container[data-v-795f7b59]{margin-left:auto;margin-right:auto;width:1536px;width:980px;background:var(--colors-generic-modal-background,var(--color-generic-modal-background));z-index:1;position:relative;overflow:auto;max-width:100%}@media only screen and (max-width:1250px){.container[data-v-795f7b59]{width:692px}}@media only screen and (max-width:735px){.container[data-v-795f7b59]{width:87.5%}}@media only screen and (max-width:320px){.container[data-v-795f7b59]{width:215px}}.close[data-v-795f7b59]{position:absolute;z-index:9999;top:22px;left:22px;width:17px;height:17px;color:#666;cursor:pointer;background:none;border:0;display:flex;align-items:center}.close .close-icon[data-v-795f7b59]{fill:currentColor;width:100%;height:100%}.theme-dark .container[data-v-795f7b59]{background:#000}.theme-dark .container .close[data-v-795f7b59]{color:#b0b0b0}.theme-code .container[data-v-795f7b59]{background-color:var(--code-background,var(--color-code-background))}.metadata[data-v-94ff76c0]{display:flex}.item[data-v-94ff76c0]{font-size:.7058823529rem;line-height:1.3333333333;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);display:flex;flex-direction:column;justify-content:flex-end;align-items:center;border-right:1px solid #fff;padding:0 27.5px}@media only screen and (max-width:735px){.item[data-v-94ff76c0]{font-size:.6470588235rem;line-height:1.6363636364;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);padding:0 8px}}.item[data-v-94ff76c0]:first-of-type{padding-left:0}.item[data-v-94ff76c0]:last-of-type{border:none}@media only screen and (max-width:735px){.item[data-v-94ff76c0]:last-of-type{padding-right:0}}.content[data-v-94ff76c0]{color:#fff}.icon[data-v-94ff76c0]{font-size:2.8235294118rem;line-height:1.0833333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){.icon[data-v-94ff76c0]{font-size:2.3529411765rem;line-height:1.1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){.icon[data-v-94ff76c0]{font-size:1.8823529412rem;line-height:1.125;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.small-icon[data-v-94ff76c0]{width:1em;height:1em;margin-left:.2rem}.small-icon.xcode-icon[data-v-94ff76c0]{width:.8em;height:.8em}.content-link[data-v-94ff76c0]{display:flex;align-items:center}a[data-v-94ff76c0]{color:var(--colors-link,var(--color-tutorials-overview-link))}.duration[data-v-94ff76c0]{display:flex;align-items:baseline;font-size:2.3529411765rem;line-height:1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);line-height:1.8rem}@media only screen and (max-width:735px){.duration[data-v-94ff76c0]{font-size:1.6470588235rem;line-height:1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);line-height:1.3rem}}.minutes[data-v-94ff76c0]{display:inline-block;font-size:1.6470588235rem;line-height:1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);line-height:1.3rem}@media only screen and (max-width:735px){.minutes[data-v-94ff76c0]{font-size:1rem;line-height:1.2352941176;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);line-height:.8rem}}.item-large-icon[data-v-94ff76c0]{height:2.3rem;max-width:100%}@media only screen and (max-width:735px){.item-large-icon[data-v-94ff76c0]{height:1.5rem;max-width:100%}}.bottom[data-v-94ff76c0]{margin-top:13px}@media only screen and (max-width:735px){.bottom[data-v-94ff76c0]{margin-top:8px}}.hero[data-v-2a434750]{background-color:var(--color-tutorial-hero-background);color:var(--color-tutorial-hero-text);position:relative}@media screen{.hero.dark[data-v-2a434750]{--color-fill:#fff;--color-fill-secondary:#f7f7f7;--color-fill-tertiary:#f0f0f0;--color-fill-quaternary:#282828;--color-fill-blue:#00f;--color-fill-light-blue-secondary:#d1d1ff;--color-fill-gray:#ccc;--color-fill-gray-secondary:#f5f5f5;--color-fill-gray-tertiary:#f0f0f0;--color-fill-gray-quaternary:#f0f0f0;--color-fill-green-secondary:#f0fff0;--color-fill-orange-secondary:#fffaf6;--color-fill-red-secondary:#fff0f5;--color-figure-blue:#36f;--color-figure-gray:#000;--color-figure-gray-secondary:#666;--color-figure-gray-secondary-alt:#666;--color-figure-gray-tertiary:#666;--color-figure-green:green;--color-figure-light-gray:#666;--color-figure-orange:#c30;--color-figure-red:red;--color-tutorials-teal:#000;--color-article-background:var(--color-fill-tertiary);--color-article-body-background:var(--color-fill);--color-aside-deprecated:var(--color-figure-gray);--color-aside-deprecated-background:var(--color-fill-orange-secondary);--color-aside-deprecated-border:var(--color-figure-orange);--color-aside-experiment:var(--color-figure-gray);--color-aside-experiment-background:var(--color-fill-gray-secondary);--color-aside-experiment-border:var(--color-figure-light-gray);--color-aside-important:var(--color-figure-gray);--color-aside-important-background:var(--color-fill-gray-secondary);--color-aside-important-border:var(--color-figure-light-gray);--color-aside-note:var(--color-figure-gray);--color-aside-note-background:var(--color-fill-gray-secondary);--color-aside-note-border:var(--color-figure-light-gray);--color-aside-tip:var(--color-figure-gray);--color-aside-tip-background:var(--color-fill-gray-secondary);--color-aside-tip-border:var(--color-figure-light-gray);--color-aside-warning:var(--color-figure-gray);--color-aside-warning-background:var(--color-fill-red-secondary);--color-aside-warning-border:var(--color-figure-red);--color-badge-text:#fff;--color-badge-default:var(--color-figure-gray);--color-badge-beta:var(--color-figure-gray-tertiary);--color-badge-deprecated:var(--color-figure-orange);--color-badge-dark-default:#fff;--color-badge-dark-beta:#b0b0b0;--color-badge-dark-deprecated:#f60;--color-button-background:var(--color-fill-blue);--color-button-background-active:#36f;--color-button-background-hover:var(--color-figure-blue);--color-button-text:#fff;--color-call-to-action-background:var(--color-fill-secondary);--color-changes-added:var(--color-figure-light-gray);--color-changes-added-hover:var(--color-figure-light-gray);--color-changes-deprecated:var(--color-figure-light-gray);--color-changes-deprecated-hover:var(--color-figure-light-gray);--color-changes-modified:var(--color-figure-light-gray);--color-changes-modified-hover:var(--color-figure-light-gray);--color-changes-modified-previous-background:var(--color-fill);--color-code-background:var(--color-fill-secondary);--color-code-collapsible-background:var(--color-fill-tertiary);--color-code-collapsible-text:var(--color-figure-gray-secondary-alt);--color-code-line-highlight:rgba(51,102,255,.08);--color-code-line-highlight-border:var(--color-figure-blue);--color-code-plain:var(--color-figure-gray);--color-dropdown-background:hsla(0,0%,100%,.8);--color-dropdown-border:#ccc;--color-dropdown-option-text:#666;--color-dropdown-text:#000;--color-dropdown-dark-background:hsla(0,0%,100%,.1);--color-dropdown-dark-border:hsla(0,0%,94%,.2);--color-dropdown-dark-option-text:#ccc;--color-dropdown-dark-text:#fff;--color-eyebrow:var(--color-figure-gray-secondary);--color-focus-border-color:var(--color-fill-blue);--color-focus-color:rgba(0,125,250,.6);--color-form-error:var(--color-figure-red);--color-form-error-background:var(--color-fill-red-secondary);--color-form-valid:var(--color-figure-green);--color-form-valid-background:var(--color-fill-green-secondary);--color-generic-modal-background:var(--color-fill);--color-grid:var(--color-fill-gray);--color-header-text:var(--color-figure-gray);--color-hero-eyebrow:#ccc;--color-link:var(--color-figure-blue);--color-loading-placeholder-background:var(--color-fill);--color-nav-color:#000;--color-nav-current-link:#000;--color-nav-expanded:#fff;--color-nav-hierarchy-collapse-background:#f0f0f0;--color-nav-hierarchy-collapse-borders:#ccc;--color-nav-hierarchy-item-borders:#ccc;--color-nav-keyline:rgba(0,0,0,.2);--color-nav-link-color:#000;--color-nav-link-color-hover:#36f;--color-nav-outlines:#ccc;--color-nav-rule:hsla(0,0%,94%,.5);--color-nav-solid-background:#fff;--color-nav-sticking-expanded-keyline:rgba(0,0,0,.1);--color-nav-stuck:hsla(0,0%,100%,.9);--color-nav-uiblur-expanded:hsla(0,0%,100%,.9);--color-nav-uiblur-stuck:hsla(0,0%,100%,.7);--color-nav-root-subhead:var(--color-tutorials-teal);--color-nav-dark-border-top-color:hsla(0,0%,100%,.4);--color-nav-dark-color:#fff;--color-nav-dark-current-link:#fff;--color-nav-dark-expanded:#2a2a2a;--color-nav-dark-hierarchy-collapse-background:#424242;--color-nav-dark-hierarchy-collapse-borders:#666;--color-nav-dark-hierarchy-item-borders:#424242;--color-nav-dark-keyline:rgba(66,66,66,.95);--color-nav-dark-link-color:#fff;--color-nav-dark-link-color-hover:#09f;--color-nav-dark-outlines:#575757;--color-nav-dark-rule:#575757;--color-nav-dark-solid-background:#000;--color-nav-dark-sticking-expanded-keyline:rgba(66,66,66,.7);--color-nav-dark-stuck:rgba(42,42,42,.9);--color-nav-dark-uiblur-expanded:rgba(42,42,42,.9);--color-nav-dark-uiblur-stuck:rgba(42,42,42,.7);--color-nav-dark-root-subhead:#fff;--color-other-decl-button:var(--color-text-background);--color-runtime-preview-background:var(--color-fill-tertiary);--color-runtime-preview-disabled-text:hsla(0,0%,40%,.6);--color-runtime-preview-text:var(--color-figure-gray-secondary);--color-secondary-label:var(--color-figure-gray-secondary);--color-step-background:var(--color-fill-secondary);--color-step-caption:var(--color-figure-gray-secondary);--color-step-focused:var(--color-figure-light-gray);--color-step-text:var(--color-figure-gray-secondary);--color-svg-icon:#666;--color-syntax-addition:var(--color-figure-green);--color-syntax-attributes:#947100;--color-syntax-characters:#272ad8;--color-syntax-comments:#707f8c;--color-syntax-deletion:var(--color-figure-red);--color-syntax-documentation-markup:#506375;--color-syntax-documentation-markup-keywords:#506375;--color-syntax-heading:#ba2da2;--color-syntax-highlighted:rgba(0,113,227,.2);--color-syntax-keywords:#ad3da4;--color-syntax-marks:#000;--color-syntax-numbers:#272ad8;--color-syntax-other-class-names:#703daa;--color-syntax-other-constants:#4b21b0;--color-syntax-other-declarations:#047cb0;--color-syntax-other-function-and-method-names:#4b21b0;--color-syntax-other-instance-variables-and-globals:#703daa;--color-syntax-other-preprocessor-macros:#78492a;--color-syntax-other-type-names:#703daa;--color-syntax-param-internal-name:#404040;--color-syntax-plain-text:#000;--color-syntax-preprocessor-statements:#78492a;--color-syntax-project-class-names:#3e8087;--color-syntax-project-constants:#2d6469;--color-syntax-project-function-and-method-names:#2d6469;--color-syntax-project-instance-variables-and-globals:#3e8087;--color-syntax-project-preprocessor-macros:#78492a;--color-syntax-project-type-names:#3e8087;--color-syntax-strings:#d12f1b;--color-syntax-type-declarations:#03638c;--color-syntax-urls:#1337ff;--color-tabnav-item-border-color:var(--color-fill-gray);--color-text:var(--color-figure-gray);--color-text-background:var(--color-fill);--color-tutorial-assessments-background:var(--color-fill-secondary);--color-tutorial-background:var(--color-fill);--color-tutorial-navbar-dropdown-background:var(--color-fill);--color-tutorial-navbar-dropdown-border:var(--color-fill-gray);--color-tutorial-quiz-border-active:var(--color-figure-blue);--color-tutorials-overview-background:#161616;--color-tutorials-overview-content:#fff;--color-tutorials-overview-content-alt:#fff;--color-tutorials-overview-eyebrow:#ccc;--color-tutorials-overview-icon:#b0b0b0;--color-tutorials-overview-link:#09f;--color-tutorials-overview-navigation-link:#ccc;--color-tutorials-overview-navigation-link-active:#fff;--color-tutorials-overview-navigation-link-hover:#fff;--color-tutorial-hero-text:#fff;--color-tutorial-hero-background:#000;--color-navigator-item-hover:rgba(0,0,255,.05);--color-card-background:var(--color-fill);--color-card-content-text:var(--color-figure-gray);--color-card-eyebrow:var(--color-figure-gray-secondary-alt);--color-card-shadow:rgba(0,0,0,.04);--color-link-block-card-border:rgba(0,0,0,.04);--color-standard-red:#ffc2c2;--color-standard-orange:#fc9;--color-standard-yellow:#ffe0a3;--color-standard-blue:#9cf;--color-standard-green:#9cc;--color-standard-purple:#ccf;--color-standard-gray:#f0f0f0;--color-fill:#000;--color-fill-secondary:#161616;--color-fill-tertiary:#2a2a2a;--color-fill-blue:#06f;--color-fill-light-blue-secondary:#004ec4;--color-fill-gray:#575757;--color-fill-gray-secondary:#222;--color-fill-gray-tertiary:#424242;--color-fill-gray-quaternary:#424242;--color-fill-green-secondary:#030;--color-fill-orange-secondary:#472400;--color-fill-red-secondary:#300;--color-figure-blue:#09f;--color-figure-gray:#fff;--color-figure-gray-secondary:#ccc;--color-figure-gray-secondary-alt:#b0b0b0;--color-figure-gray-tertiary:#b0b0b0;--color-figure-green:#090;--color-figure-light-gray:#b0b0b0;--color-figure-orange:#f60;--color-figure-red:#f33;--color-tutorials-teal:#fff;--color-article-body-background:#111;--color-badge-text:#000;--color-badge-default:var(--color-badge-dark-default);--color-button-background-active:#06f;--color-code-line-highlight:rgba(0,153,255,.08);--color-dropdown-background:var(--color-dropdown-dark-background);--color-dropdown-border:var(--color-dropdown-dark-border);--color-dropdown-option-text:var(--color-dropdown-dark-option-text);--color-dropdown-text:var(--color-dropdown-dark-text);--color-nav-color:var(--color-nav-dark-color);--color-nav-current-link:var(--color-nav-dark-current-link);--color-nav-expanded:var(--color-nav-dark-expanded);--color-nav-hierarchy-collapse-background:var(--color-nav-dark-hierarchy-collapse-background);--color-nav-hierarchy-collapse-borders:var(--color-nav-dark-hierarchy-collapse-borders);--color-nav-hierarchy-item-borders:var(--color-nav-dark-hierarchy-item-borders);--color-nav-keyline:var(--color-nav-dark-keyline);--color-nav-link-color:var(--color-nav-dark-link-color);--color-nav-link-color-hover:var(--color-nav-dark-link-color-hover);--color-nav-outlines:var(--color-nav-dark-outlines);--color-nav-rule:var(--color-nav-dark-rule);--color-nav-solid-background:var(--color-nav-dark-solid-background);--color-nav-sticking-expanded-keyline:var(--color-nav-dark-sticking-expanded-keyline);--color-nav-stuck:var(--color-nav-dark-stuck);--color-nav-uiblur-expanded:var(--color-nav-dark-uiblur-expanded);--color-nav-uiblur-stuck:var(--color-nav-dark-uiblur-stuck);--color-runtime-preview-disabled-text:hsla(0,0%,80%,.6);--color-syntax-attributes:#cc9768;--color-syntax-characters:#d9c97c;--color-syntax-comments:#7f8c98;--color-syntax-documentation-markup:#7f8c98;--color-syntax-documentation-markup-keywords:#a3b1bf;--color-syntax-highlighted:rgba(0,113,227,.6);--color-syntax-keywords:#ff7ab2;--color-syntax-marks:#fff;--color-syntax-numbers:#d9c97c;--color-syntax-other-class-names:#dabaff;--color-syntax-other-constants:#a7ebdd;--color-syntax-other-declarations:#4eb0cc;--color-syntax-other-function-and-method-names:#b281eb;--color-syntax-other-instance-variables-and-globals:#b281eb;--color-syntax-other-preprocessor-macros:#ffa14f;--color-syntax-other-type-names:#dabaff;--color-syntax-param-internal-name:#bfbfbf;--color-syntax-plain-text:#fff;--color-syntax-preprocessor-statements:#ffa14f;--color-syntax-project-class-names:#acf2e4;--color-syntax-project-constants:#78c2b3;--color-syntax-project-function-and-method-names:#78c2b3;--color-syntax-project-instance-variables-and-globals:#78c2b3;--color-syntax-project-preprocessor-macros:#ffa14f;--color-syntax-project-type-names:#acf2e4;--color-syntax-strings:#ff8170;--color-syntax-type-declarations:#6bdfff;--color-syntax-urls:#69f;--color-tutorial-background:var(--color-fill-tertiary);--color-navigator-item-hover:rgba(0,102,255,.5);--color-card-shadow:hsla(0,0%,100%,.04);--color-link-block-card-border:hsla(0,0%,100%,.25);--color-standard-red:#8b0000;--color-standard-orange:#8b4000;--color-standard-yellow:#8f7200;--color-standard-blue:#002d75;--color-standard-green:#023b2d;--color-standard-purple:#512b55;--color-standard-gray:#2a2a2a}}.bg[data-v-2a434750]{background-color:var(--color-tutorial-hero-background);background-position:top;background-repeat:no-repeat;background-size:cover;content:"";height:100%;left:0;opacity:.3;position:absolute;top:0;width:100%}.row[data-v-2a434750]{margin-left:auto;margin-right:auto;width:1536px;width:980px;padding:80px 0}@media only screen and (max-width:1250px){.row[data-v-2a434750]{width:692px}}@media only screen and (max-width:735px){.row[data-v-2a434750]{width:87.5%}}@media only screen and (max-width:320px){.row[data-v-2a434750]{width:215px}}.col[data-v-2a434750]{z-index:1}[data-v-2a434750] .eyebrow{font-size:1.4117647059rem;line-height:1.1666666667;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-hero-eyebrow)}@media only screen and (max-width:1250px){[data-v-2a434750] .eyebrow{font-size:1.2352941176rem;line-height:1.1904761905;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.headline[data-v-2a434750]{font-size:2.8235294118rem;line-height:1.0833333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);margin-bottom:2rem}@media only screen and (max-width:1250px){.headline[data-v-2a434750]{font-size:2.3529411765rem;line-height:1.1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){.headline[data-v-2a434750]{font-size:1.8823529412rem;line-height:1.125;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.intro[data-v-2a434750]{font-size:1.2352941176rem;line-height:1.380952381;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:735px){.intro[data-v-2a434750]{font-size:1.1176470588rem;line-height:1.4210526316;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.content+p[data-v-2a434750]{margin-top:var(--spacing-stacked-margin-large)}@media only screen and (max-width:735px){.content+p[data-v-2a434750]{margin-top:8px}}.call-to-action[data-v-2a434750]{display:flex;align-items:center}.call-to-action .cta-icon[data-v-2a434750]{margin-left:.4rem;width:1em;height:1em}.metadata[data-v-2a434750]{margin-top:2rem}.video-asset[data-v-2a434750]{display:grid;height:100vh;margin:0;place-items:center center}.video-asset[data-v-2a434750] video{max-width:1280px;min-width:320px;width:100%}@media only screen and (max-width:735px){.headline[data-v-2a434750]{margin-bottom:19px}}.tutorial-hero[data-v-35a9482f]{margin-bottom:80px}@media only screen and (max-width:735px){.tutorial-hero[data-v-35a9482f]{margin-bottom:0}}.title[data-v-28135d78]{font-size:.7058823529rem;line-height:1.3333333333;color:var(--colors-secondary-label,var(--color-secondary-label))}.title[data-v-28135d78],.title[data-v-61b03ec2]{font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.title[data-v-61b03ec2]{font-size:1.1176470588rem;line-height:1.2105263158;color:var(--colors-header-text,var(--color-header-text));margin:25px 0}.question-content[data-v-61b03ec2] code{font-size:.7647058824rem;line-height:1.8461538462;font-weight:400;font-family:var(--typography-html-font-mono,Menlo,monospace)}.choices[data-v-61b03ec2]{display:flex;flex-direction:column;padding:0;list-style:none;margin:25px 0}.choice[data-v-61b03ec2]{font-size:.8235294118rem;line-height:1.4285714286;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);flex:1;border-radius:var(--border-radius,4px);margin:8px 0;padding:1.5rem 40px;cursor:pointer;background:var(--colors-text-background,var(--color-text-background));display:flex;flex-direction:column;justify-content:center;border-width:1px;border-style:solid;border-color:var(--colors-grid,var(--color-grid));position:relative}.choice[data-v-61b03ec2] img{max-height:23.5294117647rem}.choice[data-v-61b03ec2]:first-of-type{margin-top:0}.choice[data-v-61b03ec2] code{font-size:.7647058824rem;line-height:1.8461538462;font-weight:400;font-family:var(--typography-html-font-mono,Menlo,monospace)}.controls[data-v-61b03ec2]{text-align:center;margin-bottom:40px}.controls .button-cta[data-v-61b03ec2]{margin:.5rem;margin-top:0;padding:.3rem 3rem;min-width:8rem}input[type=radio][data-v-61b03ec2]{position:absolute;width:100%;left:0;height:100%;opacity:0;z-index:-1}.active[data-v-61b03ec2]{border-color:var(--color-tutorial-quiz-border-active);box-shadow:0 0 0 4px var(--color-focus-color);outline:none}.active [data-v-61b03ec2]{color:var(--colors-text,var(--color-text))}.correct[data-v-61b03ec2]{background:var(--color-form-valid-background);border-color:var(--color-form-valid)}.correct .choice-icon[data-v-61b03ec2]{fill:var(--color-form-valid)}.incorrect[data-v-61b03ec2]{background:var(--color-form-error-background);border-color:var(--color-form-error)}.incorrect .choice-icon[data-v-61b03ec2]{fill:var(--color-form-error)}.correct[data-v-61b03ec2],.incorrect[data-v-61b03ec2]{position:relative}.correct .choice-icon[data-v-61b03ec2],.incorrect .choice-icon[data-v-61b03ec2]{position:absolute;top:11px;left:10px;font-size:20px;width:1.05em}.disabled[data-v-61b03ec2]{pointer-events:none}.answer[data-v-61b03ec2]{margin:.5rem 1.5rem .5rem 0;font-size:.7058823529rem;line-height:1.3333333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.answer[data-v-61b03ec2]:last-of-type{margin-bottom:0}[data-v-61b03ec2] .question>.code-listing{padding:unset;border-radius:0}[data-v-61b03ec2] pre{padding:0}[data-v-61b03ec2] img{display:block;margin-left:auto;margin-right:auto;max-width:100%}.title[data-v-65e3c02c]{font-size:1.8823529412rem;line-height:1.25;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--colors-header-text,var(--color-header-text))}@media only screen and (max-width:1250px){.title[data-v-65e3c02c]{font-size:1.6470588235rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){.title[data-v-65e3c02c]{font-size:1.4117647059rem;line-height:1.3333333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.title p[data-v-65e3c02c]{color:var(--colors-text,var(--color-text))}.assessments[data-v-65e3c02c]{box-sizing:content-box;padding:0 1rem;background:var(--color-tutorial-assessments-background);margin-left:auto;margin-right:auto;width:1536px;width:980px;margin-bottom:80px}@media only screen and (max-width:1250px){.assessments[data-v-65e3c02c]{width:692px}}@media only screen and (max-width:735px){.assessments[data-v-65e3c02c]{width:87.5%}}@media only screen and (max-width:320px){.assessments[data-v-65e3c02c]{width:215px}}.banner[data-v-65e3c02c]{padding:40px 0;border-bottom:1px solid;margin-bottom:40px;border-color:var(--colors-grid,var(--color-grid));text-align:center}.success[data-v-65e3c02c]{text-align:center;padding-bottom:40px;font-size:1.8823529412rem;line-height:1.25;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--colors-text,var(--color-text))}@media only screen and (max-width:1250px){.success[data-v-65e3c02c]{font-size:1.6470588235rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){.success[data-v-65e3c02c]{font-size:1.4117647059rem;line-height:1.3333333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.assessments-wrapper[data-v-65e3c02c]{padding-top:80px}.assessments-wrapper[data-v-6db06128]{padding-bottom:40px;padding-top:0}@media only screen and (max-width:735px){.assessments-wrapper[data-v-6db06128]{padding-top:80px}}.article[data-v-9d2d5cc2]{background:var(--colors-article-background,var(--color-article-background))}@media only screen and (max-width:735px){.article[data-v-9d2d5cc2]{background:var(--colors-text-background,var(--color-article-body-background))}}.intro-container[data-v-7dcf2d10]{margin-bottom:80px}.intro[data-v-7dcf2d10]{display:flex;align-items:center}@media only screen and (max-width:735px){.intro[data-v-7dcf2d10]{padding-bottom:0;flex-direction:column}}.intro.ide .media[data-v-7dcf2d10] img{background-color:var(--colors-text-background,var(--color-text-background))}.col.left[data-v-7dcf2d10]{padding-right:40px}@media only screen and (max-width:1250px){.col.left[data-v-7dcf2d10]{padding-right:28px}}@media only screen and (max-width:735px){.col.left[data-v-7dcf2d10]{margin-left:auto;margin-right:auto;width:1536px;width:980px;padding-right:0}}@media only screen and (max-width:735px)and (max-width:1250px){.col.left[data-v-7dcf2d10]{width:692px}}@media only screen and (max-width:735px)and (max-width:735px){.col.left[data-v-7dcf2d10]{width:87.5%}}@media only screen and (max-width:735px)and (max-width:320px){.col.left[data-v-7dcf2d10]{width:215px}}.col.right[data-v-7dcf2d10]{padding-left:40px}@media only screen and (max-width:1250px){.col.right[data-v-7dcf2d10]{padding-left:28px}}@media only screen and (max-width:735px){.col.right[data-v-7dcf2d10]{padding-left:0}}.content[data-v-7dcf2d10]{font-size:1rem;line-height:1.4705882353;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.media[data-v-7dcf2d10] img{width:auto;max-height:560px;min-height:18.8235294118rem;-o-object-fit:scale-down;object-fit:scale-down}@media only screen and (max-width:735px){.media[data-v-7dcf2d10]{margin:0;margin-top:40px}.media[data-v-7dcf2d10] image,.media[data-v-7dcf2d10] video{max-height:80vh}}.media[data-v-7dcf2d10] .asset{padding:0 20px}.headline[data-v-7dcf2d10]{color:var(--colors-header-text,var(--color-header-text))}[data-v-7dcf2d10] .eyebrow{font-size:1.2352941176rem;line-height:1.1904761905;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:735px){[data-v-7dcf2d10] .eyebrow{font-size:1.1176470588rem;line-height:1.2105263158;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}[data-v-7dcf2d10] .eyebrow a{color:inherit}[data-v-7dcf2d10] .heading{font-size:1.8823529412rem;line-height:1.25;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:1250px){[data-v-7dcf2d10] .heading{font-size:1.6470588235rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){[data-v-7dcf2d10] .heading{font-size:1.4117647059rem;line-height:1.3333333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.expanded-intro[data-v-7dcf2d10]{margin-left:auto;margin-right:auto;width:1536px;width:980px;margin-top:40px}@media only screen and (max-width:1250px){.expanded-intro[data-v-7dcf2d10]{width:692px}}@media only screen and (max-width:735px){.expanded-intro[data-v-7dcf2d10]{width:87.5%}}@media only screen and (max-width:320px){.expanded-intro[data-v-7dcf2d10]{width:215px}}[data-v-7dcf2d10] .cols-2{gap:20px 16.6666666667%}[data-v-7dcf2d10] .cols-3 .column{gap:20px 12.5%}.code-preview[data-v-395e30cd]{position:sticky;overflow-y:auto;-webkit-overflow-scrolling:touch;background-color:var(--background,var(--color-step-background));height:calc(100vh - 3.05882rem)}.code-preview.ide[data-v-395e30cd]{height:100vh}.code-preview[data-v-395e30cd] .code-listing{color:var(--text,var(--color-code-plain))}.code-preview[data-v-395e30cd] .code-listing .code-line-container{padding-right:14px}.code-preview[data-v-395e30cd] pre{font-size:.7058823529rem;line-height:1.8333333333;font-weight:400;font-family:var(--typography-html-font-mono,Menlo,monospace)}.header[data-v-395e30cd]{font-size:.7058823529rem;line-height:1.3333333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);position:relative;display:flex;justify-content:space-between;align-items:center;width:-webkit-fill-available;width:-moz-available;width:stretch;cursor:pointer;font-weight:600;padding:8px 12px;border-radius:var(--border-radius,4px) var(--border-radius,4px) 0 0;z-index:1;background:var(--color-runtime-preview-background);color:var(--colors-runtime-preview-text,var(--color-runtime-preview-text))}.header[data-v-395e30cd]:focus{outline-style:none}#app.fromkeyboard .header[data-v-395e30cd]:focus{box-shadow:0 0 0 4px var(--color-focus-color);outline:none;border-color:var(--color-focus-border-color)}.runtime-preview[data-v-395e30cd]{--color-runtime-preview-shadow:rgba(0,0,0,.4);position:absolute;top:0;right:0;background:var(--color-runtime-preview-background);border-radius:var(--border-radius,4px);margin:1rem;margin-left:0;transition:width .2s ease-in;box-shadow:0 0 3px 0 var(--color-runtime-preview-shadow)}@media screen{[data-color-scheme=dark] .runtime-preview[data-v-395e30cd]{--color-runtime-preview-shadow:hsla(0,0%,100%,.4)}}@media screen and (prefers-color-scheme:dark){[data-color-scheme=auto] .runtime-preview[data-v-395e30cd]{--color-runtime-preview-shadow:hsla(0,0%,100%,.4)}}@supports not ((width:-webkit-fill-available) or (width:-moz-available) or (width:stretch)){.runtime-preview[data-v-395e30cd]{display:flex;flex-direction:column}}.runtime-preview .runtimve-preview__container[data-v-395e30cd]{border-radius:var(--border-radius,4px);overflow:hidden}.runtime-preview-ide[data-v-395e30cd]{top:0}.runtime-preview-ide .runtime-preview-asset[data-v-395e30cd] img{background-color:var(--color-runtime-preview-background)}.runtime-preview.collapsed[data-v-395e30cd]{box-shadow:0 0 3px 0 var(--color-runtime-preview-shadow);width:102px}.runtime-preview.collapsed .header[data-v-395e30cd]{border-radius:var(--border-radius,4px)}.runtime-preview.disabled[data-v-395e30cd]{box-shadow:0 0 3px 0 transparent}.runtime-preview.disabled .header[data-v-395e30cd]{color:var(--color-runtime-preview-disabled-text);cursor:auto}.runtime-preview-asset[data-v-395e30cd]{border-radius:0 0 var(--border-radius,4px) var(--border-radius,4px)}.runtime-preview-asset[data-v-395e30cd] img{border-bottom-left-radius:var(--border-radius,4px);border-bottom-right-radius:var(--border-radius,4px)}.preview-icon[data-v-395e30cd]{height:.8em;width:.8em;-webkit-user-select:none;-moz-user-select:none;user-select:none}.preview-show[data-v-395e30cd]{transform:scale(-1)}[data-v-0bdf2f26] pre{padding:10px 0}.toggle-preview[data-v-78763c14]{color:var(--color-runtime-preview-disabled-text);display:flex;align-items:center}a[data-v-78763c14]{color:var(--url,var(--color-link))}.toggle-text[data-v-78763c14]{display:flex;align-items:center}svg.toggle-icon[data-v-78763c14]{width:1em;height:1em;margin-left:.5em}.mobile-code-preview[data-v-b1691954]{background-color:var(--background,var(--color-step-background));padding:14px 0}@media only screen and (max-width:735px){.mobile-code-preview[data-v-b1691954]{display:flex;flex-direction:column}}.runtime-preview-modal-content[data-v-b1691954]{padding:45px 60px 0 60px;min-width:200px}.runtime-preview-modal-content[data-v-b1691954] img:not(.file-icon){border-radius:var(--border-radius,4px);box-shadow:0 0 3px rgba(0,0,0,.4);max-height:80vh;width:auto;display:block;margin-bottom:1rem}.runtime-preview-modal-content .runtime-preview-label[data-v-b1691954]{font-size:.7058823529rem;line-height:1.3333333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-runtime-preview-text);display:block;text-align:center;padding:.5em}[data-v-b1691954] .code-listing{color:var(--text,var(--color-code-plain))}[data-v-b1691954] .full-code-listing{padding-top:60px;min-height:calc(100vh - 60px)}[data-v-b1691954] pre{font-size:.7058823529rem;line-height:1.8333333333;font-weight:400;font-family:var(--typography-html-font-mono,Menlo,monospace)}.preview-toggle-container[data-v-b1691954]{align-self:flex-end;margin-right:20px}.step-container[data-v-d0198556]{margin:0}.step-container[data-v-d0198556]:not(:last-child){margin-bottom:100px}@media only screen and (max-width:735px){.step-container[data-v-d0198556]:not(:last-child){margin-bottom:80px}}.step[data-v-d0198556]{position:relative;border-radius:var(--tutorial-step-border-radius,var(--border-radius,4px));padding:1rem 2rem;background-color:var(--color-step-background);overflow:hidden;filter:blur(0)}.step[data-v-d0198556]:before{content:"";position:absolute;top:0;left:0;border:1px solid var(--color-step-focused);background-color:var(--color-step-focused);height:calc(100% - 2px);width:4px;opacity:0;transition:opacity .15s ease-in}.step.focused[data-v-d0198556],.step[data-v-d0198556]:focus{outline:none}.step.focused[data-v-d0198556]:before,.step[data-v-d0198556]:focus:before{opacity:1}:root.no-js .step.focused[data-v-d0198556]:before,:root.no-js .step[data-v-d0198556]:focus:before{opacity:0}@media only screen and (max-width:735px){.step[data-v-d0198556]{padding-left:2rem}.step[data-v-d0198556]:before{opacity:1}}.step-label[data-v-d0198556]{font-size:.7058823529rem;line-height:1.3333333333;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--colors-text,var(--color-step-text));margin-bottom:var(--spacing-stacked-margin-small)}.caption[data-v-d0198556]{border-top:1px solid;border-color:var(--color-step-caption);padding:1rem 0 0 0;margin-top:1rem}.media-container[data-v-d0198556]{display:none}@media only screen and (max-width:735px){.step[data-v-d0198556]{margin:0 .5882352941rem 1.1764705882rem .5882352941rem}.step.focused[data-v-d0198556],.step[data-v-d0198556]:focus{outline:none}.media-container[data-v-d0198556]{display:block;position:relative}.media-container[data-v-d0198556] img,.media-container[data-v-d0198556] video{max-height:80vh}[data-v-d0198556] .asset{padding:0 20px}}.steps[data-v-e3061a7c]{position:relative;font-size:.8235294118rem;line-height:1.4285714286;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);display:flex;color:var(--colors-text,var(--color-text))}@media only screen and (max-width:735px){.steps[data-v-e3061a7c]{padding-top:80px}.steps[data-v-e3061a7c]:before{position:absolute;top:0;border-top:1px solid var(--color-fill-gray-tertiary);content:"";width:calc(100% - 2.35294rem);margin:0 1.1764705882rem}}.steps[data-v-e3061a7c] aside{background:unset;border:unset;box-shadow:unset;-moz-column-break-inside:unset;break-inside:unset;padding:unset}.steps[data-v-e3061a7c] aside .label{font-size:.7058823529rem;line-height:1.3333333333;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.steps[data-v-e3061a7c] aside+*{margin-top:var(--spacing-stacked-margin-large)}.content-container[data-v-e3061a7c]{flex:none;margin-right:4.1666666667%;width:37.5%;margin-top:140px;margin-bottom:94vh}@media only screen and (max-width:735px){.content-container[data-v-e3061a7c]{margin-top:0;margin-bottom:0;height:100%;margin-left:0;margin-right:0;position:relative;width:100%}}.asset-container[data-v-e3061a7c]{flex:none;height:calc(100vh - 3.05882rem);background-color:var(--background,var(--color-step-background));max-width:921px;width:calc(50vw + 8.33333%);position:sticky;top:3.0588235294rem;transition:margin .1s ease-in-out}@media only screen and (max-width:767px){.asset-container[data-v-e3061a7c]{top:2.8235294118rem;height:calc(100vh - 2.82353rem)}}.asset-container[data-v-e3061a7c]:not(.for-step-code){overflow-y:auto;-webkit-overflow-scrolling:touch}.asset-container.ide[data-v-e3061a7c]{height:100vh;top:0}@media only screen and (min-width:736px){.asset-container[data-v-e3061a7c]{display:grid}.asset-container>[data-v-e3061a7c]{grid-row:1;grid-column:1;height:calc(100vh - 3.05882rem)}.asset-container.ide>[data-v-e3061a7c]{height:100vh}}.asset-container .step-asset[data-v-e3061a7c]{box-sizing:border-box;padding:0;padding-left:40px;min-height:320px;height:100%}.asset-container .step-asset[data-v-e3061a7c],.asset-container .step-asset[data-v-e3061a7c] picture{height:100%;display:flex;align-items:center}.asset-container .step-asset[data-v-e3061a7c] .video-replay-container{height:100%;display:flex;flex-direction:column;justify-content:center}.asset-container .step-asset[data-v-e3061a7c] img,.asset-container .step-asset[data-v-e3061a7c] video{width:auto;max-height:calc(100vh - 3.05882rem - 80px);max-width:531.66667px;margin:0}@media only screen and (max-width:1250px){.asset-container .step-asset[data-v-e3061a7c] img,.asset-container .step-asset[data-v-e3061a7c] video{max-width:363.66667px}}.asset-container .step-asset[data-v-e3061a7c] .video-replay-container,.asset-container .step-asset[data-v-e3061a7c] img{min-height:320px}.asset-container .step-asset[data-v-e3061a7c] .video-replay-container video{min-height:280px}.asset-container .step-asset[data-v-e3061a7c] [data-orientation=landscape]{max-width:min(841px,calc(50vw + 8.33333% - 80px))}@media only screen and (max-width:735px){.asset-container[data-v-e3061a7c]{display:none}}.asset-wrapper[data-v-e3061a7c]{width:63.2%;align-self:center;transition:transform .25s ease-out;will-change:transform}.asset-wrapper.ide .step-asset[data-v-e3061a7c] img{background-color:var(--background,var(--color-step-background))}.asset-wrapper[data-v-e3061a7c]:has([data-orientation=landscape]){width:unset}[data-v-e3061a7c] .runtime-preview-asset{display:grid}[data-v-e3061a7c] .runtime-preview-asset>*{grid-row:1;grid-column:1}.interstitial[data-v-e3061a7c]{padding:0 2rem}.interstitial[data-v-e3061a7c]:not(:first-child){margin-top:5.8823529412rem}.interstitial[data-v-e3061a7c]:not(:last-child){margin-bottom:30px}@media only screen and (max-width:735px){.interstitial[data-v-e3061a7c]{margin-left:auto;margin-right:auto;width:1536px;width:980px;padding:0}}@media only screen and (max-width:735px)and (max-width:1250px){.interstitial[data-v-e3061a7c]{width:692px}}@media only screen and (max-width:735px)and (max-width:735px){.interstitial[data-v-e3061a7c]{width:87.5%}}@media only screen and (max-width:735px)and (max-width:320px){.interstitial[data-v-e3061a7c]{width:215px}}@media only screen and (max-width:735px){.interstitial[data-v-e3061a7c]:not(:first-child){margin-top:0}}.fade-enter-active[data-v-e3061a7c],.fade-leave-active[data-v-e3061a7c]{transition:opacity .3s ease-in-out}.fade-enter[data-v-e3061a7c],.fade-leave-to[data-v-e3061a7c]{opacity:0}.section[data-v-6b3a0b3a]{padding-top:80px}.sections[data-v-79a75e9e]{margin-left:auto;margin-right:auto;width:1536px;width:980px}@media only screen and (max-width:1250px){.sections[data-v-79a75e9e]{width:692px}}@media only screen and (max-width:735px){.sections[data-v-79a75e9e]{width:87.5%}}@media only screen and (max-width:320px){.sections[data-v-79a75e9e]{width:215px}}@media only screen and (max-width:735px){.sections[data-v-79a75e9e]{margin:0;width:100%}}.tutorial[data-v-1631abcb]{background-color:var(--colors-text-background,var(--color-tutorial-background))} \ No newline at end of file diff --git a/docs/css/tutorials-overview.adb17623.css b/docs/css/tutorials-overview.adb17623.css new file mode 100644 index 00000000..03fa573d --- /dev/null +++ b/docs/css/tutorials-overview.adb17623.css @@ -0,0 +1,9 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */.tutorials-navigation-link[data-v-e9f9b59c]{color:var(--color-tutorials-overview-navigation-link);transition:color .3s linear}.tutorials-navigation-link[data-v-e9f9b59c]:hover{text-decoration:none;transition:none;color:var(--color-tutorials-overview-navigation-link-hover)}.tutorials-navigation-link.active[data-v-e9f9b59c]{color:var(--color-tutorials-overview-navigation-link-active)}.tutorials-navigation-list[data-v-4e0180fa]{list-style-type:none;margin:0}.tutorials-navigation-list li+li[data-v-4e0180fa]:not(.volume--named){margin-top:24px}.tutorials-navigation-list .volume--named+.volume--named[data-v-4e0180fa]{margin-top:12px}.expand-enter-active,.expand-leave-active{transition:height .3s ease-in-out;overflow:hidden}.expand-enter,.expand-leave-to{height:0}.toggle[data-v-489416f8]{color:#f0f0f0;line-height:21px;display:flex;align-items:center;width:100%;font-weight:600;padding:6px 6px 6px 0;border-bottom:1px solid #2a2a2a;text-decoration:none;box-sizing:border-box}@media only screen and (max-width:767px){.toggle[data-v-489416f8]{padding-right:6px;border-bottom-color:hsla(0,0%,100%,.1)}}.toggle .text[data-v-489416f8]{word-break:break-word}.toggle[data-v-489416f8]:hover{text-decoration:none}.toggle .toggle-icon[data-v-489416f8]{display:inline-block;transition:transform .2s ease-in;height:.4em;width:.4em;margin-left:auto;margin-right:.2em}.collapsed .toggle .toggle-icon[data-v-489416f8]{transform:rotate(45deg)}.collapsed .toggle[data-v-489416f8],.collapsed .toggle[data-v-489416f8]:hover{color:#b0b0b0}.tutorials-navigation-menu-content[data-v-489416f8]{opacity:1;transition:height .2s ease-in,opacity .2s ease-in}.collapsed .tutorials-navigation-menu-content[data-v-489416f8]{height:0;opacity:0}.tutorials-navigation-menu-content .tutorials-navigation-list[data-v-489416f8]{padding:24px 0 12px 0}.tutorials-navigation[data-v-79093ed6]{font-size:1rem;line-height:1.2352941176;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.nav-title-content[data-v-854b4dd6]{max-width:100%}.title[data-v-854b4dd6]{color:var(--color-nav-root-title,currentColor);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:inline-block;vertical-align:top;max-width:296px}@media only screen and (max-width:1023px){.title[data-v-854b4dd6]{max-width:205px}}@media only screen and (max-width:767px){.title[data-v-854b4dd6]{flex-basis:fill;display:initial;vertical-align:initial;max-width:none}}.subhead[data-v-854b4dd6]{color:var(--color-nav-root-subhead)}.theme-dark .subhead[data-v-854b4dd6]{color:var(--color-nav-dark-root-subhead)}.nav[data-v-54bcce6d] .nav-menu{padding-top:0}.nav[data-v-54bcce6d] .nav-menu .nav-menu-items{margin-left:auto}@media only screen and (min-width:768px){.nav[data-v-54bcce6d] .nav-menu .nav-menu-items .in-page-navigation{display:none}}@media only screen and (min-width:320px)and (max-width:735px){.nav[data-v-54bcce6d] .nav-menu .nav-menu-items{padding:18px 0 40px}}.hero[data-v-400ffab5]{margin-left:auto;margin-right:auto;width:1536px;width:980px;padding-bottom:4.7058823529rem;padding-top:4.7058823529rem}@media only screen and (max-width:1250px){.hero[data-v-400ffab5]{width:692px}}@media only screen and (max-width:735px){.hero[data-v-400ffab5]{width:87.5%}}@media only screen and (max-width:320px){.hero[data-v-400ffab5]{width:215px}}@media screen{.hero[data-v-400ffab5]{--color-fill:#fff;--color-fill-secondary:#f7f7f7;--color-fill-tertiary:#f0f0f0;--color-fill-quaternary:#282828;--color-fill-blue:#00f;--color-fill-light-blue-secondary:#d1d1ff;--color-fill-gray:#ccc;--color-fill-gray-secondary:#f5f5f5;--color-fill-gray-tertiary:#f0f0f0;--color-fill-gray-quaternary:#f0f0f0;--color-fill-green-secondary:#f0fff0;--color-fill-orange-secondary:#fffaf6;--color-fill-red-secondary:#fff0f5;--color-figure-blue:#36f;--color-figure-gray:#000;--color-figure-gray-secondary:#666;--color-figure-gray-secondary-alt:#666;--color-figure-gray-tertiary:#666;--color-figure-green:green;--color-figure-light-gray:#666;--color-figure-orange:#c30;--color-figure-red:red;--color-tutorials-teal:#000;--color-article-background:var(--color-fill-tertiary);--color-article-body-background:var(--color-fill);--color-aside-deprecated:var(--color-figure-gray);--color-aside-deprecated-background:var(--color-fill-orange-secondary);--color-aside-deprecated-border:var(--color-figure-orange);--color-aside-experiment:var(--color-figure-gray);--color-aside-experiment-background:var(--color-fill-gray-secondary);--color-aside-experiment-border:var(--color-figure-light-gray);--color-aside-important:var(--color-figure-gray);--color-aside-important-background:var(--color-fill-gray-secondary);--color-aside-important-border:var(--color-figure-light-gray);--color-aside-note:var(--color-figure-gray);--color-aside-note-background:var(--color-fill-gray-secondary);--color-aside-note-border:var(--color-figure-light-gray);--color-aside-tip:var(--color-figure-gray);--color-aside-tip-background:var(--color-fill-gray-secondary);--color-aside-tip-border:var(--color-figure-light-gray);--color-aside-warning:var(--color-figure-gray);--color-aside-warning-background:var(--color-fill-red-secondary);--color-aside-warning-border:var(--color-figure-red);--color-badge-text:#fff;--color-badge-default:var(--color-figure-gray);--color-badge-beta:var(--color-figure-gray-tertiary);--color-badge-deprecated:var(--color-figure-orange);--color-badge-dark-default:#fff;--color-badge-dark-beta:#b0b0b0;--color-badge-dark-deprecated:#f60;--color-button-background:var(--color-fill-blue);--color-button-background-active:#36f;--color-button-background-hover:var(--color-figure-blue);--color-button-text:#fff;--color-call-to-action-background:var(--color-fill-secondary);--color-changes-added:var(--color-figure-light-gray);--color-changes-added-hover:var(--color-figure-light-gray);--color-changes-deprecated:var(--color-figure-light-gray);--color-changes-deprecated-hover:var(--color-figure-light-gray);--color-changes-modified:var(--color-figure-light-gray);--color-changes-modified-hover:var(--color-figure-light-gray);--color-changes-modified-previous-background:var(--color-fill);--color-code-background:var(--color-fill-secondary);--color-code-collapsible-background:var(--color-fill-tertiary);--color-code-collapsible-text:var(--color-figure-gray-secondary-alt);--color-code-line-highlight:rgba(51,102,255,.08);--color-code-line-highlight-border:var(--color-figure-blue);--color-code-plain:var(--color-figure-gray);--color-dropdown-background:hsla(0,0%,100%,.8);--color-dropdown-border:#ccc;--color-dropdown-option-text:#666;--color-dropdown-text:#000;--color-dropdown-dark-background:hsla(0,0%,100%,.1);--color-dropdown-dark-border:hsla(0,0%,94%,.2);--color-dropdown-dark-option-text:#ccc;--color-dropdown-dark-text:#fff;--color-eyebrow:var(--color-figure-gray-secondary);--color-focus-border-color:var(--color-fill-blue);--color-focus-color:rgba(0,125,250,.6);--color-form-error:var(--color-figure-red);--color-form-error-background:var(--color-fill-red-secondary);--color-form-valid:var(--color-figure-green);--color-form-valid-background:var(--color-fill-green-secondary);--color-generic-modal-background:var(--color-fill);--color-grid:var(--color-fill-gray);--color-header-text:var(--color-figure-gray);--color-hero-eyebrow:#ccc;--color-link:var(--color-figure-blue);--color-loading-placeholder-background:var(--color-fill);--color-nav-color:#000;--color-nav-current-link:#000;--color-nav-expanded:#fff;--color-nav-hierarchy-collapse-background:#f0f0f0;--color-nav-hierarchy-collapse-borders:#ccc;--color-nav-hierarchy-item-borders:#ccc;--color-nav-keyline:rgba(0,0,0,.2);--color-nav-link-color:#000;--color-nav-link-color-hover:#36f;--color-nav-outlines:#ccc;--color-nav-rule:hsla(0,0%,94%,.5);--color-nav-solid-background:#fff;--color-nav-sticking-expanded-keyline:rgba(0,0,0,.1);--color-nav-stuck:hsla(0,0%,100%,.9);--color-nav-uiblur-expanded:hsla(0,0%,100%,.9);--color-nav-uiblur-stuck:hsla(0,0%,100%,.7);--color-nav-root-subhead:var(--color-tutorials-teal);--color-nav-dark-border-top-color:hsla(0,0%,100%,.4);--color-nav-dark-color:#fff;--color-nav-dark-current-link:#fff;--color-nav-dark-expanded:#2a2a2a;--color-nav-dark-hierarchy-collapse-background:#424242;--color-nav-dark-hierarchy-collapse-borders:#666;--color-nav-dark-hierarchy-item-borders:#424242;--color-nav-dark-keyline:rgba(66,66,66,.95);--color-nav-dark-link-color:#fff;--color-nav-dark-link-color-hover:#09f;--color-nav-dark-outlines:#575757;--color-nav-dark-rule:#575757;--color-nav-dark-solid-background:#000;--color-nav-dark-sticking-expanded-keyline:rgba(66,66,66,.7);--color-nav-dark-stuck:rgba(42,42,42,.9);--color-nav-dark-uiblur-expanded:rgba(42,42,42,.9);--color-nav-dark-uiblur-stuck:rgba(42,42,42,.7);--color-nav-dark-root-subhead:#fff;--color-other-decl-button:var(--color-text-background);--color-runtime-preview-background:var(--color-fill-tertiary);--color-runtime-preview-disabled-text:hsla(0,0%,40%,.6);--color-runtime-preview-text:var(--color-figure-gray-secondary);--color-secondary-label:var(--color-figure-gray-secondary);--color-step-background:var(--color-fill-secondary);--color-step-caption:var(--color-figure-gray-secondary);--color-step-focused:var(--color-figure-light-gray);--color-step-text:var(--color-figure-gray-secondary);--color-svg-icon:#666;--color-syntax-addition:var(--color-figure-green);--color-syntax-attributes:#947100;--color-syntax-characters:#272ad8;--color-syntax-comments:#707f8c;--color-syntax-deletion:var(--color-figure-red);--color-syntax-documentation-markup:#506375;--color-syntax-documentation-markup-keywords:#506375;--color-syntax-heading:#ba2da2;--color-syntax-highlighted:rgba(0,113,227,.2);--color-syntax-keywords:#ad3da4;--color-syntax-marks:#000;--color-syntax-numbers:#272ad8;--color-syntax-other-class-names:#703daa;--color-syntax-other-constants:#4b21b0;--color-syntax-other-declarations:#047cb0;--color-syntax-other-function-and-method-names:#4b21b0;--color-syntax-other-instance-variables-and-globals:#703daa;--color-syntax-other-preprocessor-macros:#78492a;--color-syntax-other-type-names:#703daa;--color-syntax-param-internal-name:#404040;--color-syntax-plain-text:#000;--color-syntax-preprocessor-statements:#78492a;--color-syntax-project-class-names:#3e8087;--color-syntax-project-constants:#2d6469;--color-syntax-project-function-and-method-names:#2d6469;--color-syntax-project-instance-variables-and-globals:#3e8087;--color-syntax-project-preprocessor-macros:#78492a;--color-syntax-project-type-names:#3e8087;--color-syntax-strings:#d12f1b;--color-syntax-type-declarations:#03638c;--color-syntax-urls:#1337ff;--color-tabnav-item-border-color:var(--color-fill-gray);--color-text:var(--color-figure-gray);--color-text-background:var(--color-fill);--color-tutorial-assessments-background:var(--color-fill-secondary);--color-tutorial-background:var(--color-fill);--color-tutorial-navbar-dropdown-background:var(--color-fill);--color-tutorial-navbar-dropdown-border:var(--color-fill-gray);--color-tutorial-quiz-border-active:var(--color-figure-blue);--color-tutorials-overview-background:#161616;--color-tutorials-overview-content:#fff;--color-tutorials-overview-content-alt:#fff;--color-tutorials-overview-eyebrow:#ccc;--color-tutorials-overview-icon:#b0b0b0;--color-tutorials-overview-link:#09f;--color-tutorials-overview-navigation-link:#ccc;--color-tutorials-overview-navigation-link-active:#fff;--color-tutorials-overview-navigation-link-hover:#fff;--color-tutorial-hero-text:#fff;--color-tutorial-hero-background:#000;--color-navigator-item-hover:rgba(0,0,255,.05);--color-card-background:var(--color-fill);--color-card-content-text:var(--color-figure-gray);--color-card-eyebrow:var(--color-figure-gray-secondary-alt);--color-card-shadow:rgba(0,0,0,.04);--color-link-block-card-border:rgba(0,0,0,.04);--color-standard-red:#ffc2c2;--color-standard-orange:#fc9;--color-standard-yellow:#ffe0a3;--color-standard-blue:#9cf;--color-standard-green:#9cc;--color-standard-purple:#ccf;--color-standard-gray:#f0f0f0;--color-fill:#000;--color-fill-secondary:#161616;--color-fill-tertiary:#2a2a2a;--color-fill-blue:#06f;--color-fill-light-blue-secondary:#004ec4;--color-fill-gray:#575757;--color-fill-gray-secondary:#222;--color-fill-gray-tertiary:#424242;--color-fill-gray-quaternary:#424242;--color-fill-green-secondary:#030;--color-fill-orange-secondary:#472400;--color-fill-red-secondary:#300;--color-figure-blue:#09f;--color-figure-gray:#fff;--color-figure-gray-secondary:#ccc;--color-figure-gray-secondary-alt:#b0b0b0;--color-figure-gray-tertiary:#b0b0b0;--color-figure-green:#090;--color-figure-light-gray:#b0b0b0;--color-figure-orange:#f60;--color-figure-red:#f33;--color-tutorials-teal:#fff;--color-article-body-background:#111;--color-badge-text:#000;--color-badge-default:var(--color-badge-dark-default);--color-button-background-active:#06f;--color-code-line-highlight:rgba(0,153,255,.08);--color-dropdown-background:var(--color-dropdown-dark-background);--color-dropdown-border:var(--color-dropdown-dark-border);--color-dropdown-option-text:var(--color-dropdown-dark-option-text);--color-dropdown-text:var(--color-dropdown-dark-text);--color-nav-color:var(--color-nav-dark-color);--color-nav-current-link:var(--color-nav-dark-current-link);--color-nav-expanded:var(--color-nav-dark-expanded);--color-nav-hierarchy-collapse-background:var(--color-nav-dark-hierarchy-collapse-background);--color-nav-hierarchy-collapse-borders:var(--color-nav-dark-hierarchy-collapse-borders);--color-nav-hierarchy-item-borders:var(--color-nav-dark-hierarchy-item-borders);--color-nav-keyline:var(--color-nav-dark-keyline);--color-nav-link-color:var(--color-nav-dark-link-color);--color-nav-link-color-hover:var(--color-nav-dark-link-color-hover);--color-nav-outlines:var(--color-nav-dark-outlines);--color-nav-rule:var(--color-nav-dark-rule);--color-nav-solid-background:var(--color-nav-dark-solid-background);--color-nav-sticking-expanded-keyline:var(--color-nav-dark-sticking-expanded-keyline);--color-nav-stuck:var(--color-nav-dark-stuck);--color-nav-uiblur-expanded:var(--color-nav-dark-uiblur-expanded);--color-nav-uiblur-stuck:var(--color-nav-dark-uiblur-stuck);--color-runtime-preview-disabled-text:hsla(0,0%,80%,.6);--color-syntax-attributes:#cc9768;--color-syntax-characters:#d9c97c;--color-syntax-comments:#7f8c98;--color-syntax-documentation-markup:#7f8c98;--color-syntax-documentation-markup-keywords:#a3b1bf;--color-syntax-highlighted:rgba(0,113,227,.6);--color-syntax-keywords:#ff7ab2;--color-syntax-marks:#fff;--color-syntax-numbers:#d9c97c;--color-syntax-other-class-names:#dabaff;--color-syntax-other-constants:#a7ebdd;--color-syntax-other-declarations:#4eb0cc;--color-syntax-other-function-and-method-names:#b281eb;--color-syntax-other-instance-variables-and-globals:#b281eb;--color-syntax-other-preprocessor-macros:#ffa14f;--color-syntax-other-type-names:#dabaff;--color-syntax-param-internal-name:#bfbfbf;--color-syntax-plain-text:#fff;--color-syntax-preprocessor-statements:#ffa14f;--color-syntax-project-class-names:#acf2e4;--color-syntax-project-constants:#78c2b3;--color-syntax-project-function-and-method-names:#78c2b3;--color-syntax-project-instance-variables-and-globals:#78c2b3;--color-syntax-project-preprocessor-macros:#ffa14f;--color-syntax-project-type-names:#acf2e4;--color-syntax-strings:#ff8170;--color-syntax-type-declarations:#6bdfff;--color-syntax-urls:#69f;--color-tutorial-background:var(--color-fill-tertiary);--color-navigator-item-hover:rgba(0,102,255,.5);--color-card-shadow:hsla(0,0%,100%,.04);--color-link-block-card-border:hsla(0,0%,100%,.25);--color-standard-red:#8b0000;--color-standard-orange:#8b4000;--color-standard-yellow:#8f7200;--color-standard-blue:#002d75;--color-standard-green:#023b2d;--color-standard-purple:#512b55;--color-standard-gray:#2a2a2a}}.copy-container[data-v-400ffab5]{margin:0 auto;text-align:center;width:720px}.title[data-v-400ffab5]{font-size:2.8235294118rem;line-height:1.0833333333;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-tutorials-overview-content)}@media only screen and (max-width:1250px){.title[data-v-400ffab5]{font-size:2.3529411765rem;line-height:1.1;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){.title[data-v-400ffab5]{font-size:1.8823529412rem;line-height:1.125;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.content[data-v-400ffab5]{font-size:1.2352941176rem;line-height:1.380952381;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-tutorials-overview-content)}@media only screen and (max-width:735px){.content[data-v-400ffab5]{font-size:1.1176470588rem;line-height:1.4210526316;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.meta[data-v-400ffab5]{color:var(--color-tutorials-overview-content-alt);align-items:center;display:flex;justify-content:center}.meta-content[data-v-400ffab5]{font-size:.8235294118rem;line-height:1.4285714286;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.meta .timer-icon[data-v-400ffab5]{margin-right:.3529411765rem;height:16px;width:16px;fill:var(--color-tutorials-overview-icon)}@media only screen and (max-width:735px){.meta .timer-icon[data-v-400ffab5]{margin-right:.2941176471rem;height:.8235294118rem;width:.8235294118rem}}.meta .time[data-v-400ffab5]{font-size:1.1176470588rem;line-height:1.2105263158;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}@media only screen and (max-width:735px){.meta .time[data-v-400ffab5]{font-size:1rem;line-height:1.1176470588;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.title+.content[data-v-400ffab5]{margin-top:1.4705882353rem}.content+.meta[data-v-400ffab5]{margin-top:1.1764705882rem}.button-cta[data-v-400ffab5]{margin-top:1.7647058824rem}*+.asset[data-v-400ffab5]{margin-top:4.1176470588rem}@media only screen and (max-width:1250px){.copy-container[data-v-400ffab5]{width:636px}}@media only screen and (max-width:735px){.hero[data-v-400ffab5]{padding-bottom:1.7647058824rem;padding-top:2.3529411765rem}.copy-container[data-v-400ffab5]{width:100%}.title+.content[data-v-400ffab5]{margin-top:.8823529412rem}.button-cta[data-v-400ffab5]{margin-top:1.4117647059rem}*+.asset[data-v-400ffab5]{margin-top:2.2352941176rem}}.image[data-v-569db166]{margin-bottom:10px}.name[data-v-569db166]{font-size:1.8823529412rem;line-height:1.125;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-tutorials-overview-header-text,#f0f0f0);word-break:break-word}@media only screen and (max-width:1250px){.name[data-v-569db166]{font-size:1.6470588235rem;line-height:1.1428571429;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){.name[data-v-569db166]{font-size:1.4117647059rem;line-height:1.1666666667;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.content[data-v-569db166]{font-size:1rem;line-height:1.2352941176;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-tutorials-overview-content-alt);margin-top:10px}.volume-name[data-v-569db166]{padding:50px 60px;text-align:center;background:var(--color-tutorials-overview-fill-secondary,#161616);margin:2px 0}@media only screen and (max-width:735px){.volume-name[data-v-569db166]{padding:40px 20px}}.document-icon[data-v-3a80772b]{margin-left:-3px}.tile[data-v-74dbeb68]{background:var(--color-tutorials-overview-fill-secondary,#161616);padding:40px 30px;color:var(--color-tutorials-overview-content-alt)}.content[data-v-74dbeb68] a,a[data-v-74dbeb68]{color:var(--colors-link,var(--color-tutorials-overview-link))}.icon[data-v-74dbeb68]{display:block;height:1.4705882353rem;line-height:1.4705882353rem;margin-bottom:.5882352941rem;width:1.4705882353rem}.icon[data-v-74dbeb68] svg.svg-icon{width:100%;max-height:100%;fill:var(--color-tutorials-overview-icon)}.icon[data-v-74dbeb68] svg.svg-icon .svg-icon-stroke{stroke:var(--color-tutorials-overview-content-alt)}.title[data-v-74dbeb68]{font-size:1.2352941176rem;line-height:1.1904761905;font-weight:600;margin-bottom:.8em}.content[data-v-74dbeb68],.link[data-v-74dbeb68],.title[data-v-74dbeb68]{font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.content[data-v-74dbeb68],.link[data-v-74dbeb68]{font-size:.8235294118rem;line-height:1.4285714286;font-weight:400}.content[data-v-74dbeb68]{color:var(--color-tutorials-overview-content-alt)}.link[data-v-74dbeb68]{display:block;margin-top:1.1764705882rem}.link .link-icon[data-v-74dbeb68]{margin-left:.2em;width:.6em;height:.6em}[data-v-74dbeb68] .inline-link{text-decoration:none}[data-v-74dbeb68] .content ul{list-style-type:none;margin-left:0;font-size:.8235294118rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}[data-v-74dbeb68] .content ul li:before{content:"​";position:absolute}[data-v-74dbeb68] .content li+li{margin-top:8px}@media only screen and (max-width:735px){.tile[data-v-74dbeb68]{padding:1.7647058824rem 1.1764705882rem}}.tile-group[data-v-4cacce0a]{display:grid;grid-column-gap:2px;grid-row-gap:2px}.tile-group.count-1[data-v-4cacce0a]{grid-template-columns:1fr;text-align:center}.tile-group.count-1[data-v-4cacce0a] .icon{margin-left:auto;margin-right:auto}.tile-group.count-2[data-v-4cacce0a]{grid-template-columns:repeat(2,1fr)}.tile-group.count-3[data-v-4cacce0a]{grid-template-columns:repeat(3,1fr)}.tile-group.count-4[data-v-4cacce0a]{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,auto)}.tile-group.count-5[data-v-4cacce0a]{grid-template-columns:repeat(6,1fr);grid-template-rows:repeat(2,auto)}.tile-group.count-5 .tile[data-v-4cacce0a]{grid-column-end:span 2}.tile-group.count-5 .tile[data-v-4cacce0a]:nth-of-type(-n+2){grid-column-end:span 3}.tile-group.count-6[data-v-4cacce0a]{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(3,auto)}@media only screen and (min-width:768px)and (max-width:1250px){.tile-group.tile-group[data-v-4cacce0a]{grid-template-columns:1fr;grid-template-rows:auto}}@media only screen and (max-width:735px){.tile-group.count-1[data-v-4cacce0a],.tile-group.count-2[data-v-4cacce0a],.tile-group.count-3[data-v-4cacce0a],.tile-group.count-4[data-v-4cacce0a],.tile-group.count-5[data-v-4cacce0a],.tile-group.count-6[data-v-4cacce0a]{grid-template-columns:1fr;grid-template-rows:auto}}.title[data-v-7f8022c1]{font-size:1.8823529412rem;line-height:1.125;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:#f0f0f0}@media only screen and (max-width:1250px){.title[data-v-7f8022c1]{font-size:1.6470588235rem;line-height:1.1428571429;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}@media only screen and (max-width:735px){.title[data-v-7f8022c1]{font-size:1.4117647059rem;line-height:1.1666666667;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.content[data-v-7f8022c1]{font-size:1rem;line-height:1.2352941176;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:#b0b0b0;margin-top:10px}.topic-list[data-v-0589dc3b]{list-style-type:none;margin:50px 0 0 0;position:relative}.topic-list li[data-v-0589dc3b]:before{content:"​";position:absolute}.topic-list[data-v-0589dc3b]:before{content:"";border-left:1px solid var(--color-fill-quaternary);display:block;height:calc(100% - .88235rem);left:.8823529412rem;position:absolute;top:50%;transform:translateY(-50%);width:0}.topic[data-v-0589dc3b]{font-size:1rem;line-height:1.4705882353;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);display:flex;align-items:flex-start}@media only screen and (max-width:735px){.topic[data-v-0589dc3b]{font-size:.8235294118rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}}.topic+.topic[data-v-0589dc3b]{margin-top:.5882352941rem}.topic .topic-icon[data-v-0589dc3b]{background-color:var(--color-fill-quaternary);border-radius:50%;flex-shrink:0;height:1.7647058824rem;width:1.7647058824rem;margin-right:1.1764705882rem;position:relative;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:.4705882353rem;box-sizing:border-box;display:flex;justify-content:center;align-items:center}.topic .topic-icon svg[data-v-0589dc3b]{fill:var(--color-tutorials-overview-icon);max-width:100%;max-height:100%;width:100%}.container[data-v-0589dc3b]{align-items:baseline;display:flex;justify-content:space-between;width:100%;padding-top:.1176470588rem}.container[data-v-0589dc3b]:hover{text-decoration:none}.container:hover .link[data-v-0589dc3b]{text-decoration:underline}.timer-icon[data-v-0589dc3b]{margin-right:.2941176471rem;height:.7058823529rem;width:.7058823529rem;fill:var(--color-tutorials-overview-icon)}.time[data-v-0589dc3b]{font-size:.8235294118rem;line-height:1.2857142857;font-weight:400;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-tutorials-overview-content-alt);align-items:center;display:inline-flex}.link[data-v-0589dc3b]{padding-right:.5882352941rem;color:var(--colors-link,var(--color-tutorials-overview-link))}@media only screen and (min-width:768px)and (max-width:1250px){.topic-list[data-v-0589dc3b]{margin-top:2.3529411765rem}}@media only screen and (max-width:735px){.topic-list[data-v-0589dc3b]{margin-top:1.7647058824rem}.topic[data-v-0589dc3b]{height:auto;align-items:flex-start}.topic.no-time-estimate[data-v-0589dc3b]{align-items:center}.topic.no-time-estimate .topic-icon[data-v-0589dc3b]{align-self:flex-start;top:0}.topic+.topic[data-v-0589dc3b]{margin-top:1.1764705882rem}.topic .topic-icon[data-v-0589dc3b]{top:.2941176471rem;margin-right:.7647058824rem}.container[data-v-0589dc3b]{flex-wrap:wrap;padding-top:0}.link[data-v-0589dc3b],.time[data-v-0589dc3b]{flex-basis:100%}.time[data-v-0589dc3b]{margin-top:.2941176471rem}}.chapter[data-v-7468bc5e]:focus{outline:none!important}.info[data-v-7468bc5e]{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between}.name[data-v-7468bc5e]{font-size:1.2352941176rem;line-height:1.1904761905;font-weight:600;font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif);color:var(--color-tutorials-overview-header-text,#f0f0f0)}.name-text[data-v-7468bc5e]{word-break:break-word}.eyebrow[data-v-7468bc5e]{font-size:1rem;line-height:1.2352941176;font-weight:400;color:var(--color-tutorials-overview-eyebrow);display:block;font-weight:600;margin-bottom:5px}.content[data-v-7468bc5e],.eyebrow[data-v-7468bc5e]{font-family:var(--typography-html-font,"Helvetica Neue","Helvetica","Arial",sans-serif)}.content[data-v-7468bc5e]{font-size:.8235294118rem;line-height:1.4285714286;font-weight:400;color:var(--color-tutorials-overview-content-alt)}.asset[data-v-7468bc5e]{flex:0 0 190px}.intro[data-v-7468bc5e]{flex:0 1 360px}@media only screen and (min-width:768px)and (max-width:1250px){.asset[data-v-7468bc5e]{flex:0 0 130px}.intro[data-v-7468bc5e]{flex:0 1 260px}}@media only screen and (max-width:767px){.intro[data-v-7468bc5e]{flex:0 1 340px}}@media only screen and (max-width:735px){.info[data-v-7468bc5e]{display:block;text-align:center}.asset[data-v-7468bc5e]{margin:0 45px}.eyebrow[data-v-7468bc5e]{margin-bottom:7px}.intro[data-v-7468bc5e]{margin-top:40px}}.tile[data-v-540dbf10]{background:var(--color-tutorials-overview-fill-secondary,#161616);margin:2px 0;padding:50px 60px}.asset[data-v-540dbf10]{margin-bottom:10px}@media only screen and (min-width:768px)and (max-width:1250px){.tile[data-v-540dbf10]{padding:40px 30px}}@media only screen and (max-width:735px){.volume[data-v-540dbf10]{border-radius:0}.tile[data-v-540dbf10]{padding:40px 20px}}.learning-path[data-v-69a72bbc]{background:var(--color-tutorials-overview-fill,#000);padding:4.7058823529rem 0}.main-container[data-v-69a72bbc]{margin-left:auto;margin-right:auto;width:1536px;width:980px;align-items:stretch;display:flex;justify-content:space-between}@media only screen and (max-width:1250px){.main-container[data-v-69a72bbc]{width:692px}}@media only screen and (max-width:735px){.main-container[data-v-69a72bbc]{width:87.5%}}@media only screen and (max-width:320px){.main-container[data-v-69a72bbc]{width:215px}}.ide .main-container[data-v-69a72bbc]{justify-content:center}.secondary-content-container[data-v-69a72bbc]{flex:0 0 200px;width:200px}.tutorials-navigation[data-v-69a72bbc]{position:sticky;top:7.7647058824rem}.primary-content-container[data-v-69a72bbc]{flex:0 1 720px;max-width:100%}.content-sections-container .content-section[data-v-69a72bbc]{border-radius:12px;overflow:hidden}.content-sections-container .content-section+.content-section[data-v-69a72bbc]{margin-top:1.1764705882rem}@media only screen and (min-width:768px)and (max-width:1250px){.learning-path[data-v-69a72bbc]{padding:2.3529411765rem 0}.primary-content-container[data-v-69a72bbc]{flex-basis:auto;margin-left:1.2941176471rem}.secondary-content-container[data-v-69a72bbc]{flex:0 0 180px;width:180px}}@media only screen and (max-width:767px){.secondary-content-container[data-v-69a72bbc]{display:none}}@media only screen and (max-width:735px){.content-sections-container .content-section[data-v-69a72bbc]{border-radius:0}.content-sections-container .content-section.volume[data-v-69a72bbc]{margin-top:1.1764705882rem}.learning-path[data-v-69a72bbc]{padding:0}.main-container[data-v-69a72bbc]{width:100%}}.tutorials-overview[data-v-5381f0aa]{background:#000;flex:1;height:100%}.tutorials-overview .radial-gradient[data-v-5381f0aa]{margin-top:-3.0588235294rem;padding-top:3.0588235294rem;background:var(--color-tutorials-overview-fill-secondary,var(--color-tutorials-overview-background))}@media only screen and (max-width:735px){.tutorials-overview .radial-gradient[data-v-5381f0aa]{margin-top:-2.8235294118rem;padding-top:2.8235294118rem}}@-moz-document url-prefix(){.tutorials-overview .radial-gradient[data-v-5381f0aa]{background:#111!important}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore.json b/docs/data/documentation/awslambdaruntimecore.json new file mode 100644 index 00000000..8f202fb5 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore.json @@ -0,0 +1 @@ +{"kind":"symbol","variants":[{"paths":["\/documentation\/awslambdaruntimecore"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"hierarchy":{"paths":[[]]},"topicSections":[{"anchor":"Essentials","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/quick-setup","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Deployment"],"title":"Essentials"},{"anchor":"Articles","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/0001-v2-api"],"generated":true,"title":"Articles"},{"generated":true,"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime"],"title":"Classes","anchor":"Classes"},{"anchor":"Protocols","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"],"generated":true,"title":"Protocols"},{"title":"Structures","generated":true,"anchor":"Structures","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder"]},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda"],"title":"Enumerations","anchor":"Enumerations","generated":true}],"abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"metadata":{"role":"collection","externalID":"AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","roleHeading":"Framework","modules":[{"name":"AWSLambdaRuntimeCore"}],"symbolKind":"module"},"primaryContentSections":[{"kind":"content","content":[{"level":2,"type":"heading","text":"Overview","anchor":"Overview"},{"inlineContent":[{"text":"Many modern systems have client components like iOS, macOS or watchOS applications as well as server components that those clients interact with. Serverless functions are often the easiest and most efficient way for client application developers to extend their applications into the cloud.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Serverless functions are increasingly becoming a popular choice for running event-driven or otherwise ad-hoc compute tasks in the cloud. They power mission critical microservices and data intensive workloads. In many cases, serverless functions allow developers to more easily scale and control compute costs given their on-demand nature."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When using serverless functions, attention must be given to resource utilization as it directly impacts the costs of the system. This is where Swift shines! With its low memory footprint, deterministic performance, and quick start time, Swift is a fantastic match for the serverless functions architecture."}]},{"type":"paragraph","inlineContent":[{"text":"Combine this with Swift’s developer friendliness, expressiveness, and emphasis on safety, and we have a solution that is great for developers at all skill levels, scalable, and cost effective.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Swift AWS Lambda Runtime was designed to make building Lambda functions in Swift simple and safe. The library is an implementation of the ","type":"text"},{"identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/runtimes-api.html","type":"reference","isActive":true},{"type":"text","text":" and uses an embedded asynchronous HTTP client based on "},{"type":"reference","identifier":"https:\/\/github.com\/apple\/swift-nio","isActive":true},{"text":" that is fine-tuned for performance in the AWS Lambda Runtime context. The library provides a multi-tier API that allows building a range of Lambda functions: from quick and simple closures to complex, performance-sensitive event handlers.","type":"text"}]}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","interfaceLanguage":"swift"},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaEventDecoder":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder","abstract":[{"type":"text","text":"The protocol a decoder must conform to so that it can be used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true,"type":"reference"},{"text":" to decode incoming","type":"text"},{"type":"text","text":" "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" events."}],"url":"\/documentation\/awslambdaruntimecore\/lambdaeventdecoder","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaEventDecoder"}],"title":"LambdaEventDecoder","type":"topic","navigatorTitle":[{"text":"LambdaEventDecoder","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/handle(_:context:)":{"required":true,"kind":"symbol","title":"handle(_:context:)","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"handle"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event"},{"text":", ","kind":"text"},{"text":"context","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa","kind":"typeIdentifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","type":"topic","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","abstract":[{"text":"A ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"type":"text","text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ClosureHandler","kind":"identifier"}],"navigatorTitle":[{"text":"ClosureHandler","kind":"identifier"}],"title":"ClosureHandler","url":"\/documentation\/awslambdaruntimecore\/closurehandler","role":"symbol","type":"topic","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/Deployment":{"kind":"article","title":"Deploying your Swift Lambda functions","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Deployment","abstract":[{"text":"Learn how to deploy your Swift Lambda functions to AWS.","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/deployment","type":"topic","role":"article"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder/Output":{"required":true,"kind":"symbol","title":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","abstract":[],"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/output","type":"topic","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/0001-v2-api":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/0001-v2-api","role":"article","type":"topic","kind":"article","url":"\/documentation\/awslambdaruntimecore\/0001-v2-api","title":"v2 API proposal for swift-aws-lambda-runtime","abstract":[{"code":"swift-aws-lambda-runtime","type":"codeVoice"},{"type":"text","text":" is an important library for the Swift on Server ecosystem. The initial API was written before"},{"type":"text","text":" "},{"text":"async\/await was introduced to Swift. When async\/await was introduced, shims were added to bridge between the underlying","type":"text"},{"type":"text","text":" "},{"type":"text","text":"SwiftNIO "},{"type":"codeVoice","code":"EventLoop"},{"text":" interfaces and async\/await. However, just like ","type":"text"},{"code":"gRPC-swift","type":"codeVoice"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"postgres-nio"},{"type":"text","text":", we now want to"},{"type":"text","text":" "},{"type":"text","text":"shift to solely using async\/await instead of "},{"code":"EventLoop","type":"codeVoice"},{"text":" interfaces. For this, large parts of the current API have to be","type":"text"},{"type":"text","text":" "},{"type":"text","text":"reconsidered."}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"VoidEncoder"}],"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/voidencoder","title":"VoidEncoder","navigatorTitle":[{"kind":"identifier","text":"VoidEncoder"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder","role":"symbol","abstract":[]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html":{"title":"AWS Lambda Runtime API","identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/runtimes-api.html","titleInlineContent":[{"text":"AWS Lambda Runtime API","type":"text"}],"type":"link","url":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/runtimes-api.html"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingClosureHandler":{"abstract":[{"type":"text","text":"A "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax.","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler","title":"StreamingClosureHandler","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingClosureHandler"}],"type":"topic","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"StreamingClosureHandler"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/Lambda":{"navigatorTitle":[{"text":"Lambda","kind":"identifier"}],"abstract":[],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda","kind":"symbol","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambda","title":"Lambda","type":"topic","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"Lambda","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/finish()":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/finish()","abstract":[{"text":"End the response stream and the underlying HTTP response.","type":"text"}],"title":"finish()","kind":"symbol","required":true,"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"finish"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler/handle(_:responseWriter:context:)":{"role":"symbol","type":"topic","url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler\/handle(_:responsewriter:context:)","required":true,"title":"handle(_:responseWriter:context:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"responseWriter"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","abstract":[{"text":"The handler function – implement the business logic of the Lambda function here.","type":"text"}],"kind":"symbol"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content":{"title":"Your First Lambda Function Written in Swift","kind":"overview","role":"overview","url":"\/tutorials\/table-of-content","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","abstract":[{"type":"text","text":"A step-by-step tutorial to learn how to implement, build, test, and deploy your first Lambda function written in Swift."}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"https://github.com/apple/swift-nio":{"type":"link","identifier":"https:\/\/github.com\/apple\/swift-nio","titleInlineContent":[{"text":"SwiftNIO","type":"text"}],"url":"https:\/\/github.com\/apple\/swift-nio","title":"SwiftNIO"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder":{"role":"symbol","navigatorTitle":[{"text":"LambdaOutputEncoder","kind":"identifier"}],"type":"topic","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaOutputEncoder","kind":"identifier"}],"abstract":[{"type":"text","text":"The protocol an encoder must conform to so that it can be used with "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true},{"text":" to encode the generic","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output"},{"text":" object into a ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":"."}],"title":"LambdaOutputEncoder","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Event":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","role":"symbol","abstract":[{"text":"Generic input type.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","title":"Event","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Event","kind":"identifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"}],"type":"topic","kind":"symbol","required":true},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/write(_:)":{"abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","required":true,"kind":"symbol","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)","title":"write(_:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"write","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandlerAdapter":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter","title":"LambdaHandlerAdapter","abstract":[{"type":"text","text":"Adapts a "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true},{"text":".","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter","kind":"symbol","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaHandlerAdapter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaHandlerAdapter"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter","role":"symbol","abstract":[{"text":"A ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","isActive":true},{"text":" wrapper that conforms to ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":".","type":"text"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaCodableResponseWriter","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter","navigatorTitle":[{"text":"LambdaCodableResponseWriter","kind":"identifier"}],"kind":"symbol","title":"LambdaCodableResponseWriter"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Output":{"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","title":"Output","abstract":[{"type":"text","text":"Generic output type."},{"text":" ","type":"text"},{"type":"text","text":"This is the return type of the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"text":" function.","type":"text"}],"required":true,"role":"symbol","kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime","abstract":[],"title":"LambdaRuntime","kind":"symbol","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"LambdaRuntime"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaRuntime"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/quick-setup":{"type":"topic","abstract":[{"type":"text","text":"Learn how to create your first project in 3 minutes."}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/quick-setup","kind":"article","url":"\/documentation\/awslambdaruntimecore\/quick-setup","role":"article","title":"Getting Started Quickly"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/0001-v2-api.json b/docs/data/documentation/awslambdaruntimecore/0001-v2-api.json new file mode 100644 index 00000000..bf733a3a --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/0001-v2-api.json @@ -0,0 +1 @@ +{"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/0001-v2-api"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"code":"swift-aws-lambda-runtime","type":"codeVoice"},{"text":" is an important library for the Swift on Server ecosystem. The initial API was written before","type":"text"},{"type":"text","text":" "},{"type":"text","text":"async\/await was introduced to Swift. When async\/await was introduced, shims were added to bridge between the underlying"},{"type":"text","text":" "},{"text":"SwiftNIO ","type":"text"},{"type":"codeVoice","code":"EventLoop"},{"text":" interfaces and async\/await. However, just like ","type":"text"},{"code":"gRPC-swift","type":"codeVoice"},{"type":"text","text":" and "},{"code":"postgres-nio","type":"codeVoice"},{"text":", we now want to","type":"text"},{"type":"text","text":" "},{"type":"text","text":"shift to solely using async\/await instead of "},{"code":"EventLoop","type":"codeVoice"},{"type":"text","text":" interfaces. For this, large parts of the current API have to be"},{"text":" ","type":"text"},{"type":"text","text":"reconsidered."}],"metadata":{"title":"v2 API proposal for swift-aws-lambda-runtime","roleHeading":"Article","role":"article","modules":[{"name":"AWSLambdaRuntimeCore"}]},"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","type":"heading","text":"Overview","level":2},{"type":"paragraph","inlineContent":[{"text":"Versions:","type":"text"}]},{"type":"unorderedList","items":[{"content":[{"inlineContent":[{"type":"text","text":"v1 (2024-08-07): Initial version"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"type":"text","text":"v1.1:"}],"type":"paragraph"},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Remove the "},{"code":"reportError(_:)","type":"codeVoice"},{"type":"text","text":" method from "},{"code":"LambdaResponseStreamWriter","type":"codeVoice"},{"type":"text","text":" and instead make the "},{"code":"handle(...)","type":"codeVoice"},{"text":" method of","type":"text"},{"type":"text","text":" "},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"text":" throwing.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Remove the "},{"code":"addBackgroundTask(_:)","type":"codeVoice"},{"type":"text","text":" method from "},{"code":"LambdaContext","type":"codeVoice"},{"type":"text","text":" due to structured concurrency concerns and introduce"},{"text":" ","type":"text"},{"text":"the ","type":"text"},{"type":"codeVoice","code":"LambdaWithBackgroundProcessingHandler"},{"text":" protocol as a solution.","type":"text"}]},{"items":[{"content":[{"inlineContent":[{"text":"Introduce ","type":"text"},{"type":"codeVoice","code":"LambdaHandlerAdapter"},{"type":"text","text":", which adapts handlers conforming to "},{"type":"codeVoice","code":"LambdaHandler"},{"text":" with","type":"text"},{"text":" ","type":"text"},{"code":"LambdaWithBackgroundProcessingHandler","type":"codeVoice"},{"type":"text","text":"."}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"Update ","type":"text"},{"code":"LambdaCodableAdapter","type":"codeVoice"},{"type":"text","text":" to now be generic over any handler conforming to"},{"type":"text","text":" "},{"type":"codeVoice","code":"LambdaWithBackgroundProcessingHandler"},{"text":" instead of ","type":"text"},{"type":"codeVoice","code":"LambdaHandler"},{"text":".","type":"text"}],"type":"paragraph"}]}],"type":"unorderedList"}]}],"type":"unorderedList"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"v1.2:"}]},{"type":"unorderedList","items":[{"content":[{"inlineContent":[{"type":"text","text":"Remove "},{"type":"codeVoice","code":"~Copyable"},{"type":"text","text":" from "},{"code":"LambdaResponseStreamWriter","type":"codeVoice"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"LambdaResponseWriter"},{"type":"text","text":". Instead throw an error when"},{"text":" ","type":"text"},{"type":"codeVoice","code":"finish()"},{"type":"text","text":" is called multiple times or when "},{"type":"codeVoice","code":"write"},{"text":"\/","type":"text"},{"type":"codeVoice","code":"writeAndFinish"},{"type":"text","text":" is called after "},{"code":"finish()","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}]}]}]}]},{"text":"Motivation","type":"heading","level":2,"anchor":"Motivation"},{"anchor":"Current-Limitations","type":"heading","level":3,"text":"Current Limitations"},{"text":"EventLoop interfaces","level":4,"type":"heading","anchor":"EventLoop-interfaces"},{"type":"paragraph","inlineContent":[{"text":"The current API extensively uses the ","type":"text"},{"type":"codeVoice","code":"EventLoop"},{"type":"text","text":" family of interfaces from SwiftNIO in many areas. To use these"},{"text":" ","type":"text"},{"text":"interfaces correctly though, it requires developers to exercise great care and understand the various transform methods","type":"text"},{"type":"text","text":" "},{"text":"that are used to work with ","type":"text"},{"type":"codeVoice","code":"EventLoop"},{"type":"text","text":"s and "},{"type":"codeVoice","code":"EventLoopFuture"},{"type":"text","text":"s. This results in a lot of cognitive complexity and makes"},{"text":" ","type":"text"},{"text":"the code in the current API hard to reason about and maintain. For these reasons, the overarching trend in the Swift on","type":"text"},{"text":" ","type":"text"},{"text":"Server ecosystem is to shift to newer, more readable, Swift concurrency constructs and de-couple from SwiftNIO’s","type":"text"},{"text":" ","type":"text"},{"code":"EventLoop","type":"codeVoice"},{"text":" interfaces.","type":"text"}]},{"text":"No ownership of the main() function","anchor":"No-ownership-of-the-main-function","level":4,"type":"heading"},{"inlineContent":[{"text":"A Lambda function can currently be implemented through conformance to the various handler protocols defined in","type":"text"},{"text":" ","type":"text"},{"code":"AWSLambdaRuntimeCore\/LambdaHandler","type":"codeVoice"},{"type":"text","text":". Each of these protocols have an extension which implements a "},{"type":"codeVoice","code":"static func main()"},{"text":".","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This allows users to annotate their "},{"type":"codeVoice","code":"LambdaHandler"},{"text":" conforming object with ","type":"text"},{"code":"@main","type":"codeVoice"},{"text":". The ","type":"text"},{"code":"static func main()","type":"codeVoice"},{"type":"text","text":" calls the"},{"text":" ","type":"text"},{"type":"text","text":"internal "},{"type":"codeVoice","code":"Lambda.run()"},{"text":" function, which starts the Lambda function. Since the ","type":"text"},{"code":"Lambda.run()","type":"codeVoice"},{"type":"text","text":" method is internal, users"},{"type":"text","text":" "},{"text":"cannot override the default implementation. This has proven challenging for users who want to","type":"text"},{"type":"text","text":" "},{"type":"reference","identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/issues\/265","isActive":true},{"type":"text","text":"."},{"text":" ","type":"text"},{"type":"text","text":"Setting up global properties is required to customize the Swift Logging, Metric and Tracing backend."}],"type":"paragraph"},{"level":4,"type":"heading","text":"Non-trivial transition from SimpleLambdaHandler to LambdaHandler","anchor":"Non-trivial-transition-from-SimpleLambdaHandler-to-LambdaHandler"},{"type":"paragraph","inlineContent":[{"text":"The ","type":"text"},{"type":"codeVoice","code":"SimpleLambdaHandler"},{"type":"text","text":" protocol provides a quick and easy way to implement a basic Lambda function. It only requires"},{"type":"text","text":" "},{"type":"text","text":"an implementation of the "},{"type":"codeVoice","code":"handle"},{"text":" function where the business logic of the Lambda function can be written.","type":"text"},{"type":"text","text":" "},{"type":"codeVoice","code":"SimpleLambdaHandler"},{"type":"text","text":" is perfectly sufficient for small use-cases as the user does not need to spend much time looking"},{"type":"text","text":" "},{"text":"into the library.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"However, "},{"type":"codeVoice","code":"SimpleLambdaHandler"},{"type":"text","text":" cannot be used when services such as a database client need to be initialized before the"},{"type":"text","text":" "},{"type":"text","text":"Lambda runtime starts and then also gracefully shutdown prior to the runtime terminating. This is because the only way"},{"type":"text","text":" "},{"text":"to register termination logic is through the ","type":"text"},{"type":"codeVoice","code":"LambdaInitializationContext"},{"text":" (containing a field","type":"text"},{"type":"text","text":" "},{"type":"codeVoice","code":"terminator: LambdaTerminator"},{"type":"text","text":") which is created and used "},{"inlineContent":[{"type":"text","text":"internally"}],"type":"emphasis"},{"text":" within ","type":"text"},{"type":"codeVoice","code":"LambdaRuntime"},{"type":"text","text":" and never exposed through"},{"text":" ","type":"text"},{"type":"codeVoice","code":"SimpleLambdaHandler"},{"type":"text","text":". For such use-cases, other handler protocols like "},{"code":"LambdaHandler","type":"codeVoice"},{"text":" must be used. ","type":"text"},{"code":"LambdaHandler","type":"codeVoice"},{"type":"text","text":" "},{"text":"exposes a ","type":"text"},{"code":"context","type":"codeVoice"},{"text":" argument of type ","type":"text"},{"type":"codeVoice","code":"LambdaInitializationContext"},{"text":" through its initializer. Within the initializer,","type":"text"},{"text":" ","type":"text"},{"text":"required services can be initialized and their graceful shutdown logic can be registered with the","type":"text"},{"type":"text","text":" "},{"type":"codeVoice","code":"context.terminator.register"},{"text":" function.","type":"text"}]},{"inlineContent":[{"type":"text","text":"Yet, "},{"type":"codeVoice","code":"LambdaHandler"},{"text":" is quite cumbersome to use in such use-cases as users have to deviate from the established norms of","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"the Swift on Server ecosystem in order to cleanly manage the lifecycle of the services intended to be used. This is"},{"text":" ","type":"text"},{"text":"because the convenient ","type":"text"},{"code":"swift-service-lifecycle","type":"codeVoice"},{"text":" v2 library — which is commonly used for cleanly managing the lifecycles","type":"text"},{"type":"text","text":" "},{"type":"text","text":"of required services and widely supported by many libraries — cannot be used in a structured concurrency manner."}],"type":"paragraph"},{"level":4,"type":"heading","text":"Does not integrate well with swift-service-lifecycle in a structured concurrency manner","anchor":"Does-not-integrate-well-with-swift-service-lifecycle-in-a-structured-concurrency-manner"},{"inlineContent":[{"text":"The Lambda runtime can only be started using the ","type":"text"},{"inlineContent":[{"type":"text","text":"internal"}],"type":"strong"},{"type":"text","text":" "},{"type":"codeVoice","code":"Lambda.run()"},{"type":"text","text":" function. This function is called by the"},{"text":" ","type":"text"},{"code":"main()","type":"codeVoice"},{"type":"text","text":" function defined by the "},{"type":"codeVoice","code":"LambdaHandler"},{"type":"text","text":" protocol, preventing users from injecting initialized services into the"},{"type":"text","text":" "},{"text":"runtime ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"prior","type":"text"}]},{"type":"text","text":" to it starting. As shown below, this forces users to use an "},{"type":"strong","inlineContent":[{"type":"text","text":"unstructured concurrency"}]},{"type":"text","text":" approach and"},{"type":"text","text":" "},{"text":"manually initialize services, leading to the issue of the user then perhaps forgetting to gracefully shutdown the","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"initialized services:"}],"type":"paragraph"},{"syntax":"swift","code":["struct MyLambda: LambdaHandler {"," let pgClient: PostgresClient",""," init(context: AWSLambdaRuntimeCore.LambdaInitializationContext) async throws {"," \/\/\/ Instantiate service"," let client = PostgresClient(configuration: ...)",""," \/\/\/ Unstructured concurrency to initialize the service"," let pgTask = Task {"," await client.run()"," }",""," \/\/\/ Store the client in `self` so that it can be used in `handle(...)`"," self.pgClient = client",""," \/\/\/ !!! Must remember to explicitly register termination logic for PostgresClient !!!"," context.terminator.register("," name: \"PostgreSQL Client\","," handler: { eventLoop in"," pgTask.cancel()"," return eventLoop.makeFutureWithTask {"," await pgTask.value"," }"," }"," )"," }",""," func handle(_ event: Event, context: LambdaContext) async throws -> Output {"," \/\/\/ Use the initialized service stored in `self.pgClient`"," try await self.pgClient.query(...)"," }","}"],"type":"codeListing"},{"anchor":"Verbose-Codable-support","level":4,"text":"Verbose Codable support","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"In the current API, there are extensions and Codable wrapper classes for decoding events and encoding computed responses","type":"text"},{"type":"text","text":" "},{"type":"text","text":"for "},{"type":"emphasis","inlineContent":[{"type":"text","text":"each"}]},{"text":" different handler protocol and for both ","type":"text"},{"type":"codeVoice","code":"String"},{"type":"text","text":" and "},{"type":"codeVoice","code":"JSON"},{"type":"text","text":" formats. This has resulted in a lot of"},{"text":" ","type":"text"},{"type":"text","text":"boilerplate code which can very easily be made generic and simplified in v2."}]},{"text":"New features","level":3,"type":"heading","anchor":"New-features"},{"type":"heading","level":4,"text":"Support response streaming","anchor":"Support-response-streaming"},{"type":"paragraph","inlineContent":[{"text":"In April 2023","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"https:\/\/aws.amazon.com\/blogs\/compute\/introducing-aws-lambda-response-streaming\/"},{"type":"text","text":" "},{"type":"text","text":"in Lambda. The current API does not support streaming. For v2 we want to change this."}]},{"anchor":"Scheduling-background-work","level":4,"type":"heading","text":"Scheduling background work"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In May"},{"type":"text","text":" "},{"identifier":"https:\/\/aws.amazon.com\/blogs\/compute\/running-code-after-returning-a-response-from-an-aws-lambda-function\/","type":"reference","isActive":true},{"text":" ","type":"text"},{"type":"text","text":"until the runtime asks for more work from the control plane. We want to support this by adding new API that allows"},{"text":" ","type":"text"},{"text":"background processing, even after the response has been returned.","type":"text"}]},{"level":2,"type":"heading","text":"Proposed Solution","anchor":"Proposed-Solution"},{"anchor":"asyncawait-first-API","type":"heading","text":"async\/await-first API","level":3},{"type":"paragraph","inlineContent":[{"text":"Large parts of ","type":"text"},{"code":"Lambda","type":"codeVoice"},{"type":"text","text":", "},{"code":"LambdaHandler","type":"codeVoice"},{"type":"text","text":", and "},{"type":"codeVoice","code":"LambdaRuntime"},{"text":" will be re-written to use async\/await constructs in place","type":"text"},{"type":"text","text":" "},{"type":"text","text":"of the "},{"code":"EventLoop","type":"codeVoice"},{"text":" family of interfaces.","type":"text"}]},{"text":"Providing ownership of main() and support for swift-service-lifecycle","anchor":"Providing-ownership-of-main-and-support-for-swift-service-lifecycle","level":3,"type":"heading"},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Instead of conforming to a handler protocol, users can now create a "},{"code":"LambdaRuntime","type":"codeVoice"},{"type":"text","text":" by passing in a handler closure."}]}]},{"content":[{"inlineContent":[{"type":"codeVoice","code":"LambdaRuntime"},{"text":" conforms to ","type":"text"},{"type":"codeVoice","code":"ServiceLifecycle.Service"},{"type":"text","text":" by implementing a "},{"code":"run()","type":"codeVoice"},{"text":" method that contains initialization","type":"text"},{"type":"text","text":" "},{"type":"text","text":"and graceful shutdown logic."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"This allows the lifecycle of the "},{"code":"LambdaRuntime","type":"codeVoice"},{"type":"text","text":" to be managed with "},{"code":"swift-service-lifecycle","type":"codeVoice"},{"text":" ","type":"text"},{"inlineContent":[{"type":"text","text":"alongside"}],"type":"emphasis"},{"type":"text","text":" and in the"},{"type":"text","text":" "},{"type":"text","text":"same way the lifecycles of the required services are managed, e.g."},{"type":"text","text":" "},{"code":"try await ServiceGroup(services: [postgresClient, ..., lambdaRuntime], ...).run()","type":"codeVoice"},{"text":".","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Dependencies can now be injected into "},{"code":"LambdaRuntime","type":"codeVoice"},{"type":"text","text":". With "},{"type":"codeVoice","code":"swift-service-lifecycle"},{"text":", services will be initialized","type":"text"},{"text":" ","type":"text"},{"text":"together with ","type":"text"},{"code":"LambdaRuntime","type":"codeVoice"},{"type":"text","text":"."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"The required services can then be used within the handler in a structured concurrency manner.","type":"text"},{"type":"text","text":" "},{"code":"swift-service-lifecycle","type":"codeVoice"},{"type":"text","text":" takes care of listening for termination signals and terminating the services as well as the"},{"type":"text","text":" "},{"code":"LambdaRuntime","type":"codeVoice"},{"type":"text","text":" in correct order."}]}]},{"content":[{"inlineContent":[{"type":"codeVoice","code":"LambdaTerminator"},{"type":"text","text":" can now be eliminated because its role is replaced with "},{"type":"codeVoice","code":"swift-service-lifecycle"},{"type":"text","text":". The termination"},{"type":"text","text":" "},{"type":"text","text":"logic of the Lambda function will be implemented in the conforming "},{"code":"run()","type":"codeVoice"},{"text":" function of ","type":"text"},{"code":"LambdaRuntime","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"With this, the earlier code snippet can be replaced with something much easier to read, maintain, and debug:"}]},{"code":["\/\/\/ Instantiate services","let postgresClient = PostgresClient()","","\/\/\/ Instantiate LambdaRuntime with a closure handler implementing the business logic of the Lambda function","let runtime = LambdaRuntime { (event: Input, context: LambdaContext) in"," \/\/\/ Use initialized service within the handler"," try await postgresClient.query(...)","}","","\/\/\/ Use ServiceLifecycle to manage the initialization and termination","\/\/\/ of the services as well as the LambdaRuntime","let serviceGroup = ServiceGroup("," services: [postgresClient, runtime],"," configuration: .init(gracefulShutdownSignals: [.sigterm]),"," logger: logger",")","try await serviceGroup.run()"],"type":"codeListing","syntax":"swift"},{"text":"Simplifying Codable support","type":"heading","level":3,"anchor":"Simplifying-Codable-support"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A detailed explanation is provided in the "},{"inlineContent":[{"text":"Codable Support","type":"text"}],"type":"strong"},{"text":" section. In short, much of the boilerplate code defined","type":"text"},{"type":"text","text":" "},{"type":"text","text":"for each handler protocol in "},{"type":"codeVoice","code":"Lambda+Codable"},{"type":"text","text":" and "},{"type":"codeVoice","code":"Lambda+String"},{"type":"text","text":" will be replaced with a single "},{"type":"codeVoice","code":"LambdaCodableAdapter"},{"text":" ","type":"text"},{"text":"struct.","type":"text"}]},{"inlineContent":[{"type":"text","text":"This adapter struct is generic over (1) any handler conforming to a new handler protocol"},{"type":"text","text":" "},{"type":"codeVoice","code":"LambdaWithBackgroundProcessingHandler"},{"text":", (2) the user-specified input and output types, and (3) any decoder and encoder","type":"text"},{"type":"text","text":" "},{"type":"text","text":"conforming to protocols "},{"code":"LambdaEventDecoder","type":"codeVoice"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"LambdaOutputDecoder"},{"type":"text","text":". The adapter will wrap the underlying handler"},{"text":" ","type":"text"},{"type":"text","text":"with encoding\/decoding logic."}],"type":"paragraph"},{"text":"Detailed Solution","level":2,"type":"heading","anchor":"Detailed-Solution"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Below are explanations for all types that we want to use in AWS Lambda Runtime v2."}]},{"text":"LambdaResponseStreamWriter","type":"heading","anchor":"LambdaResponseStreamWriter","level":3},{"type":"paragraph","inlineContent":[{"type":"text","text":"We will introduce a new "},{"type":"codeVoice","code":"LambdaResponseStreamWriter"},{"type":"text","text":" protocol. It is used in the new "},{"type":"codeVoice","code":"StreamingLambdaHandler"},{"text":" (defined","type":"text"},{"type":"text","text":" "},{"text":"below), which is the new base protocol for the ","type":"text"},{"code":"LambdaRuntime","type":"codeVoice"},{"type":"text","text":" (defined below as well)."}]},{"type":"codeListing","syntax":"swift","code":["\/\/\/ A writer object to write the Lambda response stream into","public protocol LambdaResponseStreamWriter {"," \/\/\/ Write a response part into the stream. The HTTP response is started lazily before the first call to `write(_:)`."," \/\/\/ Bytes written to the writer are streamed continually."," func write(_ buffer: ByteBuffer) async throws"," \/\/\/ End the response stream and the underlying HTTP response."," func finish() async throws"," \/\/\/ Write a response part into the stream and end the response stream as well as the underlying HTTP response."," func writeAndFinish(_ buffer: ByteBuffer) async throws","}"]},{"inlineContent":[{"type":"text","text":"If the user does not call "},{"type":"codeVoice","code":"finish()"},{"type":"text","text":", the library will automatically finish the stream after the last "},{"type":"codeVoice","code":"write"},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"Appropriate errors will be thrown if ","type":"text"},{"code":"finish()","type":"codeVoice"},{"type":"text","text":" is called multiple times, or if "},{"code":"write","type":"codeVoice"},{"type":"text","text":"\/"},{"type":"codeVoice","code":"writeAndFinish"},{"type":"text","text":" is called after"},{"text":" ","type":"text"},{"type":"codeVoice","code":"finish()"},{"type":"text","text":"."}],"type":"paragraph"},{"level":3,"anchor":"LambdaContext","type":"heading","text":"LambdaContext"},{"inlineContent":[{"code":"LambdaContext","type":"codeVoice"},{"text":" will be largely unchanged, but the ","type":"text"},{"type":"codeVoice","code":"eventLoop"},{"type":"text","text":" property will be removed. The "},{"code":"allocator","type":"codeVoice"},{"text":" property of","type":"text"},{"text":" ","type":"text"},{"text":"type ","type":"text"},{"type":"codeVoice","code":"ByteBufferAllocator"},{"type":"text","text":" will also be removed because (1), we generally want to reduce the number of SwiftNIO types"},{"text":" ","type":"text"},{"type":"text","text":"exposed in the API, and (2), "},{"code":"ByteBufferAllocator","type":"codeVoice"},{"type":"text","text":" does not optimize the allocation strategies. The common pattern"},{"type":"text","text":" "},{"type":"text","text":"observed across many libraries is to re-use existing "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":"s as much as possible. This is also what we do for the"},{"type":"text","text":" "},{"code":"LambdaCodableAdapter","type":"codeVoice"},{"text":" (explained in the ","type":"text"},{"inlineContent":[{"text":"Codable Support","type":"text"}],"type":"strong"},{"text":" section) implementation.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["\/\/\/ A context object passed as part of an invocation in LambdaHandler handle functions.","public struct LambdaContext: Sendable {"," \/\/\/ The request ID, which identifies the request that triggered the function invocation."," public var requestID: String { get }",""," \/\/\/ The AWS X-Ray tracing header."," public var traceID: String { get }",""," \/\/\/ The ARN of the Lambda function, version, or alias that's specified in the invocation."," public var invokedFunctionARN: String { get }",""," \/\/\/ The timestamp that the function times out."," public var deadline: DispatchWallTime { get }",""," \/\/\/ For invocations from the AWS Mobile SDK, data about the Amazon Cognito identity provider."," public var cognitoIdentity: String? { get }",""," \/\/\/ For invocations from the AWS Mobile SDK, data about the client application and device."," public var clientContext: String? { get }",""," \/\/\/ `Logger` to log with."," \/\/\/"," \/\/\/ - note: The `LogLevel` can be configured using the `LOG_LEVEL` environment variable."," public var logger: Logger { get }","}"],"syntax":"swift"},{"anchor":"Handlers","text":"Handlers","level":3,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"We introduce three handler protocols: ","type":"text"},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"type":"text","text":", "},{"code":"LambdaHandler","type":"codeVoice"},{"text":", and","type":"text"},{"type":"text","text":" "},{"code":"LambdaWithBackgroundProcessingHandler","type":"codeVoice"},{"text":".","type":"text"}]},{"level":4,"type":"heading","text":"StreamingLambdaHandler","anchor":"StreamingLambdaHandler"},{"inlineContent":[{"type":"text","text":"The new "},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"text":" protocol is the base protocol to implement a Lambda function. Most users will not use","type":"text"},{"text":" ","type":"text"},{"text":"this protocol and instead use the ","type":"text"},{"type":"codeVoice","code":"LambdaHandler"},{"text":" protocol defined below.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["\/\/\/ The base StreamingLambdaHandler protocol","public protocol StreamingLambdaHandler {"," \/\/\/ The business logic of the Lambda function"," \/\/\/ - Parameters:"," \/\/\/ - event: The invocation's input data"," \/\/\/ - responseWriter: A ``LambdaResponseStreamWriter`` to write the invocation's response to."," \/\/\/ If no response or error is written to the `responseWriter` it will"," \/\/\/ report an error to the invoker."," \/\/\/ - context: The LambdaContext containing the invocation's metadata"," \/\/\/ - Throws:"," \/\/\/ How the thrown error will be handled by the runtime:"," \/\/\/ - An invocation error will be reported if the error is thrown before the first call to"," \/\/\/ ``LambdaResponseStreamWriter.write(_:)``."," \/\/\/ - If the error is thrown after call(s) to ``LambdaResponseStreamWriter.write(_:)`` but before"," \/\/\/ a call to ``LambdaResponseStreamWriter.finish()``, the response stream will be closed and trailing"," \/\/\/ headers will be sent."," \/\/\/ - If ``LambdaResponseStreamWriter.finish()`` has already been called before the error is thrown, the"," \/\/\/ error will be logged."," mutating func handle(_ event: ByteBuffer, responseWriter: some LambdaResponseStreamWriter, context: LambdaContext) async throws","}"]},{"inlineContent":[{"text":"Using this protocol requires the ","type":"text"},{"type":"codeVoice","code":"handle"},{"type":"text","text":" method to receive the incoming event as a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" and return the output"},{"text":" ","type":"text"},{"text":"as a ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"text":" too.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"Through the ","type":"text"},{"code":"LambdaResponseStreamWriter","type":"codeVoice"},{"type":"text","text":", which is passed as an argument in the "},{"code":"handle","type":"codeVoice"},{"text":" function, the ","type":"text"},{"type":"strong","inlineContent":[{"text":"response can be","type":"text"},{"text":" ","type":"text"},{"text":"streamed","type":"text"}]},{"text":" by calling the ","type":"text"},{"type":"codeVoice","code":"write(_:)"},{"text":" function of the ","type":"text"},{"code":"LambdaResponseStreamWriter","type":"codeVoice"},{"type":"text","text":" with partial data repeatedly before"},{"text":" ","type":"text"},{"type":"text","text":"finally closing the response stream by calling "},{"type":"codeVoice","code":"finish()"},{"type":"text","text":". Users can also choose to return the entire output and not"},{"type":"text","text":" "},{"type":"text","text":"stream the response by calling "},{"code":"writeAndFinish(_:)","type":"codeVoice"},{"type":"text","text":"."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"This protocol also allows for background tasks to be run after a result has been reported to the AWS Lambda control","type":"text"},{"type":"text","text":" "},{"text":"plane, since the ","type":"text"},{"code":"handle(...)","type":"codeVoice"},{"text":" function is free to implement any background work after the call to","type":"text"},{"type":"text","text":" "},{"type":"codeVoice","code":"responseWriter.finish()"},{"text":".","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"The protocol is defined in a way that supports a broad range of use-cases. The handle method is marked as ","type":"text"},{"type":"codeVoice","code":"mutating"},{"type":"text","text":" to"},{"type":"text","text":" "},{"text":"allow handlers to be implemented with a ","type":"text"},{"type":"codeVoice","code":"struct"},{"type":"text","text":"."}]},{"inlineContent":[{"type":"text","text":"An implementation that sends the number 1 to 10 every 500ms could look like this:"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["struct SendNumbersWithPause: StreamingLambdaHandler {"," func handle("," _ event: ByteBuffer,"," responseWriter: some LambdaResponseStreamWriter,"," context: LambdaContext"," ) async throws {"," for i in 1...10 {"," \/\/ Send partial data"," responseWriter.write(ByteBuffer(string: #\"\\#(i)\\n\\r\"#))"," \/\/ Perform some long asynchronous work"," try await Task.sleep(for: .milliseconds(500))"," }"," \/\/ All data has been sent. Close off the response stream."," responseWriter.finish()"," }","}"]},{"text":"LambdaHandler:","type":"heading","anchor":"LambdaHandler","level":4},{"inlineContent":[{"text":"This handler protocol will be the go-to choice for most use-cases because it is completely agnostic to any","type":"text"},{"type":"text","text":" "},{"type":"text","text":"encoding\/decoding logic – conforming objects simply have to implement the "},{"type":"codeVoice","code":"handle"},{"type":"text","text":" function where the input and return"},{"text":" ","type":"text"},{"type":"text","text":"types are Swift objects."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that the "},{"type":"codeVoice","code":"handle"},{"text":" function does not receive a ","type":"text"},{"code":"LambdaResponseStreamWriter","type":"codeVoice"},{"text":" as an argument. Response streaming is","type":"text"},{"text":" ","type":"text"},{"text":"not viable for ","type":"text"},{"type":"codeVoice","code":"LambdaHandler"},{"text":" because the output has to be encoded prior to it being sent, e.g. it is not possible to","type":"text"},{"text":" ","type":"text"},{"text":"encode a partial\/incomplete JSON string.","type":"text"}]},{"code":["public protocol LambdaHandler {"," \/\/\/ Generic input type"," \/\/\/ The body of the request sent to Lambda will be decoded into this type for the handler to consume"," associatedtype Event"," \/\/\/ Generic output type"," \/\/\/ This is the return type of the handle() function."," associatedtype Output",""," \/\/\/ The business logic of the Lambda function. Receives a generic input type and returns a generic output type."," \/\/\/ Agnostic to encoding\/decoding"," mutating func handle(_ event: Event, context: LambdaContext) async throws -> Output","}"],"type":"codeListing","syntax":"swift"},{"text":"LambdaWithBackgroundProcessingHandler:","type":"heading","level":4,"anchor":"LambdaWithBackgroundProcessingHandler"},{"inlineContent":[{"type":"text","text":"This protocol is exactly like "},{"type":"codeVoice","code":"LambdaHandler"},{"type":"text","text":", with the only difference being the added support for executing background"},{"type":"text","text":" "},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."}],"type":"paragraph"},{"inlineContent":[{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"type":"text","text":" "},{"type":"codeVoice","code":"LambdaResponseWriter"},{"type":"text","text":" that is passed in as an argument, meaning that the "},{"code":"handle","type":"codeVoice"},{"type":"text","text":" function is then free to implement"},{"text":" ","type":"text"},{"type":"text","text":"any background work after the result has been sent to the AWS Lambda control plane."}],"type":"paragraph"},{"inlineContent":[{"code":"LambdaResponseWriter","type":"codeVoice"},{"type":"text","text":" has different semantics to the "},{"code":"LambdaResponseStreamWriter","type":"codeVoice"},{"type":"text","text":". Where the "},{"type":"codeVoice","code":"write(_:)"},{"type":"text","text":" function of"},{"text":" ","type":"text"},{"type":"codeVoice","code":"LambdaResponseStreamWriter"},{"type":"text","text":" means writing into a response stream, the "},{"type":"codeVoice","code":"write(_:)"},{"type":"text","text":" function of "},{"type":"codeVoice","code":"LambdaResponseWriter"},{"text":" ","type":"text"},{"type":"text","text":"simply serves as a mechanism to return the output without explicitly returning from the "},{"code":"handle","type":"codeVoice"},{"text":" function.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["public protocol LambdaResponseWriter {"," associatedtype Output",""," \/\/\/ Sends the generic Output object (representing the computed result of the handler)"," \/\/\/ to the AWS Lambda response endpoint."," \/\/\/ An error will be thrown if this function is called more than once."," func write(_: Output) async throws","}","","public protocol LambdaWithBackgroundProcessingHandler {"," \/\/\/ Generic input type"," \/\/\/ The body of the request sent to Lambda will be decoded into this type for the handler to consume"," associatedtype Event"," \/\/\/ Generic output type"," \/\/\/ This is the type that the handle() function will send through the ``LambdaResponseWriter``."," associatedtype Output",""," \/\/\/ The business logic of the Lambda function. Receives a generic input type and returns a generic output type."," \/\/\/ Agnostic to JSON encoding\/decoding"," func handle("," _ event: Event,"," outputWriter: some LambdaResponseWriter,"," context: LambdaContext"," ) async throws","}"]},{"text":"Example Usage:","level":5,"anchor":"Example-Usage","type":"heading"},{"code":["struct BackgroundProcessingHandler: LambdaWithBackgroundProcessingHandler {"," struct Input: Decodable {"," let message: String"," }",""," struct Greeting: Encodable {"," let echoedMessage: String"," }",""," typealias Event = Input"," typealias Output = Greeting",""," func handle("," _ event: Event,"," outputWriter: some LambdaResponseWriter,"," context: LambdaContext"," ) async throws {"," \/\/ Return result to the Lambda control plane"," try await outputWriter.write(result: Greeting(echoedMessage: event.messageToEcho))",""," \/\/ Perform some background work, e.g:"," try await Task.sleep(for: .seconds(10))",""," \/\/ Exit the function. All asynchronous work has been executed before exiting the scope of this function."," \/\/ Follows structured concurrency principles."," return"," }","}"],"type":"codeListing","syntax":"swift"},{"anchor":"Handler-Adapters","level":4,"type":"heading","text":"Handler Adapters"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Since the "},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"text":" protocol is the base protocol the ","type":"text"},{"type":"codeVoice","code":"LambdaRuntime"},{"type":"text","text":" works with, there are adapters to"},{"text":" ","type":"text"},{"text":"make both ","type":"text"},{"type":"codeVoice","code":"LambdaHandler"},{"type":"text","text":" and "},{"code":"LambdaWithBackgroundProcessingHandler","type":"codeVoice"},{"type":"text","text":" compatible with "},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"text":".","type":"text"}]},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"code":"LambdaHandlerAdapter","type":"codeVoice"},{"text":" accepts a ","type":"text"},{"code":"LambdaHandler","type":"codeVoice"},{"text":" and conforms it to ","type":"text"},{"type":"codeVoice","code":"LambdaWithBackgroundProcessingHandler"},{"type":"text","text":". This is"},{"text":" ","type":"text"},{"text":"achieved by taking the generic ","type":"text"},{"type":"codeVoice","code":"Output"},{"type":"text","text":" object returned from the "},{"code":"handle","type":"codeVoice"},{"type":"text","text":" function of "},{"code":"LambdaHandler","type":"codeVoice"},{"type":"text","text":" and passing it"},{"text":" ","type":"text"},{"text":"to the ","type":"text"},{"type":"codeVoice","code":"write(_:)"},{"type":"text","text":" function of the "},{"type":"codeVoice","code":"LambdaResponseWriter"},{"type":"text","text":"."}]}]},{"content":[{"inlineContent":[{"code":"LambdaCodableAdapter","type":"codeVoice"},{"type":"text","text":" accepts a "},{"code":"LambdaWithBackgroundProcessingHandler","type":"codeVoice"},{"text":" and conforms it to ","type":"text"},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"text":".","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This is achieved by wrapping the "},{"type":"codeVoice","code":"LambdaResponseWriter"},{"type":"text","text":" with the "},{"type":"codeVoice","code":"LambdaResponseStreamWriter"},{"text":" provided by","type":"text"},{"type":"text","text":" "},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"type":"text","text":". A call to the "},{"type":"codeVoice","code":"write(_:)"},{"text":" function of ","type":"text"},{"code":"LambdaResponseWriter","type":"codeVoice"},{"text":" is translated into a call to","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"codeVoice","code":"writeAndFinish(_:)"},{"type":"text","text":" function of "},{"type":"codeVoice","code":"LambdaResponseStreamWriter"},{"type":"text","text":"."}],"type":"paragraph"}]}],"type":"orderedList"},{"inlineContent":[{"text":"Both ","type":"text"},{"type":"codeVoice","code":"LambdaHandlerAdapter"},{"type":"text","text":" and "},{"code":"LambdaCodableAdapter","type":"codeVoice"},{"type":"text","text":" are described in greater detail in the "},{"type":"strong","inlineContent":[{"text":"Codable Support","type":"text"}]},{"text":" ","type":"text"},{"type":"text","text":"section."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"To summarize, "},{"type":"codeVoice","code":"LambdaHandler"},{"text":" can be used with the ","type":"text"},{"type":"codeVoice","code":"LambdaRuntime"},{"text":" by first going through ","type":"text"},{"type":"codeVoice","code":"LambdaHandlerAdapter"},{"type":"text","text":" and"},{"type":"text","text":" "},{"type":"text","text":"then through "},{"type":"codeVoice","code":"LambdaCodableAdapter"},{"type":"text","text":". "},{"type":"codeVoice","code":"LambdaWithBackgroundHandler"},{"type":"text","text":" just requires "},{"code":"LambdaCodableAdapter","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"For the common JSON-in and JSON-out use-case, there is an extension on "},{"code":"LambdaRuntime","type":"codeVoice"},{"type":"text","text":" that abstracts away this wrapping"},{"text":" ","type":"text"},{"type":"text","text":"from the user."}],"type":"paragraph"},{"text":"LambdaRuntime","anchor":"LambdaRuntime","type":"heading","level":3},{"inlineContent":[{"type":"codeVoice","code":"LambdaRuntime"},{"type":"text","text":" is the class that communicates with the Lambda control plane as defined in"},{"type":"text","text":" "},{"type":"reference","isActive":true,"identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/runtimes-custom.html"},{"type":"text","text":" and"},{"type":"text","text":" "},{"type":"text","text":"forward the invocations to the provided "},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"type":"text","text":". It will conform to "},{"code":"ServiceLifecycle.Service","type":"codeVoice"},{"text":" to","type":"text"},{"type":"text","text":" "},{"text":"provide support for ","type":"text"},{"type":"codeVoice","code":"swift-service-lifecycle"},{"type":"text","text":"."}],"type":"paragraph"},{"code":["\/\/\/ The LambdaRuntime object. This object communicates with the Lambda control plane","\/\/\/ to fetch work and report errors.","public final class LambdaRuntime: ServiceLifecycle.Service, Sendable"," where Handler: StreamingLambdaHandler","{",""," \/\/\/ Create a LambdaRuntime by passing a handler, an eventLoop and a logger."," \/\/\/ - Parameter handler: A ``StreamingLambdaHandler`` that will be invoked"," \/\/\/ - Parameter eventLoop: An ``EventLoop`` on which the LambdaRuntime will be"," \/\/\/ executed. Defaults to an EventLoop from"," \/\/\/ ``NIOSingletons.posixEventLoopGroup``."," \/\/\/ - Parameter logger: A logger"," public init("," handler: sending Handler,"," eventLoop: EventLoop = Lambda.defaultEventLoop,"," logger: Logger = Logger(label: \"Lambda\")"," )",""," \/\/\/ Create a LambdaRuntime by passing a ``StreamingLambdaHandler``."," public convenience init(handler: sending Handler)",""," \/\/\/ Starts the LambdaRuntime by connecting to the Lambda control plane to ask"," \/\/\/ for events to process. If the environment variable AWS_LAMBDA_RUNTIME_API is"," \/\/\/ set, the LambdaRuntime will connect to the Lambda control plane. Otherwise"," \/\/\/ it will start a mock server that can be used for testing at port 8080"," \/\/\/ locally."," \/\/\/ Cancel the task that runs this function to close the communication with"," \/\/\/ the Lambda control plane or close the local mock server. This function"," \/\/\/ only returns once cancelled."," public func run() async throws","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"The current API allows for a Lambda function to be tested locally through a mock server by requiring an environment","type":"text"},{"type":"text","text":" "},{"text":"variable named ","type":"text"},{"type":"codeVoice","code":"LOCAL_LAMBDA_SERVER_ENABLED"},{"text":" to be set to ","type":"text"},{"type":"codeVoice","code":"true"},{"type":"text","text":". If this environment variable is not set, the program"},{"text":" ","type":"text"},{"type":"text","text":"immediately crashes as the user will not have the "},{"type":"codeVoice","code":"AWS_LAMBDA_RUNTIME_API"},{"type":"text","text":" environment variable on their local machine"},{"type":"text","text":" "},{"type":"text","text":"(set automatically when deployed to AWS Lambda). However, making the user set the "},{"code":"LOCAL_LAMBDA_SERVER_ENABLED","type":"codeVoice"},{"type":"text","text":" "},{"type":"text","text":"environment variable is an unnecessary step that can be avoided. In the v2 API, the "},{"type":"codeVoice","code":"run()"},{"type":"text","text":" function will automatically"},{"type":"text","text":" "},{"text":"start the mock server when the ","type":"text"},{"type":"codeVoice","code":"AWS_LAMBDA_RUNTIME_API"},{"type":"text","text":" environment variable cannot be found."}]},{"type":"heading","level":3,"text":"Lambda","anchor":"Lambda"},{"type":"paragraph","inlineContent":[{"type":"text","text":"We also add an enum to store a static function and a property on. We put this on the static "},{"type":"codeVoice","code":"Lambda"},{"type":"text","text":" because"},{"type":"text","text":" "},{"type":"codeVoice","code":"LambdaRuntime"},{"text":" is generic and thus has bad ergonomics for static properties and functions.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["enum Lambda {"," \/\/\/ This returns the default EventLoop that a LambdaRuntime is scheduled on."," \/\/\/ It uses `NIOSingletons.posixEventLoopGroup.next()` under the hood."," public static var defaultEventLoop: any EventLoop { get }",""," \/\/\/ Report a startup error to the Lambda Control Plane API"," public static func reportStartupError(any Error) async","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Since the library now provides ownership of the "},{"code":"main()","type":"codeVoice"},{"text":" function and allows users to initialize services before the","type":"text"},{"text":" ","type":"text"},{"type":"codeVoice","code":"LambdaRuntime"},{"type":"text","text":" is initialized, the library cannot implicitly report"},{"text":" ","type":"text"},{"identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/runtimes-api.html#runtimes-api-initerror","isActive":true,"type":"reference"},{"text":" ","type":"text"},{"type":"text","text":"like it currently does through the "},{"type":"codeVoice","code":"initialize()"},{"type":"text","text":" function of "},{"type":"codeVoice","code":"LambdaRunner"},{"type":"text","text":" which wraps the handler’s "},{"code":"init(...)","type":"codeVoice"},{"type":"text","text":" and"},{"type":"text","text":" "},{"text":"handles any errors thrown by reporting it to the dedicated AWS endpoint.","type":"text"}]},{"inlineContent":[{"text":"To retain support for initialization error reporting, the ","type":"text"},{"type":"codeVoice","code":"Lambda.reportStartupError(any Error)"},{"text":" function gives users","type":"text"},{"type":"text","text":" "},{"text":"the option to manually report initialization errors in their closure handler. Although this should ideally happen","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"implicitly like it currently does in v1, we believe this is a small compromise in comparison to the benefits gained in"},{"type":"text","text":" "},{"type":"text","text":"now being able to cleanly manage the lifecycles of required services in a structured concurrency manner."}],"type":"paragraph"},{"type":"aside","style":"note","content":[{"type":"paragraph","inlineContent":[{"text":"","type":"text"}]},{"inlineContent":[{"type":"text","text":"Assume we want to load a secret for the Lambda function from a secret vault first. If this fails, we want to report"},{"text":" ","type":"text"},{"type":"text","text":"the error to the control plane:"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["let secretVault = SecretVault()","","do {"," \/\/\/ !!! Error thrown: secret \"foo\" does not exist !!!"," let secret = try await secretVault.getSecret(\"foo\")",""," let runtime = LambdaRuntime { (event: Input, context: LambdaContext) in"," \/\/\/ Lambda business logic"," }",""," let serviceGroup = ServiceGroup("," services: [postgresClient, runtime],"," configuration: .init(gracefulShutdownSignals: [.sigterm]),"," logger: logger"," )"," try await serviceGroup.run()","} catch {"," \/\/\/ Report startup error straight away to the dedicated initialization error endpoint"," try await Lambda.reportStartupError(error)","}"]}],"name":"Use-case"},{"text":"Codable support","type":"heading","anchor":"Codable-support","level":3},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"LambdaHandler"},{"text":" and ","type":"text"},{"code":"LambdaWithBackgroundProcessingHandler","type":"codeVoice"},{"type":"text","text":" protocols abstract away encoding\/decoding logic from the"},{"type":"text","text":" "},{"type":"text","text":"conformers as they are generic over custom "},{"code":"Event","type":"codeVoice"},{"type":"text","text":" and "},{"code":"Output","type":"codeVoice"},{"type":"text","text":" types. We introduce two adapters "},{"type":"codeVoice","code":"LambdaHandlerAdapter"},{"type":"text","text":" "},{"text":"and ","type":"text"},{"code":"CodableLambdaAdapter","type":"codeVoice"},{"type":"text","text":" that implement the encoding\/decoding logic and in turn allow the respective handlers to"},{"type":"text","text":" "},{"text":"conform to ","type":"text"},{"type":"codeVoice","code":"StreamingLambdaHandler"},{"text":".","type":"text"}]},{"level":4,"text":"LambdaHandlerAdapter","anchor":"LambdaHandlerAdapter","type":"heading"},{"inlineContent":[{"type":"text","text":"Any handler conforming to "},{"type":"codeVoice","code":"LambdaHandler"},{"text":" can be conformed to ","type":"text"},{"code":"LambdaWithBackgroundProcessingHandler","type":"codeVoice"},{"type":"text","text":" through"},{"type":"text","text":" "},{"type":"codeVoice","code":"LambdaHandlerAdapter"},{"type":"text","text":"."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["\/\/\/ Wraps an underlying handler conforming to ``LambdaHandler``","\/\/\/ with ``LambdaWithBackgroundProcessingHandler``.","public struct LambdaHandlerAdapter<"," Event: Decodable,"," Output,"," Handler: LambdaHandler",">: LambdaWithBackgroundProcessingHandler where Handler.Event == Event, Handler.Output == Output {"," let handler: Handler",""," \/\/\/ Register the concrete handler."," public init(handler: Handler)",""," \/\/\/ 1. Call the `self.handler.handle(...)` with `event` and `context`."," \/\/\/ 2. Pass the generic `Output` object returned from `self.handler.handle(...)` to `outputWriter.write(_:)`"," public func handle(_ event: Event, outputWriter: some LambdaResponseWriter, context: LambdaContext) async throws","}"]},{"anchor":"LambdaCodableAdapter","type":"heading","level":4,"text":"LambdaCodableAdapter"},{"inlineContent":[{"type":"codeVoice","code":"LambdaCodableAdapter"},{"text":" accepts any generic underlying handler conforming to ","type":"text"},{"type":"codeVoice","code":"LambdaWithBackgroundProcessingHandler"},{"type":"text","text":". It"},{"type":"text","text":" "},{"type":"text","text":"also accepts "},{"type":"emphasis","inlineContent":[{"type":"text","text":"any"}]},{"type":"text","text":" encoder and decoder object conforming to the "},{"type":"codeVoice","code":"LambdaEventDecoder"},{"type":"text","text":" and "},{"code":"LambdaOutputEncoder","type":"codeVoice"},{"text":" ","type":"text"},{"text":"protocols:","type":"text"}],"type":"paragraph"},{"level":5,"text":"LambdaEventDecoder and LambdaOutputEncoder protocols","type":"heading","anchor":"LambdaEventDecoder-and-LambdaOutputEncoder-protocols"},{"syntax":"swift","type":"codeListing","code":["public protocol LambdaEventDecoder {"," \/\/\/ Decode the ByteBuffer representing the received event into the generic type Event"," \/\/\/ the handler will receive"," func decode(_ type: Event.Type, from buffer: ByteBuffer) throws -> Event","}","","public protocol LambdaOutputEncoder {"," \/\/\/ Encode the generic type Output the handler has produced into a ByteBuffer"," func encode(_ value: Output, into buffer: inout ByteBuffer) throws","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We provide conformances for Foundation’s "},{"code":"JSONDecoder","type":"codeVoice"},{"text":" to ","type":"text"},{"code":"LambdaEventDecoder","type":"codeVoice"},{"text":" and ","type":"text"},{"code":"JSONEncoder","type":"codeVoice"},{"type":"text","text":" to"},{"text":" ","type":"text"},{"type":"codeVoice","code":"LambdaOutputEncoder"},{"text":".","type":"text"}]},{"inlineContent":[{"type":"codeVoice","code":"LambdaCodableAdapter"},{"type":"text","text":" implements its "},{"code":"handle()","type":"codeVoice"},{"type":"text","text":" method by:"}],"type":"paragraph"},{"type":"orderedList","items":[{"content":[{"inlineContent":[{"text":"Decoding the ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" event into the generic "},{"type":"codeVoice","code":"Event"},{"text":" type.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"Wrapping the ","type":"text"},{"type":"codeVoice","code":"LambdaResponseStreamWriter"},{"text":" with a concrete ","type":"text"},{"type":"codeVoice","code":"LambdaResponseWriter"},{"type":"text","text":" such that calls to"},{"text":" ","type":"text"},{"code":"LambdaResponseWriter","type":"codeVoice"},{"text":"s ","type":"text"},{"type":"codeVoice","code":"write(_:)"},{"type":"text","text":" are mapped to "},{"type":"codeVoice","code":"LambdaResponseStreamWriter"},{"text":"s ","type":"text"},{"type":"codeVoice","code":"writeAndFinish(_:)"},{"type":"text","text":"."}],"type":"paragraph"},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"text":"Note that the argument to ","type":"text"},{"type":"codeVoice","code":"LambdaResponseWriter"},{"type":"text","text":"s "},{"type":"codeVoice","code":"write(_:)"},{"text":" is a generic ","type":"text"},{"type":"codeVoice","code":"Output"},{"type":"text","text":" object whereas"},{"text":" ","type":"text"},{"type":"codeVoice","code":"LambdaResponseStreamWriter"},{"type":"text","text":"s "},{"code":"writeAndFinish(_:)","type":"codeVoice"},{"type":"text","text":" requires a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":"."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"Therefore, the concrete implementation of ","type":"text"},{"type":"codeVoice","code":"LambdaResponseWriter"},{"text":" also accepts an encoder. Its ","type":"text"},{"type":"codeVoice","code":"write(_:)"},{"type":"text","text":" function"},{"type":"text","text":" "},{"type":"text","text":"first encodes the generic "},{"type":"codeVoice","code":"Output"},{"text":" object and then passes it to the underlying ","type":"text"},{"type":"codeVoice","code":"LambdaResponseStreamWriter"},{"text":".","type":"text"}]}]}],"type":"unorderedList"}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"Passing the generic ","type":"text"},{"code":"Event","type":"codeVoice"},{"text":" instance, the concrete ","type":"text"},{"type":"codeVoice","code":"LambdaResponseWriter"},{"text":", as well as the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"text":" to the","type":"text"},{"type":"text","text":" "},{"text":"underlying handler’s ","type":"text"},{"code":"handle()","type":"codeVoice"},{"type":"text","text":" method."}]}]}]},{"inlineContent":[{"type":"codeVoice","code":"LambdaCodableAdapter"},{"type":"text","text":" can implement encoding\/decoding for "},{"inlineContent":[{"type":"text","text":"any"}],"type":"emphasis"},{"text":" handler conforming to","type":"text"},{"type":"text","text":" "},{"code":"LambdaWithBackgroundProcessingHandler","type":"codeVoice"},{"text":" if ","type":"text"},{"type":"codeVoice","code":"Event"},{"type":"text","text":" is "},{"code":"Decodable","type":"codeVoice"},{"type":"text","text":" and the "},{"type":"codeVoice","code":"Output"},{"text":" is ","type":"text"},{"code":"Encodable","type":"codeVoice"},{"text":" or ","type":"text"},{"type":"codeVoice","code":"Void"},{"type":"text","text":", meaning"},{"text":" ","type":"text"},{"text":"that the encoding\/decoding stubs do not need to be implemented by the user.","type":"text"}],"type":"paragraph"},{"code":["\/\/\/ Wraps an underlying handler conforming to `LambdaWithBackgroundProcessingHandler`","\/\/\/ with encoding\/decoding logic","public struct LambdaCodableAdapter<"," Handler: LambdaWithBackgroundProcessingHandler,"," Event: Decodable,"," Output,"," Decoder: LambdaEventDecoder,"," Encoder: LambdaOutputEncoder",">: StreamingLambdaHandler where Handler.Output == Output, Handler.Event == Event {",""," \/\/\/ Register the concrete handler, encoder, and decoder."," public init("," handler: Handler,"," encoder: Encoder,"," decoder: Decoder"," ) where Output: Encodable",""," \/\/\/ For handler with a void output -- the user doesn't specify an encoder."," public init("," handler: Handler,"," decoder: Decoder"," ) where Output == Void, Encoder == VoidEncoder",""," \/\/\/ 1. Decode the invocation event using `self.decoder`"," \/\/\/ 2. Create a concrete `LambdaResponseWriter` that maps calls to `write(_:)` with the `responseWriter`s `writeAndFinish(_:)`"," \/\/\/ 2. Call the underlying `self.handler.handle()` method with the decoded event data, the concrete `LambdaResponseWriter`,"," \/\/\/ and the `LambdaContext`."," public mutating func handle("," _ request: ByteBuffer,"," responseWriter: some LambdaResponseStreamWriter,"," context: LambdaContext"," ) async throws","}"],"type":"codeListing","syntax":"swift"},{"anchor":"Handler-as-a-Closure","level":3,"text":"Handler as a Closure","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"To create a Lambda function using the current API, a user first has to create an object and conform it to one of the","type":"text"},{"type":"text","text":" "},{"type":"text","text":"handler protocols by implementing the initializer and the "},{"type":"codeVoice","code":"handle(...)"},{"text":" function. Now that ","type":"text"},{"code":"LambdaRuntime","type":"codeVoice"},{"text":" is public,","type":"text"},{"text":" ","type":"text"},{"text":"this verbosity can very easily be simplified.","type":"text"}]},{"type":"heading","anchor":"ClosureHandler","level":4,"text":"ClosureHandler"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This handler is generic over any "},{"code":"Event","type":"codeVoice"},{"text":" type conforming to ","type":"text"},{"code":"Decodable","type":"codeVoice"},{"type":"text","text":" and any "},{"code":"Output","type":"codeVoice"},{"type":"text","text":" type conforming to "},{"code":"Encodable","type":"codeVoice"},{"text":" ","type":"text"},{"type":"text","text":"or "},{"type":"codeVoice","code":"Void"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["public struct ClosureHandler: LambdaHandler {"," \/\/\/ Initialize with a closure handler over generic Input and Output types"," public init(body: @escaping (Event, LambdaContext) async throws -> Output) where Output: Encodable"," \/\/\/ Initialize with a closure handler over a generic Input type (Void Output)."," public init(body: @escaping (Event, LambdaContext) async throws -> Void) where Output == Void"," \/\/\/ The business logic of the Lambda function."," public func handle(_ event: Event, context: LambdaContext) async throws -> Output","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Given that "},{"code":"ClosureHandler","type":"codeVoice"},{"text":" conforms to ","type":"text"},{"type":"codeVoice","code":"LambdaHandler"},{"text":":","type":"text"}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"We can extend the "},{"type":"codeVoice","code":"LambdaRuntime"},{"text":" initializer such that it accepts a closure as an argument.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Within the initializer, the closure handler is wrapped with "},{"code":"LambdaCodableAdapter","type":"codeVoice"},{"type":"text","text":"."}]}]}]},{"code":["extension LambdaRuntime {"," \/\/\/ Initialize a LambdaRuntime with a closure handler over generic Event and Output types."," \/\/\/ This initializer bolts on encoding\/decoding logic by wrapping the closure handler with"," \/\/\/ LambdaCodableAdapter."," public init("," body: @escaping (Event, LambdaContext) async throws -> Output"," ) where Handler == LambdaCodableAdapter, Event, Output, JSONDecoder, JSONEncoder>",""," \/\/\/ Same as above but for handlers with a void output"," public init("," body: @escaping (Event, LambdaContext) async throws -> Void"," ) where Handler == LambdaCodableAdapter, Event, Void, JSONDecoder, VoidEncoder>","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"type":"text","text":"We can now significantly reduce the verbosity and leverage Swift’s trailing closure syntax to cleanly create and run a"},{"type":"text","text":" "},{"text":"Lambda function, abstracting away the decoding and encoding logic from the user:","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["\/\/\/ The type the handler will use as input","struct Input: Decodable {"," var message: String","}","","\/\/\/ The type the handler will output","struct Greeting: Encodable {"," var echoedMessage: String","}","","\/\/\/ A simple Lambda function that echoes the input","let runtime = LambdaRuntime { (event: Input, context: LambdaContext) in"," Greeting(echoedMessage: event.message)","}","","try await runtime.run()"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"We also add a "},{"type":"codeVoice","code":"StreamingClosureHandler"},{"type":"text","text":" conforming to "},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"type":"text","text":" for use-cases where the user wants to"},{"type":"text","text":" "},{"type":"text","text":"handle encoding\/decoding themselves:"}]},{"type":"codeListing","syntax":"swift","code":["public struct StreamingClosureHandler: StreamingLambdaHandler {",""," public init("," body: @escaping sending (ByteBuffer, LambdaResponseStreamWriter, LambdaContext) async throws -> ()"," )",""," public func handle("," _ request: ByteBuffer,"," responseWriter: LambdaResponseStreamWriter,"," context: LambdaContext"," ) async throws","}","","extension LambdaRuntime {"," public init("," body: @escaping sending (ByteBuffer, LambdaResponseStreamWriter, LambdaContext) async throws -> ()"," )","}"]},{"type":"heading","text":"Alternatives considered","level":2,"anchor":"Alternatives-considered"},{"level":3,"type":"heading","text":"[UInt8] instead of ByteBuffer","anchor":"UInt8-instead-of-ByteBuffer"},{"type":"paragraph","inlineContent":[{"type":"text","text":"We considered using "},{"code":"[UInt8]","type":"codeVoice"},{"text":" instead of ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" in the base "},{"code":"LambdaHandler","type":"codeVoice"},{"type":"text","text":" API. We decided to use "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" "},{"text":"for two reasons.","type":"text"}]},{"type":"orderedList","items":[{"content":[{"inlineContent":[{"type":"text","text":"99% of use-cases will use the JSON codable API and will not directly get in touch with ByteBuffer anyway. For those"},{"type":"text","text":" "},{"type":"text","text":"users it does not matter if the base API uses "},{"type":"codeVoice","code":"ByteBuffer"},{"text":" or ","type":"text"},{"type":"codeVoice","code":"[UInt8]"},{"type":"text","text":"."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"The incoming and outgoing data must be in the ","type":"text"},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" format anyway, as Lambda uses SwiftNIO under the hood and"},{"type":"text","text":" "},{"type":"text","text":"SwiftNIO uses "},{"code":"ByteBuffer","type":"codeVoice"},{"text":" in its APIs. By using ","type":"text"},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" we can save a copies to and from "},{"type":"codeVoice","code":"[UInt8]"},{"type":"text","text":". This will"},{"text":" ","type":"text"},{"type":"text","text":"reduce the invocation time for all users."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The base "},{"code":"LambdaHandler","type":"codeVoice"},{"type":"text","text":" API is most likely mainly being used by developers that want to integrate their web"},{"type":"text","text":" "},{"text":"framework with Lambda (examples: Vapor, Hummingbird, …). Those developers will most likely prefer to get the data","type":"text"},{"type":"text","text":" "},{"text":"in the ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" format anyway, as their lower level networking stack also depends on SwiftNIO."}]}]}]},{"level":3,"text":"Users create a LambdaResponse, that supports streaming instead of being passed a LambdaResponseStreamWriter","type":"heading","anchor":"Users-create-a-LambdaResponse-that-supports-streaming-instead-of-being-passed-a-LambdaResponseStreamWriter"},{"type":"paragraph","inlineContent":[{"text":"Instead of passing the ","type":"text"},{"type":"codeVoice","code":"LambdaResponseStreamWriter"},{"type":"text","text":" in the invocation we considered a new type "},{"type":"codeVoice","code":"LambdaResponse"},{"type":"text","text":", that"},{"type":"text","text":" "},{"text":"users must return in the ","type":"text"},{"type":"codeVoice","code":"StreamingLambdaHandler"},{"text":".","type":"text"}]},{"inlineContent":[{"text":"Its API would look like this:","type":"text"}],"type":"paragraph"},{"code":["\/\/\/ A response returned from a ``LambdaHandler``.","\/\/\/ The response can be empty, a single ByteBuffer or a response stream.","public struct LambdaResponse {"," \/\/\/ A writer to be used when creating a streamed response."," public struct Writer {"," \/\/\/ Writes data to the response stream"," public func write(_ byteBuffer: ByteBuffer) async throws"," \/\/\/ Closes off the response stream"," public func finish() async throws"," \/\/\/ Writes the `byteBuffer` to the response stream and subsequently closes the stream"," public func writeAndFinish(_ byteBuffer: ByteBuffer) async throws"," }",""," \/\/\/ Creates an empty lambda response"," public init()",""," \/\/\/ Creates a LambdaResponse with a fixed ByteBuffer."," public init(_ byteBuffer: ByteBuffer)",""," \/\/\/ Creates a streamed lambda response. Use the ``Writer`` to send"," \/\/\/ response chunks on the stream."," public init(_ stream: @escaping sending (Writer) async throws -> ())","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"StreamingLambdaHandler"},{"type":"text","text":" would look like this:"}]},{"syntax":"swift","code":["\/\/\/ The base LambdaHandler protocol","public protocol StreamingLambdaHandler {"," \/\/\/ The business logic of the Lambda function"," \/\/\/ - Parameters:"," \/\/\/ - event: The invocation's input data"," \/\/\/ - context: The LambdaContext containing the invocation's metadata"," \/\/\/ - Returns: A LambdaResponse, that can be streamed"," mutating func handle("," _ event: ByteBuffer,"," context: LambdaContext"," ) async throws -> LambdaResponse","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"There are pros and cons for the API that returns the ","type":"text"},{"code":"LambdaResponses","type":"codeVoice"},{"text":" and there are pros and cons for the API that","type":"text"},{"type":"text","text":" "},{"text":"receives a ","type":"text"},{"code":"LambdaResponseStreamWriter","type":"codeVoice"},{"type":"text","text":" as a parameter."}]},{"type":"paragraph","inlineContent":[{"text":"Concerning following structured concurrency principles the approach that receives a ","type":"text"},{"type":"codeVoice","code":"LambdaResponseStreamWriter"},{"text":" as a","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"parameter has benefits as the lifetime of the handle function is tied to the invocation runtime. The approach that"},{"type":"text","text":" "},{"type":"text","text":"returns a "},{"code":"LambdaResponse","type":"codeVoice"},{"text":" splits the invocation into two separate function calls. First the handle method is invoked,","type":"text"},{"type":"text","text":" "},{"type":"text","text":"second the "},{"type":"codeVoice","code":"LambdaResponse"},{"text":" writer closure is invoked. This means that it is impossible to use Swift APIs that use","type":"text"},{"type":"text","text":" "},{"code":"with","type":"codeVoice"},{"text":" style lifecycle management patterns from before creating the response until sending the full response stream off.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"For example, users instrumenting their lambdas with Swift tracing likely can not use the "},{"type":"codeVoice","code":"withSpan"},{"type":"text","text":" API for the full"},{"text":" ","type":"text"},{"type":"text","text":"lifetime of the request, if they return a streamed response."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"However, if it comes to consistency with the larger Swift on server ecosystem, the API that returns a "},{"type":"codeVoice","code":"LambdaResponse"},{"text":" ","type":"text"},{"text":"is likely the better choice. Hummingbird v2, OpenAPI and the new Swift gRPC v2 implementation all use this approach.","type":"text"},{"type":"text","text":" "},{"text":"This might be due to the fact that writing middleware becomes easier, if a Response is explicitly returned.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We decided to implement the approach in which a "},{"code":"LambdaResponseStreamWriter","type":"codeVoice"},{"text":" is passed to the function, since the","type":"text"},{"type":"text","text":" "},{"text":"approach in which a ","type":"text"},{"type":"codeVoice","code":"LambdaResponse"},{"type":"text","text":" is returned can trivially be built on top of it. This is not true vice versa."}]},{"inlineContent":[{"type":"text","text":"We welcome the discussion on this topic and are open to change our minds and API here."}],"type":"paragraph"},{"text":"Adding a function `addBackgroundTask(_ body: sending @escaping () async -> ())` in `LambdaContext`","type":"heading","level":3,"anchor":"Adding-a-function-addBackgroundTask-body-sending-escaping--async-%3E--in-LambdaContext"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Initially we proposed an explicit "},{"code":"addBackgroundTask(_:)","type":"codeVoice"},{"text":" function in ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"text":" that users could call from their","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"handler object to schedule a background task to be run after the result is reported to AWS. We received feedback that"},{"type":"text","text":" "},{"text":"this approach for supporting background tasks does not exhibit structured concurrency, as code could still be in","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"execution after leaving the scope of the "},{"type":"codeVoice","code":"handle(...)"},{"type":"text","text":" function."}]},{"type":"paragraph","inlineContent":[{"text":"For handlers conforming to the ","type":"text"},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"type":"text","text":", "},{"type":"codeVoice","code":"addBackgroundTask(_:)"},{"type":"text","text":" was anyways unnecessary as background"},{"text":" ","type":"text"},{"type":"text","text":"work could be executed in a structured concurrency manner within the "},{"code":"handle(...)","type":"codeVoice"},{"type":"text","text":" function after the call to"},{"type":"text","text":" "},{"type":"codeVoice","code":"LambdaResponseStreamWriter.finish()"},{"type":"text","text":"."}]},{"inlineContent":[{"type":"text","text":"For handlers conforming to the "},{"type":"codeVoice","code":"LambdaHandler"},{"type":"text","text":" protocol, we considered extending "},{"code":"LambdaHandler","type":"codeVoice"},{"type":"text","text":" with a"},{"type":"text","text":" "},{"type":"codeVoice","code":"performPostHandleWork(...)"},{"type":"text","text":" function that will be called after the "},{"code":"handle","type":"codeVoice"},{"text":" function by the library. Users wishing to","type":"text"},{"type":"text","text":" "},{"type":"text","text":"add background work can override this function in their "},{"type":"codeVoice","code":"LambdaHandler"},{"type":"text","text":" conforming object."}],"type":"paragraph"},{"syntax":"swift","code":["public protocol LambdaHandler {"," associatedtype Event"," associatedtype Output",""," func handle(_ event: Event, context: LambdaContext) async throws -> Output",""," func performPostHandleWork(...) async throws -> Void","}","","extension LambdaHandler {"," \/\/ User's can override this function if they wish to perform background work"," \/\/ after returning a response from ``handle``."," func performPostHandleWork(...) async throws -> Void {"," \/\/ nothing to do"," }","}"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"Yet this poses difficulties when the user wishes to use any state created in the "},{"type":"codeVoice","code":"handle(...)"},{"type":"text","text":" function as part of the"},{"text":" ","type":"text"},{"text":"background work.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"In general, the most common use-case for this library will be to implement simple Lambda functions that do not have","type":"text"},{"type":"text","text":" "},{"type":"text","text":"requirements for response streaming, nor to perform any background work after returning the output. To keep things easy"},{"text":" ","type":"text"},{"type":"text","text":"for the common use-case, and with Swift’s principle of progressive disclosure of complexity in mind, we settled on three"},{"type":"text","text":" "},{"text":"handler protocols:","type":"text"}],"type":"paragraph"},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"code":"LambdaHandler","type":"codeVoice"},{"text":": Most common use-case. JSON-in, JSON-out. Does not support background work execution. An intuitive","type":"text"},{"type":"text","text":" "},{"type":"codeVoice","code":"handle(event: Event, context: LambdaContext) -> Output"},{"text":" API that is simple to understand, i.e. users are not exposed","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"to the concept of sending their response through a writer. "},{"code":"LambdaHandler","type":"codeVoice"},{"type":"text","text":" can be very cleanly implemented and used"},{"text":" ","type":"text"},{"type":"text","text":"with "},{"type":"codeVoice","code":"LambdaRuntime"},{"type":"text","text":", especially with "},{"code":"ClosureHandler","type":"codeVoice"},{"text":".","type":"text"}]}]},{"content":[{"inlineContent":[{"code":"LambdaWithBackgroundProcessingHandler","type":"codeVoice"},{"text":": If users wish to augment their ","type":"text"},{"code":"LambdaHandler","type":"codeVoice"},{"type":"text","text":" with the ability to run"},{"type":"text","text":" "},{"type":"text","text":"background tasks, they can easily migrate. A user simply has to:"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"text":"Change the conformance to ","type":"text"},{"code":"LambdaWithBackgroundProcessingHandler","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Add an additional "},{"type":"codeVoice","code":"outputWriter: some LambdaResponseWriter"},{"type":"text","text":" argument to the "},{"code":"handle","type":"codeVoice"},{"type":"text","text":" function."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Replace the "},{"code":"return ...","type":"codeVoice"},{"text":" with ","type":"text"},{"type":"codeVoice","code":"outputWriter.write(...)"},{"text":".","type":"text"}]}]},{"content":[{"inlineContent":[{"text":"Implement any background work after ","type":"text"},{"type":"codeVoice","code":"outputWriter.write(...)"},{"text":".","type":"text"}],"type":"paragraph"}]}],"type":"orderedList"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"StreamingLambdaHandler"},{"type":"text","text":": This is the base handler protocol which is intended to be used directly only for advanced"},{"type":"text","text":" "},{"type":"text","text":"use-cases. Users are provided the invocation event as a "},{"code":"ByteBuffer","type":"codeVoice"},{"text":" and a ","type":"text"},{"type":"codeVoice","code":"LambdaResponseStreamWriter"},{"type":"text","text":" where the"},{"text":" ","type":"text"},{"text":"computed result (as ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":") can either be streamed (with repeated calls to "},{"type":"codeVoice","code":"write(_:)"},{"text":") or sent all at once","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"(with a single call to "},{"type":"codeVoice","code":"writeAndFinish(_:)"},{"type":"text","text":"). After closing the "},{"code":"LambdaResponseStreamWriter","type":"codeVoice"},{"type":"text","text":", any background work can"},{"type":"text","text":" "},{"type":"text","text":"be implemented."}]}]}]},{"type":"heading","anchor":"Making-LambdaResponseStreamWriter-and-LambdaResponseWriter-~Copyable","text":"Making LambdaResponseStreamWriter and LambdaResponseWriter ~Copyable","level":3},{"inlineContent":[{"type":"text","text":"We initially proposed to make the "},{"code":"LambdaResponseStreamWriter","type":"codeVoice"},{"type":"text","text":" and "},{"code":"LambdaResponseWriter","type":"codeVoice"},{"text":" protocols ","type":"text"},{"code":"~Copyable","type":"codeVoice"},{"type":"text","text":", with"},{"type":"text","text":" "},{"text":"the functions that close the response having the ","type":"text"},{"type":"codeVoice","code":"consuming"},{"type":"text","text":" ownership keyword. This was so that the compiler could"},{"text":" ","type":"text"},{"type":"text","text":"enforce the restriction of not being able to interact with the writer after the response stream has closed."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"However, non-copyable types do not compose nicely and add complexity for users. Further, for the compiler to actually"},{"type":"text","text":" "},{"type":"text","text":"enforce the "},{"code":"consuming","type":"codeVoice"},{"text":" restrictions, user’s have to explicitly mark the writer argument as ","type":"text"},{"type":"codeVoice","code":"consuming"},{"text":" in the ","type":"text"},{"code":"handle","type":"codeVoice"},{"text":" ","type":"text"},{"type":"text","text":"function."}]},{"type":"paragraph","inlineContent":[{"text":"Therefore, throwing appropriate errors to prevent abnormal interaction with the writers seems to be the simplest","type":"text"},{"type":"text","text":" "},{"type":"text","text":"approach."}]},{"text":"A word about versioning","level":2,"anchor":"A-word-about-versioning","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"We are aware that AWS Lambda Runtime has not reached a proper 1.0. We intend to keep the current implementation around"},{"text":" ","type":"text"},{"type":"text","text":"at 1.0-alpha. We don’t want to change the current API without releasing a new major. We think there are lots of adopters"},{"text":" ","type":"text"},{"text":"out there that depend on the API in v1. Because of this we intend to release the proposed API here as AWS Lambda Runtime","type":"text"},{"text":" ","type":"text"},{"text":"v2.","type":"text"}]}]}],"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/0001-v2-api","interfaceLanguage":"swift"},"kind":"article","sections":[],"references":{"https://aws.amazon.com/blogs/compute/introducing-aws-lambda-response-streaming/":{"url":"https:\/\/aws.amazon.com\/blogs\/compute\/introducing-aws-lambda-response-streaming\/","type":"link","identifier":"https:\/\/aws.amazon.com\/blogs\/compute\/introducing-aws-lambda-response-streaming\/","title":"AWS introduced support for response streaming","titleInlineContent":[{"text":"AWS introduced support for response streaming","type":"text"}]},"https://aws.amazon.com/blogs/compute/running-code-after-returning-a-response-from-an-aws-lambda-function/":{"url":"https:\/\/aws.amazon.com\/blogs\/compute\/running-code-after-returning-a-response-from-an-aws-lambda-function\/","type":"link","identifier":"https:\/\/aws.amazon.com\/blogs\/compute\/running-code-after-returning-a-response-from-an-aws-lambda-function\/","title":"AWS described in a blog post that you can run background tasks in Lambda","titleInlineContent":[{"text":"AWS described in a blog post that you can run background tasks in Lambda","type":"text"}]},"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html#runtimes-api-initerror":{"url":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/runtimes-api.html#runtimes-api-initerror","type":"link","identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/runtimes-api.html#runtimes-api-initerror","title":"errors that occur during initialization to the dedicated endpoint AWS exposes","titleInlineContent":[{"text":"errors that occur during initialization to the dedicated endpoint AWS exposes","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"https://github.com/swift-server/swift-aws-lambda-runtime/issues/265":{"url":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/issues\/265","type":"link","identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/issues\/265","title":"set up global properties before the Lambda starts-up","titleInlineContent":[{"text":"set up global properties before the Lambda starts-up","type":"text"}]},"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html":{"url":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/runtimes-custom.html","type":"link","identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/runtimes-custom.html","title":"Building a custom runtime for AWS Lambda","titleInlineContent":[{"text":"Building a custom runtime for AWS Lambda","type":"text"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/closurehandler.json b/docs/data/documentation/awslambdaruntimecore/closurehandler.json new file mode 100644 index 00000000..8bebe697 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/closurehandler.json @@ -0,0 +1 @@ +{"metadata":{"title":"ClosureHandler","roleHeading":"Structure","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ClosureHandler"}],"symbolKind":"struct","externalID":"s:20AWSLambdaRuntimeCore14ClosureHandlerV","navigatorTitle":[{"kind":"identifier","text":"ClosureHandler"}],"role":"symbol","modules":[{"name":"AWSLambdaRuntimeCore"}]},"abstract":[{"text":"A ","type":"text"},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference"},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"type":"text","text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax."}],"relationshipsSections":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"],"title":"Conforms To","type":"conformsTo","kind":"relationships"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"ClosureHandler","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"Event"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"Output"},{"kind":"text","text":"> "},{"text":"where","kind":"keyword"},{"kind":"text","text":" "},{"text":"Event","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"kind":"typeIdentifier","text":"Decodable","preciseIdentifier":"s:Se"}]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/closurehandler"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"topicSections":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-5sz8r","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-9o0yg"],"generated":true,"title":"Initializers","anchor":"Initializers"},{"generated":true,"anchor":"Instance-Methods","title":"Instance Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/handle(_:context:)"]}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler/init(body:)-5sz8r":{"abstract":[{"type":"text","text":"Initialize with a closure handler over generic "},{"code":"Input","type":"codeVoice"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"Output"},{"text":" types.","type":"text"}],"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/closurehandler\/init(body:)-5sz8r","title":"init(body:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-5sz8r","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"text":"body","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"text":")","kind":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","abstract":[{"text":"A ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"type":"text","text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ClosureHandler","kind":"identifier"}],"navigatorTitle":[{"text":"ClosureHandler","kind":"identifier"}],"title":"ClosureHandler","url":"\/documentation\/awslambdaruntimecore\/closurehandler","role":"symbol","type":"topic","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler/init(body:)-9o0yg":{"type":"topic","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"body"},{"kind":"text","text":": ("},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":")","kind":"text"}],"role":"symbol","title":"init(body:)","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-9o0yg","url":"\/documentation\/awslambdaruntimecore\/closurehandler\/init(body:)-9o0yg","abstract":[{"text":"Initialize with a closure handler over a generic ","type":"text"},{"code":"Input","type":"codeVoice"},{"type":"text","text":" type, and a "},{"type":"codeVoice","code":"Void"},{"text":" ","type":"text"},{"type":"codeVoice","code":"Output"},{"type":"text","text":"."}],"kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/handle(_:context:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","title":"handle(_:context:)","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"required":true,"kind":"symbol","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Output":{"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","title":"Output","abstract":[{"type":"text","text":"Generic output type."},{"text":" ","type":"text"},{"type":"text","text":"This is the return type of the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"text":" function.","type":"text"}],"required":true,"role":"symbol","kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Event":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","role":"symbol","abstract":[{"text":"Generic input type.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","title":"Event","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Event","kind":"identifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"}],"type":"topic","kind":"symbol","required":true},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler/handle(_:context:)":{"title":"handle(_:context:)","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/handle(_:context:)","abstract":[{"type":"text","text":"Calls the provided "},{"type":"codeVoice","code":"self.body"},{"type":"text","text":" closure with the generic "},{"code":"Event","type":"codeVoice"},{"type":"text","text":" object representing the incoming event, and the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"}],"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/closurehandler\/handle(_:context:)","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"text":", ","kind":"text"},{"text":"context","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","kind":"typeIdentifier","text":"LambdaContext"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Output","kind":"typeIdentifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/closurehandler/handle(_:context:).json b/docs/data/documentation/awslambdaruntimecore/closurehandler/handle(_:context:).json new file mode 100644 index 00000000..8c4daa7d --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/closurehandler/handle(_:context:).json @@ -0,0 +1 @@ +{"kind":"symbol","metadata":{"symbolKind":"method","modules":[{"name":"AWSLambdaRuntimeCore"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Event","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Output"}],"roleHeading":"Instance Method","role":"symbol","externalID":"s:20AWSLambdaRuntimeCore14ClosureHandlerV6handle_7contextq_x_AA13LambdaContextVtYaKF","title":"handle(_:context:)"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/handle(_:context:)"},"abstract":[{"type":"text","text":"Calls the provided "},{"type":"codeVoice","code":"self.body"},{"type":"text","text":" closure with the generic "},{"code":"Event","type":"codeVoice"},{"text":" object representing the incoming event, and the ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","isActive":true,"type":"reference"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"event"},{"text":": ","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"context","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Output"}],"languages":["swift"]}]},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The generic "},{"code":"Event","type":"codeVoice"},{"text":" object representing the invocation’s input data.","type":"text"}]}],"name":"event"},{"content":[{"inlineContent":[{"text":"The ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","isActive":true},{"text":" containing the invocation’s metadata.","type":"text"}],"type":"paragraph"}],"name":"context"}]}],"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/closurehandler\/handle(_:context:)"]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler"]]},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler/handle(_:context:)":{"title":"handle(_:context:)","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/handle(_:context:)","abstract":[{"type":"text","text":"Calls the provided "},{"type":"codeVoice","code":"self.body"},{"type":"text","text":" closure with the generic "},{"code":"Event","type":"codeVoice"},{"type":"text","text":" object representing the incoming event, and the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"}],"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/closurehandler\/handle(_:context:)","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"text":", ","kind":"text"},{"text":"context","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","kind":"typeIdentifier","text":"LambdaContext"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Output","kind":"typeIdentifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","abstract":[{"text":"A ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"type":"text","text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ClosureHandler","kind":"identifier"}],"navigatorTitle":[{"text":"ClosureHandler","kind":"identifier"}],"title":"ClosureHandler","url":"\/documentation\/awslambdaruntimecore\/closurehandler","role":"symbol","type":"topic","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/closurehandler/init(body:)-5sz8r.json b/docs/data/documentation/awslambdaruntimecore/closurehandler/init(body:)-5sz8r.json new file mode 100644 index 00000000..e610cb27 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/closurehandler/init(body:)-5sz8r.json @@ -0,0 +1 @@ +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-5sz8r"},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"body"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":", "},{"text":"LambdaContext","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Output"},{"text":") ","kind":"text"},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"Output"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:SE","kind":"typeIdentifier","text":"Encodable"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"The handler function written as a closure.","type":"text"}]}],"name":"body"}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"text":"body","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","kind":"typeIdentifier","text":"LambdaContext"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Output"},{"kind":"text","text":")"}],"title":"init(body:)","role":"symbol","modules":[{"name":"AWSLambdaRuntimeCore"}],"externalID":"s:20AWSLambdaRuntimeCore14ClosureHandlerV4bodyACyxq_Gq_x_AA13LambdaContextVtYaKc_tcSER_rlufc","symbolKind":"init","roleHeading":"Initializer"},"sections":[],"kind":"symbol","abstract":[{"type":"text","text":"Initialize with a closure handler over generic "},{"type":"codeVoice","code":"Input"},{"type":"text","text":" and "},{"type":"codeVoice","code":"Output"},{"type":"text","text":" types."}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/closurehandler\/init(body:)-5sz8r"]}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","abstract":[{"text":"A ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"type":"text","text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ClosureHandler","kind":"identifier"}],"navigatorTitle":[{"text":"ClosureHandler","kind":"identifier"}],"title":"ClosureHandler","url":"\/documentation\/awslambdaruntimecore\/closurehandler","role":"symbol","type":"topic","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler/init(body:)-5sz8r":{"abstract":[{"type":"text","text":"Initialize with a closure handler over generic "},{"code":"Input","type":"codeVoice"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"Output"},{"text":" types.","type":"text"}],"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/closurehandler\/init(body:)-5sz8r","title":"init(body:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-5sz8r","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"text":"body","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"text":")","kind":"text"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/closurehandler/init(body:)-9o0yg.json b/docs/data/documentation/awslambdaruntimecore/closurehandler/init(body:)-9o0yg.json new file mode 100644 index 00000000..6b21a104 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/closurehandler/init(body:)-9o0yg.json @@ -0,0 +1 @@ +{"metadata":{"symbolKind":"init","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"body","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":", "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"kind":"text","text":" -> "},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":")","kind":"text"}],"externalID":"s:20AWSLambdaRuntimeCore14ClosureHandlerV4bodyACyxytGyx_AA13LambdaContextVtYaKc_tcytRs_rlufc","title":"init(body:)","roleHeading":"Initializer","modules":[{"name":"AWSLambdaRuntimeCore"}],"role":"symbol"},"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/closurehandler\/init(body:)-9o0yg"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-9o0yg","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initialize with a closure handler over a generic "},{"code":"Input","type":"codeVoice"},{"text":" type, and a ","type":"text"},{"type":"codeVoice","code":"Void"},{"text":" ","type":"text"},{"type":"codeVoice","code":"Output"},{"type":"text","text":"."}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler"]]},"kind":"symbol","sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"init"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"body"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","kind":"typeIdentifier","text":"LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"text":") ","kind":"text"},{"kind":"keyword","text":"where"},{"text":" ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":" == ()"}]}]},{"parameters":[{"name":"body","content":[{"inlineContent":[{"type":"text","text":"The handler function written as a closure."}],"type":"paragraph"}]}],"kind":"parameters"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","abstract":[{"text":"A ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"type":"text","text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ClosureHandler","kind":"identifier"}],"navigatorTitle":[{"text":"ClosureHandler","kind":"identifier"}],"title":"ClosureHandler","url":"\/documentation\/awslambdaruntimecore\/closurehandler","role":"symbol","type":"topic","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler/init(body:)-9o0yg":{"type":"topic","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"body"},{"kind":"text","text":": ("},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":")","kind":"text"}],"role":"symbol","title":"init(body:)","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-9o0yg","url":"\/documentation\/awslambdaruntimecore\/closurehandler\/init(body:)-9o0yg","abstract":[{"text":"Initialize with a closure handler over a generic ","type":"text"},{"code":"Input","type":"codeVoice"},{"type":"text","text":" type, and a "},{"type":"codeVoice","code":"Void"},{"text":" ","type":"text"},{"type":"codeVoice","code":"Output"},{"type":"text","text":"."}],"kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/deployment.json b/docs/data/documentation/awslambdaruntimecore/deployment.json new file mode 100644 index 00000000..407e8b25 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/deployment.json @@ -0,0 +1 @@ +{"kind":"article","schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/deployment"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Learn how to deploy your Swift Lambda functions to AWS.","type":"text"}],"metadata":{"roleHeading":"Article","role":"article","modules":[{"name":"AWSLambdaRuntimeCore"}],"title":"Deploying your Swift Lambda functions"},"primaryContentSections":[{"kind":"content","content":[{"text":"Overview","level":2,"type":"heading","anchor":"overview"},{"inlineContent":[{"type":"text","text":"There are multiple ways to deploy your Swift code to AWS Lambda. The very first time, you’ll probably use the AWS Console to create a new Lambda function and upload your code as a zip file. However, as you iterate on your code, you’ll want to automate the deployment process."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"To take full advantage of the cloud, we recommend using Infrastructure as Code (IaC) tools like the "},{"isActive":true,"type":"reference","identifier":"https:\/\/aws.amazon.com\/serverless\/sam\/"},{"type":"text","text":" or "},{"isActive":true,"type":"reference","identifier":"https:\/\/aws.amazon.com\/cdk\/"},{"text":". These tools allow you to define your infrastructure and deployment process as code, which can be version-controlled and automated.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"In this section, we show you how to deploy your Swift Lambda functions using different AWS Tools. Alternatively, you might also consider using popular third-party tools like ","type":"text"},{"identifier":"https:\/\/www.serverless.com\/","isActive":true,"type":"reference"},{"type":"text","text":", "},{"type":"reference","identifier":"https:\/\/www.terraform.io\/","isActive":true},{"type":"text","text":", or "},{"type":"reference","identifier":"https:\/\/www.pulumi.com\/","isActive":true},{"type":"text","text":" to deploy Lambda functions and create and manage AWS infrastructure."}]},{"type":"paragraph","inlineContent":[{"text":"Here is the content of this guide:","type":"text"}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"isActive":true,"type":"reference","identifier":"#prerequisites"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"identifier":"#choosing-the-aws-region-where-to-deploy","isActive":true,"type":"reference"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"reference","isActive":true,"identifier":"#the-lambda-execution-iam-role"}]}]},{"content":[{"inlineContent":[{"type":"reference","identifier":"#deploy-your-lambda-function-with-the-aws-console","isActive":true}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"identifier":"#deploy-your-lambda-function-with-the-aws-command-line-interface-cli","type":"reference","isActive":true}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"identifier":"#deploy-your-lambda-function-with-aws-serverless-application-model-sam","type":"reference","isActive":true}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"isActive":true,"type":"reference","identifier":"#deploy-your-lambda-function-with-aws-cloud-development-kit-cdk"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"identifier":"#third-party-tools","type":"reference","isActive":true}]}]}]},{"type":"heading","level":2,"text":"Prerequisites","anchor":"Prerequisites"},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Your AWS Account"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"To deploy a Lambda function on AWS, you need an AWS account. If you don’t have one yet, you can create a new account at "},{"type":"reference","isActive":true,"identifier":"https:\/\/signin.aws.amazon.com\/signup?request_type=register"},{"text":". It takes a few minutes to register. A credit card is required.","type":"text"}]},{"inlineContent":[{"text":"We do not recommend using the root credentials you entered at account creation time for day-to-day work. Instead, create an ","type":"text"},{"type":"reference","identifier":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/id_users.html","isActive":true},{"type":"text","text":" with the necessary permissions and use its credentials."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Follow the steps in "},{"identifier":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/id_users_create.html","isActive":true,"type":"reference"},{"text":".","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We suggest to attach the "},{"type":"codeVoice","code":"AdministratorAccess"},{"type":"text","text":" policy to the user for the initial setup. For production workloads, you should follow the principle of least privilege and grant only the permissions required for your users. The "},{"identifier":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/access_policies_managed-vs-inline.html#aws-managed-policies","type":"reference","isActive":true},{"type":"text","text":" to manage all resources on the AWS account."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"AWS Security Credentials"}]},{"type":"paragraph","inlineContent":[{"identifier":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/security-creds.html","type":"reference","isActive":true},{"type":"text","text":" are required to access the AWS console, AWS APIs, or to let tools access your AWS account."}]},{"inlineContent":[{"type":"text","text":"AWS Security Credentials can be "},{"type":"strong","inlineContent":[{"type":"text","text":"long-term credentials"}]},{"text":" (for example, an Access Key ID and a Secret Access Key attached to your IAM user) or ","type":"text"},{"inlineContent":[{"type":"text","text":"temporary credentials"}],"type":"strong"},{"type":"text","text":" obtained via other AWS API, such as when accessing AWS through single sign-on (SSO) or when assuming an IAM role."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"To follow the steps in this guide, you need to know your AWS Access Key ID and Secret Access Key. If you don’t have them, you can create them in the AWS Management Console. Follow the steps in "},{"type":"reference","isActive":true,"identifier":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/id_credentials_access-keys.html#Using_CreateAccessKey"},{"type":"text","text":"."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"When you use SSO with your enterprise identity tools (such as Microsoft entra ID –formerly Active Directory–, Okta, and others) or when you write scripts or code assuming an IAM role, you receive temporary credentials. These credentials are valid for a limited time, have a limited scope, and are rotated automatically. You can use them in the same way as long-term credentials. In addition to an AWS Access Key and Secret Access Key, temporary credentials include a session token."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here is a typical set of temporary credentials (redacted for security)."}]},{"syntax":"json","code":["{"," \"Credentials\": {"," \"AccessKeyId\": \"ASIA...FFSD\","," \"SecretAccessKey\": \"Xn...NL\","," \"SessionToken\": \"IQ...pV\","," \"Expiration\": \"2024-11-23T11:32:30+00:00\""," }","}"],"type":"codeListing"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"A Swift Lambda function to deploy."}]},{"inlineContent":[{"type":"text","text":"You need a Swift Lambda function to deploy. If you don’t have one yet, you can use one of the examples in the "},{"identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/tree\/main\/Examples","type":"reference","isActive":true},{"text":" directory.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"Compile and package the function using the following command","type":"text"}],"type":"paragraph"},{"code":["swift package archive --allow-network-connections docker"],"syntax":"sh","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"This command creates a ZIP file with the compiled Swift code. The ZIP file is located in the ","type":"text"},{"type":"codeVoice","code":".build\/plugins\/AWSLambdaPackager\/outputs\/AWSLambdaPackager\/MyLambda\/MyLambda.zip"},{"type":"text","text":" folder."}]},{"inlineContent":[{"type":"text","text":"The name of the ZIP file depends on the target name you entered in the "},{"type":"codeVoice","code":"Package.swift"},{"type":"text","text":" file."}],"type":"paragraph"},{"content":[{"type":"paragraph","inlineContent":[{"text":"[!NOTE]","type":"text"},{"type":"text","text":" "},{"type":"text","text":"When building on Linux, your current user must have permission to use docker. On most Linux distributions, you can do so by adding your user to the "},{"type":"codeVoice","code":"docker"},{"type":"text","text":" group with the following command: "},{"code":"sudo usermod -aG docker $USER","type":"codeVoice"},{"type":"text","text":". You must log out and log back in for the changes to take effect."}]}],"style":"note","name":"Note","type":"aside"}]}]},{"level":2,"type":"heading","text":"Choosing the AWS Region where to deploy","anchor":"Choosing-the-AWS-Region-where-to-deploy"},{"inlineContent":[{"type":"reference","identifier":"https:\/\/aws.amazon.com\/about-aws\/global-infrastructure\/","isActive":true},{"text":" spans over 34 geographic Regions (and continuously expanding). When you create a resource on AWS, such as a Lambda function, you have to select a geographic region where the resource will be created. The two main factors to consider to select a Region are the physical proximity with your users and geographical compliance.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Physical proximity helps you reduce the network latency between the Lambda function and your customers. For example, when the majority of your users are located in South-East Asia, you might consider deploying in the Singapore, the Malaysia, or Jakarta Region."}]},{"inlineContent":[{"type":"text","text":"Geographical compliance, also known as data residency compliance, involves following location-specific regulations about how and where data can be stored and processed."}],"type":"paragraph"},{"type":"heading","anchor":"The-Lambda-execution-IAM-role","level":2,"text":"The Lambda execution IAM role"},{"type":"paragraph","inlineContent":[{"text":"A Lambda execution role is an AWS Identity and Access Management (IAM) role that grants your Lambda function the necessary permissions to interact with other AWS services and resources. Think of it as a security passport that determines what your function is allowed to do within AWS. For example, if your Lambda function needs to read files from Amazon S3, write logs to Amazon CloudWatch, or access an Amazon DynamoDB table, the execution role must include the appropriate permissions for these actions.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When you create a Lambda function, you must specify an execution role. This role contains two main components: a trust policy that allows the Lambda service itself to assume the role, and permission policies that determine what AWS resources the function can access. By default, Lambda functions get basic permissions to write logs to CloudWatch Logs, but any additional permissions (like accessing S3 buckets or sending messages to SQS queues) must be explicitly added to the role’s policies. Following the principle of least privilege, it’s recommended to grant only the minimum permissions necessary for your function to operate, helping maintain the security of your serverless applications."}]},{"text":"Deploy your Lambda function with the AWS Console","anchor":"Deploy-your-Lambda-function-with-the-AWS-Console","level":2,"type":"heading"},{"inlineContent":[{"type":"text","text":"In this section, we deploy the HelloWorld example function using the AWS Console. The HelloWorld function is a simple function that takes a "},{"type":"codeVoice","code":"String"},{"text":" as input and returns a ","type":"text"},{"type":"codeVoice","code":"String"},{"type":"text","text":"."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Authenticate on the AWS console using your IAM username and password. On the top right side, select the AWS Region where you want to deploy, then navigate to the Lambda section."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"identifier":"console-10-regions","type":"image"}]},{"level":3,"type":"heading","anchor":"Create-the-function","text":"Create the function"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Select "},{"type":"strong","inlineContent":[{"text":"Create a function","type":"text"}]},{"text":" to create a function.","type":"text"}]},{"type":"paragraph","inlineContent":[{"identifier":"console-20-dashboard","type":"image"}]},{"type":"paragraph","inlineContent":[{"text":"Select ","type":"text"},{"inlineContent":[{"type":"text","text":"Author function from scratch"}],"type":"strong"},{"text":". Enter a ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Function name"}]},{"type":"text","text":" ("},{"type":"codeVoice","code":"HelloWorld"},{"type":"text","text":") and select "},{"type":"codeVoice","code":"Amazon Linux 2"},{"text":" as ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Runtime"}]},{"text":".","type":"text"},{"text":" ","type":"text"},{"text":"Select the architecture. When you compile your Swift code on a x84_64 machine, such as an Intel Mac, select ","type":"text"},{"code":"x86_64","type":"codeVoice"},{"type":"text","text":". When you compile your Swift code on an Arm machine, such as the Apple Silicon M1 or more recent, select "},{"code":"arm64","type":"codeVoice"},{"type":"text","text":"."}]},{"inlineContent":[{"type":"text","text":"Select "},{"inlineContent":[{"text":"Create function","type":"text"}],"type":"strong"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"image","identifier":"console-30-create-function"}]},{"type":"paragraph","inlineContent":[{"text":"On the right side, select ","type":"text"},{"inlineContent":[{"type":"text","text":"Upload from"}],"type":"strong"},{"text":" and select ","type":"text"},{"inlineContent":[{"text":".zip file","type":"text"}],"type":"strong"},{"type":"text","text":"."}]},{"inlineContent":[{"type":"image","identifier":"console-40-select-zip-file"}],"type":"paragraph"},{"inlineContent":[{"text":"Select the zip file created with the ","type":"text"},{"type":"codeVoice","code":"swift package archive --allow-network-connections docker"},{"type":"text","text":" command as described in the "},{"overridingTitle":"Prerequisites","isActive":true,"identifier":"#prerequisites","type":"reference","overridingTitleInlineContent":[{"text":"Prerequisites","type":"text"}]},{"type":"text","text":" section."}],"type":"paragraph"},{"inlineContent":[{"text":"Select ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Save"}]}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"identifier":"console-50-upload-zip","type":"image"}]},{"inlineContent":[{"type":"text","text":"You’re now ready to test your function."}],"type":"paragraph"},{"level":3,"text":"Invoke the function","anchor":"Invoke-the-function","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Select the ","type":"text"},{"type":"strong","inlineContent":[{"text":"Test","type":"text"}]},{"text":" tab in the console and prepare a payload to send to your Lambda function. In this example, you’ve deployed the ","type":"text"},{"type":"reference","isActive":true,"identifier":"Exmaples.HelloWorld\/README.md"},{"type":"text","text":" example function. As explained, the function takes a "},{"code":"String","type":"codeVoice"},{"text":" as input and returns a ","type":"text"},{"code":"String","type":"codeVoice"},{"type":"text","text":". we will therefore create a test event with a JSON payload that contains a "},{"code":"String","type":"codeVoice"},{"text":".","type":"text"}]},{"inlineContent":[{"type":"text","text":"Select "},{"inlineContent":[{"text":"Create new event","type":"text"}],"type":"strong"},{"type":"text","text":". Enter an "},{"type":"strong","inlineContent":[{"type":"text","text":"Event name"}]},{"text":". Enter ","type":"text"},{"code":"\"Swift on Lambda\"","type":"codeVoice"},{"type":"text","text":" as "},{"type":"strong","inlineContent":[{"type":"text","text":"Event JSON"}]},{"type":"text","text":". Note that the payload must be a valid JSON document, hence we use surrounding double quotes ("},{"type":"codeVoice","code":"\""},{"text":").","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Select "},{"type":"strong","inlineContent":[{"text":"Test","type":"text"}]},{"text":" on the upper right side of the screen.","type":"text"}]},{"inlineContent":[{"identifier":"console-60-prepare-test-event","type":"image"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"The response of the invocation and additional meta data appear in the green section of the page."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can see the response from the Swift code: "},{"code":"Hello Swift on Lambda","type":"codeVoice"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"text":"The function consumed 109.60ms of execution time, out of this 83.72ms where spent to initialize this new runtime. This initialization time is known as Lambda cold start time.","type":"text"}]},{"type":"aside","name":"Note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Lambda cold start time refers to the initial delay that occurs when a Lambda function is invoked for the first time or after being idle for a while. Cold starts happen because AWS needs to provision and initialize a new container, load your code, and start your runtime environment (in this case, the Swift runtime). This delay is particularly noticeable for the first invocation, but subsequent invocations (known as “warm starts”) are typically much faster because the container and runtime are already initialized and ready to process requests. Cold starts are an important consideration when architecting serverless applications, especially for latency-sensitive workloads. Usually, compiled languages, such as Swift, Go, and Rust, have shorter cold start times compared to interpreted languages, such as Python, Java, Ruby, and Node.js."}]}],"style":"note"},{"type":"codeListing","syntax":"text","code":["","![Console - view invocation result](console-70-view-invocation-response)","","Select **Test** to invoke the function again with the same payload. ","","Observe the results. No initialization time is reported because the Lambda execution environment was ready after the first invocation. The runtime duration of the second invocation is 1.12ms.","","```text","REPORT RequestId: f789fbb6-10d9-4ba3-8a84-27aa283369a2\tDuration: 1.12 ms\tBilled Duration: 2 ms\tMemory Size: 128 MB\tMax Memory Used: 26 MB\t"]},{"inlineContent":[{"text":"AWS lambda charges usage per number of invocations and the CPU time, rounded to the next millisecond. AWS Lambda offers a generous free-tier of 1 million invocation each month and 400,000 GB-seconds of compute time per month. See ","type":"text"},{"type":"reference","identifier":"https:\/\/aws.amazon.com\/lambda\/pricing\/","isActive":true},{"type":"text","text":" for the details."}],"type":"paragraph"},{"anchor":"Delete-the-function","type":"heading","text":"Delete the function","level":3},{"type":"paragraph","inlineContent":[{"text":"When you’re finished with testing, you can delete the Lambda function and the IAM execution role that the console created automatically.","type":"text"}]},{"inlineContent":[{"type":"text","text":"While you are on the "},{"type":"codeVoice","code":"HelloWorld"},{"type":"text","text":" function page in the AWS console, select "},{"inlineContent":[{"text":"Actions","type":"text"}],"type":"strong"},{"type":"text","text":", then "},{"type":"strong","inlineContent":[{"text":"Delete function","type":"text"}]},{"text":" in the menu on the top-right part of the page.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"identifier":"console-80-delete-function","type":"image"}]},{"type":"paragraph","inlineContent":[{"text":"Then, navigate to the IAM section of the AWS console. Select ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Roles"}]},{"text":" on the right-side menu and search for ","type":"text"},{"code":"HelloWorld","type":"codeVoice"},{"text":". The console appended some random characters to role name. The name you see on your console is different that the one on the screenshot.","type":"text"}]},{"inlineContent":[{"text":"Select the ","type":"text"},{"type":"codeVoice","code":"HelloWorld-role-xxxx"},{"text":" role and select ","type":"text"},{"type":"strong","inlineContent":[{"text":"Delete","type":"text"}]},{"text":". Confirm the deletion by entering the role name again, and select ","type":"text"},{"inlineContent":[{"type":"text","text":"Delete"}],"type":"strong"},{"text":" on the confirmation box.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"image","identifier":"console-80-delete-role"}]},{"anchor":"Deploy-your-Lambda-function-with-the-AWS-Command-Line-Interface-CLI","type":"heading","level":2,"text":"Deploy your Lambda function with the AWS Command Line Interface (CLI)"},{"inlineContent":[{"type":"text","text":"You can deploy your Lambda function using the AWS Command Line Interface (CLI). The CLI is a unified tool to manage your AWS services from the command line and automate your operations through scripts. The CLI is available for Windows, macOS, and Linux. Follow the "},{"identifier":"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/getting-started-install.html","isActive":true,"type":"reference"},{"type":"text","text":" and "},{"isActive":true,"identifier":"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-configure-quickstart.html","type":"reference"},{"type":"text","text":" instructions in the AWS CLI User Guide."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"In this example, we’re building the HelloWorld example from the ","type":"text"},{"overridingTitle":"Examples","type":"reference","overridingTitleInlineContent":[{"type":"text","text":"Examples"}],"identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/tree\/main\/Examples","isActive":true},{"type":"text","text":" directory."}]},{"type":"heading","level":3,"text":"Create the function","anchor":"Create-the-function"},{"inlineContent":[{"type":"text","text":"To create a function, you must first create the function execution role and define the permission. Then, you create the function with the "},{"type":"codeVoice","code":"create-function"},{"type":"text","text":" command."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"The command assumes you’ve already created the ZIP file with the ","type":"text"},{"type":"codeVoice","code":"swift package archive --allow-network-connections docker"},{"text":" command, as described in the ","type":"text"},{"isActive":true,"overridingTitleInlineContent":[{"type":"text","text":"Prerequisites"}],"identifier":"#prerequisites","type":"reference","overridingTitle":"Prerequisites"},{"text":" section.","type":"text"}]},{"code":["# enter your AWS Account ID ","export AWS_ACCOUNT_ID=123456789012","","# Allow the Lambda service to assume the execution role","cat < assume-role-policy.json","{"," \"Version\": \"2012-10-17\","," \"Statement\": ["," {"," \"Effect\": \"Allow\","," \"Principal\": {"," \"Service\": \"lambda.amazonaws.com\""," },"," \"Action\": \"sts:AssumeRole\""," }"," ]","}","EOF","","# Create the execution role","aws iam create-role \\","--role-name lambda_basic_execution \\","--assume-role-policy-document file:\/\/assume-role-policy.json","","# create permissions to associate with the role","cat < permissions.json","{"," \"Version\": \"2012-10-17\","," \"Statement\": ["," {"," \"Effect\": \"Allow\","," \"Action\": ["," \"logs:CreateLogGroup\","," \"logs:CreateLogStream\","," \"logs:PutLogEvents\""," ],"," \"Resource\": \"arn:aws:logs:*:*:*\""," }"," ]","}","EOF","","# Attach the permissions to the role","aws iam put-role-policy \\","--role-name lambda_basic_execution \\","--policy-name lambda_basic_execution_policy \\","--policy-document file:\/\/permissions.json","","# Create the Lambda function","aws lambda create-function \\","--function-name MyLambda \\","--zip-file fileb:\/\/.build\/plugins\/AWSLambdaPackager\/outputs\/AWSLambdaPackager\/MyLambda\/MyLambda.zip \\","--runtime provided.al2 \\","--handler provided \\","--architectures arm64 \\","--role arn:aws:iam::${AWS_ACCOUNT_ID}:role\/lambda_basic_execution"],"type":"codeListing","syntax":"sh"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"--architectures"},{"text":" flag is only required when you build the binary on an Apple Silicon machine (Apple M1 or more recent). It defaults to ","type":"text"},{"type":"codeVoice","code":"x64"},{"text":".","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"To update the function, use the ","type":"text"},{"type":"codeVoice","code":"update-function-code"},{"type":"text","text":" command after you’ve recompiled and archived your code again with the "},{"code":"swift package archive","type":"codeVoice"},{"type":"text","text":" command."}]},{"type":"codeListing","syntax":"sh","code":["aws lambda update-function-code \\","--function-name MyLambda \\","--zip-file fileb:\/\/.build\/plugins\/AWSLambdaPackager\/outputs\/AWSLambdaPackager\/MyLambda\/MyLambda.zip"]},{"level":3,"type":"heading","anchor":"Invoke-the-function","text":"Invoke the function"},{"inlineContent":[{"text":"Use the ","type":"text"},{"type":"codeVoice","code":"invoke-function"},{"text":" command to invoke the function. You can pass a well-formed JSON payload as input to the function. The payload must be encoded in base64. The CLI returns the status code and stores the response in a file.","type":"text"}],"type":"paragraph"},{"code":["# invoke the function","aws lambda invoke \\","--function-name MyLambda \\","--payload $(echo \\\"Swift Lambda function\\\" | base64) \\","out.txt","","# show the response","cat out.txt","","# delete the response file","rm out.txt"],"syntax":"sh","type":"codeListing"},{"level":3,"type":"heading","anchor":"Delete-the-function","text":"Delete the function"},{"inlineContent":[{"type":"text","text":"To cleanup, first delete the Lambda funtion, then delete the IAM role."}],"type":"paragraph"},{"code":["# delete the Lambda function","aws lambda delete-function --function-name MyLambda","","# delete the IAM policy attached to the role","aws iam delete-role-policy --role-name lambda_basic_execution --policy-name lambda_basic_execution_policy","","# delete the IAM role","aws iam delete-role --role-name lambda_basic_execution"],"type":"codeListing","syntax":"sh"},{"anchor":"Deploy-your-Lambda-function-with-AWS-Serverless-Application-Model-SAM","text":"Deploy your Lambda function with AWS Serverless Application Model (SAM)","type":"heading","level":2},{"inlineContent":[{"type":"text","text":"AWS Serverless Application Model (SAM) is an open-source framework for building serverless applications. It provides a simplified way to define the Amazon API Gateway APIs, AWS Lambda functions, and Amazon DynamoDB tables needed by your serverless application. You can define your serverless application in a single file, and SAM will use it to deploy your function and all its dependencies."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To use SAM, you need to "},{"identifier":"https:\/\/docs.aws.amazon.com\/serverless-application-model\/latest\/developerguide\/serverless-sam-cli-install.html","isActive":true,"type":"reference"},{"type":"text","text":" on your machine. The SAM CLI provides a set of commands to package, deploy, and manage your serverless applications."}]},{"type":"paragraph","inlineContent":[{"text":"Use SAM when you want to deploy more than a Lambda function. SAM helps you to create additional resources like an API Gateway, an S3 bucket, or a DynamoDB table, and manage the permissions between them.","type":"text"}]},{"type":"heading","anchor":"Create-the-function","level":3,"text":"Create the function"},{"inlineContent":[{"text":"We assume your Swift function is compiled and packaged, as described in the ","type":"text"},{"type":"reference","overridingTitle":"Prerequisites","identifier":"#prerequisites","overridingTitleInlineContent":[{"type":"text","text":"Prerequisites"}],"isActive":true},{"type":"text","text":" section."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When using SAM, you describe the infrastructure you want to deploy in a YAML file. The file contains the definition of the Lambda function, the IAM role, and the permissions needed by the function. The SAM CLI uses this file to package and deploy your function."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can create a SAM template to define a REST API implemented by AWS API Gateway and a Lambda function with the following command"}]},{"code":["cat < template.yaml","AWSTemplateFormatVersion: '2010-09-09'","Transform: AWS::Serverless-2016-10-31","Description: SAM Template for APIGateway Lambda Example","","Resources:"," # Lambda function"," APIGatewayLambda:"," Type: AWS::Serverless::Function"," Properties:"," # the directory name and ZIP file names depends on the Swift executable target name"," CodeUri: .build\/plugins\/AWSLambdaPackager\/outputs\/AWSLambdaPackager\/APIGatewayLambda\/APIGatewayLambda.zip"," Timeout: 60"," Handler: swift.bootstrap # ignored by the Swift runtime"," Runtime: provided.al2"," MemorySize: 512"," Architectures:"," - arm64"," # The events that will trigger this function "," Events:"," HttpApiEvent:"," Type: HttpApi # AWS API Gateway v2","","Outputs:"," # display API Gateway endpoint"," APIGatewayEndpoint:"," Description: \"API Gateway endpoint URI\""," Value: !Sub \"https:\/\/${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com\"","EOF"],"syntax":"sh","type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In this example, the Lambda function must accept an APIGateway v2 JSON payload as input parameter and return a valid APIGAteway v2 JSON response. See the example code in the "},{"type":"reference","identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/blob\/main\/Examples\/APIGateway\/README.md","isActive":true},{"text":".","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"To deploy the function with SAM, use the "},{"type":"codeVoice","code":"sam deploy"},{"type":"text","text":" command. The very first time you deploy a function, you should use the "},{"type":"codeVoice","code":"--guided"},{"text":" flag to configure the deployment. The command will ask you a series of questions to configure the deployment.","type":"text"}]},{"inlineContent":[{"type":"text","text":"Here is the command to deploy the function with SAM:"}],"type":"paragraph"},{"type":"codeListing","syntax":"sh","code":["# start the first deployment ","sam deploy --guided ","","Configuring SAM deploy","======================",""," Looking for config file [samconfig.toml] : Not found",""," Setting default arguments for 'sam deploy'"," ========================================="," Stack Name [sam-app]: APIGatewayLambda"," AWS Region [us-east-1]: "," #Shows you resources changes to be deployed and require a 'Y' to initiate deploy"," Confirm changes before deploy [y\/N]: n"," #SAM needs permission to be able to create roles to connect to the resources in your template"," Allow SAM CLI IAM role creation [Y\/n]: y"," #Preserves the state of previously provisioned resources when an operation fails"," Disable rollback [y\/N]: n"," APIGatewayLambda has no authentication. Is this okay? [y\/N]: y"," Save arguments to configuration file [Y\/n]: y"," SAM configuration file [samconfig.toml]: "," SAM configuration environment [default]: ",""," Looking for resources needed for deployment:","","(redacted for brevity)","","CloudFormation outputs from deployed stack","--------------------------------------------------------------------------------","Outputs ","--------------------------------------------------------------------------------","Key APIGatewayEndpoint ","Description API Gateway endpoint URI\" ","Value https:\/\/59i4uwbuj2.execute-api.us-east-1.amazonaws.com ","--------------------------------------------------------------------------------","","","Successfully created\/updated stack - APIGAtewayLambda in us-east-1 "]},{"inlineContent":[{"type":"text","text":"To update your function or any other AWS service defined in your YAML file, you can use the "},{"code":"sam deploy","type":"codeVoice"},{"text":" command without the ","type":"text"},{"type":"codeVoice","code":"--guided"},{"type":"text","text":" flag."}],"type":"paragraph"},{"level":3,"type":"heading","anchor":"Invoke-the-function","text":"Invoke the function"},{"type":"paragraph","inlineContent":[{"type":"text","text":"SAM allows you to invoke the function locally and remotely."}]},{"inlineContent":[{"type":"text","text":"Local invocations allows you to test your code before uploading it. It requires docker to run."}],"type":"paragraph"},{"type":"codeListing","code":["# First, generate a sample event","sam local generate-event apigateway http-api-proxy > event.json ","","# Next, invoke the function locally","sam local invoke -e .\/event.json","","START RequestId: 3f5096c6-0fd3-4605-b03e-d46658e6b141 Version: $LATEST","END RequestId: 3134f067-9396-4f4f-bebb-3c63ef745803","REPORT RequestId: 3134f067-9396-4f4f-bebb-3c63ef745803 Init Duration: 0.04 ms Duration: 38.38 msBilled Duration: 39 ms Memory Size: 512 MB Max Memory Used: 512 MB","{\"body\": \"{\\\"version\\\":\\\"2.0\\\",\\\"routeKey\\\":\\\"$default\\\",\\\"rawPath\\\":\\\"\\\\\/path\\\\\/to\\\\\/resource\\\",... REDACTED FOR BREVITY ...., \"statusCode\": 200, \"headers\": {\"content-type\": \"application\/json\"}}"],"syntax":"sh"},{"content":[{"type":"paragraph","inlineContent":[{"text":"If you’ve previously authenticated to Amazon ECR Public and your auth token has expired, you may receive an authentication error when attempting to do unauthenticated docker pulls from Amazon ECR Public. To resolve this issue, it may be necessary to run ","type":"text"},{"type":"codeVoice","code":"docker logout public.ecr.aws"},{"text":" to avoid the error. This will result in an unauthenticated pull. For more information, see ","type":"text"},{"identifier":"https:\/\/docs.aws.amazon.com\/AmazonECR\/latest\/public\/public-troubleshooting.html#public-troubleshooting-authentication","type":"reference","isActive":true},{"type":"text","text":"."}]}],"style":"note","type":"aside","name":"Note"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Remote invocations are done with the "},{"type":"codeVoice","code":"sam remote invoke"},{"type":"text","text":" command."}]},{"type":"codeListing","code":["sam remote invoke \\"," --stack-name APIGatewayLambda \\"," --event-file .\/event.json","","Invoking Lambda Function APIGatewayLambda ","START RequestId: ec8082c5-933b-4176-9c63-4c8fb41ca259 Version: $LATEST","END RequestId: ec8082c5-933b-4176-9c63-4c8fb41ca259","REPORT RequestId: ec8082c5-933b-4176-9c63-4c8fb41ca259 Duration: 6.01 ms Billed Duration: 7 ms Memory Size: 512 MB Max Memory Used: 35 MB","{\"body\":\"{\\\"stageVariables\\\":{\\\"stageVariable1\\\":\\\"value1\\\",\\\"stageVariable2\\\":\\\"value2\\\"},\\\"rawPath\\\":\\\"\\\\\\\/path\\\\\\\/to\\\\\\\/resource\\\",\\\"routeKey\\\":\\\"$default\\\",\\\"cookies\\\":[\\\"cookie1\\\",\\\"cookie2\\\"] ... REDACTED FOR BREVITY ... \\\"statusCode\\\":200,\"headers\":{\"content-type\":\"application\/json\"}} "],"syntax":"sh"},{"type":"paragraph","inlineContent":[{"text":"SAM allows you to access the function logs from Amazon Cloudwatch.","type":"text"}]},{"type":"codeListing","syntax":"sh","code":["sam logs --stack-name APIGatewayLambda","","Access logging is disabled for HTTP API ID (g9m53sn7xa) ","2024\/12\/19\/[$LATEST]4dd42d66282145a2964ff13dfcd5dc65 2024-12-19T10:16:25.593000 INIT_START Runtime Version: provided:al2.v75 Runtime Version ARN: arn:aws:lambda:us-east-1::runtime:4f3438ed7de2250cc00ea1260c3dc3cd430fad27835d935a02573b6cf07ceed8","2024\/12\/19\/[$LATEST]4dd42d66282145a2964ff13dfcd5dc65 2024-12-19T10:16:25.715000 START RequestId: d8afa647-8361-4bce-a817-c57b92a060af Version: $LATEST","2024\/12\/19\/[$LATEST]4dd42d66282145a2964ff13dfcd5dc65 2024-12-19T10:16:25.758000 END RequestId: d8afa647-8361-4bce-a817-c57b92a060af","2024\/12\/19\/[$LATEST]4dd42d66282145a2964ff13dfcd5dc65 2024-12-19T10:16:25.758000 REPORT RequestId: d8afa647-8361-4bce-a817-c57b92a060af Duration: 40.74 ms Billed Duration: 162 ms Memory Size: 512 MB Max Memory Used: 34 MB Init Duration: 120.64 ms","2024\/12\/19\/[$LATEST]4dd42d66282145a2964ff13dfcd5dc65 2024-12-19T10:17:10.343000 START RequestId: ec8082c5-933b-4176-9c63-4c8fb41ca259 Version: $LATEST","2024\/12\/19\/[$LATEST]4dd42d66282145a2964ff13dfcd5dc65 2024-12-19T10:17:10.350000 END RequestId: ec8082c5-933b-4176-9c63-4c8fb41ca259","2024\/12\/19\/[$LATEST]4dd42d66282145a2964ff13dfcd5dc65 2024-12-19T10:17:10.350000 REPORT RequestId: ec8082c5-933b-4176-9c63-4c8fb41ca259 Duration: 6.01 ms Billed Duration: 7 ms Memory Size: 512 MB Max Memory Used: 35 MB"]},{"type":"paragraph","inlineContent":[{"text":"You can also tail the logs with the ","type":"text"},{"type":"codeVoice","code":"-t, --tail"},{"text":" flag.","type":"text"}]},{"type":"heading","text":"Delete the function","anchor":"Delete-the-function","level":3},{"type":"paragraph","inlineContent":[{"type":"text","text":"SAM allows you to delete your function and all infrastructure that is defined in the YAML template with just one command."}]},{"type":"codeListing","code":["sam delete","","Are you sure you want to delete the stack APIGatewayLambda in the region us-east-1 ? [y\/N]: y","Are you sure you want to delete the folder APIGatewayLambda in S3 which contains the artifacts? [y\/N]: y","- Deleting S3 object with key APIGatewayLambda\/1b5a27c048549382462bd8ea589f7cfe ","- Deleting S3 object with key APIGatewayLambda\/396d2c434ecc24aaddb670bd5cca5fe8.template ","- Deleting Cloudformation stack APIGatewayLambda","","Deleted successfully"],"syntax":"sh"},{"text":"Deploy your Lambda function with the AWS Cloud Development Kit (CDK)","level":2,"type":"heading","anchor":"Deploy-your-Lambda-function-with-the-AWS-Cloud-Development-Kit-CDK"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The AWS Cloud Development Kit is an open-source software development framework to define cloud infrastructure in code and provision it through AWS CloudFormation. The CDK provides high-level constructs that preconfigure AWS resources with best practices, and you can use familiar programming languages like TypeScript, Javascript, Python, Java, C#, and Go to define your infrastructure."}]},{"inlineContent":[{"text":"To use the CDK, you need to ","type":"text"},{"type":"reference","identifier":"https:\/\/docs.aws.amazon.com\/cdk\/v2\/guide\/getting_started.html","isActive":true},{"type":"text","text":" on your machine. The CDK CLI provides a set of commands to manage your CDK projects."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Use the CDK when you want to define your infrastructure in code and manage the deployment of your Lambda function and other AWS services.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This example deploys the [APIGateway]((https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/blob\/main\/Examples\/APIGateway\/) example code. It comprises a Lambda function that implements a REST API and an API Gateway to expose the function over HTTPS."}]},{"level":3,"text":"Create a CDK project","type":"heading","anchor":"Create-a-CDK-project"},{"type":"paragraph","inlineContent":[{"text":"To create a new CDK project, use the ","type":"text"},{"code":"cdk init","type":"codeVoice"},{"type":"text","text":" command. The command creates a new directory with the project structure and the necessary files to define your infrastructure."}]},{"code":["# In your Swift Lambda project folder","mkdir infra && cd infra","cdk init app --language typescript"],"syntax":"sh","type":"codeListing"},{"inlineContent":[{"type":"text","text":"In this example, the code to create a Swift Lambda function with the CDK is written in TypeScript. The following code creates a new Lambda function with the "},{"code":"swift","type":"codeVoice"},{"text":" runtime.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"It requires the "},{"code":"@aws-cdk\/aws-lambda","type":"codeVoice"},{"type":"text","text":" package to define the Lambda function. You can install the dependency with the following command:"}]},{"type":"codeListing","code":["npm install aws-cdk-lib constructs"],"syntax":"sh"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Then, in the lib folder, create a new file named "},{"code":"swift-lambda-stack.ts","type":"codeVoice"},{"type":"text","text":" with the following content:"}]},{"type":"codeListing","syntax":"typescript","code":["import * as cdk from 'aws-cdk-lib';","import * as lambda from 'aws-cdk-lib\/aws-lambda';","","export class LambdaApiStack extends cdk.Stack {"," constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {"," super(scope, id, props);",""," \/\/ Create the Lambda function"," const lambdaFunction = new lambda.Function(this, 'SwiftLambdaFunction', {"," runtime: lambda.Runtime.PROVIDED_AL2,"," architecture: lambda.Architecture.ARM_64,"," handler: 'bootstrap',"," code: lambda.Code.fromAsset('..\/.build\/plugins\/AWSLambdaPackager\/outputs\/AWSLambdaPackager\/APIGatewayLambda\/APIGatewayLambda.zip'),"," memorySize: 512,"," timeout: cdk.Duration.seconds(30),"," environment: {"," LOG_LEVEL: 'debug',"," },"," });"," }","} "]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The code assumes you already built and packaged the APIGateway Lambda function with the "},{"code":"swift package archive --allow-network-connections docker","type":"codeVoice"},{"text":" command, as described in the ","type":"text"},{"overridingTitleInlineContent":[{"text":"Prerequisites","type":"text"}],"isActive":true,"overridingTitle":"Prerequisites","type":"reference","identifier":"#prerequisites"},{"type":"text","text":" section."}]},{"inlineContent":[{"type":"text","text":"You can write code to add an API Gateway to invoke your Lambda function. The following code creates an HTTP API Gateway that triggers the Lambda function."}],"type":"paragraph"},{"syntax":"typescript","code":["\/\/ in the import section at the top","import * as apigateway from 'aws-cdk-lib\/aws-apigatewayv2';","import { HttpLambdaIntegration } from 'aws-cdk-lib\/aws-apigatewayv2-integrations';","","\/\/ in the constructor, after having created the Lambda function","\/\/ ...",""," \/\/ Create the API Gateway"," const httpApi = new apigateway.HttpApi(this, 'HttpApi', {"," defaultIntegration: new HttpLambdaIntegration({"," handler: lambdaFunction,"," }),"," });",""," \/\/ Output the API Gateway endpoint"," new cdk.CfnOutput(this, 'APIGatewayEndpoint', {"," value: httpApi.url!,"," });","","\/\/ ... "],"type":"codeListing"},{"level":3,"text":"Deploy the infrastructure","anchor":"Deploy-the-infrastructure","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To deploy the infrastructure, type the following commands."}]},{"code":["# Change to the infra directory","cd infra","","# Install the dependencies (only before the first deployment)","npm install ","","# Deploy the infrastructure","cdk deploy","","✨ Synthesis time: 2.88s","... redacted for brevity ...","Do you wish to deploy these changes (y\/n)? y","... redacted for brevity ..."," ✅ LambdaApiStack","","✨ Deployment time: 42.96s","","Outputs:","LambdaApiStack.ApiUrl = https:\/\/tyqnjcawh0.execute-api.eu-central-1.amazonaws.com\/","Stack ARN:","arn:aws:cloudformation:eu-central-1:012345678901:stack\/LambdaApiStack\/e0054390-be05-11ef-9504-065628de4b89","","✨ Total time: 45.84s"],"syntax":"sh","type":"codeListing"},{"type":"heading","text":"Invoke your Lambda function","level":3,"anchor":"Invoke-your-Lambda-function"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To invoke the Lambda function, use this "},{"type":"codeVoice","code":"curl"},{"type":"text","text":" command line."}]},{"syntax":"bash","type":"codeListing","code":["curl https:\/\/tyqnjcawh0.execute-api.eu-central-1.amazonaws.com"]},{"type":"paragraph","inlineContent":[{"text":"Be sure to replace the URL with the API Gateway endpoint returned in the previous step.","type":"text"}]},{"inlineContent":[{"type":"text","text":"This should print a JSON similar to"}],"type":"paragraph"},{"code":["{\"version\":\"2.0\",\"rawPath\":\"\\\/\",\"isBase64Encoded\":false,\"rawQueryString\":\"\",\"headers\":{\"user-agent\":\"curl\\\/8.7.1\",\"accept\":\"*\\\/*\",\"host\":\"a5q74es3k2.execute-api.us-east-1.amazonaws.com\",\"content-length\":\"0\",\"x-amzn-trace-id\":\"Root=1-66fb0388-691f744d4bd3c99c7436a78d\",\"x-forwarded-port\":\"443\",\"x-forwarded-for\":\"81.0.0.43\",\"x-forwarded-proto\":\"https\"},\"requestContext\":{\"requestId\":\"e719cgNpoAMEcwA=\",\"http\":{\"sourceIp\":\"81.0.0.43\",\"path\":\"\\\/\",\"protocol\":\"HTTP\\\/1.1\",\"userAgent\":\"curl\\\/8.7.1\",\"method\":\"GET\"},\"stage\":\"$default\",\"apiId\":\"a5q74es3k2\",\"time\":\"30\\\/Sep\\\/2024:20:01:12 +0000\",\"timeEpoch\":1727726472922,\"domainPrefix\":\"a5q74es3k2\",\"domainName\":\"a5q74es3k2.execute-api.us-east-1.amazonaws.com\",\"accountId\":\"012345678901\"}"],"syntax":"bash","type":"codeListing"},{"inlineContent":[{"type":"text","text":"If you have "},{"code":"jq","type":"codeVoice"},{"text":" installed, you can use it to pretty print the output.","type":"text"}],"type":"paragraph"},{"code":["curl -s https:\/\/tyqnjcawh0.execute-api.eu-central-1.amazonaws.com | jq ","{"," \"version\": \"2.0\","," \"rawPath\": \"\/\","," \"requestContext\": {"," \"domainPrefix\": \"a5q74es3k2\","," \"stage\": \"$default\","," \"timeEpoch\": 1727726558220,"," \"http\": {"," \"protocol\": \"HTTP\/1.1\","," \"method\": \"GET\","," \"userAgent\": \"curl\/8.7.1\","," \"path\": \"\/\","," \"sourceIp\": \"81.0.0.43\""," },"," \"apiId\": \"a5q74es3k2\","," \"accountId\": \"012345678901\","," \"requestId\": \"e72KxgsRoAMEMSA=\","," \"domainName\": \"a5q74es3k2.execute-api.us-east-1.amazonaws.com\","," \"time\": \"30\/Sep\/2024:20:02:38 +0000\""," },"," \"rawQueryString\": \"\","," \"routeKey\": \"$default\","," \"headers\": {"," \"x-forwarded-for\": \"81.0.0.43\","," \"user-agent\": \"curl\/8.7.1\","," \"host\": \"a5q74es3k2.execute-api.us-east-1.amazonaws.com\","," \"accept\": \"*\/*\","," \"x-amzn-trace-id\": \"Root=1-66fb03de-07533930192eaf5f540db0cb\","," \"content-length\": \"0\","," \"x-forwarded-proto\": \"https\","," \"x-forwarded-port\": \"443\""," },"," \"isBase64Encoded\": false","}"],"syntax":"bash","type":"codeListing"},{"type":"heading","text":"Delete the infrastructure","anchor":"Delete-the-infrastructure","level":3},{"inlineContent":[{"type":"text","text":"When done testing, you can delete the infrastructure with this command."}],"type":"paragraph"},{"code":["cdk destroy","","Are you sure you want to delete: LambdaApiStack (y\/n)? y","LambdaApiStack: destroying... [1\/1]","... redacted for brevity ..."," ✅ LambdaApiStack: destroyed"],"type":"codeListing","syntax":"bash"},{"type":"heading","text":"Third-party tools","anchor":"Third-party-tools","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"We welcome contributions to this section. If you have experience deploying Swift Lambda functions with third-party tools like Serverless Framework, Terraform, or Pulumi, please share your knowledge with the community."}]}]}],"seeAlsoSections":[{"anchor":"Essentials","generated":true,"title":"Essentials","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/quick-setup"]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Deployment"},"references":{"https://aws.amazon.com/about-aws/global-infrastructure/":{"type":"link","identifier":"https:\/\/aws.amazon.com\/about-aws\/global-infrastructure\/","titleInlineContent":[{"type":"text","text":"AWS Global infrastructure"}],"title":"AWS Global infrastructure","url":"https:\/\/aws.amazon.com\/about-aws\/global-infrastructure\/"},"https://aws.amazon.com/lambda/pricing/":{"type":"link","identifier":"https:\/\/aws.amazon.com\/lambda\/pricing\/","titleInlineContent":[{"type":"text","text":"Lambda pricing"}],"title":"Lambda pricing","url":"https:\/\/aws.amazon.com\/lambda\/pricing\/"},"console-60-prepare-test-event":{"type":"image","alt":"Console - prepare test event","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/console-60-prepare-test-event.png","traits":["1x","light"]}],"identifier":"console-60-prepare-test-event"},"https://www.serverless.com/":{"type":"link","title":"Serverless Framework","url":"https:\/\/www.serverless.com\/","identifier":"https:\/\/www.serverless.com\/","titleInlineContent":[{"type":"text","text":"Serverless Framework"}]},"https://github.com/swift-server/swift-aws-lambda-runtime/blob/main/Examples/APIGateway/README.md":{"type":"link","title":"APIGateway example README file","url":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/blob\/main\/Examples\/APIGateway\/README.md","identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/blob\/main\/Examples\/APIGateway\/README.md","titleInlineContent":[{"type":"text","text":"APIGateway example README file"}]},"https://aws.amazon.com/serverless/sam/":{"type":"link","title":"AWS Serverless Application Model (SAM)","url":"https:\/\/aws.amazon.com\/serverless\/sam\/","identifier":"https:\/\/aws.amazon.com\/serverless\/sam\/","titleInlineContent":[{"type":"text","text":"AWS Serverless Application Model (SAM)"}]},"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html":{"type":"link","title":"Identity and Access Manager (IAM) user","url":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/id_users.html","identifier":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/id_users.html","titleInlineContent":[{"type":"text","text":"Identity and Access Manager (IAM) user"}]},"#the-lambda-execution-iam-role":{"type":"link","title":"The Lambda execution IAM role","url":"#the-lambda-execution-iam-role","identifier":"#the-lambda-execution-iam-role","titleInlineContent":[{"type":"text","text":"The Lambda execution IAM role"}]},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content":{"title":"Your First Lambda Function Written in Swift","kind":"overview","role":"overview","url":"\/tutorials\/table-of-content","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","abstract":[{"type":"text","text":"A step-by-step tutorial to learn how to implement, build, test, and deploy your first Lambda function written in Swift."}],"type":"topic"},"https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html":{"type":"link","title":"install the CDK CLI","url":"https:\/\/docs.aws.amazon.com\/cdk\/v2\/guide\/getting_started.html","identifier":"https:\/\/docs.aws.amazon.com\/cdk\/v2\/guide\/getting_started.html","titleInlineContent":[{"type":"text","text":"install the CDK CLI"}]},"console-50-upload-zip":{"type":"image","alt":"Console - select zip file","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/console-50-upload-zip.png","traits":["1x","light"]}],"identifier":"console-50-upload-zip"},"#deploy-your-lambda-function-with-aws-serverless-application-model-sam":{"type":"link","identifier":"#deploy-your-lambda-function-with-aws-serverless-application-model-sam","titleInlineContent":[{"type":"text","text":"Deploy your Lambda function with AWS Serverless Application Model (SAM)"}],"title":"Deploy your Lambda function with AWS Serverless Application Model (SAM)","url":"#deploy-your-lambda-function-with-aws-serverless-application-model-sam"},"https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html":{"type":"link","identifier":"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/getting-started-install.html","titleInlineContent":[{"text":"installation","type":"text"}],"title":"installation","url":"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/getting-started-install.html"},"Exmaples.HelloWorld/README.md":{"type":"link","identifier":"Exmaples.HelloWorld\/README.md","titleInlineContent":[{"type":"text","text":"HelloWorld"}],"title":"HelloWorld","url":"Exmaples.HelloWorld\/README.md"},"https://www.terraform.io/":{"type":"link","identifier":"https:\/\/www.terraform.io\/","titleInlineContent":[{"type":"text","text":"Terraform"}],"title":"Terraform","url":"https:\/\/www.terraform.io\/"},"console-80-delete-function":{"type":"image","identifier":"console-80-delete-function","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/console-80-delete-function.png","traits":["1x","light"]}],"alt":"Console - delete function"},"https://aws.amazon.com/cdk/":{"type":"link","identifier":"https:\/\/aws.amazon.com\/cdk\/","titleInlineContent":[{"type":"text","text":"AWS Cloud Development Kit (CDK)"}],"title":"AWS Cloud Development Kit (CDK)","url":"https:\/\/aws.amazon.com\/cdk\/"},"https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html":{"type":"link","identifier":"https:\/\/docs.aws.amazon.com\/serverless-application-model\/latest\/developerguide\/serverless-sam-cli-install.html","titleInlineContent":[{"type":"text","text":"install the SAM CLI"}],"title":"install the SAM CLI","url":"https:\/\/docs.aws.amazon.com\/serverless-application-model\/latest\/developerguide\/serverless-sam-cli-install.html"},"https://signin.aws.amazon.com/signup?request_type=register":{"type":"link","identifier":"https:\/\/signin.aws.amazon.com\/signup?request_type=register","titleInlineContent":[{"type":"text","text":"aws.amazon.com"}],"title":"aws.amazon.com","url":"https:\/\/signin.aws.amazon.com\/signup?request_type=register"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/quick-setup":{"type":"topic","abstract":[{"type":"text","text":"Learn how to create your first project in 3 minutes."}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/quick-setup","kind":"article","url":"\/documentation\/awslambdaruntimecore\/quick-setup","role":"article","title":"Getting Started Quickly"},"https://docs.aws.amazon.com/AmazonECR/latest/public/public-troubleshooting.html#public-troubleshooting-authentication":{"type":"link","identifier":"https:\/\/docs.aws.amazon.com\/AmazonECR\/latest\/public\/public-troubleshooting.html#public-troubleshooting-authentication","titleInlineContent":[{"type":"text","text":"Authentication issues"}],"title":"Authentication issues","url":"https:\/\/docs.aws.amazon.com\/AmazonECR\/latest\/public\/public-troubleshooting.html#public-troubleshooting-authentication"},"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey":{"type":"link","identifier":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/id_credentials_access-keys.html#Using_CreateAccessKey","titleInlineContent":[{"type":"text","text":"Creating access keys for an IAM user"}],"title":"Creating access keys for an IAM user","url":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/id_credentials_access-keys.html#Using_CreateAccessKey"},"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html":{"type":"link","identifier":"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-configure-quickstart.html","titleInlineContent":[{"type":"text","text":"configuration"}],"title":"configuration","url":"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-configure-quickstart.html"},"#deploy-your-lambda-function-with-the-aws-console":{"type":"link","identifier":"#deploy-your-lambda-function-with-the-aws-console","titleInlineContent":[{"type":"text","text":"Deploy your Lambda function with the AWS Console"}],"title":"Deploy your Lambda function with the AWS Console","url":"#deploy-your-lambda-function-with-the-aws-console"},"#choosing-the-aws-region-where-to-deploy":{"type":"link","identifier":"#choosing-the-aws-region-where-to-deploy","titleInlineContent":[{"type":"text","text":"Choosing the AWS Region where to deploy"}],"title":"Choosing the AWS Region where to deploy","url":"#choosing-the-aws-region-where-to-deploy"},"#prerequisites":{"type":"link","identifier":"#prerequisites","titleInlineContent":[{"type":"text","text":"Prerequisites"}],"title":"Prerequisites","url":"#prerequisites"},"#deploy-your-lambda-function-with-aws-cloud-development-kit-cdk":{"type":"link","identifier":"#deploy-your-lambda-function-with-aws-cloud-development-kit-cdk","titleInlineContent":[{"type":"text","text":"Deploy your Lambda function with AWS Cloud Development Kit (CDK)"}],"title":"Deploy your Lambda function with AWS Cloud Development Kit (CDK)","url":"#deploy-your-lambda-function-with-aws-cloud-development-kit-cdk"},"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html":{"type":"link","identifier":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/id_users_create.html","titleInlineContent":[{"text":"Create an IAM User in your AWS account","type":"text"}],"title":"Create an IAM User in your AWS account","url":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/id_users_create.html"},"console-40-select-zip-file":{"type":"image","identifier":"console-40-select-zip-file","variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/console-40-select-zip-file.png"}],"alt":"Console - select zip file"},"console-80-delete-role":{"type":"image","alt":"Console - delete IAM role","variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/console-80-delete-role.png"}],"identifier":"console-80-delete-role"},"console-10-regions":{"type":"image","alt":"Console - Select AWS Region","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/console-10-regions.png","traits":["1x","light"]}],"identifier":"console-10-regions"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html":{"type":"link","title":"AWS Security Credentials","url":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/security-creds.html","identifier":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/security-creds.html","titleInlineContent":[{"text":"AWS Security Credentials","type":"text"}]},"#deploy-your-lambda-function-with-the-aws-command-line-interface-cli":{"type":"link","title":"Deploy your Lambda function with the AWS Command Line Interface (CLI)","url":"#deploy-your-lambda-function-with-the-aws-command-line-interface-cli","identifier":"#deploy-your-lambda-function-with-the-aws-command-line-interface-cli","titleInlineContent":[{"type":"text","text":"Deploy your Lambda function with the AWS Command Line Interface (CLI)"}]},"console-30-create-function":{"type":"image","alt":"Console - create function","variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/console-30-create-function.png"}],"identifier":"console-30-create-function"},"console-20-dashboard":{"type":"image","alt":"Console - Lambda dashboard when there is no function","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/console-20-dashboard.png","traits":["1x","light"]}],"identifier":"console-20-dashboard"},"https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples":{"type":"link","title":"Examples","url":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/tree\/main\/Examples","identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/tree\/main\/Examples","titleInlineContent":[{"text":"Examples","type":"text"}]},"#third-party-tools":{"title":"Third-party tools","type":"link","titleInlineContent":[{"text":"Third-party tools","type":"text"}],"identifier":"#third-party-tools","url":"#third-party-tools"},"https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies":{"identifier":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/access_policies_managed-vs-inline.html#aws-managed-policies","type":"link","title":"‘AdministratorAccess’ gives the user permission","titleInlineContent":[{"text":"‘AdministratorAccess’ gives the user permission","type":"text"}],"url":"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/access_policies_managed-vs-inline.html#aws-managed-policies"},"https://www.pulumi.com/":{"identifier":"https:\/\/www.pulumi.com\/","type":"link","title":"Pulumi","titleInlineContent":[{"text":"Pulumi","type":"text"}],"url":"https:\/\/www.pulumi.com\/"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambda.json b/docs/data/documentation/awslambdaruntimecore/lambda.json new file mode 100644 index 00000000..04240a08 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambda.json @@ -0,0 +1 @@ +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Lambda","kind":"identifier"}],"platforms":["macOS"],"languages":["swift"]}]}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambda"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"topicSections":[{"anchor":"Type-Properties","generated":true,"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/defaultEventLoop"],"title":"Type Properties"},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/env(_:)"],"anchor":"Type-Methods","title":"Type Methods","generated":true}],"sections":[],"metadata":{"role":"symbol","externalID":"s:20AWSLambdaRuntimeCore6LambdaO","navigatorTitle":[{"text":"Lambda","kind":"identifier"}],"title":"Lambda","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"Lambda","kind":"identifier"}],"roleHeading":"Enumeration","modules":[{"name":"AWSLambdaRuntimeCore"}],"symbolKind":"enum"},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda"},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/Lambda":{"navigatorTitle":[{"text":"Lambda","kind":"identifier"}],"abstract":[],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda","kind":"symbol","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambda","title":"Lambda","type":"topic","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"Lambda","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/Lambda/defaultEventLoop":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/defaultEventLoop","kind":"symbol","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"defaultEventLoop"},{"text":": any ","kind":"text"},{"preciseIdentifier":"s:7NIOCore9EventLoopP","text":"EventLoop","kind":"typeIdentifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambda\/defaulteventloop","type":"topic","role":"symbol","title":"defaultEventLoop","abstract":[{"type":"text","text":"The default EventLoop the Lambda is scheduled on."}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/Lambda/env(_:)":{"url":"\/documentation\/awslambdaruntimecore\/lambda\/env(_:)","kind":"symbol","title":"env(_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"env","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"type":"topic","abstract":[{"text":"Utility to access\/read environment variables","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/env(_:)","role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambda/defaulteventloop.json b/docs/data/documentation/awslambdaruntimecore/lambda/defaulteventloop.json new file mode 100644 index 00000000..8534513d --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambda/defaulteventloop.json @@ -0,0 +1 @@ +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambda\/defaulteventloop"]}],"sections":[],"abstract":[{"type":"text","text":"The default EventLoop the Lambda is scheduled on."}],"metadata":{"fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"defaultEventLoop","kind":"identifier"},{"kind":"text","text":": any "},{"text":"EventLoop","preciseIdentifier":"s:7NIOCore9EventLoopP","kind":"typeIdentifier"}],"role":"symbol","roleHeading":"Type Property","externalID":"s:20AWSLambdaRuntimeCore6LambdaO16defaultEventLoop7NIOCore0fG0_pvpZ","modules":[{"name":"AWSLambdaRuntimeCore"}],"title":"defaultEventLoop","symbolKind":"property"},"kind":"symbol","identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/defaultEventLoop","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"defaultEventLoop","kind":"identifier"},{"kind":"text","text":": any "},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore9EventLoopP","text":"EventLoop"}],"platforms":["macOS"]}],"kind":"declarations"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/Lambda":{"navigatorTitle":[{"text":"Lambda","kind":"identifier"}],"abstract":[],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda","kind":"symbol","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambda","title":"Lambda","type":"topic","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"Lambda","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/Lambda/defaultEventLoop":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/defaultEventLoop","kind":"symbol","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"defaultEventLoop"},{"text":": any ","kind":"text"},{"preciseIdentifier":"s:7NIOCore9EventLoopP","text":"EventLoop","kind":"typeIdentifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambda\/defaulteventloop","type":"topic","role":"symbol","title":"defaultEventLoop","abstract":[{"type":"text","text":"The default EventLoop the Lambda is scheduled on."}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambda/env(_:).json b/docs/data/documentation/awslambdaruntimecore/lambda/env(_:).json new file mode 100644 index 00000000..2c130703 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambda/env(_:).json @@ -0,0 +1 @@ +{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"env","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"name","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}]}]}],"metadata":{"externalID":"s:20AWSLambdaRuntimeCore6LambdaO3envySSSgSSFZ","extendedModule":"AWSLambdaRuntimeCore","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"env","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":") -> ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}],"title":"env(_:)","modules":[{"name":"AWSLambdaRuntimeCore"}],"roleHeading":"Type Method","role":"symbol","symbolKind":"method"},"kind":"symbol","sections":[],"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/env(_:)","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Utility to access\/read environment variables"}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda"]]},"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambda\/env(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/Lambda/env(_:)":{"url":"\/documentation\/awslambdaruntimecore\/lambda\/env(_:)","kind":"symbol","title":"env(_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"env","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"type":"topic","abstract":[{"text":"Utility to access\/read environment variables","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/env(_:)","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/Lambda":{"navigatorTitle":[{"text":"Lambda","kind":"identifier"}],"abstract":[],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda","kind":"symbol","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambda","title":"Lambda","type":"topic","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"Lambda","kind":"identifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacodableadapter.json b/docs/data/documentation/awslambdaruntimecore/lambdacodableadapter.json new file mode 100644 index 00000000..28a29a09 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacodableadapter.json @@ -0,0 +1 @@ +{"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdacodableadapter"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter"},"topicSections":[{"anchor":"Initializers","title":"Initializers","generated":true,"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(decoder:handler:)","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(encoder:decoder:handler:)"]},{"title":"Instance Methods","generated":true,"anchor":"Instance-Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/handle(_:responseWriter:context:)"]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"kind":"symbol","metadata":{"modules":[{"name":"AWSLambdaRuntimeCore"}],"navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}],"roleHeading":"Structure","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"title":"LambdaCodableAdapter","role":"symbol","externalID":"s:20AWSLambdaRuntimeCore20LambdaCodableAdapterV","symbolKind":"struct"},"abstract":[{"text":"Adapts a ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true},{"text":" conforming handler to conform to ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","isActive":true},{"text":".","type":"text"}],"relationshipsSections":[{"title":"Conforms To","type":"conformsTo","kind":"relationships","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaCodableAdapter"},{"kind":"text","text":"<"},{"text":"Handler","kind":"genericParameter"},{"text":", ","kind":"text"},{"text":"Event","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"Output"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"Decoder"},{"kind":"text","text":", "},{"text":"Encoder","kind":"genericParameter"},{"text":"> ","kind":"text"},{"text":"where","kind":"keyword"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"Handler"},{"text":" : ","kind":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","kind":"typeIdentifier","text":"LambdaWithBackgroundProcessingHandler","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Event"},{"text":" == ","kind":"text"},{"kind":"typeIdentifier","text":"Handler"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Event","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Event"},{"text":", ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":" == "},{"text":"Handler","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Decoder"},{"kind":"text","text":" : "},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore18LambdaEventDecoderP","kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder","text":"LambdaEventDecoder"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Encoder"},{"text":" : ","kind":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP","text":"LambdaOutputEncoder"},{"text":", ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output","kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa"},{"kind":"text","text":" == "},{"text":"Encoder","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP0E0Qa","kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output"}]}],"kind":"declarations"}],"sections":[],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaEventDecoder":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder","abstract":[{"type":"text","text":"The protocol a decoder must conform to so that it can be used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true,"type":"reference"},{"text":" to decode incoming","type":"text"},{"type":"text","text":" "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" events."}],"url":"\/documentation\/awslambdaruntimecore\/lambdaeventdecoder","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaEventDecoder"}],"title":"LambdaEventDecoder","type":"topic","navigatorTitle":[{"text":"LambdaEventDecoder","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter/init(decoder:handler:)":{"role":"symbol","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"decoder","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Decoder"},{"text":", ","kind":"text"},{"text":"handler","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"kind":"text","text":")"}],"title":"init(decoder:handler:)","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(decoder:handler:)","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/init(decoder:handler:)","abstract":[{"type":"text","text":"Initializes an instance given a decoder, and a handler with a "},{"code":"Void","type":"codeVoice"},{"type":"text","text":" output."}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter/handle(_:responseWriter:context:)":{"abstract":[{"type":"text","text":"A "},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","type":"reference"},{"type":"text","text":" wrapper."}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/handle(_:responseWriter:context:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"<"},{"text":"Writer","kind":"genericParameter"},{"text":">(","kind":"text"},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","kind":"typeIdentifier","text":"ByteBuffer"},{"text":", ","kind":"text"},{"text":"responseWriter","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Writer","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/handle(_:responsewriter:context:)","title":"handle(_:responseWriter:context:)","type":"topic","role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/Event":{"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Event"},{"kind":"text","text":" : "},{"text":"Decodable","kind":"typeIdentifier","preciseIdentifier":"s:Se"}],"abstract":[{"text":"Generic input type.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"required":true,"title":"Event","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/event","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Event","role":"symbol","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/Output":{"kind":"symbol","title":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output","role":"symbol","abstract":[{"text":"Generic output type.","type":"text"},{"type":"text","text":" "},{"text":"This is the type that the ","type":"text"},{"type":"codeVoice","code":"handle"},{"type":"text","text":" function will send through the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"},{"type":"text","text":"."}],"type":"topic","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"text":"Output","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/output"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter/init(encoder:decoder:handler:)":{"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(encoder:decoder:handler:)","abstract":[{"text":"Initializes an instance given an encoder, decoder, and a handler with a non-","type":"text"},{"type":"codeVoice","code":"Void"},{"type":"text","text":" output."}],"url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/init(encoder:decoder:handler:)","role":"symbol","title":"init(encoder:decoder:handler:)","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"encoder"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Encoder"},{"text":", ","kind":"text"},{"text":"decoder","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Decoder","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"handler","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"text":")","kind":"text"}],"kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/finish()":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/finish()","abstract":[{"text":"End the response stream and the underlying HTTP response.","type":"text"}],"title":"finish()","kind":"symbol","required":true,"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"finish"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler/handle(_:responseWriter:context:)":{"role":"symbol","type":"topic","url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler\/handle(_:responsewriter:context:)","required":true,"title":"handle(_:responseWriter:context:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"responseWriter"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","abstract":[{"text":"The handler function – implement the business logic of the Lambda function here.","type":"text"}],"kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder":{"role":"symbol","navigatorTitle":[{"text":"LambdaOutputEncoder","kind":"identifier"}],"type":"topic","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaOutputEncoder","kind":"identifier"}],"abstract":[{"type":"text","text":"The protocol an encoder must conform to so that it can be used with "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true},{"text":" to encode the generic","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output"},{"text":" object into a ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":"."}],"title":"LambdaOutputEncoder","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder/Output":{"required":true,"kind":"symbol","title":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","abstract":[],"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/output","type":"topic","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacodableadapter/handle(_:responsewriter:context:).json b/docs/data/documentation/awslambdaruntimecore/lambdacodableadapter/handle(_:responsewriter:context:).json new file mode 100644 index 00000000..723d1c18 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacodableadapter/handle(_:responsewriter:context:).json @@ -0,0 +1 @@ +{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"mutating","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"text":"<","kind":"text"},{"text":"Writer","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"request","kind":"internalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","kind":"typeIdentifier","text":"ByteBuffer"},{"text":", ","kind":"text"},{"text":"responseWriter","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Writer"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"LambdaContext","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"text":" ","kind":"text"},{"text":"where","kind":"keyword"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"Writer"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","text":"LambdaResponseStreamWriter"}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"text":"Discussion","type":"heading"},{"items":[{"content":[{"inlineContent":[{"type":"text","text":"event: The received event."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"outputWriter: The writer to write the computed response to.","type":"text"}]}]},{"content":[{"inlineContent":[{"type":"text","text":"context: The "},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","type":"reference"},{"text":" containing the invocation’s metadata.","type":"text"}],"type":"paragraph"}]}],"type":"unorderedList"}]}],"metadata":{"symbolKind":"method","modules":[{"name":"AWSLambdaRuntimeCore"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"Writer"},{"text":">(","kind":"text"},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"responseWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Writer","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"context"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"roleHeading":"Instance Method","externalID":"s:20AWSLambdaRuntimeCore20LambdaCodableAdapterV6handle_14responseWriter7contexty7NIOCore10ByteBufferV_qd__AA0D7ContextVtYaKAA0d14ResponseStreamI0Rd__lF","role":"symbol","title":"handle(_:responseWriter:context:)"},"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/handle(_:responseWriter:context:)","interfaceLanguage":"swift"},"abstract":[{"text":"A ","type":"text"},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","type":"reference"},{"type":"text","text":" wrapper."}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/handle(_:responsewriter:context:)"]}],"kind":"symbol","sections":[],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler/handle(_:responseWriter:context:)":{"role":"symbol","type":"topic","url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler\/handle(_:responsewriter:context:)","required":true,"title":"handle(_:responseWriter:context:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"responseWriter"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","abstract":[{"text":"The handler function – implement the business logic of the Lambda function here.","type":"text"}],"kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/write(_:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"type":"topic","title":"write(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"required":true,"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter/handle(_:responseWriter:context:)":{"abstract":[{"type":"text","text":"A "},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","type":"reference"},{"type":"text","text":" wrapper."}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/handle(_:responseWriter:context:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"<"},{"text":"Writer","kind":"genericParameter"},{"text":">(","kind":"text"},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","kind":"typeIdentifier","text":"ByteBuffer"},{"text":", ","kind":"text"},{"text":"responseWriter","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Writer","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/handle(_:responsewriter:context:)","title":"handle(_:responseWriter:context:)","type":"topic","role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacodableadapter/init(decoder:handler:).json b/docs/data/documentation/awslambdaruntimecore/lambdacodableadapter/init(decoder:handler:).json new file mode 100644 index 00000000..fcede1b0 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacodableadapter/init(decoder:handler:).json @@ -0,0 +1 @@ +{"sections":[],"abstract":[{"type":"text","text":"Initializes an instance given a decoder, and a handler with a "},{"code":"Void","type":"codeVoice"},{"text":" output.","type":"text"}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"decoder"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Decoder"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"handler"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Handler"},{"text":") ","kind":"text"},{"text":"where","kind":"keyword"},{"kind":"text","text":" "},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":" == (), "},{"text":"Encoder","kind":"typeIdentifier"},{"kind":"text","text":" == "},{"kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder","preciseIdentifier":"s:20AWSLambdaRuntimeCore11VoidEncoderV","text":"VoidEncoder"},{"kind":"text","text":", "},{"text":"Handler","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output","text":"Output"},{"text":" == ()","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"name":"decoder","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The decoder object that will be used to decode the received "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" event into the generic "},{"type":"codeVoice","code":"Event"},{"text":" type served to the ","type":"text"},{"type":"codeVoice","code":"handler"},{"text":".","type":"text"}]}]},{"content":[{"inlineContent":[{"type":"text","text":"The handler object."}],"type":"paragraph"}],"name":"handler"}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter"]]},"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/init(decoder:handler:)"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(decoder:handler:)"},"metadata":{"modules":[{"name":"AWSLambdaRuntimeCore"}],"title":"init(decoder:handler:)","role":"symbol","roleHeading":"Initializer","externalID":"s:20AWSLambdaRuntimeCore20LambdaCodableAdapterV7decoder7handlerACyxq_ytq1_AA11VoidEncoderVGq1__xtcytRs0_AGRs2_yt6OutputRtzrlufc","symbolKind":"init","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"decoder"},{"kind":"text","text":": "},{"text":"Decoder","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"handler"},{"kind":"text","text":": "},{"text":"Handler","kind":"typeIdentifier"},{"text":")","kind":"text"}]},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseWriter"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"LambdaResponseWriter","kind":"identifier"}],"type":"topic","kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","title":"LambdaResponseWriter","role":"symbol","abstract":[{"type":"text","text":"Used with "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"},{"text":".","type":"text"},{"text":" ","type":"text"},{"text":"A mechanism to “return” an output from ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"type":"emphasis","inlineContent":[{"type":"text","text":"after"}]},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","kind":"symbol","title":"LambdaWithBackgroundProcessingHandler","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaWithBackgroundProcessingHandler"}],"abstract":[{"text":"This protocol is exactly like ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"type":"text","text":", with the only difference being the added support for executing background"},{"type":"text","text":" "},{"text":"work after the result has been sent to the AWS Lambda control plane.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This is achieved by not having a return type in the "},{"code":"handle","type":"codeVoice"},{"text":" function. The output is instead written into a","type":"text"},{"type":"text","text":" "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"type":"text","text":"that is passed in as an argument, meaning that the"},{"type":"text","text":" "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true,"type":"reference"},{"type":"text","text":" function is then"},{"type":"text","text":" "},{"text":"free to implement any background work after the result has been sent to the AWS Lambda control plane.","type":"text"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/Output":{"kind":"symbol","title":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output","role":"symbol","abstract":[{"text":"Generic output type.","type":"text"},{"type":"text","text":" "},{"text":"This is the type that the ","type":"text"},{"type":"codeVoice","code":"handle"},{"type":"text","text":" function will send through the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"},{"type":"text","text":"."}],"type":"topic","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"text":"Output","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/output"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter/init(decoder:handler:)":{"role":"symbol","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"decoder","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Decoder"},{"text":", ","kind":"text"},{"text":"handler","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"kind":"text","text":")"}],"title":"init(decoder:handler:)","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(decoder:handler:)","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/init(decoder:handler:)","abstract":[{"type":"text","text":"Initializes an instance given a decoder, and a handler with a "},{"code":"Void","type":"codeVoice"},{"type":"text","text":" output."}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"VoidEncoder"}],"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/voidencoder","title":"VoidEncoder","navigatorTitle":[{"kind":"identifier","text":"VoidEncoder"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder","role":"symbol","abstract":[]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacodableadapter/init(encoder:decoder:handler:).json b/docs/data/documentation/awslambdaruntimecore/lambdacodableadapter/init(encoder:decoder:handler:).json new file mode 100644 index 00000000..40ef4026 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacodableadapter/init(encoder:decoder:handler:).json @@ -0,0 +1 @@ +{"kind":"symbol","variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/init(encoder:decoder:handler:)"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Initializes an instance given an encoder, decoder, and a handler with a non-","type":"text"},{"type":"codeVoice","code":"Void"},{"text":" output.","type":"text"}],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"encoder"},{"text":": ","kind":"text"},{"text":"Encoder","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"decoder"},{"text":": ","kind":"text"},{"text":"Decoder","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"handler","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Handler"},{"kind":"text","text":") "},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"Output"},{"text":" : ","kind":"text"},{"text":"Encodable","preciseIdentifier":"s:SE","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"The encoder object that will be used to encode the generic ","type":"text"},{"type":"codeVoice","code":"Output"},{"type":"text","text":" obtained from the "},{"type":"codeVoice","code":"handler"},{"text":"’s ","type":"text"},{"type":"codeVoice","code":"outputWriter"},{"type":"text","text":" into a "},{"type":"codeVoice","code":"ByteBuffer"},{"text":".","type":"text"}]}],"name":"encoder"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The decoder object that will be used to decode the received "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" event into the generic "},{"type":"codeVoice","code":"Event"},{"type":"text","text":" type served to the "},{"code":"handler","type":"codeVoice"},{"type":"text","text":"."}]}],"name":"decoder"},{"name":"handler","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The handler object."}]}]}]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(encoder:decoder:handler:)"},"metadata":{"fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"encoder","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Encoder","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"decoder","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Decoder"},{"kind":"text","text":", "},{"text":"handler","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Handler","kind":"typeIdentifier"},{"text":")","kind":"text"}],"externalID":"s:20AWSLambdaRuntimeCore20LambdaCodableAdapterV7encoder7decoder7handlerACyxq_q0_q1_q2_Gq2__q1_xtcSER0_rlufc","roleHeading":"Initializer","title":"init(encoder:decoder:handler:)","symbolKind":"init","role":"symbol","modules":[{"name":"AWSLambdaRuntimeCore"}]},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter/init(encoder:decoder:handler:)":{"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(encoder:decoder:handler:)","abstract":[{"text":"Initializes an instance given an encoder, decoder, and a handler with a non-","type":"text"},{"type":"codeVoice","code":"Void"},{"type":"text","text":" output."}],"url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/init(encoder:decoder:handler:)","role":"symbol","title":"init(encoder:decoder:handler:)","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"encoder"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Encoder"},{"text":", ","kind":"text"},{"text":"decoder","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Decoder","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"handler","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"text":")","kind":"text"}],"kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacodableresponsewriter.json b/docs/data/documentation/awslambdaruntimecore/lambdacodableresponsewriter.json new file mode 100644 index 00000000..31e5f51d --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacodableresponsewriter.json @@ -0,0 +1 @@ +{"metadata":{"symbolKind":"struct","externalID":"s:20AWSLambdaRuntimeCore27LambdaCodableResponseWriterV","role":"symbol","modules":[{"name":"AWSLambdaRuntimeCore"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaCodableResponseWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaCodableResponseWriter"}],"title":"LambdaCodableResponseWriter","roleHeading":"Structure"},"sections":[],"abstract":[{"text":"A ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"type":"text","text":" wrapper that conforms to "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true,"type":"reference"},{"type":"text","text":"."}],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter"},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"topicSections":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/init(encoder:streamWriter:)"],"anchor":"Initializers","generated":true,"title":"Initializers"},{"generated":true,"anchor":"Instance-Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/write(_:)"],"title":"Instance Methods"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaCodableResponseWriter","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"Output"},{"kind":"text","text":", "},{"text":"Encoder","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"Base"},{"text":"> ","kind":"text"},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"text":" == ","kind":"text"},{"text":"Encoder","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP0E0Qa"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Encoder"},{"text":" : ","kind":"text"},{"text":"LambdaOutputEncoder","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Base"},{"text":" : ","kind":"text"},{"text":"LambdaResponseStreamWriter","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter"]}],"relationshipsSections":[{"title":"Conforms To","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"],"type":"conformsTo","kind":"relationships"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter","role":"symbol","abstract":[{"text":"A ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","isActive":true},{"text":" wrapper that conforms to ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":".","type":"text"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaCodableResponseWriter","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter","navigatorTitle":[{"text":"LambdaCodableResponseWriter","kind":"identifier"}],"kind":"symbol","title":"LambdaCodableResponseWriter"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/write(_:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"type":"topic","title":"write(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"required":true,"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableResponseWriter/write(_:)":{"url":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter\/write(_:)","role":"symbol","kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/write(_:)","title":"write(_:)","abstract":[]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder":{"role":"symbol","navigatorTitle":[{"text":"LambdaOutputEncoder","kind":"identifier"}],"type":"topic","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaOutputEncoder","kind":"identifier"}],"abstract":[{"type":"text","text":"The protocol an encoder must conform to so that it can be used with "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true},{"text":" to encode the generic","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output"},{"text":" object into a ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":"."}],"title":"LambdaOutputEncoder","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder/Output":{"required":true,"kind":"symbol","title":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","abstract":[],"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/output","type":"topic","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableResponseWriter/init(encoder:streamWriter:)":{"title":"init(encoder:streamWriter:)","type":"topic","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"encoder"},{"kind":"text","text":": "},{"text":"Encoder","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"streamWriter","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Base"},{"kind":"text","text":")"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter\/init(encoder:streamwriter:)","abstract":[{"text":"Initializes an instance given an encoder and an underlying ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"type":"text","text":"."}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/init(encoder:streamWriter:)","kind":"symbol","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacodableresponsewriter/init(encoder:streamwriter:).json b/docs/data/documentation/awslambdaruntimecore/lambdacodableresponsewriter/init(encoder:streamwriter:).json new file mode 100644 index 00000000..ba11feb7 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacodableresponsewriter/init(encoder:streamwriter:).json @@ -0,0 +1 @@ +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"text":"encoder","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Encoder","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"streamWriter"},{"text":": ","kind":"text"},{"text":"Base","kind":"typeIdentifier"},{"text":")","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"parameters","parameters":[{"name":"encoder","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The encoder object that will be used to encode the generic "},{"type":"codeVoice","code":"Output"},{"text":" into a ","type":"text"},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":", which will then be passed to "},{"code":"streamWriter","type":"codeVoice"},{"text":".","type":"text"}]}]},{"name":"streamWriter","content":[{"type":"paragraph","inlineContent":[{"text":"The underlying ","type":"text"},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","type":"reference"},{"type":"text","text":" that will be wrapped."}]}]}]}],"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/init(encoder:streamWriter:)","interfaceLanguage":"swift"},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"title":"init(encoder:streamWriter:)","externalID":"s:20AWSLambdaRuntimeCore27LambdaCodableResponseWriterV7encoder06streamG0ACyxq_q0_Gq__q0_tcfc","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"text":"encoder","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Encoder"},{"kind":"text","text":", "},{"kind":"externalParam","text":"streamWriter"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Base"},{"kind":"text","text":")"}],"roleHeading":"Initializer","modules":[{"name":"AWSLambdaRuntimeCore"}],"symbolKind":"init"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter"]]},"abstract":[{"type":"text","text":"Initializes an instance given an encoder and an underlying "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","isActive":true,"type":"reference"},{"text":".","type":"text"}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter\/init(encoder:streamwriter:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/write(_:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"type":"topic","title":"write(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"required":true,"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter","role":"symbol","abstract":[{"text":"A ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","isActive":true},{"text":" wrapper that conforms to ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":".","type":"text"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaCodableResponseWriter","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter","navigatorTitle":[{"text":"LambdaCodableResponseWriter","kind":"identifier"}],"kind":"symbol","title":"LambdaCodableResponseWriter"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableResponseWriter/init(encoder:streamWriter:)":{"title":"init(encoder:streamWriter:)","type":"topic","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"encoder"},{"kind":"text","text":": "},{"text":"Encoder","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"streamWriter","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Base"},{"kind":"text","text":")"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter\/init(encoder:streamwriter:)","abstract":[{"text":"Initializes an instance given an encoder and an underlying ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"type":"text","text":"."}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/init(encoder:streamWriter:)","kind":"symbol","role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacodableresponsewriter/write(_:).json b/docs/data/documentation/awslambdaruntimecore/lambdacodableresponsewriter/write(_:).json new file mode 100644 index 00000000..699ef29c --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacodableresponsewriter/write(_:).json @@ -0,0 +1 @@ +{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"write"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"output"},{"text":": ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"languages":["swift"]}]}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/write(_:)"},"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"write"},{"kind":"text","text":"("},{"text":"Output","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"title":"write(_:)","symbolKind":"method","roleHeading":"Instance Method","role":"symbol","externalID":"s:20AWSLambdaRuntimeCore27LambdaCodableResponseWriterV5writeyyxYaKF","modules":[{"name":"AWSLambdaRuntimeCore"}]},"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"LambdaResponseWriter.write(_:)"},{"text":".","type":"text"}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter\/write(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableResponseWriter/write(_:)":{"url":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter\/write(_:)","role":"symbol","kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/write(_:)","title":"write(_:)","abstract":[]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter","role":"symbol","abstract":[{"text":"A ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","isActive":true},{"text":" wrapper that conforms to ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":".","type":"text"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaCodableResponseWriter","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter","navigatorTitle":[{"text":"LambdaCodableResponseWriter","kind":"identifier"}],"kind":"symbol","title":"LambdaCodableResponseWriter"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacontext.json b/docs/data/documentation/awslambdaruntimecore/lambdacontext.json new file mode 100644 index 00000000..7dcf6db5 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacontext.json @@ -0,0 +1 @@ +{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"sections":[],"kind":"symbol","relationshipsSections":[{"title":"Conforms To","kind":"relationships","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/s28CustomDebugStringConvertibleP","doc:\/\/AWSLambdaRuntimeCore\/s8SendableP"],"type":"conformsTo"}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdacontext"],"traits":[{"interfaceLanguage":"swift"}]}],"topicSections":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/clientContext","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/cognitoIdentity","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/deadline","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/debugDescription","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/invokedFunctionARN","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/logger","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/requestID","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/traceID"],"anchor":"Instance-Properties","generated":true,"title":"Instance Properties"},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/getRemainingTime()"],"anchor":"Instance-Methods","generated":true,"title":"Instance Methods"}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"abstract":[{"text":"Lambda runtime context.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"The Lambda runtime generates and passes the "},{"type":"codeVoice","code":"LambdaContext"},{"text":" to the Lambda handler as an argument.","type":"text"}],"metadata":{"modules":[{"name":"AWSLambdaRuntimeCore"}],"externalID":"s:20AWSLambdaRuntimeCore13LambdaContextV","role":"symbol","roleHeading":"Structure","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaContext"}],"title":"LambdaContext","symbolKind":"struct","navigatorTitle":[{"kind":"identifier","text":"LambdaContext"}]},"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"},"references":{"doc://AWSLambdaRuntimeCore/s8SendableP":{"type":"unresolvable","identifier":"doc:\/\/AWSLambdaRuntimeCore\/s8SendableP","title":"Swift.Sendable"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/logger":{"type":"topic","kind":"symbol","abstract":[{"code":"Logger","type":"codeVoice"},{"text":" to log with.","type":"text"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"logger"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Logger","preciseIdentifier":"s:7Logging6LoggerV"}],"title":"logger","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/logger","url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/logger"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/requestID":{"abstract":[{"text":"The request ID, which identifies the request that triggered the function invocation.","type":"text"}],"title":"requestID","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"requestID","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/requestID","url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/requestid"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/debugDescription":{"title":"debugDescription","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/debugDescription","kind":"symbol","type":"topic","abstract":[],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"debugDescription"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/debugdescription","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/cognitoIdentity":{"title":"cognitoIdentity","url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/cognitoidentity","abstract":[{"type":"text","text":"For invocations from the AWS Mobile SDK, data about the Amazon Cognito identity provider."}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cognitoIdentity"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/cognitoIdentity","role":"symbol","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/invokedFunctionARN":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/invokedFunctionARN","role":"symbol","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/invokedfunctionarn","abstract":[{"text":"The ARN of the Lambda function, version, or alias that’s specified in the invocation.","type":"text"}],"title":"invokedFunctionARN","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"invokedFunctionARN","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/getRemainingTime()":{"abstract":[],"type":"topic","role":"symbol","title":"getRemainingTime()","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/getRemainingTime()","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/getremainingtime()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getRemainingTime"},{"text":"() -> ","kind":"text"},{"preciseIdentifier":"s:s8DurationV","text":"Duration","kind":"typeIdentifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/traceID":{"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/traceid","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"traceID","kind":"identifier"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/traceID","title":"traceID","type":"topic","abstract":[{"type":"text","text":"The AWS X-Ray tracing header."}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/deadline":{"title":"deadline","type":"topic","role":"symbol","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"deadline"},{"kind":"text","text":": "},{"preciseIdentifier":"s:8Dispatch0A8WallTimeV","text":"DispatchWallTime","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"The timestamp that the function times out."}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/deadline","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/deadline"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/clientContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/clientContext","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"clientContext","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/clientcontext","role":"symbol","title":"clientContext","abstract":[{"type":"text","text":"For invocations from the AWS Mobile SDK, data about the client application and device."}]},"doc://AWSLambdaRuntimeCore/s28CustomDebugStringConvertibleP":{"type":"unresolvable","identifier":"doc:\/\/AWSLambdaRuntimeCore\/s28CustomDebugStringConvertibleP","title":"Swift.CustomDebugStringConvertible"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacontext/clientcontext.json b/docs/data/documentation/awslambdaruntimecore/lambdacontext/clientcontext.json new file mode 100644 index 00000000..a1133a80 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacontext/clientcontext.json @@ -0,0 +1 @@ +{"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/clientContext","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"clientContext","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"? { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}]}]}],"metadata":{"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"clientContext"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":"?"}],"externalID":"s:20AWSLambdaRuntimeCore13LambdaContextV06clientE0SSSgvp","modules":[{"name":"AWSLambdaRuntimeCore"}],"symbolKind":"property","roleHeading":"Instance Property","title":"clientContext"},"kind":"symbol","variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdacontext\/clientcontext"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"]]},"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"type":"text","text":"For invocations from the AWS Mobile SDK, data about the client application and device."}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/clientContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/clientContext","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"clientContext","kind":"identifier"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/clientcontext","role":"symbol","title":"clientContext","abstract":[{"type":"text","text":"For invocations from the AWS Mobile SDK, data about the client application and device."}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacontext/cognitoidentity.json b/docs/data/documentation/awslambdaruntimecore/lambdacontext/cognitoidentity.json new file mode 100644 index 00000000..0156c981 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacontext/cognitoidentity.json @@ -0,0 +1 @@ +{"schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdacontext\/cognitoidentity"]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"cognitoIdentity","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"? { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]}],"metadata":{"externalID":"s:20AWSLambdaRuntimeCore13LambdaContextV15cognitoIdentitySSSgvp","symbolKind":"property","roleHeading":"Instance Property","title":"cognitoIdentity","modules":[{"name":"AWSLambdaRuntimeCore"}],"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"cognitoIdentity"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":"?","kind":"text"}]},"kind":"symbol","abstract":[{"type":"text","text":"For invocations from the AWS Mobile SDK, data about the Amazon Cognito identity provider."}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/cognitoIdentity"},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/cognitoIdentity":{"title":"cognitoIdentity","url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/cognitoidentity","abstract":[{"type":"text","text":"For invocations from the AWS Mobile SDK, data about the Amazon Cognito identity provider."}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cognitoIdentity"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/cognitoIdentity","role":"symbol","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacontext/deadline.json b/docs/data/documentation/awslambdaruntimecore/lambdacontext/deadline.json new file mode 100644 index 00000000..898f368a --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacontext/deadline.json @@ -0,0 +1 @@ +{"abstract":[{"type":"text","text":"The timestamp that the function times out."}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdacontext\/deadline"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"deadline"},{"kind":"text","text":": "},{"preciseIdentifier":"s:8Dispatch0A8WallTimeV","text":"DispatchWallTime","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"externalID":"s:20AWSLambdaRuntimeCore13LambdaContextV8deadline8Dispatch0G8WallTimeVvp","modules":[{"name":"AWSLambdaRuntimeCore"}],"symbolKind":"property","title":"deadline","role":"symbol","roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"deadline","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:8Dispatch0A8WallTimeV","kind":"typeIdentifier","text":"DispatchWallTime"}]},"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/deadline","interfaceLanguage":"swift"},"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/deadline":{"title":"deadline","type":"topic","role":"symbol","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"deadline"},{"kind":"text","text":": "},{"preciseIdentifier":"s:8Dispatch0A8WallTimeV","text":"DispatchWallTime","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"The timestamp that the function times out."}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/deadline","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/deadline"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacontext/debugdescription.json b/docs/data/documentation/awslambdaruntimecore/lambdacontext/debugdescription.json new file mode 100644 index 00000000..657979bd --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacontext/debugdescription.json @@ -0,0 +1 @@ +{"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/debugDescription"},"abstract":[{"text":"Inherited from ","type":"text"},{"type":"codeVoice","code":"CustomDebugStringConvertible.debugDescription"},{"type":"text","text":"."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdacontext\/debugdescription"]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"debugDescription","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}]}],"kind":"declarations"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"]]},"metadata":{"externalID":"s:20AWSLambdaRuntimeCore13LambdaContextV16debugDescriptionSSvp","symbolKind":"property","title":"debugDescription","roleHeading":"Instance Property","modules":[{"name":"AWSLambdaRuntimeCore"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"debugDescription","kind":"identifier"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}]},"kind":"symbol","references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/debugDescription":{"title":"debugDescription","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/debugDescription","kind":"symbol","type":"topic","abstract":[],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"debugDescription"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/debugdescription","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacontext/getremainingtime().json b/docs/data/documentation/awslambdaruntimecore/lambdacontext/getremainingtime().json new file mode 100644 index 00000000..4233369e --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacontext/getremainingtime().json @@ -0,0 +1 @@ +{"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdacontext\/getremainingtime()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/getRemainingTime()","interfaceLanguage":"swift"},"metadata":{"role":"symbol","title":"getRemainingTime()","modules":[{"name":"AWSLambdaRuntimeCore"}],"externalID":"s:20AWSLambdaRuntimeCore13LambdaContextV16getRemainingTimes8DurationVyF","roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"getRemainingTime","kind":"identifier"},{"text":"() -> ","kind":"text"},{"text":"Duration","preciseIdentifier":"s:s8DurationV","kind":"typeIdentifier"}],"symbolKind":"method"},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"]]},"kind":"symbol","sections":[],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"getRemainingTime","kind":"identifier"},{"text":"() -> ","kind":"text"},{"preciseIdentifier":"s:s8DurationV","kind":"typeIdentifier","text":"Duration"}],"platforms":["macOS"]}],"kind":"declarations"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/getRemainingTime()":{"abstract":[],"type":"topic","role":"symbol","title":"getRemainingTime()","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/getRemainingTime()","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/getremainingtime()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getRemainingTime"},{"text":"() -> ","kind":"text"},{"preciseIdentifier":"s:s8DurationV","text":"Duration","kind":"typeIdentifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacontext/invokedfunctionarn.json b/docs/data/documentation/awslambdaruntimecore/lambdacontext/invokedfunctionarn.json new file mode 100644 index 00000000..2df7feca --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacontext/invokedfunctionarn.json @@ -0,0 +1 @@ +{"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/invokedFunctionARN","interfaceLanguage":"swift"},"metadata":{"modules":[{"name":"AWSLambdaRuntimeCore"}],"title":"invokedFunctionARN","externalID":"s:20AWSLambdaRuntimeCore13LambdaContextV18invokedFunctionARNSSvp","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"invokedFunctionARN","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"}]},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"type":"text","text":"The ARN of the Lambda function, version, or alias that’s specified in the invocation."}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdacontext\/invokedfunctionarn"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"invokedFunctionARN"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","sections":[],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/invokedFunctionARN":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/invokedFunctionARN","role":"symbol","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/invokedfunctionarn","abstract":[{"text":"The ARN of the Lambda function, version, or alias that’s specified in the invocation.","type":"text"}],"title":"invokedFunctionARN","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"invokedFunctionARN","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacontext/logger.json b/docs/data/documentation/awslambdaruntimecore/lambdacontext/logger.json new file mode 100644 index 00000000..80f038f6 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacontext/logger.json @@ -0,0 +1 @@ +{"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/logger","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"kind":"text","text":": "},{"text":"Logger","preciseIdentifier":"s:7Logging6LoggerV","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"]}]},{"content":[{"type":"heading","text":"Discussion","anchor":"discussion","level":2},{"name":"Note","style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"code":"LogLevel","type":"codeVoice"},{"text":" can be configured using the ","type":"text"},{"type":"codeVoice","code":"LOG_LEVEL"},{"text":" environment variable.","type":"text"}]}],"type":"aside"}],"kind":"content"}],"abstract":[{"code":"Logger","type":"codeVoice"},{"type":"text","text":" to log with."}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"]]},"sections":[],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdacontext\/logger"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"logger","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Logging6LoggerV","text":"Logger"}],"title":"logger","modules":[{"name":"AWSLambdaRuntimeCore"}],"externalID":"s:20AWSLambdaRuntimeCore13LambdaContextV6logger7Logging6LoggerVvp","roleHeading":"Instance Property"},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/logger":{"type":"topic","kind":"symbol","abstract":[{"code":"Logger","type":"codeVoice"},{"text":" to log with.","type":"text"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"logger"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Logger","preciseIdentifier":"s:7Logging6LoggerV"}],"title":"logger","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/logger","url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/logger"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacontext/requestid.json b/docs/data/documentation/awslambdaruntimecore/lambdacontext/requestid.json new file mode 100644 index 00000000..e36be163 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacontext/requestid.json @@ -0,0 +1 @@ +{"kind":"symbol","abstract":[{"type":"text","text":"The request ID, which identifies the request that triggered the function invocation."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"requestID","kind":"identifier"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdacontext\/requestid"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"requestID"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"roleHeading":"Instance Property","role":"symbol","title":"requestID","externalID":"s:20AWSLambdaRuntimeCore13LambdaContextV9requestIDSSvp","modules":[{"name":"AWSLambdaRuntimeCore"}]},"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/requestID","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"]]},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/requestID":{"abstract":[{"text":"The request ID, which identifies the request that triggered the function invocation.","type":"text"}],"title":"requestID","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"requestID","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/requestID","url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/requestid"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdacontext/traceid.json b/docs/data/documentation/awslambdaruntimecore/lambdacontext/traceid.json new file mode 100644 index 00000000..9b7c42cc --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdacontext/traceid.json @@ -0,0 +1 @@ +{"metadata":{"externalID":"s:20AWSLambdaRuntimeCore13LambdaContextV7traceIDSSvp","roleHeading":"Instance Property","title":"traceID","symbolKind":"property","modules":[{"name":"AWSLambdaRuntimeCore"}],"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"traceID","kind":"identifier"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}]},"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"type":"text","text":"The AWS X-Ray tracing header."}],"sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"traceID"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdacontext\/traceid"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/traceID"},"kind":"symbol","references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext/traceID":{"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdacontext\/traceid","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"traceID","kind":"identifier"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/traceID","title":"traceID","type":"topic","abstract":[{"type":"text","text":"The AWS X-Ray tracing header."}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaeventdecoder.json b/docs/data/documentation/awslambdaruntimecore/lambdaeventdecoder.json new file mode 100644 index 00000000..fec49c93 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaeventdecoder.json @@ -0,0 +1 @@ +{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"LambdaEventDecoder","kind":"identifier"}]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"The protocol a decoder must conform to so that it can be used with "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true},{"text":" to decode incoming","type":"text"},{"type":"text","text":" "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" events."}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdaeventdecoder"]}],"kind":"symbol","metadata":{"externalID":"s:20AWSLambdaRuntimeCore18LambdaEventDecoderP","modules":[{"name":"AWSLambdaRuntimeCore"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaEventDecoder"}],"role":"symbol","roleHeading":"Protocol","symbolKind":"protocol","title":"LambdaEventDecoder","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaEventDecoder","kind":"identifier"}]},"topicSections":[{"generated":true,"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder\/decode(_:from:)"],"title":"Instance Methods","anchor":"Instance-Methods"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaEventDecoder":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder","abstract":[{"type":"text","text":"The protocol a decoder must conform to so that it can be used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true,"type":"reference"},{"text":" to decode incoming","type":"text"},{"type":"text","text":" "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" events."}],"url":"\/documentation\/awslambdaruntimecore\/lambdaeventdecoder","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaEventDecoder"}],"title":"LambdaEventDecoder","type":"topic","navigatorTitle":[{"text":"LambdaEventDecoder","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaEventDecoder/decode(_:from:)":{"required":true,"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder\/decode(_:from:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decode"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"Event"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":".Type, "},{"text":"from","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Event"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaeventdecoder\/decode(_:from:)","abstract":[{"type":"text","text":"Decode the "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" representing the received event into the generic "},{"type":"codeVoice","code":"Event"},{"type":"text","text":" type"},{"type":"text","text":" "},{"text":"the handler will receive.","type":"text"}],"role":"symbol","title":"decode(_:from:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaeventdecoder/decode(_:from:).json b/docs/data/documentation/awslambdaruntimecore/lambdaeventdecoder/decode(_:from:).json new file mode 100644 index 00000000..7618cc85 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaeventdecoder/decode(_:from:).json @@ -0,0 +1 @@ +{"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"decode","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"Event"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"type","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"text":".Type, ","kind":"text"},{"text":"from","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"buffer"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"kind":"text","text":" "},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"text":"Decodable","preciseIdentifier":"s:Se","kind":"typeIdentifier"}],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"The type of the object to decode the buffer into.","type":"text"}]}],"name":"type"},{"content":[{"type":"paragraph","inlineContent":[{"text":"The buffer to be decoded.","type":"text"}]}],"name":"buffer"}]},{"content":[{"anchor":"return-value","type":"heading","level":2,"text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"An object containing the decoded data."}]}],"kind":"content"}],"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder\/decode(_:from:)","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdaeventdecoder\/decode(_:from:)"]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder"]]},"metadata":{"roleHeading":"Instance Method","externalID":"s:20AWSLambdaRuntimeCore18LambdaEventDecoderP6decode_4fromqd__qd__m_7NIOCore10ByteBufferVtKSeRd__lF","title":"decode(_:from:)","required":true,"modules":[{"name":"AWSLambdaRuntimeCore"}],"symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decode"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"Event"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"text":".Type, ","kind":"text"},{"kind":"externalParam","text":"from"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"kind":"text","text":") "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Event"}],"role":"symbol"},"kind":"symbol","abstract":[{"text":"Decode the ","type":"text"},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the received event into the generic "},{"type":"codeVoice","code":"Event"},{"type":"text","text":" type"},{"text":" ","type":"text"},{"text":"the handler will receive.","type":"text"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaEventDecoder":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder","abstract":[{"type":"text","text":"The protocol a decoder must conform to so that it can be used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true,"type":"reference"},{"text":" to decode incoming","type":"text"},{"type":"text","text":" "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" events."}],"url":"\/documentation\/awslambdaruntimecore\/lambdaeventdecoder","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaEventDecoder"}],"title":"LambdaEventDecoder","type":"topic","navigatorTitle":[{"text":"LambdaEventDecoder","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaEventDecoder/decode(_:from:)":{"required":true,"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder\/decode(_:from:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decode"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"Event"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":".Type, "},{"text":"from","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Event"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaeventdecoder\/decode(_:from:)","abstract":[{"type":"text","text":"Decode the "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" representing the received event into the generic "},{"type":"codeVoice","code":"Event"},{"type":"text","text":" type"},{"type":"text","text":" "},{"text":"the handler will receive.","type":"text"}],"role":"symbol","title":"decode(_:from:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdahandler.json b/docs/data/documentation/awslambdaruntimecore/lambdahandler.json new file mode 100644 index 00000000..9327b2d8 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdahandler.json @@ -0,0 +1 @@ +{"sections":[],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"topicSections":[{"anchor":"Associated-Types","generated":true,"title":"Associated Types","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"]},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"],"generated":true,"title":"Instance Methods","anchor":"Instance-Methods"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdahandler"]}],"abstract":[{"type":"text","text":"This handler protocol is intended to serve the most common use-cases."},{"type":"text","text":" "},{"text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"type":"text","text":" object and encoding the returned "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","isActive":true},{"text":" object is handled by the library.","type":"text"},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","isActive":true,"type":"reference"},{"type":"text","text":" function simply receives the generic "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","isActive":true},{"type":"text","text":" object as input and returns the generic "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"platforms":["macOS"]}]},{"content":[{"level":2,"type":"heading","anchor":"overview","text":"Overview"},{"style":"note","name":"Note","type":"aside","content":[{"inlineContent":[{"text":"This handler protocol does not support response streaming because the output has to be encoded prior to it being sent, e.g. it is not possible to encode a partial\/incomplete JSON string.","type":"text"},{"type":"text","text":" "},{"text":"This protocol also does not support the execution of background work after the response has been returned – the ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"},{"type":"text","text":" protocol caters for such use-cases."}],"type":"paragraph"}]}],"kind":"content"}],"relationshipsSections":[{"title":"Conforming Types","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler"],"type":"conformingTypes","kind":"relationships"}],"metadata":{"externalID":"s:20AWSLambdaRuntimeCore13LambdaHandlerP","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaHandler"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaHandler"}],"symbolKind":"protocol","modules":[{"name":"AWSLambdaRuntimeCore"}],"roleHeading":"Protocol","title":"LambdaHandler","role":"symbol"},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/handle(_:context:)":{"required":true,"kind":"symbol","title":"handle(_:context:)","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"handle"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event"},{"text":", ","kind":"text"},{"text":"context","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa","kind":"typeIdentifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","type":"topic","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Output":{"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","title":"Output","abstract":[{"type":"text","text":"Generic output type."},{"text":" ","type":"text"},{"type":"text","text":"This is the return type of the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"text":" function.","type":"text"}],"required":true,"role":"symbol","kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseWriter"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"type":"topic","abstract":[{"text":"Used with ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"},{"type":"text","text":"."},{"type":"text","text":" "},{"type":"text","text":"A mechanism to “return” an output from "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"type":"text","text":" without the function needing to"},{"type":"text","text":" "},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","kind":"symbol","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Event":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","role":"symbol","abstract":[{"text":"Generic input type.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","title":"Event","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Event","kind":"identifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"}],"type":"topic","kind":"symbol","required":true},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","abstract":[{"text":"A ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"type":"text","text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ClosureHandler","kind":"identifier"}],"navigatorTitle":[{"text":"ClosureHandler","kind":"identifier"}],"title":"ClosureHandler","url":"\/documentation\/awslambdaruntimecore\/closurehandler","role":"symbol","type":"topic","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdahandler/event.json b/docs/data/documentation/awslambdaruntimecore/lambdahandler/event.json new file mode 100644 index 00000000..3813bdfc --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdahandler/event.json @@ -0,0 +1 @@ +{"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdahandler\/event"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"text":"Generic input type.","type":"text"},{"text":" ","type":"text"},{"text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"]]},"sections":[],"metadata":{"symbolKind":"associatedtype","externalID":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","required":true,"role":"symbol","modules":[{"name":"AWSLambdaRuntimeCore"}],"fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"text":"Event","kind":"identifier"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:Se","kind":"typeIdentifier","text":"Decodable"}],"title":"Event","roleHeading":"Associated Type"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"Event","kind":"identifier"},{"kind":"text","text":" : "},{"preciseIdentifier":"s:Se","kind":"typeIdentifier","text":"Decodable"}]}],"kind":"declarations"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/handle(_:context:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","title":"handle(_:context:)","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"required":true,"kind":"symbol","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Output":{"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","title":"Output","abstract":[{"type":"text","text":"Generic output type."},{"text":" ","type":"text"},{"type":"text","text":"This is the return type of the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"text":" function.","type":"text"}],"required":true,"role":"symbol","kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Event":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","role":"symbol","abstract":[{"text":"Generic input type.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","title":"Event","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Event","kind":"identifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"}],"type":"topic","kind":"symbol","required":true}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdahandler/handle(_:context:).json b/docs/data/documentation/awslambdaruntimecore/lambdahandler/handle(_:context:).json new file mode 100644 index 00000000..e6552b16 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdahandler/handle(_:context:).json @@ -0,0 +1 @@ +{"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"event"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","text":"Event","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"parameters":[{"name":"event","content":[{"type":"paragraph","inlineContent":[{"text":"The generic ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object representing the invocation’s input data.","type":"text"}]}]},{"name":"context","content":[{"inlineContent":[{"type":"text","text":"The "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"},{"text":" containing the invocation’s metadata.","type":"text"}],"type":"paragraph"}]}],"kind":"parameters"},{"content":[{"level":2,"text":"Return Value","anchor":"return-value","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A generic "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","type":"reference","isActive":true},{"text":" object representing the computed result.","type":"text"}]}],"kind":"content"}],"abstract":[{"type":"text","text":"Implement the business logic of the Lambda function here."}],"kind":"symbol","variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"metadata":{"externalID":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6handle_7context6OutputQz5EventQz_AA0D7ContextVtYaKF","role":"symbol","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"}],"title":"handle(_:context:)","modules":[{"name":"AWSLambdaRuntimeCore"}],"required":true,"roleHeading":"Instance Method"},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Event":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","role":"symbol","abstract":[{"text":"Generic input type.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","title":"Event","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Event","kind":"identifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"}],"type":"topic","kind":"symbol","required":true},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/handle(_:context:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","title":"handle(_:context:)","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"required":true,"kind":"symbol","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Output":{"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","title":"Output","abstract":[{"type":"text","text":"Generic output type."},{"text":" ","type":"text"},{"type":"text","text":"This is the return type of the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"text":" function.","type":"text"}],"required":true,"role":"symbol","kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdahandler/output.json b/docs/data/documentation/awslambdaruntimecore/lambdahandler/output.json new file mode 100644 index 00000000..dcdb6e39 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdahandler/output.json @@ -0,0 +1 @@ +{"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdahandler\/output"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},"abstract":[{"type":"text","text":"Generic output type."},{"type":"text","text":" "},{"type":"text","text":"This is the return type of the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"type":"text","text":" function."}],"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","metadata":{"externalID":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa","modules":[{"name":"AWSLambdaRuntimeCore"}],"role":"symbol","required":true,"symbolKind":"associatedtype","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"title":"Output","roleHeading":"Associated Type"},"sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Event":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","role":"symbol","abstract":[{"text":"Generic input type.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","title":"Event","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Event","kind":"identifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"}],"type":"topic","kind":"symbol","required":true},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Output":{"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","title":"Output","abstract":[{"type":"text","text":"Generic output type."},{"text":" ","type":"text"},{"type":"text","text":"This is the return type of the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"text":" function.","type":"text"}],"required":true,"role":"symbol","kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/handle(_:context:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","title":"handle(_:context:)","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"required":true,"kind":"symbol","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdahandleradapter.json b/docs/data/documentation/awslambdaruntimecore/lambdahandleradapter.json new file mode 100644 index 00000000..7008f8d6 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdahandleradapter.json @@ -0,0 +1 @@ +{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaHandlerAdapter","kind":"identifier"},{"text":"<","kind":"text"},{"text":"Event","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"Output"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"Handler"},{"kind":"text","text":"> "},{"kind":"keyword","text":"where"},{"text":" ","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"text":" == ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","text":"Event","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Output"},{"kind":"text","text":" == "},{"kind":"typeIdentifier","text":"Handler"},{"text":".","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa","text":"Output"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Handler"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"LambdaHandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP"}]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"topicSections":[{"generated":true,"title":"Initializers","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/init(handler:)"],"anchor":"Initializers"},{"anchor":"Instance-Methods","generated":true,"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/handle(_:outputWriter:context:)"],"title":"Instance Methods"}],"sections":[],"relationshipsSections":[{"type":"conformsTo","title":"Conforms To","kind":"relationships","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter","interfaceLanguage":"swift"},"kind":"symbol","abstract":[{"text":"Adapts a ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","isActive":true},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"},{"type":"text","text":"."}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdahandleradapter"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"modules":[{"name":"AWSLambdaRuntimeCore"}],"navigatorTitle":[{"text":"LambdaHandlerAdapter","kind":"identifier"}],"externalID":"s:20AWSLambdaRuntimeCore20LambdaHandlerAdapterV","title":"LambdaHandlerAdapter","symbolKind":"struct","roleHeading":"Structure","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaHandlerAdapter"}],"role":"symbol"},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Event":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","role":"symbol","abstract":[{"text":"Generic input type.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","title":"Event","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Event","kind":"identifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"}],"type":"topic","kind":"symbol","required":true},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandlerAdapter":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter","title":"LambdaHandlerAdapter","abstract":[{"type":"text","text":"Adapts a "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true},{"text":".","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter","kind":"symbol","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaHandlerAdapter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaHandlerAdapter"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/handle(_:context:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","title":"handle(_:context:)","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"required":true,"kind":"symbol","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandlerAdapter/init(handler:)":{"url":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter\/init(handler:)","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"handler"},{"kind":"text","text":": "},{"text":"Handler","kind":"typeIdentifier"},{"text":")","kind":"text"}],"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/init(handler:)","kind":"symbol","title":"init(handler:)","role":"symbol","abstract":[{"type":"text","text":"Initializes an instance given a concrete handler."}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Output":{"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","title":"Output","abstract":[{"type":"text","text":"Generic output type."},{"text":" ","type":"text"},{"type":"text","text":"This is the return type of the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"text":" function.","type":"text"}],"required":true,"role":"symbol","kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandlerAdapter/handle(_:outputWriter:context:)":{"type":"topic","role":"symbol","title":"handle(_:outputWriter:context:)","kind":"symbol","abstract":[{"type":"text","text":"Passes the generic "},{"type":"codeVoice","code":"Event"},{"type":"text","text":" object to the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","isActive":true},{"text":" function, and","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"the resulting output is then written to "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"’s "},{"type":"codeVoice","code":"outputWriter"},{"type":"text","text":"."}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/handle(_:outputWriter:context:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"Event","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"some"},{"kind":"text","text":" "},{"text":"LambdaResponseWriter","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Output"},{"kind":"text","text":">, "},{"text":"context","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdahandleradapter/handle(_:outputwriter:context:).json b/docs/data/documentation/awslambdaruntimecore/lambdahandleradapter/handle(_:outputwriter:context:).json new file mode 100644 index 00000000..02e11582 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdahandleradapter/handle(_:outputwriter:context:).json @@ -0,0 +1 @@ +{"metadata":{"role":"symbol","title":"handle(_:outputWriter:context:)","externalID":"s:20AWSLambdaRuntimeCore20LambdaHandlerAdapterV6handle_12outputWriter7contextyx_qd__AA0D7ContextVtYaKAA0d8ResponseI0Rd__6OutputQyd__AJRt0_lF","symbolKind":"method","modules":[{"name":"AWSLambdaRuntimeCore"}],"roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"outputWriter"},{"text":": ","kind":"text"},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":">, "},{"text":"context","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}]},"kind":"symbol","identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/handle(_:outputWriter:context:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Passes the generic "},{"type":"codeVoice","code":"Event"},{"text":" object to the ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","isActive":true,"type":"reference"},{"text":" function, and","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"the resulting output is then written to "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"},{"type":"text","text":"’s "},{"code":"outputWriter","type":"codeVoice"},{"type":"text","text":"."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"event","kind":"internalParam"},{"kind":"text","text":": "},{"text":"Event","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"outputWriter"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"kind":"text","text":" "},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","text":"LambdaResponseWriter","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"Output"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"kind":"text","text":": "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"languages":["swift"]}]},{"kind":"parameters","parameters":[{"name":"event","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The received event."}]}]},{"name":"outputWriter","content":[{"inlineContent":[{"type":"text","text":"The writer to write the computed response to."}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"type":"text","text":"The "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","isActive":true,"type":"reference"},{"text":" containing the invocation’s metadata.","type":"text"}],"type":"paragraph"}],"name":"context"}]}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdahandleradapter\/handle(_:outputwriter:context:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter"]]},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/handle(_:context:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","title":"handle(_:context:)","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"required":true,"kind":"symbol","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandlerAdapter/handle(_:outputWriter:context:)":{"type":"topic","role":"symbol","title":"handle(_:outputWriter:context:)","kind":"symbol","abstract":[{"type":"text","text":"Passes the generic "},{"type":"codeVoice","code":"Event"},{"type":"text","text":" object to the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","isActive":true},{"text":" function, and","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"the resulting output is then written to "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"’s "},{"type":"codeVoice","code":"outputWriter"},{"type":"text","text":"."}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/handle(_:outputWriter:context:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"Event","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"some"},{"kind":"text","text":" "},{"text":"LambdaResponseWriter","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Output"},{"kind":"text","text":">, "},{"text":"context","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandlerAdapter":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter","title":"LambdaHandlerAdapter","abstract":[{"type":"text","text":"Adapts a "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true},{"text":".","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter","kind":"symbol","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaHandlerAdapter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaHandlerAdapter"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdahandleradapter/init(handler:).json b/docs/data/documentation/awslambdaruntimecore/lambdahandleradapter/init(handler:).json new file mode 100644 index 00000000..bb94fd46 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdahandleradapter/init(handler:).json @@ -0,0 +1 @@ +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/init(handler:)"},"metadata":{"title":"init(handler:)","roleHeading":"Initializer","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"handler"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Handler"},{"text":")","kind":"text"}],"externalID":"s:20AWSLambdaRuntimeCore20LambdaHandlerAdapterV7handlerACyxq_q0_Gq0__tcfc","symbolKind":"init","modules":[{"name":"AWSLambdaRuntimeCore"}]},"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"text":"handler","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Handler"},{"text":")","kind":"text"}]}],"kind":"declarations"},{"parameters":[{"name":"handler","content":[{"inlineContent":[{"type":"text","text":"The "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","isActive":true},{"text":" conforming handler that is to be adapted to ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"},{"text":".","type":"text"}],"type":"paragraph"}]}],"kind":"parameters"}],"sections":[],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdahandleradapter\/init(handler:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter"]]},"abstract":[{"type":"text","text":"Initializes an instance given a concrete handler."}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Event":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","role":"symbol","abstract":[{"text":"Generic input type.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","title":"Event","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Event","kind":"identifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"}],"type":"topic","kind":"symbol","required":true},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Output":{"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","title":"Output","abstract":[{"type":"text","text":"Generic output type."},{"text":" ","type":"text"},{"type":"text","text":"This is the return type of the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"text":" function.","type":"text"}],"required":true,"role":"symbol","kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/handle(_:context:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","title":"handle(_:context:)","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"required":true,"kind":"symbol","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandlerAdapter/init(handler:)":{"url":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter\/init(handler:)","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"handler"},{"kind":"text","text":": "},{"text":"Handler","kind":"typeIdentifier"},{"text":")","kind":"text"}],"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/init(handler:)","kind":"symbol","title":"init(handler:)","role":"symbol","abstract":[{"type":"text","text":"Initializes an instance given a concrete handler."}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandlerAdapter":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter","title":"LambdaHandlerAdapter","abstract":[{"type":"text","text":"Adapts a "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true},{"text":".","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter","kind":"symbol","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaHandlerAdapter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaHandlerAdapter"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaoutputencoder.json b/docs/data/documentation/awslambdaruntimecore/lambdaoutputencoder.json new file mode 100644 index 00000000..ff3d8252 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaoutputencoder.json @@ -0,0 +1 @@ +{"relationshipsSections":[{"type":"conformingTypes","title":"Conforming Types","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder"],"kind":"relationships"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaOutputEncoder","kind":"identifier"}],"platforms":["macOS"]}]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","interfaceLanguage":"swift"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdaoutputencoder"]}],"sections":[],"abstract":[{"text":"The protocol an encoder must conform to so that it can be used with ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true,"type":"reference"},{"text":" to encode the generic","type":"text"},{"type":"text","text":" "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","isActive":true},{"text":" object into a ","type":"text"},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":"."}],"schemaVersion":{"major":0,"patch":0,"minor":3},"metadata":{"modules":[{"name":"AWSLambdaRuntimeCore"}],"role":"symbol","externalID":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP","roleHeading":"Protocol","navigatorTitle":[{"kind":"identifier","text":"LambdaOutputEncoder"}],"symbolKind":"protocol","title":"LambdaOutputEncoder","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"LambdaOutputEncoder","kind":"identifier"}]},"topicSections":[{"title":"Associated Types","generated":true,"anchor":"Associated-Types","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output"]},{"title":"Instance Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/encode(_:into:)"],"generated":true,"anchor":"Instance-Methods"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder/Output":{"required":true,"kind":"symbol","title":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","abstract":[],"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/output","type":"topic","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder":{"role":"symbol","navigatorTitle":[{"text":"LambdaOutputEncoder","kind":"identifier"}],"type":"topic","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaOutputEncoder","kind":"identifier"}],"abstract":[{"type":"text","text":"The protocol an encoder must conform to so that it can be used with "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true},{"text":" to encode the generic","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output"},{"text":" object into a ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":"."}],"title":"LambdaOutputEncoder","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder/encode(_:into:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/encode(_:into:)","abstract":[{"text":"Encode the generic type ","type":"text"},{"type":"codeVoice","code":"Output"},{"type":"text","text":" the handler has returned into a "},{"type":"codeVoice","code":"ByteBuffer"},{"text":".","type":"text"}],"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/encode(_:into:)","required":true,"type":"topic","title":"encode(_:into:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"encode","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP0E0Qa"},{"kind":"text","text":", "},{"kind":"externalParam","text":"into"},{"text":": ","kind":"text"},{"text":"inout","kind":"keyword"},{"kind":"text","text":" "},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","kind":"typeIdentifier","text":"ByteBuffer"},{"text":") ","kind":"text"},{"text":"throws","kind":"keyword"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"VoidEncoder"}],"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/voidencoder","title":"VoidEncoder","navigatorTitle":[{"kind":"identifier","text":"VoidEncoder"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder","role":"symbol","abstract":[]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaoutputencoder/encode(_:into:).json b/docs/data/documentation/awslambdaruntimecore/lambdaoutputencoder/encode(_:into:).json new file mode 100644 index 00000000..4dc15a3e --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaoutputencoder/encode(_:into:).json @@ -0,0 +1 @@ +{"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"encode"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"value"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP0E0Qa","text":"Output"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"into"},{"kind":"text","text":" "},{"kind":"internalParam","text":"buffer"},{"text":": ","kind":"text"},{"text":"inout","kind":"keyword"},{"kind":"text","text":" "},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"throws"}],"platforms":["macOS"]}]},{"parameters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"The object to encode into a ","type":"text"},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":"."}]}],"name":"value"},{"name":"buffer","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" where the encoded value will be written to."}]}]}],"kind":"parameters"}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder"]]},"metadata":{"required":true,"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"encode","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP0E0Qa","kind":"typeIdentifier","text":"Output"},{"text":", ","kind":"text"},{"text":"into","kind":"externalParam"},{"kind":"text","text":": "},{"text":"inout","kind":"keyword"},{"text":" ","kind":"text"},{"text":"ByteBuffer","preciseIdentifier":"s:7NIOCore10ByteBufferV","kind":"typeIdentifier"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"}],"modules":[{"name":"AWSLambdaRuntimeCore"}],"externalID":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP6encode_4intoy0E0Qz_7NIOCore10ByteBufferVztKF","role":"symbol","symbolKind":"method","title":"encode(_:into:)"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/encode(_:into:)"]}],"sections":[],"kind":"symbol","abstract":[{"type":"text","text":"Encode the generic type "},{"type":"codeVoice","code":"Output"},{"type":"text","text":" the handler has returned into a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":"."}],"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/encode(_:into:)","interfaceLanguage":"swift"},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder/encode(_:into:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/encode(_:into:)","abstract":[{"text":"Encode the generic type ","type":"text"},{"type":"codeVoice","code":"Output"},{"type":"text","text":" the handler has returned into a "},{"type":"codeVoice","code":"ByteBuffer"},{"text":".","type":"text"}],"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/encode(_:into:)","required":true,"type":"topic","title":"encode(_:into:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"encode","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP0E0Qa"},{"kind":"text","text":", "},{"kind":"externalParam","text":"into"},{"text":": ","kind":"text"},{"text":"inout","kind":"keyword"},{"kind":"text","text":" "},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","kind":"typeIdentifier","text":"ByteBuffer"},{"text":") ","kind":"text"},{"text":"throws","kind":"keyword"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder/Output":{"required":true,"kind":"symbol","title":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","abstract":[],"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/output","type":"topic","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder":{"role":"symbol","navigatorTitle":[{"text":"LambdaOutputEncoder","kind":"identifier"}],"type":"topic","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaOutputEncoder","kind":"identifier"}],"abstract":[{"type":"text","text":"The protocol an encoder must conform to so that it can be used with "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true},{"text":" to encode the generic","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output"},{"text":" object into a ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":"."}],"title":"LambdaOutputEncoder","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaoutputencoder/output.json b/docs/data/documentation/awslambdaruntimecore/lambdaoutputencoder/output.json new file mode 100644 index 00000000..d3f546ae --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaoutputencoder/output.json @@ -0,0 +1 @@ +{"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder"]]},"kind":"symbol","identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"text":"Output","kind":"identifier"}],"platforms":["macOS"],"languages":["swift"]}]}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/output"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"externalID":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP0E0Qa","modules":[{"name":"AWSLambdaRuntimeCore"}],"title":"Output","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Output"}],"role":"symbol","required":true,"symbolKind":"associatedtype"},"sections":[],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder":{"role":"symbol","navigatorTitle":[{"text":"LambdaOutputEncoder","kind":"identifier"}],"type":"topic","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaOutputEncoder","kind":"identifier"}],"abstract":[{"type":"text","text":"The protocol an encoder must conform to so that it can be used with "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true},{"text":" to encode the generic","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output"},{"text":" object into a ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":"."}],"title":"LambdaOutputEncoder","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder/Output":{"required":true,"kind":"symbol","title":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","abstract":[],"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/output","type":"topic","role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaresponsestreamwriter.json b/docs/data/documentation/awslambdaruntimecore/lambdaresponsestreamwriter.json new file mode 100644 index 00000000..db5115b6 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaresponsestreamwriter.json @@ -0,0 +1 @@ +{"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"metadata":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"role":"symbol","symbolKind":"protocol","navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","externalID":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","modules":[{"name":"AWSLambdaRuntimeCore"}],"roleHeading":"Protocol"},"sections":[],"abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"before the first call to "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"text":" or ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)","isActive":true},{"text":".","type":"text"}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"LambdaResponseStreamWriter","kind":"identifier"}],"languages":["swift"],"platforms":["macOS"]}]}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"topicSections":[{"generated":true,"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"],"anchor":"Instance-Methods","title":"Instance Methods"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/write(_:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"type":"topic","title":"write(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"required":true,"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/finish()":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/finish()","abstract":[{"text":"End the response stream and the underlying HTTP response.","type":"text"}],"title":"finish()","kind":"symbol","required":true,"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"finish"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/finish().json b/docs/data/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/finish().json new file mode 100644 index 00000000..ae2b49af --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/finish().json @@ -0,0 +1 @@ +{"abstract":[{"text":"End the response stream and the underlying HTTP response.","type":"text"}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/finish()"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"finish"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}]}],"kind":"declarations"}],"sections":[],"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"finish"},{"kind":"text","text":"() "},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"externalID":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP6finishyyYaKF","title":"finish()","role":"symbol","roleHeading":"Instance Method","symbolKind":"method","required":true,"modules":[{"name":"AWSLambdaRuntimeCore"}]},"kind":"symbol","identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"]]},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/write(_:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"type":"topic","title":"write(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"required":true,"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/finish()":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/finish()","abstract":[{"text":"End the response stream and the underlying HTTP response.","type":"text"}],"title":"finish()","kind":"symbol","required":true,"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"finish"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/write(_:).json b/docs/data/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/write(_:).json new file mode 100644 index 00000000..cb6dce0c --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/write(_:).json @@ -0,0 +1 @@ +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)"]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"write","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"buffer","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"name":"buffer","content":[{"type":"paragraph","inlineContent":[{"text":"The buffer to write.","type":"text"}]}]}]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"]]},"sections":[],"abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"metadata":{"role":"symbol","modules":[{"name":"AWSLambdaRuntimeCore"}],"roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"write"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"title":"write(_:)","required":true,"externalID":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP5writeyy7NIOCore10ByteBufferVYaKF","symbolKind":"method"},"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/write(_:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"type":"topic","title":"write(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"required":true,"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/writeandfinish(_:).json b/docs/data/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/writeandfinish(_:).json new file mode 100644 index 00000000..0c4d9efb --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/writeandfinish(_:).json @@ -0,0 +1 @@ +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)"]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"writeAndFinish","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"buffer","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}]}],"kind":"declarations"},{"parameters":[{"name":"buffer","content":[{"type":"paragraph","inlineContent":[{"text":"The buffer to write.","type":"text"}]}]}],"kind":"parameters"}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"]]},"kind":"symbol","schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"metadata":{"required":true,"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"writeAndFinish","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"symbolKind":"method","externalID":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP14writeAndFinishyy7NIOCore10ByteBufferVYaKF","title":"writeAndFinish(_:)","roleHeading":"Instance Method","modules":[{"name":"AWSLambdaRuntimeCore"}]},"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)","interfaceLanguage":"swift"},"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/write(_:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"type":"topic","title":"write(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"required":true,"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaresponsewriter.json b/docs/data/documentation/awslambdaruntimecore/lambdaresponsewriter.json new file mode 100644 index 00000000..09b10caa --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaresponsewriter.json @@ -0,0 +1 @@ +{"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"},"abstract":[{"text":"Used with ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"text":".","type":"text"},{"text":" ","type":"text"},{"text":"A mechanism to “return” an output from ","type":"text"},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","type":"reference"},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"type":"emphasis","inlineContent":[{"text":"after","type":"text"}]},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"sections":[],"topicSections":[{"anchor":"Associated-Types","title":"Associated Types","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output"],"generated":true},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/write(_:)"],"anchor":"Instance-Methods","title":"Instance Methods","generated":true}],"relationshipsSections":[{"title":"Conforming Types","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter"],"type":"conformingTypes","kind":"relationships"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP6OutputQa","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output"},{"text":">","kind":"text"}],"platforms":["macOS"]}]}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdaresponsewriter"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","metadata":{"role":"symbol","roleHeading":"Protocol","title":"LambdaResponseWriter","externalID":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"LambdaResponseWriter","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"symbolKind":"protocol","modules":[{"name":"AWSLambdaRuntimeCore"}]},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter/Output":{"kind":"symbol","abstract":[],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter\/output","required":true,"title":"Output","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter/write(_:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/write(_:)","title":"write(_:)","kind":"symbol","required":true,"type":"topic","abstract":[{"text":"Sends the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output"},{"text":" object (representing the computed result of the handler)","type":"text"},{"type":"text","text":" "},{"text":"to the AWS Lambda response endpoint.","type":"text"},{"type":"text","text":" "},{"text":"This function simply serves as a mechanism to return the computed result from a handler function","type":"text"},{"type":"text","text":" "},{"type":"text","text":"without an explicit "},{"type":"codeVoice","code":"return"},{"type":"text","text":"."}],"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"write"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP6OutputQa","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter\/write(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter","role":"symbol","abstract":[{"text":"A ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","isActive":true},{"text":" wrapper that conforms to ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":".","type":"text"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaCodableResponseWriter","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter","navigatorTitle":[{"text":"LambdaCodableResponseWriter","kind":"identifier"}],"kind":"symbol","title":"LambdaCodableResponseWriter"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaresponsewriter/output.json b/docs/data/documentation/awslambdaruntimecore/lambdaresponsewriter/output.json new file mode 100644 index 00000000..b73d2e58 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaresponsewriter/output.json @@ -0,0 +1 @@ +{"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdaresponsewriter\/output"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"required":true,"roleHeading":"Associated Type","externalID":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP6OutputQa","symbolKind":"associatedtype","modules":[{"name":"AWSLambdaRuntimeCore"}],"role":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"text":"Output","kind":"identifier"}],"title":"Output"},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Output"}],"platforms":["macOS"],"languages":["swift"]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output"},"sections":[],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter/Output":{"kind":"symbol","abstract":[],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter\/output","required":true,"title":"Output","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","kind":"symbol","title":"LambdaWithBackgroundProcessingHandler","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaWithBackgroundProcessingHandler"}],"abstract":[{"text":"This protocol is exactly like ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"type":"text","text":", with the only difference being the added support for executing background"},{"type":"text","text":" "},{"text":"work after the result has been sent to the AWS Lambda control plane.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This is achieved by not having a return type in the "},{"code":"handle","type":"codeVoice"},{"text":" function. The output is instead written into a","type":"text"},{"type":"text","text":" "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"type":"text","text":"that is passed in as an argument, meaning that the"},{"type":"text","text":" "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true,"type":"reference"},{"type":"text","text":" function is then"},{"type":"text","text":" "},{"text":"free to implement any background work after the result has been sent to the AWS Lambda control plane.","type":"text"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaresponsewriter/write(_:).json b/docs/data/documentation/awslambdaruntimecore/lambdaresponsewriter/write(_:).json new file mode 100644 index 00000000..804ca453 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaresponsewriter/write(_:).json @@ -0,0 +1 @@ +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/write(_:)"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdaresponsewriter\/write(_:)"]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"]]},"sections":[],"kind":"symbol","abstract":[{"type":"text","text":"Sends the generic "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output","type":"reference","isActive":true},{"type":"text","text":" object (representing the computed result of the handler)"},{"text":" ","type":"text"},{"text":"to the AWS Lambda response endpoint.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This function simply serves as a mechanism to return the computed result from a handler function"},{"type":"text","text":" "},{"type":"text","text":"without an explicit "},{"type":"codeVoice","code":"return"},{"type":"text","text":"."}],"metadata":{"externalID":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP5writeyy6OutputQzYaKF","required":true,"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"write"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP6OutputQa","kind":"typeIdentifier","text":"Output"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"symbolKind":"method","modules":[{"name":"AWSLambdaRuntimeCore"}],"title":"write(_:)","roleHeading":"Instance Method","role":"symbol"},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"write","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"output"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP6OutputQa"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}],"platforms":["macOS"],"languages":["swift"]}]}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter/Output":{"kind":"symbol","abstract":[],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter\/output","required":true,"title":"Output","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter/write(_:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/write(_:)","title":"write(_:)","kind":"symbol","required":true,"type":"topic","abstract":[{"text":"Sends the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output"},{"text":" object (representing the computed result of the handler)","type":"text"},{"type":"text","text":" "},{"text":"to the AWS Lambda response endpoint.","type":"text"},{"type":"text","text":" "},{"text":"This function simply serves as a mechanism to return the computed result from a handler function","type":"text"},{"type":"text","text":" "},{"type":"text","text":"without an explicit "},{"type":"codeVoice","code":"return"},{"type":"text","text":"."}],"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"write"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP6OutputQa","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter\/write(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaruntime.json b/docs/data/documentation/awslambdaruntimecore/lambdaruntime.json new file mode 100644 index 00000000..e0952c4e --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaruntime.json @@ -0,0 +1 @@ +{"schemaVersion":{"major":0,"patch":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"final","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"LambdaRuntime","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"Handler"},{"text":"> ","kind":"text"},{"text":"where","kind":"keyword"},{"kind":"text","text":" "},{"text":"Handler","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore22StreamingLambdaHandlerP","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","text":"StreamingLambdaHandler"}]}]}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdaruntime"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"symbol","metadata":{"role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaRuntime"}],"title":"LambdaRuntime","externalID":"s:20AWSLambdaRuntimeCore06LambdaB0C","roleHeading":"Class","navigatorTitle":[{"kind":"identifier","text":"LambdaRuntime"}],"modules":[{"name":"AWSLambdaRuntimeCore"}],"symbolKind":"class"},"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime","interfaceLanguage":"swift"},"topicSections":[{"title":"Initializers","anchor":"Initializers","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(body:)","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(decoder:body:)","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(encoder:decoder:body:)","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(handler:eventLoop:logger:)"],"generated":true},{"generated":true,"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/run()"],"anchor":"Instance-Methods","title":"Instance Methods"}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"relationshipsSections":[{"kind":"relationships","title":"Conforms To","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/s8SendableP"],"type":"conformsTo"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime/run()":{"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"run"},{"text":"() ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"run()","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/run()","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/run()","abstract":[]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime/init(body:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(body:)","title":"init(body:)","type":"topic","kind":"symbol","fragments":[{"text":"convenience","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"body"},{"kind":"text","text":": ("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", any ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter"},{"text":", ","kind":"text"},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":")","kind":"text"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(body:)","role":"symbol","conformance":{"constraints":[{"type":"codeVoice","code":"Handler"},{"text":" conforms to ","type":"text"},{"type":"codeVoice","code":"StreamingLambdaHandler"},{"type":"text","text":"."}],"conformancePrefix":[{"type":"text","text":"Conforms when"}],"availabilityPrefix":[{"text":"Available when","type":"text"}]},"abstract":[{"type":"text","text":"Initialize an instance with a "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":" in the form of a closure.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/finish()":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/finish()","abstract":[{"text":"End the response stream and the underlying HTTP response.","type":"text"}],"title":"finish()","kind":"symbol","required":true,"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"finish"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler/handle(_:responseWriter:context:)":{"role":"symbol","type":"topic","url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler\/handle(_:responsewriter:context:)","required":true,"title":"handle(_:responseWriter:context:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"responseWriter"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","abstract":[{"text":"The handler function – implement the business logic of the Lambda function here.","type":"text"}],"kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime/init(decoder:body:)":{"abstract":[{"text":"Initialize an instance with a ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","isActive":true},{"text":" defined in the form of a closure ","type":"text"},{"inlineContent":[{"text":"with a ","type":"text"},{"type":"codeVoice","code":"Void"},{"text":" return type","type":"text"}],"type":"strong"},{"type":"text","text":", an encoder, and a decoder."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"convenience"},{"kind":"text","text":" "},{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"Event"},{"kind":"text","text":", "},{"text":"Decoder","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"decoder"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Decoder"},{"kind":"text","text":", "},{"kind":"externalParam","text":"body"},{"kind":"text","text":": "},{"kind":"attribute","text":"sending "},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":")"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(decoder:body:)","conformance":{"constraints":[{"code":"Handler","type":"codeVoice"},{"text":" conforms to ","type":"text"},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"text":".","type":"text"}],"conformancePrefix":[{"text":"Conforms when","type":"text"}],"availabilityPrefix":[{"text":"Available when","type":"text"}]},"type":"topic","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(decoder:body:)","title":"init(decoder:body:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/s8SendableP":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/s8SendableP","title":"Swift.Sendable","type":"unresolvable"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime/init(handler:eventLoop:logger:)":{"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(handler:eventloop:logger:)","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(handler:eventLoop:logger:)","role":"symbol","abstract":[],"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"handler"},{"text":": ","kind":"text"},{"kind":"attribute","text":"sending "},{"text":"Handler","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"eventLoop","kind":"externalParam"},{"kind":"text","text":": any "},{"kind":"typeIdentifier","text":"EventLoop","preciseIdentifier":"s:7NIOCore9EventLoopP"},{"kind":"text","text":", "},{"text":"logger","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Logger","kind":"typeIdentifier","preciseIdentifier":"s:7Logging6LoggerV"},{"text":")","kind":"text"}],"type":"topic","title":"init(handler:eventLoop:logger:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime","abstract":[],"title":"LambdaRuntime","kind":"symbol","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"LambdaRuntime"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaRuntime"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime/init(encoder:decoder:body:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(encoder:decoder:body:)","role":"symbol","type":"topic","conformance":{"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}],"constraints":[{"code":"Handler","type":"codeVoice"},{"text":" conforms to ","type":"text"},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"type":"text","text":"."}]},"title":"init(encoder:decoder:body:)","abstract":[{"text":"Initialize an instance with a ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","isActive":true,"type":"reference"},{"type":"text","text":" defined in the form of a closure "},{"inlineContent":[{"text":"with a non-","type":"text"},{"type":"codeVoice","code":"Void"},{"type":"text","text":" return type"}],"type":"strong"},{"type":"text","text":", an encoder, and a decoder."}],"fragments":[{"kind":"keyword","text":"convenience"},{"text":" ","kind":"text"},{"kind":"identifier","text":"init"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"Event"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"Output"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"Encoder"},{"text":", ","kind":"text"},{"text":"Decoder","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"encoder"},{"text":": ","kind":"text"},{"text":"Encoder","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"decoder","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Decoder","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"body","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"sending ","kind":"attribute"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":")"}],"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(encoder:decoder:body:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaruntime/init(body:).json b/docs/data/documentation/awslambdaruntimecore/lambdaruntime/init(body:).json new file mode 100644 index 00000000..e4a1a7bb --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaruntime/init(body:).json @@ -0,0 +1 @@ +{"abstract":[{"type":"text","text":"Initialize an instance with a "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"type":"text","text":" in the form of a closure."}],"kind":"symbol","identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(body:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(body:)"]}],"metadata":{"title":"init(body:)","modules":[{"name":"AWSLambdaRuntimeCore"}],"conformance":{"availabilityPrefix":[{"type":"text","text":"Available when"}],"constraints":[{"type":"codeVoice","code":"Handler"},{"type":"text","text":" conforms to "},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"text":".","type":"text"}],"conformancePrefix":[{"text":"Conforms when","type":"text"}]},"externalID":"s:20AWSLambdaRuntimeCore06LambdaB0C4bodyACyAA23StreamingClosureHandlerVGy7NIOCore10ByteBufferV_AA0D20ResponseStreamWriter_pAA0D7ContextVtYaYbKc_tcAFRszrlufc","symbolKind":"init","fragments":[{"text":"convenience","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"body"},{"kind":"text","text":": ("},{"text":"ByteBuffer","preciseIdentifier":"s:7NIOCore10ByteBufferV","kind":"typeIdentifier"},{"text":", any ","kind":"text"},{"kind":"typeIdentifier","text":"LambdaResponseStreamWriter","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"kind":"text","text":" -> "},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"text":")","kind":"text"}],"roleHeading":"Initializer","extendedModule":"AWSLambdaRuntimeCore","role":"symbol"},"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"convenience","kind":"keyword"},{"kind":"text","text":" "},{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"kind":"externalParam","text":"body"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":", any ","kind":"text"},{"kind":"typeIdentifier","text":"LambdaResponseStreamWriter","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":") ","kind":"text"},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"text":" == ","kind":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler","preciseIdentifier":"s:20AWSLambdaRuntimeCore23StreamingClosureHandlerV","text":"StreamingClosureHandler","kind":"typeIdentifier"}]}]},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The handler in the form of a closure."}]}],"name":"body"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler/handle(_:responseWriter:context:)":{"role":"symbol","type":"topic","url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler\/handle(_:responsewriter:context:)","required":true,"title":"handle(_:responseWriter:context:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"responseWriter"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","abstract":[{"text":"The handler function – implement the business logic of the Lambda function here.","type":"text"}],"kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/finish()":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/finish()","abstract":[{"text":"End the response stream and the underlying HTTP response.","type":"text"}],"title":"finish()","kind":"symbol","required":true,"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"finish"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingClosureHandler":{"abstract":[{"type":"text","text":"A "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax.","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler","title":"StreamingClosureHandler","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingClosureHandler"}],"type":"topic","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"StreamingClosureHandler"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime","abstract":[],"title":"LambdaRuntime","kind":"symbol","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"LambdaRuntime"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaRuntime"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime/init(body:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(body:)","title":"init(body:)","type":"topic","kind":"symbol","fragments":[{"text":"convenience","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"body"},{"kind":"text","text":": ("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", any ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter"},{"text":", ","kind":"text"},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":")","kind":"text"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(body:)","role":"symbol","conformance":{"constraints":[{"type":"codeVoice","code":"Handler"},{"text":" conforms to ","type":"text"},{"type":"codeVoice","code":"StreamingLambdaHandler"},{"type":"text","text":"."}],"conformancePrefix":[{"type":"text","text":"Conforms when"}],"availabilityPrefix":[{"text":"Available when","type":"text"}]},"abstract":[{"type":"text","text":"Initialize an instance with a "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":" in the form of a closure.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/write(_:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"type":"topic","title":"write(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"required":true,"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaruntime/init(decoder:body:).json b/docs/data/documentation/awslambdaruntimecore/lambdaruntime/init(decoder:body:).json new file mode 100644 index 00000000..2bb67737 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaruntime/init(decoder:body:).json @@ -0,0 +1 @@ +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(decoder:body:)"]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"type":"text","text":"Initialize an instance with a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","isActive":true,"type":"reference"},{"type":"text","text":" defined in the form of a closure "},{"inlineContent":[{"text":"with a ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" return type"}],"type":"strong"},{"text":", an encoder, and a decoder.","type":"text"}],"metadata":{"title":"init(decoder:body:)","symbolKind":"init","role":"symbol","extendedModule":"AWSLambdaRuntimeCore","externalID":"s:20AWSLambdaRuntimeCore06LambdaB0C7decoder4bodyACyAA0D14CodableAdapterVyAA0d7HandlerH0Vyqd__ytAA07ClosureI0Vyqd__ytGGqd__ytqd_0_AA11VoidEncoderVGGqd_0__yqd___AA0D7ContextVtYaKcntcAPRszSeRd__AA0D12EventDecoderRd_0_r0_lufc","roleHeading":"Initializer","conformance":{"availabilityPrefix":[{"text":"Available when","type":"text"}],"constraints":[{"type":"codeVoice","code":"Handler"},{"text":" conforms to ","type":"text"},{"type":"codeVoice","code":"StreamingLambdaHandler"},{"type":"text","text":"."}],"conformancePrefix":[{"text":"Conforms when","type":"text"}]},"fragments":[{"text":"convenience","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"text":"Event","kind":"genericParameter"},{"kind":"text","text":", "},{"text":"Decoder","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"decoder"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Decoder"},{"text":", ","kind":"text"},{"text":"body","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"attribute","text":"sending "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":", "},{"text":"LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"text":")","kind":"text"}],"modules":[{"name":"AWSLambdaRuntimeCore"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"convenience"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"kind":"text","text":"<"},{"text":"Event","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"Decoder"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"decoder"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Decoder"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"body"},{"text":": ","kind":"text"},{"text":"sending ","kind":"attribute"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","kind":"typeIdentifier","text":"LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"Handler"},{"text":" == ","kind":"text"},{"kind":"typeIdentifier","text":"LambdaCodableAdapter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaCodableAdapterV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaHandlerAdapterV","text":"LambdaHandlerAdapter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":", (), "},{"text":"ClosureHandler","kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","preciseIdentifier":"s:20AWSLambdaRuntimeCore14ClosureHandlerV"},{"text":"<","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"kind":"text","text":", ()>>, "},{"kind":"typeIdentifier","text":"Event"},{"text":", (), ","kind":"text"},{"text":"Decoder","kind":"typeIdentifier"},{"kind":"text","text":", "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore11VoidEncoderV","text":"VoidEncoder"},{"text":">, ","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:Se","kind":"typeIdentifier","text":"Decodable"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Decoder"},{"text":" : ","kind":"text"},{"kind":"typeIdentifier","text":"LambdaEventDecoder","preciseIdentifier":"s:20AWSLambdaRuntimeCore18LambdaEventDecoderP","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder"}],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"decoder","content":[{"type":"paragraph","inlineContent":[{"text":"The decoder object that will be used to decode the incoming ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" event into the generic "},{"type":"codeVoice","code":"Event"},{"type":"text","text":" type."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The handler in the form of a closure."}]}],"name":"body"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(decoder:body:)"},"sections":[],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime","abstract":[],"title":"LambdaRuntime","kind":"symbol","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"LambdaRuntime"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaRuntime"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Output":{"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","title":"Output","abstract":[{"type":"text","text":"Generic output type."},{"text":" ","type":"text"},{"type":"text","text":"This is the return type of the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"text":" function.","type":"text"}],"required":true,"role":"symbol","kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Event":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","role":"symbol","abstract":[{"text":"Generic input type.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","title":"Event","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Event","kind":"identifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"}],"type":"topic","kind":"symbol","required":true},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime/init(decoder:body:)":{"abstract":[{"text":"Initialize an instance with a ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","isActive":true},{"text":" defined in the form of a closure ","type":"text"},{"inlineContent":[{"text":"with a ","type":"text"},{"type":"codeVoice","code":"Void"},{"text":" return type","type":"text"}],"type":"strong"},{"type":"text","text":", an encoder, and a decoder."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"convenience"},{"kind":"text","text":" "},{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"Event"},{"kind":"text","text":", "},{"text":"Decoder","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"decoder"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Decoder"},{"kind":"text","text":", "},{"kind":"externalParam","text":"body"},{"kind":"text","text":": "},{"kind":"attribute","text":"sending "},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":")"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(decoder:body:)","conformance":{"constraints":[{"code":"Handler","type":"codeVoice"},{"text":" conforms to ","type":"text"},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"text":".","type":"text"}],"conformancePrefix":[{"text":"Conforms when","type":"text"}],"availabilityPrefix":[{"text":"Available when","type":"text"}]},"type":"topic","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(decoder:body:)","title":"init(decoder:body:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","abstract":[{"text":"A ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"type":"text","text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ClosureHandler","kind":"identifier"}],"navigatorTitle":[{"text":"ClosureHandler","kind":"identifier"}],"title":"ClosureHandler","url":"\/documentation\/awslambdaruntimecore\/closurehandler","role":"symbol","type":"topic","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandlerAdapter":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter","title":"LambdaHandlerAdapter","abstract":[{"type":"text","text":"Adapts a "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true},{"text":".","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter","kind":"symbol","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaHandlerAdapter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaHandlerAdapter"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaEventDecoder":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder","abstract":[{"type":"text","text":"The protocol a decoder must conform to so that it can be used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true,"type":"reference"},{"text":" to decode incoming","type":"text"},{"type":"text","text":" "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" events."}],"url":"\/documentation\/awslambdaruntimecore\/lambdaeventdecoder","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaEventDecoder"}],"title":"LambdaEventDecoder","type":"topic","navigatorTitle":[{"text":"LambdaEventDecoder","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/handle(_:context:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","title":"handle(_:context:)","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"required":true,"kind":"symbol","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"VoidEncoder"}],"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/voidencoder","title":"VoidEncoder","navigatorTitle":[{"kind":"identifier","text":"VoidEncoder"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder","role":"symbol","abstract":[]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaruntime/init(encoder:decoder:body:).json b/docs/data/documentation/awslambdaruntimecore/lambdaruntime/init(encoder:decoder:body:).json new file mode 100644 index 00000000..81429d4d --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaruntime/init(encoder:decoder:body:).json @@ -0,0 +1 @@ +{"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(encoder:decoder:body:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initialize an instance with a "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":" defined in the form of a closure ","type":"text"},{"type":"strong","inlineContent":[{"text":"with a non-","type":"text"},{"type":"codeVoice","code":"Void"},{"type":"text","text":" return type"}]},{"text":", an encoder, and a decoder.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"convenience","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"init"},{"text":"<","kind":"text"},{"text":"Event","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"Output"},{"text":", ","kind":"text"},{"text":"Encoder","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"Decoder"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"encoder"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Encoder"},{"text":", ","kind":"text"},{"text":"decoder","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Decoder"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"body"},{"text":": ","kind":"text"},{"text":"sending ","kind":"attribute"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"LambdaContext","kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Output"},{"text":") ","kind":"text"},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"text":"Handler","kind":"typeIdentifier"},{"text":" == ","kind":"text"},{"text":"LambdaCodableAdapter","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaCodableAdapterV","kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter"},{"text":"<","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaHandlerAdapterV","kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter","text":"LambdaHandlerAdapter"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Output"},{"text":", ","kind":"text"},{"text":"ClosureHandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore14ClosureHandlerV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":", "},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":">>, "},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Output"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Decoder"},{"kind":"text","text":", "},{"text":"Encoder","kind":"typeIdentifier"},{"kind":"text","text":">, "},{"text":"Event","kind":"typeIdentifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Output"},{"text":" : ","kind":"text"},{"text":"Encodable","kind":"typeIdentifier","preciseIdentifier":"s:SE"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Output"},{"text":" == ","kind":"text"},{"text":"Encoder","kind":"typeIdentifier"},{"kind":"text","text":"."},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP0E0Qa","text":"Output"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Encoder"},{"text":" : ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP","text":"LambdaOutputEncoder"},{"kind":"text","text":", "},{"text":"Decoder","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"kind":"typeIdentifier","text":"LambdaEventDecoder","preciseIdentifier":"s:20AWSLambdaRuntimeCore18LambdaEventDecoderP","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder"}],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"encoder","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The encoder object that will be used to encode the generic "},{"code":"Output","type":"codeVoice"},{"type":"text","text":" into a "},{"code":"ByteBuffer","type":"codeVoice"},{"text":".","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"The decoder object that will be used to decode the incoming ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" event into the generic "},{"type":"codeVoice","code":"Event"},{"type":"text","text":" type."}]}],"name":"decoder"},{"name":"body","content":[{"type":"paragraph","inlineContent":[{"text":"The handler in the form of a closure.","type":"text"}]}]}]}],"kind":"symbol","metadata":{"extendedModule":"AWSLambdaRuntimeCore","modules":[{"name":"AWSLambdaRuntimeCore"}],"roleHeading":"Initializer","role":"symbol","externalID":"s:20AWSLambdaRuntimeCore06LambdaB0C7encoder7decoder4bodyACyAA0D14CodableAdapterVyAA0d7HandlerI0Vyqd__qd_0_AA07ClosureJ0Vyqd__qd_0_GGqd__qd_0_qd_2_qd_1_GGqd_1__qd_2_qd_0_qd___AA0D7ContextVtYaKcntcAORszSeRd__SERd_0_6OutputQyd_1_Rsd_0_AA0dM7EncoderRd_1_AA0D12EventDecoderRd_2_r2_lufc","conformance":{"conformancePrefix":[{"type":"text","text":"Conforms when"}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"constraints":[{"code":"Handler","type":"codeVoice"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"StreamingLambdaHandler"},{"type":"text","text":"."}]},"title":"init(encoder:decoder:body:)","symbolKind":"init","fragments":[{"text":"convenience","kind":"keyword"},{"text":" ","kind":"text"},{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"Event"},{"text":", ","kind":"text"},{"text":"Output","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"Encoder"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"Decoder"},{"kind":"text","text":">("},{"kind":"externalParam","text":"encoder"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Encoder"},{"kind":"text","text":", "},{"text":"decoder","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Decoder","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"body"},{"kind":"text","text":": "},{"kind":"attribute","text":"sending "},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":", "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"text":"Output","kind":"typeIdentifier"},{"text":")","kind":"text"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(encoder:decoder:body:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime"]]},"sections":[],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandlerAdapter":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter","title":"LambdaHandlerAdapter","abstract":[{"type":"text","text":"Adapts a "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true},{"text":".","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter","kind":"symbol","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaHandlerAdapter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaHandlerAdapter"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime/init(encoder:decoder:body:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(encoder:decoder:body:)","role":"symbol","type":"topic","conformance":{"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}],"constraints":[{"code":"Handler","type":"codeVoice"},{"text":" conforms to ","type":"text"},{"code":"StreamingLambdaHandler","type":"codeVoice"},{"type":"text","text":"."}]},"title":"init(encoder:decoder:body:)","abstract":[{"text":"Initialize an instance with a ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","isActive":true,"type":"reference"},{"type":"text","text":" defined in the form of a closure "},{"inlineContent":[{"text":"with a non-","type":"text"},{"type":"codeVoice","code":"Void"},{"type":"text","text":" return type"}],"type":"strong"},{"type":"text","text":", an encoder, and a decoder."}],"fragments":[{"kind":"keyword","text":"convenience"},{"text":" ","kind":"text"},{"kind":"identifier","text":"init"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"Event"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"Output"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"Encoder"},{"text":", ","kind":"text"},{"text":"Decoder","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"encoder"},{"text":": ","kind":"text"},{"text":"Encoder","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"decoder","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Decoder","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"body","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"sending ","kind":"attribute"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":")"}],"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(encoder:decoder:body:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Output":{"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","title":"Output","abstract":[{"type":"text","text":"Generic output type."},{"text":" ","type":"text"},{"type":"text","text":"This is the return type of the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"text":" function.","type":"text"}],"required":true,"role":"symbol","kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime","abstract":[],"title":"LambdaRuntime","kind":"symbol","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"LambdaRuntime"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaRuntime"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Event":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","role":"symbol","abstract":[{"text":"Generic input type.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","title":"Event","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Event","kind":"identifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"}],"type":"topic","kind":"symbol","required":true},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","abstract":[{"text":"A ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"type":"text","text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ClosureHandler","kind":"identifier"}],"navigatorTitle":[{"text":"ClosureHandler","kind":"identifier"}],"title":"ClosureHandler","url":"\/documentation\/awslambdaruntimecore\/closurehandler","role":"symbol","type":"topic","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/handle(_:context:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","title":"handle(_:context:)","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"required":true,"kind":"symbol","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder/Output":{"required":true,"kind":"symbol","title":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","abstract":[],"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/output","type":"topic","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder":{"role":"symbol","navigatorTitle":[{"text":"LambdaOutputEncoder","kind":"identifier"}],"type":"topic","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaOutputEncoder","kind":"identifier"}],"abstract":[{"type":"text","text":"The protocol an encoder must conform to so that it can be used with "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true},{"text":" to encode the generic","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output"},{"text":" object into a ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":"."}],"title":"LambdaOutputEncoder","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaEventDecoder":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder","abstract":[{"type":"text","text":"The protocol a decoder must conform to so that it can be used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true,"type":"reference"},{"text":" to decode incoming","type":"text"},{"type":"text","text":" "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" events."}],"url":"\/documentation\/awslambdaruntimecore\/lambdaeventdecoder","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaEventDecoder"}],"title":"LambdaEventDecoder","type":"topic","navigatorTitle":[{"text":"LambdaEventDecoder","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaruntime/init(handler:eventloop:logger:).json b/docs/data/documentation/awslambdaruntimecore/lambdaruntime/init(handler:eventloop:logger:).json new file mode 100644 index 00000000..8ce5148f --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaruntime/init(handler:eventloop:logger:).json @@ -0,0 +1 @@ +{"schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(handler:eventloop:logger:)"]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime"]]},"metadata":{"symbolKind":"init","modules":[{"name":"AWSLambdaRuntimeCore"}],"externalID":"s:20AWSLambdaRuntimeCore06LambdaB0C7handler9eventLoop6loggerACyxGxn_7NIOCore05EventG0_p7Logging6LoggerVtcfc","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"text":"handler","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"attribute","text":"sending "},{"text":"Handler","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"eventLoop"},{"kind":"text","text":": any "},{"preciseIdentifier":"s:7NIOCore9EventLoopP","text":"EventLoop","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"logger"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Logging6LoggerV","text":"Logger"},{"kind":"text","text":")"}],"title":"init(handler:eventLoop:logger:)","role":"symbol"},"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(handler:eventLoop:logger:)","interfaceLanguage":"swift"},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"handler","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"sending ","kind":"attribute"},{"text":"Handler","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"eventLoop","kind":"externalParam"},{"kind":"text","text":": any "},{"text":"EventLoop","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore9EventLoopP"},{"text":" = Lambda.defaultEventLoop, ","kind":"text"},{"text":"logger","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Logger","kind":"typeIdentifier","preciseIdentifier":"s:7Logging6LoggerV"},{"kind":"text","text":" = Logger(label: \"LambdaRuntime\"))"}],"platforms":["macOS"]}]}],"sections":[],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime","abstract":[],"title":"LambdaRuntime","kind":"symbol","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"LambdaRuntime"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaRuntime"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime/init(handler:eventLoop:logger:)":{"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(handler:eventloop:logger:)","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(handler:eventLoop:logger:)","role":"symbol","abstract":[],"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"handler"},{"text":": ","kind":"text"},{"kind":"attribute","text":"sending "},{"text":"Handler","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"eventLoop","kind":"externalParam"},{"kind":"text","text":": any "},{"kind":"typeIdentifier","text":"EventLoop","preciseIdentifier":"s:7NIOCore9EventLoopP"},{"kind":"text","text":", "},{"text":"logger","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Logger","kind":"typeIdentifier","preciseIdentifier":"s:7Logging6LoggerV"},{"text":")","kind":"text"}],"type":"topic","title":"init(handler:eventLoop:logger:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdaruntime/run().json b/docs/data/documentation/awslambdaruntimecore/lambdaruntime/run().json new file mode 100644 index 00000000..04195246 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdaruntime/run().json @@ -0,0 +1 @@ +{"metadata":{"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"run","kind":"identifier"},{"kind":"text","text":"() "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}],"symbolKind":"method","externalID":"s:20AWSLambdaRuntimeCore06LambdaB0C3runyyYaKF","role":"symbol","title":"run()","modules":[{"name":"AWSLambdaRuntimeCore"}]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"run","kind":"identifier"},{"text":"() ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"platforms":["macOS"]}],"kind":"declarations"}],"sections":[],"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/run()","interfaceLanguage":"swift"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime"]]},"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdaruntime\/run()"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime","abstract":[],"title":"LambdaRuntime","kind":"symbol","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"LambdaRuntime"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaRuntime"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaRuntime/run()":{"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"run"},{"text":"() ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"run()","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/run()","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/run()","abstract":[]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler.json b/docs/data/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler.json new file mode 100644 index 00000000..b4f544e2 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler.json @@ -0,0 +1 @@ +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"},"abstract":[{"type":"text","text":"This protocol is exactly like "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","isActive":true,"type":"reference"},{"text":", with the only difference being the added support for executing background","type":"text"},{"type":"text","text":" "},{"text":"work after the result has been sent to the AWS Lambda control plane.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This is achieved by not having a return type in the "},{"type":"codeVoice","code":"handle"},{"type":"text","text":" function. The output is instead written into a"},{"type":"text","text":" "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"reference","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"type":"text","text":" function is then"},{"type":"text","text":" "},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"relationshipsSections":[{"title":"Conforming Types","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter"],"kind":"relationships","type":"conformingTypes"}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"title":"LambdaWithBackgroundProcessingHandler","modules":[{"name":"AWSLambdaRuntimeCore"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"symbolKind":"protocol","externalID":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"roleHeading":"Protocol","role":"symbol"},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"languages":["swift"]}]}],"topicSections":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Event","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output"],"title":"Associated Types","anchor":"Associated-Types","generated":true},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"],"generated":true,"anchor":"Instance-Methods","title":"Instance Methods"}],"kind":"symbol","references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Output":{"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","title":"Output","abstract":[{"type":"text","text":"Generic output type."},{"text":" ","type":"text"},{"type":"text","text":"This is the return type of the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"text":" function.","type":"text"}],"required":true,"role":"symbol","kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Event":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","role":"symbol","abstract":[{"text":"Generic input type.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","title":"Event","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Event","kind":"identifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"}],"type":"topic","kind":"symbol","required":true},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandlerAdapter":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter","title":"LambdaHandlerAdapter","abstract":[{"type":"text","text":"Adapts a "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true},{"text":".","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter","kind":"symbol","type":"topic","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaHandlerAdapter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaHandlerAdapter"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/handle(_:context:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","title":"handle(_:context:)","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"required":true,"kind":"symbol","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/Event":{"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Event"},{"kind":"text","text":" : "},{"text":"Decodable","kind":"typeIdentifier","preciseIdentifier":"s:Se"}],"abstract":[{"text":"Generic input type.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"required":true,"title":"Event","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/event","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Event","role":"symbol","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/Output":{"kind":"symbol","title":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output","role":"symbol","abstract":[{"text":"Generic output type.","type":"text"},{"type":"text","text":" "},{"text":"This is the type that the ","type":"text"},{"type":"codeVoice","code":"handle"},{"type":"text","text":" function will send through the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"},{"type":"text","text":"."}],"type":"topic","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"text":"Output","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/output"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/event.json b/docs/data/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/event.json new file mode 100644 index 00000000..ad224d1f --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/event.json @@ -0,0 +1 @@ +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/event"]}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"type":"text","text":"Generic input type."},{"type":"text","text":" "},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Event"},"metadata":{"role":"symbol","externalID":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa","modules":[{"name":"AWSLambdaRuntimeCore"}],"title":"Event","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Event","kind":"identifier"},{"text":" : ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"}],"roleHeading":"Associated Type","symbolKind":"associatedtype","required":true},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Event"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"Decodable","preciseIdentifier":"s:Se"}]}]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"]]},"sections":[],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/Event":{"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Event"},{"kind":"text","text":" : "},{"text":"Decodable","kind":"typeIdentifier","preciseIdentifier":"s:Se"}],"abstract":[{"text":"Generic input type.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"required":true,"title":"Event","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/event","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Event","role":"symbol","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/handle(_:outputwriter:context:).json b/docs/data/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/handle(_:outputwriter:context:).json new file mode 100644 index 00000000..b01e5855 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/handle(_:outputwriter:context:).json @@ -0,0 +1 @@ +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"event","kind":"internalParam"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Event"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"outputWriter"},{"text":": ","kind":"text"},{"text":"some","kind":"keyword"},{"kind":"text","text":" "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP","kind":"typeIdentifier","text":"LambdaResponseWriter"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output","text":"Output","kind":"typeIdentifier"},{"kind":"text","text":">, "},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"parameters","parameters":[{"name":"event","content":[{"inlineContent":[{"type":"text","text":"The generic "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Event"},{"type":"text","text":" object representing the invocation’s input data."}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"The writer to send the computed response to. A call to ","type":"text"},{"code":"outputWriter.write(_:)","type":"codeVoice"},{"type":"text","text":" will return the response to the AWS Lambda response endpoint."},{"type":"text","text":" "},{"type":"text","text":"Any background work can then be executed before returning."}],"type":"paragraph"}],"name":"outputWriter"},{"content":[{"type":"paragraph","inlineContent":[{"text":"The ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"},{"text":" containing the invocation’s metadata.","type":"text"}]}],"name":"context"}]}],"sections":[],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"]]},"metadata":{"role":"symbol","title":"handle(_:outputWriter:context:)","modules":[{"name":"AWSLambdaRuntimeCore"}],"required":true,"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"outputWriter"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","kind":"typeIdentifier","text":"Output"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}],"externalID":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6handle_12outputWriter7contexty5EventQz_qd__AA0D7ContextVtYaKAA0d8ResponseK0Rd__6OutputQyd__ALRtzlF","symbolKind":"method"},"abstract":[{"type":"text","text":"Implement the business logic of the Lambda function here."}],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/Event":{"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Event"},{"kind":"text","text":" : "},{"text":"Decodable","kind":"typeIdentifier","preciseIdentifier":"s:Se"}],"abstract":[{"text":"Generic input type.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"required":true,"title":"Event","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/event","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Event","role":"symbol","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/Output":{"kind":"symbol","title":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output","role":"symbol","abstract":[{"text":"Generic output type.","type":"text"},{"type":"text","text":" "},{"text":"This is the type that the ","type":"text"},{"type":"codeVoice","code":"handle"},{"type":"text","text":" function will send through the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"},{"type":"text","text":"."}],"type":"topic","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"text":"Output","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/output"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"abstract":[{"type":"text","text":"Used with "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference","isActive":true},{"type":"text","text":"."},{"type":"text","text":" "},{"text":"A mechanism to “return” an output from ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" without the function needing to"},{"text":" ","type":"text"},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaResponseWriter"}],"role":"symbol","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/output.json b/docs/data/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/output.json new file mode 100644 index 00000000..564a8e41 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/output.json @@ -0,0 +1 @@ +{"metadata":{"externalID":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","symbolKind":"associatedtype","title":"Output","roleHeading":"Associated Type","role":"symbol","required":true,"modules":[{"name":"AWSLambdaRuntimeCore"}],"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"text":"Output","kind":"identifier"}]},"kind":"symbol","sections":[],"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Generic output type."},{"type":"text","text":" "},{"type":"text","text":"This is the type that the "},{"type":"codeVoice","code":"handle"},{"text":" function will send through the ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":".","type":"text"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"platforms":["macOS"]}]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/output"]}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/Output":{"kind":"symbol","title":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output","role":"symbol","abstract":[{"text":"Generic output type.","type":"text"},{"type":"text","text":" "},{"text":"This is the type that the ","type":"text"},{"type":"codeVoice","code":"handle"},{"type":"text","text":" function will send through the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"},{"type":"text","text":"."}],"type":"topic","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"text":"Output","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/output"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"title":"LambdaWithBackgroundProcessingHandler","abstract":[{"text":"This protocol is exactly like ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","isActive":true},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"text":"work after the result has been sent to the AWS Lambda control plane.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"This is achieved by not having a return type in the "},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"type":"text","text":" function is then"},{"text":" ","type":"text"},{"text":"free to implement any background work after the result has been sent to the AWS Lambda control plane.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","navigatorTitle":[{"kind":"identifier","text":"LambdaWithBackgroundProcessingHandler"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","type":"topic","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler/handle(_:outputWriter:context:)":{"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"text":"outputWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output","kind":"typeIdentifier"},{"text":">, ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"type":"topic","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","required":true,"title":"handle(_:outputWriter:context:)","role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseWriter":{"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseWriter"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","navigatorTitle":[{"text":"LambdaResponseWriter","kind":"identifier"}],"type":"topic","abstract":[{"text":"Used with ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"},{"type":"text","text":"."},{"type":"text","text":" "},{"type":"text","text":"A mechanism to “return” an output from "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"type":"text","text":" without the function needing to"},{"type":"text","text":" "},{"type":"text","text":"have a return type and exit at that point. This allows for background work to be executed "},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" a response has been sent to the AWS Lambda response endpoint."}],"title":"LambdaResponseWriter","kind":"symbol","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"title":"LambdaHandler","abstract":[{"text":"This handler protocol is intended to serve the most common use-cases.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object and encoding the returned ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference","isActive":true},{"type":"text","text":" function simply receives the generic "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"text":" object as input and returns the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandler"}],"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdahandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/quick-setup.json b/docs/data/documentation/awslambdaruntimecore/quick-setup.json new file mode 100644 index 00000000..51b1399f --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/quick-setup.json @@ -0,0 +1 @@ +{"sections":[],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/quick-setup"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/quick-setup","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Learn how to create your first project in 3 minutes."}],"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"article","seeAlsoSections":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Deployment"],"anchor":"Essentials","generated":true,"title":"Essentials"}],"primaryContentSections":[{"kind":"content","content":[{"text":"Overview","anchor":"overview","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Follow these instructions to get a high-level overview of the steps to write, test, and deploy your first Lambda function written in Swift."}]},{"type":"paragraph","inlineContent":[{"text":"For a detailed step-by-step instruction, follow the tutorial instead.","type":"text"}]},{"inlineContent":[{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","isActive":true}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"For the impatient, keep reading."}],"type":"paragraph"},{"anchor":"High-level-instructions","level":2,"text":"High-level instructions","type":"heading"},{"inlineContent":[{"type":"text","text":"Follow these 6 steps to write, test, and deploy a Lambda function in Swift."}],"type":"paragraph"},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"text":"Create a Swift project for an executable target","type":"text"}]}]}],"type":"orderedList"},{"code":["swift package init --type executable "],"type":"codeListing","syntax":"sh"},{"type":"orderedList","start":2,"items":[{"content":[{"inlineContent":[{"type":"text","text":"Add dependencies on "},{"type":"codeVoice","code":"AWSLambdaRuntime"},{"text":" library","type":"text"}],"type":"paragraph"}]}]},{"type":"codeListing","code":["\/\/ swift-tools-version:6.0","\/\/ The swift-tools-version declares the minimum version of Swift required to build this package.","","import PackageDescription","","let package = Package("," name: \"YourProjetName\","," platforms: ["," .macOS(.v15),"," ],"," products: ["," .executable(name: \"MyFirstLambdaFunction\", targets: [\"MyFirstLambdaFunction\"]),"," ],"," dependencies: ["," .package(url: \"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime.git\", from: \"main\"),"," ],"," targets: ["," .executableTarget("," name: \"MyFirstLambdaFunction\","," dependencies: ["," .product(name: \"AWSLambdaRuntime\", package: \"swift-aws-lambda-runtime\"),"," ],"," path: \"Sources\""," ),"," ]",")"],"syntax":"swift"},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Write your function code."}]}]}],"start":3},{"type":"paragraph","inlineContent":[{"text":"Create an instance of ","type":"text"},{"type":"codeVoice","code":"LambdaRuntime"},{"type":"text","text":" and pass a function as a closure. The function has this signature: "},{"type":"codeVoice","code":"(_: Event, context: LambdaContext) async throws -> Output"},{"type":"text","text":" (as defined in the "},{"type":"codeVoice","code":"LambdaHandler"},{"text":" protocol). ","type":"text"},{"type":"codeVoice","code":"Event"},{"type":"text","text":" must be "},{"code":"Decodable","type":"codeVoice"},{"type":"text","text":". "},{"code":"Output","type":"codeVoice"},{"type":"text","text":" must be "},{"code":"Encodable","type":"codeVoice"},{"text":".","type":"text"}]},{"inlineContent":[{"type":"text","text":"If your Lambda function is invoked by another AWS service, use the "},{"type":"codeVoice","code":"AWSLambdaEvent"},{"type":"text","text":" library at "},{"identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-events","type":"reference","isActive":true},{"type":"text","text":" to represent the input event."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Finally, call "},{"code":"runtime.run()","type":"codeVoice"},{"type":"text","text":" to start the event loop."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ the data structure to represent the input parameter","struct HelloRequest: Decodable {"," let name: String"," let age: Int","}","","\/\/ the data structure to represent the output response","struct HelloResponse: Encodable {"," let greetings: String","}","","\/\/ the Lambda runtime","let runtime = LambdaRuntime {"," (event: HelloRequest, context: LambdaContext) in",""," HelloResponse("," greetings: \"Hello \\(event.name). You look \\(event.age > 30 ? \"younger\" : \"older\") than your age.\""," )","}","","\/\/ start the loop","try await runtime.run()"]},{"start":4,"items":[{"content":[{"type":"paragraph","inlineContent":[{"text":"Test your code locally","type":"text"}]}]}],"type":"orderedList"},{"code":["swift run # this starts a local server on port 7000","","# Switch to another Terminal tab","","curl --header \"Content-Type: application\/json\" \\"," --request POST \\"," --data '{\"name\": \"Seb\", \"age\": 50}' \\"," http:\/\/localhost:7000\/invoke","","{\"greetings\":\"Hello Seb. You look younger than your age.\"}"],"type":"codeListing","syntax":"sh"},{"type":"orderedList","start":5,"items":[{"content":[{"inlineContent":[{"type":"text","text":"Build and package your code for AWS Lambda"}],"type":"paragraph"}]}]},{"inlineContent":[{"text":"AWS Lambda runtime runs on Amazon Linux. You must compile your code for Amazon Linux.","type":"text"}],"type":"paragraph"},{"type":"aside","style":"note","name":"Note","content":[{"type":"paragraph","inlineContent":[{"text":"Be sure to have ","type":"text"},{"type":"reference","isActive":true,"identifier":"https:\/\/docs.docker.com\/desktop\/install\/mac-install\/"},{"type":"text","text":" installed for this step."}]}]},{"code":["swift package --allow-network-connections docker archive","","-------------------------------------------------------------------------","building \"MyFirstLambdaFunction\" in docker","-------------------------------------------------------------------------","updating \"swift:amazonlinux2\" docker image"," amazonlinux2: Pulling from library\/swift"," Digest: sha256:5b0cbe56e35210fa90365ba3a4db9cd2b284a5b74d959fc1ee56a13e9c35b378"," Status: Image is up to date for swift:amazonlinux2"," docker.io\/library\/swift:amazonlinux2","building \"MyFirstLambdaFunction\""," Building for production...","...","-------------------------------------------------------------------------","archiving \"MyFirstLambdaFunction\"","-------------------------------------------------------------------------","1 archive created"," * MyFirstLambdaFunction at \/Users\/YourUserName\/MyFirstLambdaFunction\/.build\/plugins\/AWSLambdaPackager\/outputs\/AWSLambdaPackager\/MyFirstLambdaFunction\/MyFirstLambdaFunction.zip","","","cp .build\/plugins\/AWSLambdaPackager\/outputs\/AWSLambdaPackager\/MyFirstLambdaFunction\/MyFirstLambdaFunction.zip ~\/Desktop"],"type":"codeListing","syntax":"sh"},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Deploy on AWS Lambda"}]}]}],"start":6,"type":"orderedList"},{"style":"note","content":[{"inlineContent":[{"text":"Be sure ","type":"text"},{"isActive":true,"identifier":"https:\/\/docs.aws.amazon.com\/accounts\/latest\/reference\/manage-acct-creating.html","type":"reference"},{"type":"text","text":" to follow these steps."}],"type":"paragraph"}],"type":"aside","name":"Note"},{"items":[{"content":[{"inlineContent":[{"type":"text","text":"Connect to the "},{"type":"reference","identifier":"https:\/\/console.aws.amazon.com","isActive":true}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"type":"text","text":"Navigate to Lambda"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"Create a function","type":"text"}]}]},{"content":[{"inlineContent":[{"type":"text","text":"Select "},{"inlineContent":[{"text":"Provide your own bootstrap on Amazon Linux 2","type":"text"}],"type":"strong"},{"text":" as ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Runtime"}]}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"Select an ","type":"text"},{"inlineContent":[{"text":"Architecture","type":"text"}],"type":"strong"},{"type":"text","text":" that matches the one of the machine where you build the code. Select "},{"type":"strong","inlineContent":[{"text":"x86_64","type":"text"}]},{"text":" when you build on Intel-based Macs or ","type":"text"},{"type":"strong","inlineContent":[{"text":"arm64","type":"text"}]},{"text":" for Apple Silicon-based Macs.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"Upload the ZIP create during step 5","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Select the "},{"type":"strong","inlineContent":[{"text":"Test","type":"text"}]},{"text":" tab, enter a test event such as ","type":"text"},{"type":"codeVoice","code":"{\"name\": \"Seb\", \"age\": 50}"},{"text":" and select ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Test"}]}]}]}],"type":"unorderedList"},{"inlineContent":[{"text":"If the test succeeds, you will see the result: ","type":"text"},{"code":"{\"greetings\":\"Hello Seb. You look younger than your age.\"}","type":"codeVoice"},{"type":"text","text":"."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Congratulations 🎉! You just wrote, test, build, and deployed a Lambda function written in Swift.","type":"text"}]}]}],"metadata":{"title":"Getting Started Quickly","modules":[{"name":"AWSLambdaRuntimeCore"}],"role":"article","roleHeading":"Article"},"references":{"https://github.com/swift-server/swift-aws-lambda-events":{"titleInlineContent":[{"text":"https:\/\/github.com\/swift-server\/swift-aws-lambda-events","type":"text"}],"url":"https:\/\/github.com\/swift-server\/swift-aws-lambda-events","type":"link","title":"https:\/\/github.com\/swift-server\/swift-aws-lambda-events","identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-events"},"https://docs.docker.com/desktop/install/mac-install/":{"identifier":"https:\/\/docs.docker.com\/desktop\/install\/mac-install\/","titleInlineContent":[{"text":"Docker","type":"text"}],"url":"https:\/\/docs.docker.com\/desktop\/install\/mac-install\/","title":"Docker","type":"link"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content":{"title":"Your First Lambda Function Written in Swift","kind":"overview","role":"overview","url":"\/tutorials\/table-of-content","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","abstract":[{"type":"text","text":"A step-by-step tutorial to learn how to implement, build, test, and deploy your first Lambda function written in Swift."}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/Deployment":{"kind":"article","title":"Deploying your Swift Lambda functions","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Deployment","abstract":[{"text":"Learn how to deploy your Swift Lambda functions to AWS.","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/deployment","type":"topic","role":"article"},"https://console.aws.amazon.com":{"titleInlineContent":[{"text":"AWS Console","type":"text"}],"url":"https:\/\/console.aws.amazon.com","type":"link","title":"AWS Console","identifier":"https:\/\/console.aws.amazon.com"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-creating.html":{"identifier":"https:\/\/docs.aws.amazon.com\/accounts\/latest\/reference\/manage-acct-creating.html","titleInlineContent":[{"text":"to have an AWS Account","type":"text"}],"url":"https:\/\/docs.aws.amazon.com\/accounts\/latest\/reference\/manage-acct-creating.html","title":"to have an AWS Account","type":"link"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/streamingclosurehandler.json b/docs/data/documentation/awslambdaruntimecore/streamingclosurehandler.json new file mode 100644 index 00000000..d85ed2c0 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/streamingclosurehandler.json @@ -0,0 +1 @@ +{"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/streamingclosurehandler"]}],"topicSections":[{"generated":true,"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/init(body:)"],"anchor":"Initializers","title":"Initializers"},{"anchor":"Instance-Methods","title":"Instance Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/handle(_:responseWriter:context:)"],"generated":true}],"kind":"symbol","identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"metadata":{"symbolKind":"struct","title":"StreamingClosureHandler","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingClosureHandler"}],"modules":[{"name":"AWSLambdaRuntimeCore"}],"externalID":"s:20AWSLambdaRuntimeCore23StreamingClosureHandlerV","role":"symbol","roleHeading":"Structure","navigatorTitle":[{"kind":"identifier","text":"StreamingClosureHandler"}]},"abstract":[{"type":"text","text":"A "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","type":"reference","isActive":true},{"text":" conforming handler object that can be constructed with a closure.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax."}],"relationshipsSections":[{"title":"Conforms To","type":"conformsTo","kind":"relationships","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"]}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"StreamingClosureHandler","kind":"identifier"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler/handle(_:responseWriter:context:)":{"role":"symbol","type":"topic","url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler\/handle(_:responsewriter:context:)","required":true,"title":"handle(_:responseWriter:context:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"responseWriter"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","abstract":[{"text":"The handler function – implement the business logic of the Lambda function here.","type":"text"}],"kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/finish()":{"title":"finish()","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"finish","kind":"identifier"},{"text":"() ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"role":"symbol","abstract":[{"text":"End the response stream and the underlying HTTP response.","type":"text"}],"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/finish()","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","required":true},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingClosureHandler":{"abstract":[{"type":"text","text":"A "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax.","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler","title":"StreamingClosureHandler","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingClosureHandler"}],"type":"topic","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"StreamingClosureHandler"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingClosureHandler/handle(_:responseWriter:context:)":{"type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":", "},{"kind":"externalParam","text":"responseWriter"},{"text":": ","kind":"text"},{"kind":"keyword","text":"some"},{"text":" ","kind":"text"},{"text":"LambdaResponseStreamWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","kind":"typeIdentifier","text":"LambdaContext"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"abstract":[{"text":"Calls the provided ","type":"text"},{"type":"codeVoice","code":"self.body"},{"type":"text","text":" closure with the "},{"type":"codeVoice","code":"ByteBuffer"},{"text":" invocation event, the ","type":"text"},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","type":"reference"},{"type":"text","text":", and the "},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","type":"reference"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/handle(_:responseWriter:context:)","url":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler\/handle(_:responsewriter:context:)","kind":"symbol","title":"handle(_:responseWriter:context:)","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingClosureHandler/init(body:)":{"url":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler\/init(body:)","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"body"},{"kind":"text","text":": ("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", any ","kind":"text"},{"text":"LambdaResponseStreamWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":")","kind":"text"}],"kind":"symbol","type":"topic","title":"init(body:)","abstract":[{"type":"text","text":"Initialize an instance from a handler function in the form of a closure."}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/init(body:)","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/streamingclosurehandler/handle(_:responsewriter:context:).json b/docs/data/documentation/awslambdaruntimecore/streamingclosurehandler/handle(_:responsewriter:context:).json new file mode 100644 index 00000000..5fb75fa6 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/streamingclosurehandler/handle(_:responsewriter:context:).json @@ -0,0 +1 @@ +{"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/handle(_:responseWriter:context:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler"]]},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/streamingclosurehandler\/handle(_:responsewriter:context:)"]}],"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"externalID":"s:20AWSLambdaRuntimeCore23StreamingClosureHandlerV6handle_14responseWriter7contexty7NIOCore10ByteBufferV_xAA13LambdaContextVtYaKAA0n14ResponseStreamI0RzlF","role":"symbol","roleHeading":"Instance Method","title":"handle(_:responseWriter:context:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", ","kind":"text"},{"text":"responseWriter","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"some","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaResponseStreamWriter","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"context"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}],"modules":[{"name":"AWSLambdaRuntimeCore"}],"symbolKind":"method"},"abstract":[{"text":"Calls the provided ","type":"text"},{"type":"codeVoice","code":"self.body"},{"type":"text","text":" closure with the "},{"code":"ByteBuffer","type":"codeVoice"},{"text":" invocation event, the ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","isActive":true},{"text":", and the ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"event","kind":"internalParam"},{"kind":"text","text":": "},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", ","kind":"text"},{"text":"responseWriter","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"platforms":["macOS"]}]},{"parameters":[{"name":"event","content":[{"type":"paragraph","inlineContent":[{"text":"The invocation’s input data.","type":"text"}]}]},{"content":[{"inlineContent":[{"type":"text","text":"A "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","isActive":true,"type":"reference"},{"text":" to write the invocation’s response to.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"If no response or error is written to "},{"type":"codeVoice","code":"responseWriter"},{"text":" an error will be reported to the invoker.","type":"text"}],"type":"paragraph"}],"name":"responseWriter"},{"name":"context","content":[{"type":"paragraph","inlineContent":[{"text":"The ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"},{"text":" containing the invocation’s metadata.","type":"text"}]}]}],"kind":"parameters"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/write(_:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"type":"topic","title":"write(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"required":true,"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingClosureHandler/handle(_:responseWriter:context:)":{"type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":", "},{"kind":"externalParam","text":"responseWriter"},{"text":": ","kind":"text"},{"kind":"keyword","text":"some"},{"text":" ","kind":"text"},{"text":"LambdaResponseStreamWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","kind":"typeIdentifier","text":"LambdaContext"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"abstract":[{"text":"Calls the provided ","type":"text"},{"type":"codeVoice","code":"self.body"},{"type":"text","text":" closure with the "},{"type":"codeVoice","code":"ByteBuffer"},{"text":" invocation event, the ","type":"text"},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","type":"reference"},{"type":"text","text":", and the "},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","type":"reference"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/handle(_:responseWriter:context:)","url":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler\/handle(_:responsewriter:context:)","kind":"symbol","title":"handle(_:responseWriter:context:)","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingClosureHandler":{"abstract":[{"type":"text","text":"A "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax.","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler","title":"StreamingClosureHandler","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingClosureHandler"}],"type":"topic","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"StreamingClosureHandler"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/streamingclosurehandler/init(body:).json b/docs/data/documentation/awslambdaruntimecore/streamingclosurehandler/init(body:).json new file mode 100644 index 00000000..ca091d5b --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/streamingclosurehandler/init(body:).json @@ -0,0 +1 @@ +{"abstract":[{"text":"Initialize an instance from a handler function in the form of a closure.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/streamingclosurehandler\/init(body:)"]}],"kind":"symbol","metadata":{"externalID":"s:20AWSLambdaRuntimeCore23StreamingClosureHandlerV4bodyACy7NIOCore10ByteBufferV_AA26LambdaResponseStreamWriter_pAA0K7ContextVtYaYbKc_tcfc","symbolKind":"init","modules":[{"name":"AWSLambdaRuntimeCore"}],"title":"init(body:)","role":"symbol","roleHeading":"Initializer","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"text":"body","kind":"externalParam"},{"text":": (","kind":"text"},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","kind":"typeIdentifier","text":"ByteBuffer"},{"kind":"text","text":", any "},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":")"}]},"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/init(body:)"},"sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"body","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":", any ","kind":"text"},{"text":"LambdaResponseStreamWriter","kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP"},{"kind":"text","text":", "},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":")"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"parameters":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The handler function written as a closure."}]}],"name":"body"}],"kind":"parameters"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingClosureHandler":{"abstract":[{"type":"text","text":"A "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax.","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler","title":"StreamingClosureHandler","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingClosureHandler"}],"type":"topic","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"StreamingClosureHandler"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingClosureHandler/init(body:)":{"url":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler\/init(body:)","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"body"},{"kind":"text","text":": ("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", any ","kind":"text"},{"text":"LambdaResponseStreamWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":")","kind":"text"}],"kind":"symbol","type":"topic","title":"init(body:)","abstract":[{"type":"text","text":"Initialize an instance from a handler function in the form of a closure."}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/init(body:)","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/write(_:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"type":"topic","title":"write(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"required":true,"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/streaminglambdahandler.json b/docs/data/documentation/awslambdaruntimecore/streaminglambdahandler.json new file mode 100644 index 00000000..6a54a677 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/streaminglambdahandler.json @@ -0,0 +1 @@ +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/streaminglambdahandler"],"traits":[{"interfaceLanguage":"swift"}]}],"topicSections":[{"anchor":"Instance-Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"],"title":"Instance Methods","generated":true}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"metadata":{"title":"StreamingLambdaHandler","externalID":"s:20AWSLambdaRuntimeCore22StreamingLambdaHandlerP","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"StreamingLambdaHandler","kind":"identifier"}],"modules":[{"name":"AWSLambdaRuntimeCore"}],"symbolKind":"protocol","roleHeading":"Protocol","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"role":"symbol"},"sections":[],"kind":"symbol","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"text":" too.","type":"text"},{"text":" ","type":"text"},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","isActive":true},{"type":"text","text":" "},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":",","type":"text"},{"type":"text","text":" "},{"type":"text","text":"the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"text":" function is free to execute any background work.","type":"text"}],"relationshipsSections":[{"kind":"relationships","type":"conformingTypes","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler"],"title":"Conforming Types"}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"StreamingLambdaHandler"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingClosureHandler":{"abstract":[{"type":"text","text":"A "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax.","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler","title":"StreamingClosureHandler","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingClosureHandler"}],"type":"topic","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"StreamingClosureHandler"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaWithBackgroundProcessingHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"topic","kind":"symbol","role":"symbol","title":"LambdaWithBackgroundProcessingHandler","url":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"text":", with the only difference being the added support for executing background","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"type":"text","text":" "},{"text":"This is achieved by not having a return type in the ","type":"text"},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"text":"that is passed in as an argument, meaning that the","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"},{"text":" function is then","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}],"navigatorTitle":[{"text":"LambdaWithBackgroundProcessingHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/finish()":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/finish()","abstract":[{"text":"End the response stream and the underlying HTTP response.","type":"text"}],"title":"finish()","kind":"symbol","required":true,"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"finish"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/write(_:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"type":"topic","title":"write(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"required":true,"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler/handle(_:responseWriter:context:)":{"role":"symbol","type":"topic","url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler\/handle(_:responsewriter:context:)","required":true,"title":"handle(_:responseWriter:context:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"responseWriter"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","abstract":[{"text":"The handler function – implement the business logic of the Lambda function here.","type":"text"}],"kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/streaminglambdahandler/handle(_:responsewriter:context:).json b/docs/data/documentation/awslambdaruntimecore/streaminglambdahandler/handle(_:responsewriter:context:).json new file mode 100644 index 00000000..0db7d846 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/streaminglambdahandler/handle(_:responsewriter:context:).json @@ -0,0 +1 @@ +{"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","kind":"typeIdentifier","text":"ByteBuffer"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"responseWriter"},{"kind":"text","text":": "},{"kind":"keyword","text":"some"},{"kind":"text","text":" "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter"},{"kind":"text","text":", "},{"kind":"externalParam","text":"context"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"required":true,"role":"symbol","externalID":"s:20AWSLambdaRuntimeCore22StreamingLambdaHandlerP6handle_14responseWriter7contexty7NIOCore10ByteBufferV_qd__AA0E7ContextVtYaKAA0e14ResponseStreamI0Rd__lF","modules":[{"name":"AWSLambdaRuntimeCore"}],"roleHeading":"Instance Method","symbolKind":"method","title":"handle(_:responseWriter:context:)"},"sections":[],"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/streaminglambdahandler\/handle(_:responsewriter:context:)"]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","abstract":[{"type":"text","text":"The handler function – implement the business logic of the Lambda function here."}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"mutating","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"event"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ByteBuffer","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"responseWriter"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","text":"LambdaResponseStreamWriter","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"The invocation’s input data.","type":"text"}]}],"name":"event"},{"content":[{"inlineContent":[{"text":"A ","type":"text"},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","type":"reference"},{"type":"text","text":" to write the invocation’s response to."},{"type":"text","text":" "},{"type":"text","text":"If no response or error is written to "},{"type":"codeVoice","code":"responseWriter"},{"type":"text","text":" an error will be reported to the invoker."}],"type":"paragraph"}],"name":"responseWriter"},{"name":"context","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","isActive":true,"type":"reference"},{"text":" containing the invocation’s metadata.","type":"text"}]}]}]},{"kind":"content","content":[{"type":"heading","text":"Discussion","level":2,"anchor":"discussion"},{"content":[{"inlineContent":[{"type":"text","text":""},{"text":" ","type":"text"},{"text":"How the thrown error will be handled by the runtime:","type":"text"}],"type":"paragraph"},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"An invocation error will be reported if the error is thrown before the first call to"},{"text":" ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)"},{"type":"text","text":"."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"If the error is thrown after call(s) to "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","isActive":true},{"type":"text","text":" but before"},{"text":" ","type":"text"},{"text":"a call to ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":", the response stream will be closed and trailing","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"headers will be sent."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"If "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","isActive":true},{"type":"text","text":" has already been called before the error is thrown, the"},{"type":"text","text":" "},{"text":"error will be logged.","type":"text"}]}]}],"type":"unorderedList"}],"name":"Throws","type":"aside","style":"note"}]}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","title":"LambdaContext","type":"topic","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"text":"The Lambda runtime generates and passes the ","type":"text"},{"type":"codeVoice","code":"LambdaContext"},{"type":"text","text":" to the Lambda handler as an argument."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler/handle(_:responseWriter:context:)":{"role":"symbol","type":"topic","url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler\/handle(_:responsewriter:context:)","required":true,"title":"handle(_:responseWriter:context:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"responseWriter"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","abstract":[{"text":"The handler function – implement the business logic of the Lambda function here.","type":"text"}],"kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/write(_:)":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","abstract":[{"type":"text","text":"Write a response part into the stream. Bytes written are streamed continually."}],"type":"topic","title":"write(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"required":true,"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter":{"url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","type":"topic","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"text":"before the first call to ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","type":"reference","isActive":true},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"navigatorTitle":[{"kind":"identifier","text":"LambdaResponseStreamWriter"}],"title":"LambdaResponseStreamWriter","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","kind":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/finish()":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/finish()","abstract":[{"text":"End the response stream and the underlying HTTP response.","type":"text"}],"title":"finish()","kind":"symbol","required":true,"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"finish"},{"kind":"text","text":"() "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/StreamingLambdaHandler":{"kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"StreamingLambdaHandler"}],"type":"topic","navigatorTitle":[{"text":"StreamingLambdaHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"text":" ","type":"text"},{"text":"passed as an argument in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" function."},{"type":"text","text":" "},{"text":"Background work can also be executed after returning the response. After closing the response stream by calling","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()"},{"text":" or ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"type":"text","text":","},{"text":" ","type":"text"},{"type":"text","text":"the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","isActive":true},{"text":" function is free to execute any background work.","type":"text"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaResponseStreamWriter/writeAndFinish(_:)":{"abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"writeAndFinish"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"title":"writeAndFinish(_:)","required":true,"role":"symbol","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/voidencoder.json b/docs/data/documentation/awslambdaruntimecore/voidencoder.json new file mode 100644 index 00000000..96e2a0c6 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/voidencoder.json @@ -0,0 +1 @@ +{"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","topicSections":[{"title":"Initializers","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/init()"],"anchor":"Initializers","generated":true},{"generated":true,"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/encode(_:into:)"],"title":"Instance Methods","anchor":"Instance-Methods"},{"title":"Type Aliases","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/Output"],"generated":true,"anchor":"Type-Aliases"}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"VoidEncoder"}]}],"kind":"declarations"}],"sections":[],"metadata":{"title":"VoidEncoder","symbolKind":"struct","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"VoidEncoder","kind":"identifier"}],"roleHeading":"Structure","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"VoidEncoder"}],"modules":[{"name":"AWSLambdaRuntimeCore"}],"externalID":"s:20AWSLambdaRuntimeCore11VoidEncoderV"},"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/voidencoder"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder","interfaceLanguage":"swift"},"relationshipsSections":[{"kind":"relationships","type":"conformsTo","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder"],"title":"Conforms To"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder/Output":{"fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"type":"topic","url":"\/documentation\/awslambdaruntimecore\/voidencoder\/output","role":"symbol","kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/Output","title":"VoidEncoder.Output","abstract":[],"navigatorTitle":[{"text":"Output","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder/Output":{"required":true,"kind":"symbol","title":"Output","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","abstract":[],"fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/output","type":"topic","role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaCodableAdapter":{"abstract":[{"type":"text","text":"Adapts a "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler to conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaCodableAdapter"}],"kind":"symbol","title":"LambdaCodableAdapter","type":"topic","url":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","navigatorTitle":[{"text":"LambdaCodableAdapter","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder/init()":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/init()","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"title":"init()","url":"\/documentation\/awslambdaruntimecore\/voidencoder\/init()","type":"topic","abstract":[],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaOutputEncoder":{"role":"symbol","navigatorTitle":[{"text":"LambdaOutputEncoder","kind":"identifier"}],"type":"topic","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaOutputEncoder","kind":"identifier"}],"abstract":[{"type":"text","text":"The protocol an encoder must conform to so that it can be used with "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","isActive":true},{"text":" to encode the generic","type":"text"},{"type":"text","text":" "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output"},{"text":" object into a ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":"."}],"title":"LambdaOutputEncoder","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"VoidEncoder"}],"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/voidencoder","title":"VoidEncoder","navigatorTitle":[{"kind":"identifier","text":"VoidEncoder"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder","role":"symbol","abstract":[]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder/encode(_:into:)":{"title":"encode(_:into:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"encode","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":", ","kind":"text"},{"text":"into","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"text":"ByteBuffer","preciseIdentifier":"s:7NIOCore10ByteBufferV","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"throws","kind":"keyword"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/encode(_:into:)","abstract":[],"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/voidencoder\/encode(_:into:)","kind":"symbol","type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/voidencoder/encode(_:into:).json b/docs/data/documentation/awslambdaruntimecore/voidencoder/encode(_:into:).json new file mode 100644 index 00000000..42279d43 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/voidencoder/encode(_:into:).json @@ -0,0 +1 @@ +{"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/encode(_:into:)","interfaceLanguage":"swift"},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"encode"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"value"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"kind":"text","text":", "},{"text":"into","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"buffer","kind":"internalParam"},{"kind":"text","text":": "},{"text":"inout","kind":"keyword"},{"text":" ","kind":"text"},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"kind":"keyword","text":"throws"}]}]}],"sections":[],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/voidencoder\/encode(_:into:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"modules":[{"name":"AWSLambdaRuntimeCore"}],"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"encode","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"into"},{"text":": ","kind":"text"},{"kind":"keyword","text":"inout"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"}],"externalID":"s:20AWSLambdaRuntimeCore11VoidEncoderV6encode_4intoyyt_7NIOCore10ByteBufferVztKF","symbolKind":"method","title":"encode(_:into:)","roleHeading":"Instance Method"},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"LambdaOutputEncoder.encode(_:into:)"},{"type":"text","text":"."}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder/encode(_:into:)":{"title":"encode(_:into:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"encode","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":", ","kind":"text"},{"text":"into","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"text":"ByteBuffer","preciseIdentifier":"s:7NIOCore10ByteBufferV","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"throws","kind":"keyword"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/encode(_:into:)","abstract":[],"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/voidencoder\/encode(_:into:)","kind":"symbol","type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"VoidEncoder"}],"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/voidencoder","title":"VoidEncoder","navigatorTitle":[{"kind":"identifier","text":"VoidEncoder"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder","role":"symbol","abstract":[]}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/voidencoder/init().json b/docs/data/documentation/awslambdaruntimecore/voidencoder/init().json new file mode 100644 index 00000000..6b582242 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/voidencoder/init().json @@ -0,0 +1 @@ +{"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/voidencoder\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}]}],"kind":"declarations"}],"kind":"symbol","identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/init()","interfaceLanguage":"swift"},"metadata":{"externalID":"s:20AWSLambdaRuntimeCore11VoidEncoderVACycfc","role":"symbol","modules":[{"name":"AWSLambdaRuntimeCore"}],"symbolKind":"init","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer"},"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder/init()":{"kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/init()","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"title":"init()","url":"\/documentation\/awslambdaruntimecore\/voidencoder\/init()","type":"topic","abstract":[],"role":"symbol"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"VoidEncoder"}],"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/voidencoder","title":"VoidEncoder","navigatorTitle":[{"kind":"identifier","text":"VoidEncoder"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder","role":"symbol","abstract":[]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"}}} \ No newline at end of file diff --git a/docs/data/documentation/awslambdaruntimecore/voidencoder/output.json b/docs/data/documentation/awslambdaruntimecore/voidencoder/output.json new file mode 100644 index 00000000..fc4982f0 --- /dev/null +++ b/docs/data/documentation/awslambdaruntimecore/voidencoder/output.json @@ -0,0 +1 @@ +{"abstract":[{"type":"text","text":"Inherited from "},{"code":"LambdaOutputEncoder.Output","type":"codeVoice"},{"type":"text","text":"."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/Output"},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/voidencoder\/output"]}],"sections":[],"kind":"symbol","metadata":{"symbolKind":"typealias","navigatorTitle":[{"text":"Output","kind":"identifier"}],"externalID":"s:20AWSLambdaRuntimeCore11VoidEncoderV6Outputa","modules":[{"name":"AWSLambdaRuntimeCore"}],"roleHeading":"Type Alias","role":"symbol","title":"VoidEncoder.Output","fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}]},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"},{"text":" = ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"}],"languages":["swift"],"platforms":["macOS"]}]}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder":{"type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"VoidEncoder"}],"kind":"symbol","url":"\/documentation\/awslambdaruntimecore\/voidencoder","title":"VoidEncoder","navigatorTitle":[{"kind":"identifier","text":"VoidEncoder"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder","role":"symbol","abstract":[]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/VoidEncoder/Output":{"fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"type":"topic","url":"\/documentation\/awslambdaruntimecore\/voidencoder\/output","role":"symbol","kind":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/Output","title":"VoidEncoder.Output","abstract":[],"navigatorTitle":[{"text":"Output","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","title":"AWSLambdaRuntimeCore","kind":"symbol","role":"collection"}}} \ No newline at end of file diff --git a/docs/data/tutorials/awslambdaruntimecore/01-overview.json b/docs/data/tutorials/awslambdaruntimecore/01-overview.json new file mode 100644 index 00000000..e499c79b --- /dev/null +++ b/docs/data/tutorials/awslambdaruntimecore/01-overview.json @@ -0,0 +1 @@ +{"schemaVersion":{"patch":0,"minor":3,"major":0},"sections":[{"content":[],"kind":"hero","estimatedTimeInMinutes":1,"title":"Overview"},{"kind":"articleBody","content":[{"kind":"fullWidth","content":[{"type":"paragraph","inlineContent":[{"text":"This tutorial helps you to get started writing your first AWS Lambda function in Swift. You will use the ","type":"text"},{"type":"codeVoice","code":"AWSLambdaRuntime"},{"text":" package to write code that can be deployed on AWS Lambda.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"You will learn three things:","type":"text"}]},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"How to implement simple Lambda function and test it locally"}]}]},{"content":[{"inlineContent":[{"type":"text","text":"How to build a Lambda function for deployment on AWS"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"How to deploy your Lambda function on AWS and invoke it","type":"text"}],"type":"paragraph"}]}],"type":"orderedList"},{"inlineContent":[{"type":"text","text":"It’s a beginners’ tutorial. The business logic of the function is very simple, it computes the square of a number passed as input parameter. This simplicity allows you to focus on the project setup and the deployment. You will deploy your code using the AWS Management Console. It is the easiest way to get started with AWS Lambda."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"If you have any questions or recommendations, please "},{"isActive":true,"type":"reference","identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/issues"},{"text":" so that you can get your question answered and this tutorial can be improved.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"emphasis","inlineContent":[{"text":"The following instructions were recorded on January 2025 and the AWS Management Console may have changed since then. Feel free to raise an issue if you spot differences with our screenshots","type":"text"}]}]}]}]},{"action":{"overridingTitleInlineContent":[{"type":"text","text":"Read article"}],"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda","overridingTitle":"Read article","type":"reference"},"featuredEyebrow":"Article","title":"What is AWS Lambda","abstract":[],"kind":"callToAction"}],"variants":[{"paths":["\/tutorials\/awslambdaruntimecore\/01-overview"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"modules":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Before-getting-started","projects":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview","sections":[]},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda","sections":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda#When-to-use-AWS-Lambda","kind":"heading"}]},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","sections":[]}]},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Your-first-Lambda-function-in-Swift","projects":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function","sections":[{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Initialize-a-new-project"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Add-the-project-dependencies","kind":"task"},{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Write-the-function-code"},{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Test-Your-Code-Locally"}]}]},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Deploy-your-code-to-the-cloud","projects":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function","sections":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Compile-for-Amazon-Linux","kind":"task"},{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Create-an-Lambda-Function"},{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Invoke-your-Lambda-function"}]}]}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","paths":[["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/$volume","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Before-getting-started"]]},"metadata":{"role":"article","title":"Overview","categoryPathComponent":"table-of-content","category":"AWS Lambda functions in Swift"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview"},"kind":"article","references":{"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Invoke-your-Lambda-function":{"role":"pseudoSymbol","type":"section","title":"Invoke your Lambda function","kind":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Invoke-your-Lambda-function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Invoke-your-Lambda-function"},"https://github.com/swift-server/swift-aws-lambda-runtime/issues":{"type":"link","titleInlineContent":[{"type":"text","text":"leave your feedback on GitHub"}],"identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/issues","url":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/issues","title":"leave your feedback on GitHub"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/02-what-is-lambda#When-to-use-AWS-Lambda":{"type":"section","abstract":[],"title":"When to use AWS Lambda","url":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda#When-to-use-AWS-Lambda","kind":"section","role":"pseudoSymbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda#When-to-use-AWS-Lambda"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Your-first-Lambda-function-in-Swift":{"role":"article","type":"topic","title":"Your first Lambda function in Swift","kind":"article","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Your-first-Lambda-function-in-Swift","abstract":[],"url":"\/tutorials\/table-of-content\/your-first-lambda-function-in-swift"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Test-Your-Code-Locally":{"type":"section","role":"pseudoSymbol","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"title":"Test Your Code Locally","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Test-Your-Code-Locally","url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Test-Your-Code-Locally","kind":"section"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Deploy-your-code-to-the-cloud":{"role":"article","abstract":[],"url":"\/tutorials\/table-of-content\/deploy-your-code-to-the-cloud","title":"Deploy your code to the cloud","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Deploy-your-code-to-the-cloud","kind":"article"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/02-what-is-lambda":{"abstract":[],"url":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda","title":"What is AWS Lambda","estimatedTime":"3min","kind":"article","role":"article"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function","url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"title":"Deploy your function to AWS Lambda","kind":"project","role":"project","estimatedTime":"15min","type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content":{"title":"Your First Lambda Function Written in Swift","kind":"overview","role":"overview","url":"\/tutorials\/table-of-content","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","abstract":[{"type":"text","text":"A step-by-step tutorial to learn how to implement, build, test, and deploy your first Lambda function written in Swift."}],"type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Add-the-project-dependencies":{"title":"Add the project dependencies","url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Add-the-project-dependencies","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Add-the-project-dependencies","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"kind":"section","role":"pseudoSymbol"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Before-getting-started":{"abstract":[],"title":"Before getting started","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Before-getting-started","url":"\/tutorials\/table-of-content\/before-getting-started","role":"article","kind":"article","type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/01-overview":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview","url":"\/tutorials\/awslambdaruntimecore\/01-overview","abstract":[],"title":"Overview","kind":"article","role":"article","estimatedTime":"1min","type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function":{"url":"\/tutorials\/awslambdaruntimecore\/03-write-function","estimatedTime":"15min","title":"Write your first Lambda function","kind":"project","type":"topic","role":"project","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Initialize-a-new-project":{"role":"pseudoSymbol","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Initialize-a-new-project","title":"Initialize a new project","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Initialize-a-new-project","kind":"section"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Create-an-Lambda-Function":{"type":"section","title":"Create an Lambda Function","url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Create-an-Lambda-Function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"kind":"section","role":"pseudoSymbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Create-an-Lambda-Function"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-prerequisites":{"type":"topic","title":"Prerequisites","role":"article","estimatedTime":"3min","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","url":"\/tutorials\/awslambdaruntimecore\/03-prerequisites","kind":"article","abstract":[]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Write-the-function-code":{"role":"pseudoSymbol","type":"section","title":"Write the function code","kind":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Write-the-function-code","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Write-the-function-code"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Compile-for-Amazon-Linux":{"role":"pseudoSymbol","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Compile-for-Amazon-Linux","title":"Compile for Amazon Linux","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Compile-for-Amazon-Linux","kind":"section"}}} \ No newline at end of file diff --git a/docs/data/tutorials/awslambdaruntimecore/02-what-is-lambda.json b/docs/data/tutorials/awslambdaruntimecore/02-what-is-lambda.json new file mode 100644 index 00000000..515939c7 --- /dev/null +++ b/docs/data/tutorials/awslambdaruntimecore/02-what-is-lambda.json @@ -0,0 +1 @@ +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/tutorials\/awslambdaruntimecore\/02-what-is-lambda"]}],"metadata":{"categoryPathComponent":"table-of-content","title":"What is AWS Lambda","category":"AWS Lambda functions in Swift","role":"article"},"hierarchy":{"modules":[{"projects":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview","sections":[]},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda","sections":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda#When-to-use-AWS-Lambda","kind":"heading"}]},{"sections":[],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites"}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Before-getting-started"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Your-first-Lambda-function-in-Swift","projects":[{"sections":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Initialize-a-new-project","kind":"task"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Add-the-project-dependencies","kind":"task"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Write-the-function-code","kind":"task"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Test-Your-Code-Locally","kind":"task"}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function"}]},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Deploy-your-code-to-the-cloud","projects":[{"sections":[{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Compile-for-Amazon-Linux"},{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Create-an-Lambda-Function"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Invoke-your-Lambda-function","kind":"task"}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function"}]}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","paths":[["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/$volume","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Before-getting-started"]]},"kind":"article","sections":[{"content":[],"title":"What is AWS Lambda","kind":"hero","estimatedTimeInMinutes":3},{"kind":"articleBody","content":[{"content":[{"inlineContent":[{"text":"AWS Lambda is a compute service that lets you run code without provisioning or managing servers. Lambda runs your code on a high-availability compute infrastructure and performs all of the administration of the compute resources, including server and operating system maintenance, capacity provisioning and automatic scaling, and logging. With Lambda, you can run code for virtually any type of application or backend service. All you need to do is supply your code in ","type":"text"},{"type":"reference","identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-runtimes.html","isActive":true},{"text":", including Swift.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"You organize your code into ","type":"text"},{"type":"reference","identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/gettingstarted-concepts.html#gettingstarted-concepts-function","isActive":true},{"type":"text","text":". Lambda runs your function only when needed and scales automatically, from a few requests per day to thousands per second. You pay only for the compute time that you consume—there is no charge when your code is not running. For more information, see "},{"isActive":true,"type":"reference","identifier":"http:\/\/aws.amazon.com\/lambda\/pricing\/"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"text":"Lambda is a highly available service. For more information, see the ","type":"text"},{"type":"reference","identifier":"https:\/\/aws.amazon.com\/lambda\/sla\/","isActive":true},{"text":".","type":"text"}]},{"text":"When to use AWS Lambda","type":"heading","anchor":"When-to-use-AWS-Lambda","level":3},{"inlineContent":[{"type":"text","text":"Lambda is an ideal compute service for many application scenarios, as long as you can run your application code using the Lambda "},{"identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-runtime-environment.html","isActive":true,"type":"reference"},{"type":"text","text":" and within the resources that Lambda provides. For example, you can use Lambda for:"}],"type":"paragraph"},{"type":"unorderedList","items":[{"content":[{"inlineContent":[{"type":"text","text":"Mobile backends: Build backends using Lambda and Amazon API Gateway to authenticate and process API requests. Use AWS Amplify to easily integrate your backend with your iOS, Android, Web, and React Native front ends."}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"Web applications: Combine Lambda with other AWS services to build powerful web applications that automatically scale up and down and run in a highly available configuration across multiple data centers.","type":"text"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"File processing: Use Amazon Simple Storage Service (Amazon S3) to trigger Lambda data processing in real time after an upload."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Stream processing: Use Lambda and Amazon Kinesis to process real-time streaming data for application activity tracking, transaction order processing, click stream analysis, data cleansing, log filtering, indexing, social media analysis, Internet of Things (IoT) device data telemetry, and metering."}]}]},{"content":[{"inlineContent":[{"text":"IoT backends: Build serverless backends using Lambda to handle web, mobile, IoT, and third-party API requests.","type":"text"}],"type":"paragraph"}]}]},{"inlineContent":[{"type":"text","text":"When using Lambda, you are responsible only for your code. Lambda manages the compute fleet that offers a balance of memory, CPU, network, and other resources to run your code. Because Lambda manages these resources, you cannot log in to compute instances or customize the operating system on "},{"type":"reference","identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-runtimes.html","isActive":true,"overridingTitleInlineContent":[{"text":"provided runtimes","type":"text"}],"overridingTitle":"provided runtimes"},{"type":"text","text":". Lambda performs operational and administrative activities on your behalf, including managing capacity, monitoring, and logging your Lambda functions."}],"type":"paragraph"}],"kind":"fullWidth"}]},{"abstract":[],"featuredEyebrow":"Article","title":"Prerequisites","action":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","isActive":true,"overridingTitle":"Read article","overridingTitleInlineContent":[{"text":"Read article","type":"text"}],"type":"reference"},"kind":"callToAction"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/01-overview":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview","url":"\/tutorials\/awslambdaruntimecore\/01-overview","abstract":[],"title":"Overview","kind":"article","role":"article","estimatedTime":"1min","type":"topic"},"http://aws.amazon.com/lambda/pricing/":{"titleInlineContent":[{"type":"text","text":"AWS Lambda Pricing"}],"type":"link","title":"AWS Lambda Pricing","identifier":"http:\/\/aws.amazon.com\/lambda\/pricing\/","url":"http:\/\/aws.amazon.com\/lambda\/pricing\/"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function","url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"title":"Deploy your function to AWS Lambda","kind":"project","role":"project","estimatedTime":"15min","type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Deploy-your-code-to-the-cloud":{"role":"article","abstract":[],"url":"\/tutorials\/table-of-content\/deploy-your-code-to-the-cloud","title":"Deploy your code to the cloud","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Deploy-your-code-to-the-cloud","kind":"article"},"https://aws.amazon.com/lambda/sla/":{"titleInlineContent":[{"text":"AWS Lambda Service Level Agreement","type":"text"}],"type":"link","title":"AWS Lambda Service Level Agreement","identifier":"https:\/\/aws.amazon.com\/lambda\/sla\/","url":"https:\/\/aws.amazon.com\/lambda\/sla\/"},"https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-concepts.html#gettingstarted-concepts-function":{"titleInlineContent":[{"type":"text","text":"Lambda functions"}],"type":"link","title":"Lambda functions","identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/gettingstarted-concepts.html#gettingstarted-concepts-function","url":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/gettingstarted-concepts.html#gettingstarted-concepts-function"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/02-what-is-lambda":{"abstract":[],"url":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda","title":"What is AWS Lambda","estimatedTime":"3min","kind":"article","role":"article"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Write-the-function-code":{"role":"pseudoSymbol","type":"section","title":"Write the function code","kind":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Write-the-function-code","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Write-the-function-code"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Initialize-a-new-project":{"role":"pseudoSymbol","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Initialize-a-new-project","title":"Initialize a new project","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Initialize-a-new-project","kind":"section"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Before-getting-started":{"abstract":[],"title":"Before getting started","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Before-getting-started","url":"\/tutorials\/table-of-content\/before-getting-started","role":"article","kind":"article","type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Invoke-your-Lambda-function":{"role":"pseudoSymbol","type":"section","title":"Invoke your Lambda function","kind":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Invoke-your-Lambda-function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Invoke-your-Lambda-function"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Add-the-project-dependencies":{"title":"Add the project dependencies","url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Add-the-project-dependencies","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Add-the-project-dependencies","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"kind":"section","role":"pseudoSymbol"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/02-what-is-lambda#When-to-use-AWS-Lambda":{"type":"section","abstract":[],"title":"When to use AWS Lambda","url":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda#When-to-use-AWS-Lambda","kind":"section","role":"pseudoSymbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda#When-to-use-AWS-Lambda"},"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtime-environment.html":{"titleInlineContent":[{"text":"standard runtime environment","type":"text"}],"type":"link","title":"standard runtime environment","identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-runtime-environment.html","url":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-runtime-environment.html"},"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html":{"titleInlineContent":[{"type":"text","text":"one of the languages that Lambda supports"}],"type":"link","title":"one of the languages that Lambda supports","identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-runtimes.html","url":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-runtimes.html"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content":{"title":"Your First Lambda Function Written in Swift","kind":"overview","role":"overview","url":"\/tutorials\/table-of-content","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","abstract":[{"type":"text","text":"A step-by-step tutorial to learn how to implement, build, test, and deploy your first Lambda function written in Swift."}],"type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Test-Your-Code-Locally":{"type":"section","role":"pseudoSymbol","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"title":"Test Your Code Locally","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Test-Your-Code-Locally","url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Test-Your-Code-Locally","kind":"section"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Compile-for-Amazon-Linux":{"role":"pseudoSymbol","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Compile-for-Amazon-Linux","title":"Compile for Amazon Linux","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Compile-for-Amazon-Linux","kind":"section"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function":{"url":"\/tutorials\/awslambdaruntimecore\/03-write-function","estimatedTime":"15min","title":"Write your first Lambda function","kind":"project","type":"topic","role":"project","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}]},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Your-first-Lambda-function-in-Swift":{"role":"article","type":"topic","title":"Your first Lambda function in Swift","kind":"article","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Your-first-Lambda-function-in-Swift","abstract":[],"url":"\/tutorials\/table-of-content\/your-first-lambda-function-in-swift"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Create-an-Lambda-Function":{"type":"section","title":"Create an Lambda Function","url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Create-an-Lambda-Function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"kind":"section","role":"pseudoSymbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Create-an-Lambda-Function"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-prerequisites":{"type":"topic","title":"Prerequisites","role":"article","estimatedTime":"3min","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","url":"\/tutorials\/awslambdaruntimecore\/03-prerequisites","kind":"article","abstract":[]}}} \ No newline at end of file diff --git a/docs/data/tutorials/awslambdaruntimecore/03-prerequisites.json b/docs/data/tutorials/awslambdaruntimecore/03-prerequisites.json new file mode 100644 index 00000000..af45fa93 --- /dev/null +++ b/docs/data/tutorials/awslambdaruntimecore/03-prerequisites.json @@ -0,0 +1 @@ +{"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"role":"article","category":"AWS Lambda functions in Swift","title":"Prerequisites","categoryPathComponent":"table-of-content"},"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/$volume","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Before-getting-started"]],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","modules":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Before-getting-started","projects":[{"sections":[],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview"},{"sections":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda#When-to-use-AWS-Lambda","kind":"heading"}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","sections":[]}]},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Your-first-Lambda-function-in-Swift","projects":[{"sections":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Initialize-a-new-project","kind":"task"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Add-the-project-dependencies","kind":"task"},{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Write-the-function-code"},{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Test-Your-Code-Locally"}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function"}]},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Deploy-your-code-to-the-cloud","projects":[{"sections":[{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Compile-for-Amazon-Linux"},{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Create-an-Lambda-Function"},{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Invoke-your-Lambda-function"}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function"}]}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/tutorials\/awslambdaruntimecore\/03-prerequisites"]}],"sections":[{"content":[],"title":"Prerequisites","estimatedTimeInMinutes":3,"kind":"hero"},{"kind":"articleBody","content":[{"kind":"fullWidth","content":[{"type":"paragraph","inlineContent":[{"text":"This tutorial has been tested on macOS, since this is what most Swift developers work on. It should also work on Linux.","type":"text"}]},{"inlineContent":[{"type":"text","text":"To follow the instructions provided by this tutorial you’ll need to meet a couple of prerequisites."}],"type":"paragraph"},{"type":"unorderedList","items":[{"content":[{"inlineContent":[{"type":"text","text":"We expect you to have a basic understanding of the Swift programming language and be somewhat familiar with the terminal\/console. You can follow this "},{"identifier":"https:\/\/docs.swift.org\/swift-book\/documentation\/the-swift-programming-language\/guidedtour","isActive":true,"type":"reference"},{"text":". ","type":"text"},{"type":"reference","identifier":"https:\/\/support.apple.com\/guide\/terminal\/open-or-quit-terminal-apd5265185d-f365-44cb-8b09-71a064a42125\/mac","isActive":true},{"type":"text","text":"."}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"type":"text","text":"You’ll need to have a text editor and the Swift toolchain installed. On macOS, you can use "},{"isActive":true,"type":"reference","identifier":"https:\/\/developer.apple.com\/xcode\/"},{"type":"text","text":". On Linux, you must install "},{"type":"reference","identifier":"https:\/\/www.swift.org\/download\/","isActive":true},{"text":". On macOS and Linux, you may also use ","type":"text"},{"identifier":"https:\/\/code.visualstudio.com\/download","type":"reference","isActive":true},{"text":" and the ","type":"text"},{"identifier":"https:\/\/www.swift.org\/blog\/vscode-extension\/","type":"reference","isActive":true},{"type":"text","text":"."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"To compile your Lambda function to run on AWS Lambda, you will need to install "},{"isActive":true,"identifier":"https:\/\/docs.docker.com\/desktop\/install\/mac-install\/","type":"reference"},{"type":"text","text":". This tutorial doesn’t go into much detail what Docker is and what it does. Just remember that AWS Lambda functions run on Linux. Therefore, you have to compile your Swift Lambda function code for Linux. Docker allows you to start a Linux virtual machine where you will compile your Swift code before to deploy it on AWS Lambda. This tutorial contains all the commands you will have to type to interact with Docker. Follow "},{"isActive":true,"overridingTitleInlineContent":[{"type":"text","text":"the instructions provided by Docker"}],"identifier":"https:\/\/docs.docker.com\/desktop\/install\/mac-install\/","type":"reference","overridingTitle":"the instructions provided by Docker"},{"type":"text","text":" to install Docker on your machine."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"To deploy your Lambda function on AWS you need an "},{"identifier":"https:\/\/aws.amazon.com\/what-is-aws\/","isActive":true,"type":"reference"},{"type":"text","text":" account. "},{"type":"reference","identifier":"https:\/\/docs.aws.amazon.com\/accounts\/latest\/reference\/manage-acct-creating.html","isActive":true},{"type":"text","text":"."}]}]}]}]}]},{"featuredEyebrow":"Tutorial","title":"Write your first Lambda function","action":{"overridingTitle":"Get started","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function","isActive":true,"type":"reference","overridingTitleInlineContent":[{"type":"text","text":"Get started"}]},"abstract":[{"type":"text","text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift."}],"kind":"callToAction"}],"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","interfaceLanguage":"swift"},"kind":"article","references":{"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Add-the-project-dependencies":{"title":"Add the project dependencies","url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Add-the-project-dependencies","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Add-the-project-dependencies","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"kind":"section","role":"pseudoSymbol"},"https://www.swift.org/blog/vscode-extension/":{"title":"Swift extension for VSCode","type":"link","identifier":"https:\/\/www.swift.org\/blog\/vscode-extension\/","url":"https:\/\/www.swift.org\/blog\/vscode-extension\/","titleInlineContent":[{"type":"text","text":"Swift extension for VSCode"}]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-prerequisites":{"type":"topic","title":"Prerequisites","role":"article","estimatedTime":"3min","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","url":"\/tutorials\/awslambdaruntimecore\/03-prerequisites","kind":"article","abstract":[]},"https://docs.docker.com/desktop/install/mac-install/":{"type":"link","identifier":"https:\/\/docs.docker.com\/desktop\/install\/mac-install\/","url":"https:\/\/docs.docker.com\/desktop\/install\/mac-install\/","titleInlineContent":[{"text":"Docker","type":"text"}],"title":"Docker"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/02-what-is-lambda":{"abstract":[],"url":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda","title":"What is AWS Lambda","estimatedTime":"3min","kind":"article","role":"article"},"https://docs.swift.org/swift-book/documentation/the-swift-programming-language/guidedtour":{"identifier":"https:\/\/docs.swift.org\/swift-book\/documentation\/the-swift-programming-language\/guidedtour","title":"guided tour to have an overview of Swift","titleInlineContent":[{"text":"guided tour to have an overview of Swift","type":"text"}],"url":"https:\/\/docs.swift.org\/swift-book\/documentation\/the-swift-programming-language\/guidedtour","type":"link"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Before-getting-started":{"abstract":[],"title":"Before getting started","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Before-getting-started","url":"\/tutorials\/table-of-content\/before-getting-started","role":"article","kind":"article","type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Compile-for-Amazon-Linux":{"role":"pseudoSymbol","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Compile-for-Amazon-Linux","title":"Compile for Amazon Linux","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Compile-for-Amazon-Linux","kind":"section"},"https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-creating.html":{"title":"Follow these instructions to create an AWS account","titleInlineContent":[{"text":"Follow these instructions to create an AWS account","type":"text"}],"identifier":"https:\/\/docs.aws.amazon.com\/accounts\/latest\/reference\/manage-acct-creating.html","type":"link","url":"https:\/\/docs.aws.amazon.com\/accounts\/latest\/reference\/manage-acct-creating.html"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Initialize-a-new-project":{"role":"pseudoSymbol","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Initialize-a-new-project","title":"Initialize a new project","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Initialize-a-new-project","kind":"section"},"https://support.apple.com/guide/terminal/open-or-quit-terminal-apd5265185d-f365-44cb-8b09-71a064a42125/mac":{"title":"You can follow this short tutorial to learn about macOS commands and the Terminal","titleInlineContent":[{"text":"You can follow this short tutorial to learn about macOS commands and the Terminal","type":"text"}],"identifier":"https:\/\/support.apple.com\/guide\/terminal\/open-or-quit-terminal-apd5265185d-f365-44cb-8b09-71a064a42125\/mac","type":"link","url":"https:\/\/support.apple.com\/guide\/terminal\/open-or-quit-terminal-apd5265185d-f365-44cb-8b09-71a064a42125\/mac"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Deploy-your-code-to-the-cloud":{"role":"article","abstract":[],"url":"\/tutorials\/table-of-content\/deploy-your-code-to-the-cloud","title":"Deploy your code to the cloud","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Deploy-your-code-to-the-cloud","kind":"article"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/02-what-is-lambda#When-to-use-AWS-Lambda":{"type":"section","abstract":[],"title":"When to use AWS Lambda","url":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda#When-to-use-AWS-Lambda","kind":"section","role":"pseudoSymbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda#When-to-use-AWS-Lambda"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Test-Your-Code-Locally":{"type":"section","role":"pseudoSymbol","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"title":"Test Your Code Locally","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Test-Your-Code-Locally","url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Test-Your-Code-Locally","kind":"section"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Write-the-function-code":{"role":"pseudoSymbol","type":"section","title":"Write the function code","kind":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Write-the-function-code","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Write-the-function-code"},"https://code.visualstudio.com/download":{"title":"VSCode","type":"link","identifier":"https:\/\/code.visualstudio.com\/download","titleInlineContent":[{"text":"VSCode","type":"text"}],"url":"https:\/\/code.visualstudio.com\/download"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Create-an-Lambda-Function":{"type":"section","title":"Create an Lambda Function","url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Create-an-Lambda-Function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"kind":"section","role":"pseudoSymbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Create-an-Lambda-Function"},"https://aws.amazon.com/what-is-aws/":{"title":"Amazon Web Service (AWS)","type":"link","identifier":"https:\/\/aws.amazon.com\/what-is-aws\/","titleInlineContent":[{"text":"Amazon Web Service (AWS)","type":"text"}],"url":"https:\/\/aws.amazon.com\/what-is-aws\/"},"https://www.swift.org/download/":{"titleInlineContent":[{"text":"the Swift runtime and toolchain","type":"text"}],"type":"link","url":"https:\/\/www.swift.org\/download\/","identifier":"https:\/\/www.swift.org\/download\/","title":"the Swift runtime and toolchain"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Your-first-Lambda-function-in-Swift":{"role":"article","type":"topic","title":"Your first Lambda function in Swift","kind":"article","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Your-first-Lambda-function-in-Swift","abstract":[],"url":"\/tutorials\/table-of-content\/your-first-lambda-function-in-swift"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/01-overview":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview","url":"\/tutorials\/awslambdaruntimecore\/01-overview","abstract":[],"title":"Overview","kind":"article","role":"article","estimatedTime":"1min","type":"topic"},"https://developer.apple.com/xcode/":{"titleInlineContent":[{"text":"Xcode","type":"text"}],"type":"link","url":"https:\/\/developer.apple.com\/xcode\/","identifier":"https:\/\/developer.apple.com\/xcode\/","title":"Xcode"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function","url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"title":"Deploy your function to AWS Lambda","kind":"project","role":"project","estimatedTime":"15min","type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content":{"title":"Your First Lambda Function Written in Swift","kind":"overview","role":"overview","url":"\/tutorials\/table-of-content","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","abstract":[{"type":"text","text":"A step-by-step tutorial to learn how to implement, build, test, and deploy your first Lambda function written in Swift."}],"type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function":{"url":"\/tutorials\/awslambdaruntimecore\/03-write-function","estimatedTime":"15min","title":"Write your first Lambda function","kind":"project","type":"topic","role":"project","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Invoke-your-Lambda-function":{"role":"pseudoSymbol","type":"section","title":"Invoke your Lambda function","kind":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Invoke-your-Lambda-function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Invoke-your-Lambda-function"}}} \ No newline at end of file diff --git a/docs/data/tutorials/awslambdaruntimecore/03-write-function.json b/docs/data/tutorials/awslambdaruntimecore/03-write-function.json new file mode 100644 index 00000000..9505d6ef --- /dev/null +++ b/docs/data/tutorials/awslambdaruntimecore/03-write-function.json @@ -0,0 +1 @@ +{"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function","interfaceLanguage":"swift"},"variants":[{"paths":["\/tutorials\/awslambdaruntimecore\/03-write-function"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"category":"AWS Lambda functions in Swift","role":"project","title":"Write your first Lambda function","categoryPathComponent":"table-of-content"},"sections":[{"title":"Write your first Lambda function","kind":"hero","content":[{"type":"paragraph","inlineContent":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}]},{"inlineContent":[{"type":"text","text":"In this example, we will create a Lambda function that receives a text and checks if this text is a palindrome or not."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"A palindrome is a word or phrase that reads the same forward and backward.","type":"text"}]}],"estimatedTimeInMinutes":15,"chapter":"Your first Lambda function in Swift"},{"tasks":[{"stepsSection":[{"type":"paragraph","inlineContent":[{"text":"Start in your development folder.","type":"text"}]},{"code":"03-01-01-package-init.sh","type":"step","media":null,"runtimePreview":null,"caption":[],"content":[{"inlineContent":[{"text":"Open a Terminal and create a directory for your Lambda function.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"Initialize a new Swift package for an executable target.","type":"text"}],"type":"paragraph"}],"type":"step","code":"03-01-02-package-init.sh","runtimePreview":null,"caption":[],"media":null},{"code":"03-01-03-package-init.sh","runtimePreview":null,"type":"step","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Open Xcode in this newly created directory."}]}],"caption":[],"media":null},{"type":"step","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Alternatively, if you use VSCode, use the "},{"code":"code","type":"codeVoice"},{"text":" command to open VSCode in your project repository.","type":"text"}]}],"media":null,"code":"03-01-04-package-init.sh","caption":[],"runtimePreview":null},{"runtimePreview":null,"media":"03-01-xcode.png","type":"step","content":[{"inlineContent":[{"text":"In your development environment, expand the project if necessary and open the file ","type":"text"},{"type":"codeVoice","code":"Package.swift"},{"type":"text","text":"."}],"type":"paragraph"}],"caption":[{"type":"paragraph","inlineContent":[{"text":"If you are an iOS developer, you might wonder what is a ","type":"text"},{"code":"Package.swift","type":"codeVoice"},{"text":". In simple terms, your ","type":"text"},{"code":"Package.swift","type":"codeVoice"},{"type":"text","text":" defines the dependencies your code has and what products (libraries and\/or executables) your code offers."}]}],"code":null}],"anchor":"Initialize-a-new-project","title":"Initialize a new project","contentSection":[{"content":[{"type":"paragraph","inlineContent":[{"text":"Create a new swift project and open Xcode.","type":"text"}]}],"mediaPosition":"trailing","media":"03-01-terminal-package-init.png","kind":"contentAndMedia"}]},{"title":"Add the project dependencies","stepsSection":[{"media":null,"code":"03-02-01-package.swift","runtimePreview":null,"content":[{"type":"paragraph","inlineContent":[{"text":"In the Xcode editor, replace the content of ","type":"text"},{"code":"Package.swift","type":"codeVoice"},{"type":"text","text":" with the file on the right side of the screen."}]}],"type":"step","caption":[{"type":"paragraph","inlineContent":[{"type":"text","text":"It defines a package for a project named "},{"type":"codeVoice","code":"Palindrome"},{"type":"text","text":". The package name only matters when you build a library that is used by other Swift packages."}]},{"name":"Note","content":[{"type":"paragraph","inlineContent":[{"text":"Comments are important here, do not skip them. They define the minimum version of Swift to use.","type":"text"}]}],"style":"note","type":"aside"}]},{"caption":[{"type":"paragraph","inlineContent":[{"type":"text","text":"It defines on which Apple platforms the code can be executed. Since Lambda functions are supposed to be run on Linux servers with Amazon Linux 2, it is reasonable to make them run only on macOS, for debugging for example. It does not make sense to run this code on iOS, iPadOS, tvOS, and watchOS."}]}],"type":"step","media":null,"code":"03-02-02-package.swift","content":[{"type":"paragraph","inlineContent":[{"text":"Add the ","type":"text"},{"type":"codeVoice","code":"platform"},{"text":" section.","type":"text"}]}],"runtimePreview":null},{"caption":[{"type":"paragraph","inlineContent":[{"text":"It defines what external libraries your code depends on. To run code within AWS Lambda you’ll need a runtime that handles the communication with the ","type":"text"},{"type":"reference","isActive":true,"identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/runtimes-api.html"},{"text":". This is what the ","type":"text"},{"code":"AWSLambdaRuntime","type":"codeVoice"},{"text":" is for. You import it by specifying its GitHub url: ","type":"text"},{"type":"codeVoice","code":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime.git"},{"text":".","type":"text"}]}],"type":"step","media":null,"code":"03-02-03-package.swift","runtimePreview":null,"content":[{"type":"paragraph","inlineContent":[{"text":"Add the ","type":"text"},{"code":"dependencies","type":"codeVoice"},{"text":" section.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Add the "},{"type":"codeVoice","code":"target"},{"text":" section.","type":"text"}]}],"type":"step","media":null,"caption":[{"type":"paragraph","inlineContent":[{"type":"text","text":"In the "},{"type":"codeVoice","code":"targets"},{"text":" section you specify your own targets. They are pretty comparable to targets you specify within an Xcode project (that’s probably why they share the name 😎). In our example we only want to create an executable that is called ","type":"text"},{"type":"codeVoice","code":"PalindromeLambda"},{"text":". An executable must have an entrypoint. This can be either a ","type":"text"},{"type":"codeVoice","code":"main.swift"},{"type":"text","text":" or an object that is marked with "},{"code":"@main","type":"codeVoice"},{"type":"text","text":". For Lambda we will use the "},{"code":"@main","type":"codeVoice"},{"text":" approach.","type":"text"}]}],"runtimePreview":null,"code":"03-02-04-package.swift"},{"caption":[{"inlineContent":[{"text":"To advertise our ","type":"text"},{"type":"codeVoice","code":"executableTarget"},{"type":"text","text":" as a product of our package, we add it to the "},{"code":"products","type":"codeVoice"},{"text":" section.","type":"text"}],"type":"paragraph"}],"media":null,"runtimePreview":null,"content":[{"type":"paragraph","inlineContent":[{"text":"Add the ","type":"text"},{"code":"product","type":"codeVoice"},{"text":" section.","type":"text"}]}],"type":"step","code":"03-02-05-package.swift"}],"anchor":"Add-the-project-dependencies","contentSection":[{"kind":"contentAndMedia","mediaPosition":"trailing","content":[{"inlineContent":[{"text":"Prepare ","type":"text"},{"type":"codeVoice","code":"Package.swift"},{"type":"text","text":" to define the project targets and dependencies."}],"type":"paragraph"}],"media":"03-02-swift-package-manager.png"}]},{"title":"Write the function code","anchor":"Write-the-function-code","contentSection":[{"media":"03-03-swift-code-xcode.png","content":[{"type":"paragraph","inlineContent":[{"text":"Now that our project structure is ready, let’s write the code of your Lambda function. Perform the following steps in Xcode or another IDE of your choice.","type":"text"}]}],"mediaPosition":"trailing","kind":"contentAndMedia"}],"stepsSection":[{"type":"step","runtimePreview":null,"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Open the "},{"code":"main.swift","type":"codeVoice"},{"text":" file, remove the code generated and write the code to represent the request sent to your Lambda function.","type":"text"}]}],"media":null,"code":"03-03-01-main.swift","caption":[{"inlineContent":[{"text":"Input parameters must conform to the ","type":"text"},{"type":"codeVoice","code":"Decodable"},{"text":" protocol. This ensures that your Lambda function accepts any JSON input.","type":"text"}],"type":"paragraph"},{"style":"note","type":"aside","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"When your function is triggered by another AWS service, we modeled most of the input and output data format for you. You can add the dependency on "},{"isActive":true,"identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-events","type":"reference"},{"text":" and import ","type":"text"},{"code":"AWSLambdaEvents","type":"codeVoice"},{"type":"text","text":" in your code."}]}],"name":"Note"}]},{"code":"03-03-02-main.swift","caption":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Output parameters must conform to the "},{"code":"Encodable","type":"codeVoice"},{"type":"text","text":" protocol. This ensures that your Lambda function returns a valid JSON output. Your function might also return "},{"code":"Void","type":"codeVoice"},{"text":" if it does not return any value.","type":"text"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also write function that stream a response back to the caller. This is useful when you have a large amount of data to return. See the "},{"identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/tree\/main\/Examples\/Streaming","isActive":true,"type":"reference"},{"type":"text","text":" for more information."}]}],"style":"note","name":"Note","type":"aside"}],"content":[{"inlineContent":[{"text":"Write the code to represent the response returned by your Lambda function.","type":"text"}],"type":"paragraph"}],"runtimePreview":null,"media":null,"type":"step"},{"code":"03-03-03-main.swift","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Write your business logic."}]}],"media":null,"runtimePreview":null,"caption":[{"type":"paragraph","inlineContent":[{"text":"In real life project, this will be the most complex part of your code. It will live in spearate files or libraries. For this example, we will keep it simple and just return ","type":"text"},{"type":"codeVoice","code":"true"},{"type":"text","text":" if a "},{"type":"codeVoice","code":"String"},{"text":" is a palindrome.","type":"text"}]}],"type":"step"},{"runtimePreview":null,"type":"step","media":null,"caption":[],"content":[{"inlineContent":[{"text":"Add an ","type":"text"},{"code":"import","type":"codeVoice"},{"type":"text","text":" statement to import the "},{"type":"codeVoice","code":"AWSLambdaRuntime"},{"type":"text","text":" library."}],"type":"paragraph"}],"code":"03-03-04-main.swift"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Create a "},{"code":"LambdaRuntime","type":"codeVoice"},{"type":"text","text":" struct and add a handler function that will be called by the Lambda runtime."}]}],"media":null,"caption":[{"type":"paragraph","inlineContent":[{"type":"text","text":"This function is passed as a closure to the initializer of the "},{"code":"LambdaRuntime","type":"codeVoice"},{"type":"text","text":" struct. It accepts two parameters: the input event and the context. The input event is the JSON payload sent to your Lambda function. The context provides information about the function, such as the function name, memory limit, and log group name. The function returns the output event, which is the JSON payload returned by your Lambda function or Void if your function does not return any value."}]}],"runtimePreview":null,"type":"step","code":"03-03-05-main.swift"},{"media":null,"runtimePreview":null,"code":"03-03-06-main.swift","content":[{"inlineContent":[{"type":"text","text":"Add the business logic to the handler function and return the response."}],"type":"paragraph"}],"caption":[{"type":"paragraph","inlineContent":[{"type":"text","text":"In this example, we call the "},{"type":"codeVoice","code":"isPalindrome(_:)"},{"text":" function to check if the input string is a palindrome. Then, we create a response with the result of the check.","type":"text"}]}],"type":"step"},{"type":"step","runtimePreview":null,"code":"03-03-07-main.swift","caption":[{"inlineContent":[{"type":"text","text":"This function starts the Lambda runtime and listens for incoming requests. When a request is received, it calls the handler function with the input event and context. The handler function processes the request and returns the output event. The runtime sends the output event back to the caller. This function might "},{"code":"throw","type":"codeVoice"},{"type":"text","text":" an error if the runtime fails to process an event or if the handler function throws an error. This function is asynchronous and does not return until the runtime is stopped."}],"type":"paragraph"}],"media":null,"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Start the runtime by calling the "},{"type":"codeVoice","code":"run()"},{"text":" function.","type":"text"}]}]}]},{"contentSection":[{"kind":"contentAndMedia","mediaPosition":"trailing","content":[{"inlineContent":[{"text":"Before to deploy your Lambda to AWS, you want to ensure that it works on your local machine.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"The ","type":"text"},{"code":"AWSLambdaRuntime","type":"codeVoice"},{"type":"text","text":" embeds a simple web server you can start and use to send your requests to your Lambda function."}]}],"media":"03-04-test-locally.png"}],"anchor":"Test-Your-Code-Locally","stepsSection":[{"type":"paragraph","inlineContent":[{"text":"The embedded web server starts only when compiling in ","type":"text"},{"type":"codeVoice","code":"DEBUG"},{"text":" mode and when the code is not run inside a Lambda function environment. You will start the test server directly from Xcode.","type":"text"}]},{"type":"step","content":[{"inlineContent":[{"type":"text","text":"Compile and run your project. Click on the "},{"code":"Run","type":"codeVoice"},{"type":"text","text":" button (▶️) in Xcode."}],"type":"paragraph"}],"media":"03-04-01-compile-run.png","runtimePreview":null,"caption":[],"code":null},{"content":[{"inlineContent":[{"type":"text","text":"Verify the server is correctlys started. You should see the following output in the console."}],"type":"paragraph"}],"code":"03-04-02-console-output.sh","runtimePreview":null,"type":"step","caption":[],"media":null},{"caption":[],"type":"step","code":"03-04-03-curl.sh","content":[{"inlineContent":[{"type":"text","text":"Now that the local server started, open a Terminal and use "},{"type":"codeVoice","code":"curl"},{"text":" or any other HTTP client to POST your input payload to ","type":"text"},{"type":"codeVoice","code":"127.0.0.1:7000"},{"text":".","type":"text"}],"type":"paragraph"}],"runtimePreview":null,"media":null},{"runtimePreview":null,"type":"step","code":"03-04-04-curl.sh","media":null,"content":[{"type":"paragraph","inlineContent":[{"text":"When you pass ","type":"text"},{"type":"codeVoice","code":"'{\"text\": \"Was it a car or a cat I saw?\"}'"},{"text":", you should receive the response ","type":"text"},{"code":"{\"message\":\"Your text is a palindrome\",\"isPalindrome\":true,\"text\":\"Was it a car or a cat I saw?\"}","type":"codeVoice"}]}],"caption":[{"style":"note","name":"Note","content":[{"inlineContent":[{"text":"Do not forget to stop the running scheme in Xcode (⏹️) when you’re done.","type":"text"}],"type":"paragraph"}],"type":"aside"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Alternatively, you can use the command line from the Terminal."}]},{"caption":[],"runtimePreview":null,"code":"03-04-06-terminal.sh","media":null,"content":[{"inlineContent":[{"text":"Use the command ","type":"text"},{"code":"swift run","type":"codeVoice"},{"type":"text","text":" to start the local embedded web server."}],"type":"paragraph"}],"type":"step"},{"runtimePreview":null,"caption":[],"type":"step","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"You should see the following output in the console."}]}],"media":null,"code":"03-04-07-terminal.sh"},{"caption":[{"type":"aside","style":"note","name":"Note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Do not forget to stop the local server with "},{"code":"CTRL-C","type":"codeVoice"},{"type":"text","text":" when you’re done."}]}]}],"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Now that the local server started, open a second tab in the Terminal and use "},{"type":"codeVoice","code":"curl"},{"text":" or any other HTTP client to POST your input payload to ","type":"text"},{"code":"127.0.0.1:7000","type":"codeVoice"},{"type":"text","text":"."}]}],"type":"step","media":null,"code":"03-04-03-curl.sh","runtimePreview":null}],"title":"Test Your Code Locally"}],"kind":"tasks"},{"kind":"callToAction","featuredEyebrow":"Tutorial","action":{"overridingTitle":"Get started","isActive":true,"overridingTitleInlineContent":[{"text":"Get started","type":"text"}],"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function"},"title":"Deploy your function to AWS Lambda","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}]}],"kind":"project","hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/$volume","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Your-first-Lambda-function-in-Swift"]],"modules":[{"projects":[{"sections":[],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda","sections":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda#When-to-use-AWS-Lambda","kind":"heading"}]},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","sections":[]}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Before-getting-started"},{"projects":[{"sections":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Initialize-a-new-project","kind":"task"},{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Add-the-project-dependencies"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Write-the-function-code","kind":"task"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Test-Your-Code-Locally","kind":"task"}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function"}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Your-first-Lambda-function-in-Swift"},{"projects":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function","sections":[{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Compile-for-Amazon-Linux"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Create-an-Lambda-Function","kind":"task"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Invoke-your-Lambda-function","kind":"task"}]}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Deploy-your-code-to-the-cloud"}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content"},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"03-04-test-locally.png":{"identifier":"03-04-test-locally.png","alt":"Icons of succeeded and failed tests","variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/03-04-test-locally.png"}],"type":"image"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Test-Your-Code-Locally":{"type":"section","role":"pseudoSymbol","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"title":"Test Your Code Locally","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Test-Your-Code-Locally","url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Test-Your-Code-Locally","kind":"section"},"https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples/Streaming":{"url":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/tree\/main\/Examples\/Streaming","type":"link","title":"Lambda Streaming example","identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/tree\/main\/Examples\/Streaming","titleInlineContent":[{"type":"text","text":"Lambda Streaming example"}]},"03-04-07-terminal.sh":{"type":"file","content":["swift run","","Building for debugging...","[1\/1] Write swift-version--58304C5D6DBC2206.txt","Build of product 'PalindromeLambda' complete! (0.11s)","2025-01-02T15:12:49+0100 info LocalLambdaServer : [AWSLambdaRuntimeCore] LocalLambdaServer started and listening on 127.0.0.1:7000, receiving events on \/invoke"],"syntax":"","fileType":"","identifier":"03-04-07-terminal.sh","highlights":[{"line":2},{"line":3},{"line":4},{"line":5},{"line":6}],"fileName":"curl command in a terminal"},"03-01-terminal-package-init.png":{"identifier":"03-01-terminal-package-init.png","alt":"A Terminal with package init command","type":"image","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/03-01-terminal-package-init.png","traits":["1x","light"]}]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/02-what-is-lambda":{"abstract":[],"url":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda","title":"What is AWS Lambda","estimatedTime":"3min","kind":"article","role":"article"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/01-overview":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview","url":"\/tutorials\/awslambdaruntimecore\/01-overview","abstract":[],"title":"Overview","kind":"article","role":"article","estimatedTime":"1min","type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function","url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"title":"Deploy your function to AWS Lambda","kind":"project","role":"project","estimatedTime":"15min","type":"topic"},"03-02-swift-package-manager.png":{"identifier":"03-02-swift-package-manager.png","alt":"Swift Package Manager icon as a box","type":"image","variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/03-02-swift-package-manager.png"}]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Initialize-a-new-project":{"role":"pseudoSymbol","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Initialize-a-new-project","title":"Initialize a new project","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Initialize-a-new-project","kind":"section"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Add-the-project-dependencies":{"title":"Add the project dependencies","url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Add-the-project-dependencies","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Add-the-project-dependencies","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"kind":"section","role":"pseudoSymbol"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Your-first-Lambda-function-in-Swift":{"role":"article","type":"topic","title":"Your first Lambda function in Swift","kind":"article","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Your-first-Lambda-function-in-Swift","abstract":[],"url":"\/tutorials\/table-of-content\/your-first-lambda-function-in-swift"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/02-what-is-lambda#When-to-use-AWS-Lambda":{"type":"section","abstract":[],"title":"When to use AWS Lambda","url":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda#When-to-use-AWS-Lambda","kind":"section","role":"pseudoSymbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda#When-to-use-AWS-Lambda"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function":{"url":"\/tutorials\/awslambdaruntimecore\/03-write-function","estimatedTime":"15min","title":"Write your first Lambda function","kind":"project","type":"topic","role":"project","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}]},"03-04-02-console-output.sh":{"syntax":"","type":"file","highlights":[],"fileType":"","fileName":"Console output","identifier":"03-04-02-console-output.sh","content":["2025-01-02T14:59:29+0100 info LocalLambdaServer : [AWSLambdaRuntimeCore] ","LocalLambdaServer started and listening on 127.0.0.1:7000, receiving events on \/invoke"]},"03-03-swift-code-xcode.png":{"alt":"Swift code in Xcode","type":"image","variants":[{"traits":["1x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/03-03-swift-code-xcode.png"}],"identifier":"03-03-swift-code-xcode.png"},"03-04-01-compile-run.png":{"alt":"Compile and run the project","identifier":"03-04-01-compile-run.png","type":"image","variants":[{"traits":["2x","dark"],"url":"\/images\/AWSLambdaRuntimeCore\/03-04-01-compile-run~dark@2x.png"}]},"https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html":{"titleInlineContent":[{"type":"text","text":"Lambda Runtime Interface"}],"title":"Lambda Runtime Interface","identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/runtimes-api.html","url":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/runtimes-api.html","type":"link"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Write-the-function-code":{"role":"pseudoSymbol","type":"section","title":"Write the function code","kind":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Write-the-function-code","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Write-the-function-code"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Create-an-Lambda-Function":{"type":"section","title":"Create an Lambda Function","url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Create-an-Lambda-Function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"kind":"section","role":"pseudoSymbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Create-an-Lambda-Function"},"03-04-03-curl.sh":{"syntax":"","type":"file","content":["curl --header \"Content-Type: application\/json\" \\"," --request POST \\"," --data '{\"text\": \"Was it a car or a cat I saw?\"}' \\"," http:\/\/127.0.0.1:7000\/invoke",""],"fileType":"","fileName":"curl command in a terminal","identifier":"03-04-03-curl.sh","highlights":[{"line":1},{"line":2},{"line":3},{"line":4}]},"03-03-06-main.swift":{"type":"file","fileType":"swift","content":["import AWSLambdaRuntime","","\/\/ the data structure to represent the input parameter","struct Request: Decodable {"," let text: String","}","","\/\/ the data structure to represent the response parameter","struct Response: Encodable {"," let text: String"," let isPalindrome: Bool"," let message: String","}","","\/\/ the business function","func isPalindrome(_ text: String) -> Bool {"," let cleanedText = text.lowercased().filter { $0.isLetter }"," return cleanedText == String(cleanedText.reversed())","}","","\/\/ the lambda handler function","let runtime = LambdaRuntime {"," (event: Request, context: LambdaContext) -> Response in",""," \/\/ call the business function and return a response"," let result = isPalindrome(event.text)"," return Response("," text: event.text,"," isPalindrome: result,"," message: \"Your text is \\(result ? \"a\" : \"not a\") palindrome\""," )","}"],"syntax":"swift","identifier":"03-03-06-main.swift","fileName":"main.swift","highlights":[{"line":25},{"line":26},{"line":27},{"line":28},{"line":29},{"line":30},{"line":31}]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Compile-for-Amazon-Linux":{"role":"pseudoSymbol","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Compile-for-Amazon-Linux","title":"Compile for Amazon Linux","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Compile-for-Amazon-Linux","kind":"section"},"03-03-07-main.swift":{"highlights":[{"line":33},{"line":34},{"line":35}],"syntax":"swift","type":"file","identifier":"03-03-07-main.swift","fileName":"main.swift","fileType":"swift","content":["import AWSLambdaRuntime","","\/\/ the data structure to represent the input parameter","struct Request: Decodable {"," let text: String","}","","\/\/ the data structure to represent the response parameter","struct Response: Encodable {"," let text: String"," let isPalindrome: Bool"," let message: String","}","","\/\/ the business function","func isPalindrome(_ text: String) -> Bool {"," let cleanedText = text.lowercased().filter { $0.isLetter }"," return cleanedText == String(cleanedText.reversed())","}","","\/\/ the lambda handler function","let runtime = LambdaRuntime {"," (event: Request, context: LambdaContext) -> Response in",""," \/\/ call the business function and return a response"," let result = isPalindrome(event.text)"," return Response("," text: event.text,"," isPalindrome: result,"," message: \"Your text is \\(result ? \"a\" : \"not a\") palindrome\""," )","}","","\/\/ start the runtime","try await runtime.run()"]},"03-01-xcode.png":{"type":"image","identifier":"03-01-xcode.png","alt":"project open in Xcode","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/03-01-xcode@2x.png","traits":["2x","light"]},{"traits":["2x","dark"],"url":"\/images\/AWSLambdaRuntimeCore\/03-01-xcode~dark@2x.png"}]},"03-01-03-package-init.sh":{"fileName":"Commands to type in the Terminal","type":"file","syntax":"","content":["# Create a project directory","mkdir Palindrome && cd Palindrome","","# create a skeleton project","swift package init --type executable ","","# open Xcode in the current directory","xed ."],"fileType":"","highlights":[{"line":6},{"line":7},{"line":8}],"identifier":"03-01-03-package-init.sh"},"03-03-01-main.swift":{"fileName":"main.swift","identifier":"03-03-01-main.swift","fileType":"swift","type":"file","syntax":"swift","highlights":[],"content":["\/\/ the data structure to represent the input parameter","struct Request: Decodable {"," let text: String","}"]},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content":{"title":"Your First Lambda Function Written in Swift","kind":"overview","role":"overview","url":"\/tutorials\/table-of-content","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","abstract":[{"type":"text","text":"A step-by-step tutorial to learn how to implement, build, test, and deploy your first Lambda function written in Swift."}],"type":"topic"},"03-03-02-main.swift":{"content":["\/\/ the data structure to represent the input parameter","struct Request: Decodable {"," let text: String","}","","\/\/ the data structure to represent the response parameter","struct Response: Encodable {"," let text: String"," let isPalindrome: Bool"," let message: String","}"],"fileType":"swift","fileName":"main.swift","type":"file","identifier":"03-03-02-main.swift","syntax":"swift","highlights":[{"line":5},{"line":6},{"line":7},{"line":8},{"line":9},{"line":10},{"line":11}]},"03-01-02-package-init.sh":{"fileType":"","content":["# Create a project directory","mkdir Palindrome && cd Palindrome","","# create a skeleton project","swift package init --type executable "],"fileName":"Commands to type in the Terminal","type":"file","syntax":"","identifier":"03-01-02-package-init.sh","highlights":[{"line":3},{"line":4},{"line":5}]},"03-03-03-main.swift":{"identifier":"03-03-03-main.swift","type":"file","fileType":"swift","fileName":"main.swift","highlights":[{"line":12},{"line":13},{"line":14},{"line":15},{"line":16},{"line":17}],"content":["\/\/ the data structure to represent the input parameter","struct Request: Decodable {"," let text: String","}","","\/\/ the data structure to represent the response parameter","struct Response: Encodable {"," let text: String"," let isPalindrome: Bool"," let message: String","}","","\/\/ the business function","func isPalindrome(_ text: String) -> Bool {"," let cleanedText = text.lowercased().filter { $0.isLetter }"," return cleanedText == String(cleanedText.reversed())","}"],"syntax":"swift"},"03-02-04-package.swift":{"fileName":"Package.swift","identifier":"03-02-04-package.swift","highlights":[{"line":11},{"line":12},{"line":13}],"fileType":"swift","syntax":"swift","content":["\/\/ swift-tools-version:6.0","\/\/ The swift-tools-version declares the minimum version of Swift required to build this package.","","import PackageDescription","","let package = Package("," name: \"Palindrome\","," platforms: ["," .macOS(.v15)"," ],"," products: ["," .executable(name: \"PalindromeLambda\", targets: [\"PalindromeLambda\"])"," ],"," dependencies: ["," .package(url: \"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime.git\", branch: \"main\")"," ]",")"],"type":"file"},"03-02-02-package.swift":{"fileName":"Package.swift","identifier":"03-02-02-package.swift","type":"file","highlights":[{"line":7},{"line":8},{"line":9},{"line":10}],"content":["\/\/ swift-tools-version:6.0","\/\/ The swift-tools-version declares the minimum version of Swift required to build this package.","","import PackageDescription","","let package = Package("," name: \"Palindrome\","," platforms: ["," .macOS(.v15)"," ]",")"],"fileType":"swift","syntax":"swift"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Before-getting-started":{"abstract":[],"title":"Before getting started","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Before-getting-started","url":"\/tutorials\/table-of-content\/before-getting-started","role":"article","kind":"article","type":"topic"},"03-01-01-package-init.sh":{"fileName":"Commands to type in the Terminal","identifier":"03-01-01-package-init.sh","fileType":"","type":"file","syntax":"","highlights":[],"content":["# Create a project directory","mkdir Palindrome && cd Palindrome"]},"03-02-01-package.swift":{"syntax":"swift","highlights":[],"fileType":"swift","content":["\/\/ swift-tools-version:6.0","\/\/ The swift-tools-version declares the minimum version of Swift required to build this package.","","import PackageDescription","","let package = Package("," name: \"Palindrome\"",")"],"type":"file","identifier":"03-02-01-package.swift","fileName":"Package.swift"},"03-02-05-package.swift":{"identifier":"03-02-05-package.swift","fileType":"swift","syntax":"swift","type":"file","fileName":"Package.swift","content":["\/\/ swift-tools-version:6.0","\/\/ The swift-tools-version declares the minimum version of Swift required to build this package.","","import PackageDescription","","let package = Package("," name: \"Palindrome\","," platforms: ["," .macOS(.v15)"," ],"," products: ["," .executable(name: \"PalindromeLambda\", targets: [\"PalindromeLambda\"])"," ],"," dependencies: ["," .package(url: \"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime.git\", branch: \"main\")"," ],"," targets: ["," .executableTarget("," name: \"PalindromeLambda\","," dependencies: ["," .product(name: \"AWSLambdaRuntime\", package: \"swift-aws-lambda-runtime\")"," ],"," path: \"Sources\""," )"," ]",")"],"highlights":[{"line":16},{"line":17},{"line":18},{"line":19},{"line":20},{"line":21},{"line":22},{"line":23},{"line":24}]},"03-04-04-curl.sh":{"fileName":"curl command in a terminal","fileType":"","highlights":[{"line":6},{"line":7}],"identifier":"03-04-04-curl.sh","content":["curl --header \"Content-Type: application\/json\" \\"," --request POST \\"," --data '{\"text\": \"Was it a car or a cat I saw?\"}' \\"," http:\/\/127.0.0.1:7000\/invoke","","{\"message\":\"Your text is a palindrome\",\"isPalindrome\":true,\"text\":\"Was it a car or a cat I saw?\"}",""],"type":"file","syntax":""},"03-03-05-main.swift":{"identifier":"03-03-05-main.swift","fileType":"swift","type":"file","content":["import AWSLambdaRuntime","","\/\/ the data structure to represent the input parameter","struct Request: Decodable {"," let text: String","}","","\/\/ the data structure to represent the response parameter","struct Response: Encodable {"," let text: String"," let isPalindrome: Bool"," let message: String","}","","\/\/ the business function","func isPalindrome(_ text: String) -> Bool {"," let cleanedText = text.lowercased().filter { $0.isLetter }"," return cleanedText == String(cleanedText.reversed())","}","","\/\/ the lambda handler function","let runtime = LambdaRuntime {"," (event: Request, context: LambdaContext) -> Response in","","}"],"highlights":[{"line":20},{"line":21},{"line":22},{"line":23},{"line":24},{"line":25}],"syntax":"swift","fileName":"main.swift"},"03-01-04-package-init.sh":{"fileName":"Commands to type in the Terminal","type":"file","syntax":"","content":["# Create a project directory","mkdir Palindrome && cd Palindrome","","# create a skeleton project","swift package init --type executable ","","# open Xcode in the current directory","xed .","","# alternatively, you may open VSCode","code ."],"fileType":"","highlights":[{"line":9},{"line":10},{"line":11}],"identifier":"03-01-04-package-init.sh"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Deploy-your-code-to-the-cloud":{"role":"article","abstract":[],"url":"\/tutorials\/table-of-content\/deploy-your-code-to-the-cloud","title":"Deploy your code to the cloud","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Deploy-your-code-to-the-cloud","kind":"article"},"03-04-06-terminal.sh":{"fileName":"curl command in a terminal","identifier":"03-04-06-terminal.sh","fileType":"","type":"file","syntax":"","highlights":[{"line":1}],"content":["swift run"]},"03-02-03-package.swift":{"identifier":"03-02-03-package.swift","fileName":"Package.swift","content":["\/\/ swift-tools-version:6.0","\/\/ The swift-tools-version declares the minimum version of Swift required to build this package.","","import PackageDescription","","let package = Package("," name: \"Palindrome\","," platforms: ["," .macOS(.v15)"," ],"," dependencies: ["," .package(url: \"https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime.git\", branch: \"main\")"," ]",")"],"syntax":"swift","highlights":[{"line":10},{"line":11},{"line":12}],"type":"file","fileType":"swift"},"https://github.com/swift-server/swift-aws-lambda-events":{"identifier":"https:\/\/github.com\/swift-server\/swift-aws-lambda-events","titleInlineContent":[{"text":"https:\/\/github.com\/swift-server\/swift-aws-lambda-events","type":"text"}],"type":"link","title":"https:\/\/github.com\/swift-server\/swift-aws-lambda-events","url":"https:\/\/github.com\/swift-server\/swift-aws-lambda-events"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Invoke-your-Lambda-function":{"role":"pseudoSymbol","type":"section","title":"Invoke your Lambda function","kind":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Invoke-your-Lambda-function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Invoke-your-Lambda-function"},"03-03-04-main.swift":{"syntax":"swift","highlights":[{"line":1},{"line":2}],"fileType":"swift","content":["import AWSLambdaRuntime","","\/\/ the data structure to represent the input parameter","struct Request: Decodable {"," let text: String","}","","\/\/ the data structure to represent the response parameter","struct Response: Encodable {"," let text: String"," let isPalindrome: Bool"," let message: String","}","","\/\/ the business function","func isPalindrome(_ text: String) -> Bool {"," let cleanedText = text.lowercased().filter { $0.isLetter }"," return cleanedText == String(cleanedText.reversed())","}"],"type":"file","identifier":"03-03-04-main.swift","fileName":"main.swift"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-prerequisites":{"type":"topic","title":"Prerequisites","role":"article","estimatedTime":"3min","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","url":"\/tutorials\/awslambdaruntimecore\/03-prerequisites","kind":"article","abstract":[]}}} \ No newline at end of file diff --git a/docs/data/tutorials/awslambdaruntimecore/04-deploy-function.json b/docs/data/tutorials/awslambdaruntimecore/04-deploy-function.json new file mode 100644 index 00000000..64c0d4f0 --- /dev/null +++ b/docs/data/tutorials/awslambdaruntimecore/04-deploy-function.json @@ -0,0 +1 @@ +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/tutorials\/awslambdaruntimecore\/04-deploy-function"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function","interfaceLanguage":"swift"},"metadata":{"role":"project","categoryPathComponent":"table-of-content","title":"Deploy your function to AWS Lambda","category":"AWS Lambda functions in Swift"},"sections":[{"kind":"hero","estimatedTimeInMinutes":15,"title":"Deploy your function to AWS Lambda","content":[{"inlineContent":[{"type":"text","text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console"}],"type":"paragraph"}],"chapter":"Deploy your code to the cloud"},{"tasks":[{"contentSection":[{"kind":"contentAndMedia","mediaPosition":"trailing","media":"04-01-compile-for-linux.png","content":[{"inlineContent":[{"type":"text","text":"Learn how to compile your code to run it on Amazon Linux."}],"type":"paragraph"}]}],"stepsSection":[{"type":"paragraph","inlineContent":[{"type":"text","text":"AWS Lambda runs on top of "},{"isActive":true,"type":"reference","identifier":"https:\/\/aws.amazon.com\/amazon-linux-2\/"},{"type":"text","text":". You must therefore compile your code for Linux. The AWS Lambda Runtime for Swift uses Docker to do so. Once the code is compiled, it must be assembled in a ZIP file before being deployed in the cloud."},{"text":" ","type":"text"},{"type":"text","text":"The AWS Lambda Runtime for Swift provides a "},{"type":"reference","isActive":true,"identifier":"https:\/\/github.com\/apple\/swift-package-manager\/blob\/main\/Documentation\/Plugins.md"},{"type":"text","text":" to compile and zip your Lambda function in one simple step."}]},{"caption":[],"runtimePreview":null,"content":[{"type":"paragraph","inlineContent":[{"text":"Be sure Docker is started on your machine. On macOS, you can check the Docker icon in the menu bar.","type":"text"}]}],"code":null,"type":"step","media":"04-01-01-docker-started.png"},{"caption":[],"media":null,"code":"04-01-02-plugin-archive.sh","runtimePreview":null,"type":"step","content":[{"inlineContent":[{"type":"text","text":"In a terminal, invoke the "},{"type":"codeVoice","code":"archive"},{"type":"text","text":" command to build and zip your Lambda function."}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"type":"text","text":"The plugin starts a Docker container running Amazon Linux 2 and compile your Lambda function code. It then creates a zip file. When everything goes well, you should see an output similar to this one."}],"type":"paragraph"}],"media":null,"caption":[],"type":"step","code":"04-01-03-plugin-archive.sh","runtimePreview":null},{"media":null,"code":"04-01-04-plugin-archive.sh","content":[{"inlineContent":[{"type":"text","text":"Copy the generated zip files to your Desktop or Download directory for easy access. I choose the Desktop."}],"type":"paragraph"}],"caption":[],"type":"step","runtimePreview":null}],"anchor":"Compile-for-Amazon-Linux","title":"Compile for Amazon Linux"},{"stepsSection":[{"type":"paragraph","inlineContent":[{"text":"You will now deploy your code to AWS Lambda. To complete the remaining steps in this tutorial, you must have an AWS Account. You can ","type":"text"},{"identifier":"https:\/\/docs.aws.amazon.com\/accounts\/latest\/reference\/manage-acct-creating.html","isActive":true,"type":"reference"},{"text":".","type":"text"}]},{"caption":[],"runtimePreview":null,"content":[{"inlineContent":[{"type":"text","text":"Open a web browser and navigate to "},{"identifier":"https:\/\/console.aws.amazon.com","isActive":true,"type":"reference"},{"text":".","type":"text"}],"type":"paragraph"}],"code":null,"media":"04-02-01-console-login.png","type":"step"},{"runtimePreview":null,"media":"04-02-02-console-login.png","code":null,"content":[{"type":"paragraph","inlineContent":[{"text":"If you have an IAM user ID and password, select ","type":"text"},{"type":"strong","inlineContent":[{"text":"IAM User","type":"text"}]},{"type":"text","text":", otherwise proceed by entering your "},{"type":"strong","inlineContent":[{"type":"text","text":"Root user"}]},{"text":" email address and password. For this tutorial, I sign in using my IAM User ID.","type":"text"}]}],"caption":[],"type":"step"},{"code":null,"runtimePreview":null,"caption":[{"inlineContent":[{"text":"You typically choose a Region close to your customers to minimize the network latency. For this demo, I selected ","type":"text"},{"inlineContent":[{"type":"text","text":"Oregon (us-west-2)"}],"type":"strong"}],"type":"paragraph"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"AWS has multiple Regions across all continents. You can learn more about "},{"isActive":true,"identifier":"https:\/\/aws.amazon.com\/about-aws\/global-infrastructure\/regions_az\/","type":"reference"},{"text":" here.","type":"text"}]}],"type":"aside","style":"note","name":"Note"}],"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"On the top right side of the console, select the AWS Region where you want to deploy your Lambda function."}]}],"type":"step","media":"04-02-03-select-region.png"},{"caption":[],"media":"04-02-04-select-lambda.png","content":[{"inlineContent":[{"text":"On the top left side of the console, select the Lambda service to navigate to the Lambda section of the console.","type":"text"}],"type":"paragraph"}],"runtimePreview":null,"code":null,"type":"step"},{"runtimePreview":null,"caption":[],"content":[{"inlineContent":[{"type":"text","text":"On the top right side of the Lambda page, select "},{"inlineContent":[{"type":"text","text":"Create function"}],"type":"strong"},{"text":".","type":"text"}],"type":"paragraph"}],"media":"04-02-05-create-function.png","type":"step","code":null},{"caption":[{"type":"aside","name":"Note","style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The runtime architecture for Lambda ("},{"type":"codeVoice","code":"arm64"},{"text":" or ","type":"text"},{"type":"codeVoice","code":"x86_64"},{"type":"text","text":") must match the one of the machine where you compiled the code. When you compiled on an Intel-based Mac, use "},{"type":"codeVoice","code":"x86_64"},{"type":"text","text":". When compiling on an Apple Silicon-based Mac select "},{"type":"codeVoice","code":"arm64"},{"type":"text","text":"."}]}]}],"content":[{"inlineContent":[{"type":"text","text":"Enter a "},{"type":"strong","inlineContent":[{"type":"text","text":"Function name"}]},{"type":"text","text":". I choose "},{"type":"codeVoice","code":"PalindromeLambda"},{"text":". Select ","type":"text"},{"type":"codeVoice","code":"Provide your own bootstrap on Amazon Linux 2"},{"type":"text","text":" as "},{"inlineContent":[{"text":"Runtime","type":"text"}],"type":"strong"},{"type":"text","text":". And select "},{"code":"arm64","type":"codeVoice"},{"type":"text","text":" as "},{"inlineContent":[{"type":"text","text":"Architecture"}],"type":"strong"},{"type":"text","text":" when you build on a Mac with Apple Silicon. Leave all other parameter as default, and select "},{"type":"strong","inlineContent":[{"type":"text","text":"Create function"}]},{"type":"text","text":" on the bottom right part."}],"type":"paragraph"}],"media":"04-02-06-create-function.png","runtimePreview":null,"type":"step","code":null},{"code":null,"runtimePreview":null,"caption":[],"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"On the next screen, select "},{"inlineContent":[{"type":"text","text":".zip file"}],"type":"strong"},{"text":" from the ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Upload from"}]},{"text":" selection box on the middle right part of the screen.","type":"text"}]}],"media":"04-02-07-upload-zip.png","type":"step"},{"content":[{"inlineContent":[{"type":"text","text":"Select the zip file that was generated earlier and select "},{"inlineContent":[{"type":"text","text":"Save"}],"type":"strong"},{"text":".","type":"text"}],"type":"paragraph"}],"type":"step","caption":[],"code":null,"runtimePreview":null,"media":"04-02-08-upload-zip.png"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"To verify everything works well, create a test event and invoke the function from the "},{"inlineContent":[{"type":"text","text":"Test"}],"type":"strong"},{"type":"text","text":" tab in the console. Enter "},{"type":"codeVoice","code":"MyTestEvent"},{"text":" as ","type":"text"},{"inlineContent":[{"type":"text","text":"Event name"}],"type":"strong"},{"type":"text","text":". Enter "},{"type":"codeVoice","code":"{\"text\": \"Was it a car or a cat I saw?\"}"},{"text":" as ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"Event JSON"}]},{"type":"text","text":". Then, select "},{"inlineContent":[{"type":"text","text":"Test"}],"type":"strong"},{"text":".","type":"text"}]}],"caption":[],"code":null,"media":"04-02-09-test-lambda.png","runtimePreview":null,"type":"step"},{"type":"step","caption":[{"content":[{"inlineContent":[{"text":"The execution result also shares the execution duration, the actual memory consumed and the logs generated by the function. These are important data to help you to fine-tune your function. Providing the function with more memory will also give it more compute power, resulting in lower execution time.","type":"text"}],"type":"paragraph"}],"name":"Note","style":"note","type":"aside"}],"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"When the invocation succeeds, you can see the execution details and the result: "},{"type":"codeVoice","code":"{ \"message\": \"Your text is a palindrome\",\"isPalindrome\": true, \"text\": \"Was it a car or a cat I saw?\"}"},{"text":".","type":"text"}]}],"code":null,"media":"04-02-10-test-lambda-result.png","runtimePreview":null}],"contentSection":[{"content":[{"inlineContent":[{"type":"text","text":"Learn how to create a Lambda function using the AWS Management Console and to deploy your zip file"}],"type":"paragraph"}],"kind":"contentAndMedia","media":"04-02-create-lambda.png","mediaPosition":"trailing"}],"title":"Create an Lambda Function","anchor":"Create-an-Lambda-Function"},{"title":"Invoke your Lambda function","contentSection":[{"kind":"contentAndMedia","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Learn how to invoke the Lambda function using the AWS Lambda API and the AWS command line."}]}],"mediaPosition":"trailing","media":"04-03-invoke-lambda.png"}],"stepsSection":[{"inlineContent":[{"type":"text","text":"Typically you will "},{"identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-urls.html","isActive":true,"type":"reference"},{"type":"text","text":", or "},{"type":"reference","isActive":true,"identifier":"https:\/\/docs.aws.amazon.com\/apigateway\/latest\/developerguide\/getting-started-with-lambda-integration.html"},{"text":". You might use the ","type":"text"},{"isActive":true,"type":"reference","identifier":"https:\/\/docs.aws.amazon.com\/serverless-application-model\/latest\/developerguide\/what-is-sam.html"},{"type":"text","text":" to do so. We’ll leave tasks for another tutorial."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"In the remaining section of this tutorial, you will learn how to invoke your Lambda function from the AWS command-line tool.","type":"text"}]},{"caption":[{"style":"note","type":"aside","name":"Note","content":[{"inlineContent":[{"type":"text","text":"You can install the "},{"code":"aws","type":"codeVoice"},{"text":" CLI with the command ","type":"text"},{"type":"codeVoice","code":"brew awscli"},{"type":"text","text":". You need to configure the "},{"code":"aws","type":"codeVoice"},{"type":"text","text":" CLI with your AWS credentials. You may use the command "},{"code":"aws configure","type":"codeVoice"},{"text":" to configure the CLI. ","type":"text"},{"type":"reference","isActive":true,"identifier":"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/getting-started-quickstart.html"},{"type":"text","text":"."}],"type":"paragraph"}]}],"type":"step","content":[{"type":"paragraph","inlineContent":[{"text":"First, check that you have the ","type":"text"},{"type":"codeVoice","code":"aws"},{"text":" command line tool installed and configured.","type":"text"}]}],"media":null,"code":"04-03-01-aws-cli.sh","runtimePreview":null},{"content":[{"inlineContent":[{"type":"text","text":"Enter the following command to invoke your Lambda function."}],"type":"paragraph"}],"caption":[],"media":null,"code":"04-03-02-lambda-invoke.sh","runtimePreview":null,"type":"step"},{"caption":[],"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The command returns with the invocation status."}]}],"runtimePreview":null,"code":"04-03-03-lambda-invoke.sh","type":"step","media":null},{"caption":[],"media":null,"code":"04-03-04-lambda-invoke.sh","runtimePreview":null,"content":[{"inlineContent":[{"type":"text","text":"Type "},{"type":"codeVoice","code":"cat result.json"},{"type":"text","text":" to see the value returned by your function."}],"type":"paragraph"}],"type":"step"},{"code":"04-03-05-lambda-invoke.sh","runtimePreview":null,"caption":[{"type":"paragraph","inlineContent":[{"text":"Congratulation 🎉 !","type":"text"}]}],"content":[{"inlineContent":[{"text":"When everything goes well, you will see ","type":"text"},{"type":"codeVoice","code":"{\"text\":\"Was it a car or a cat I saw?\",\"isPalindrome\":true,\"message\":\"Your text is a palindrome\"}"},{"type":"text","text":"."}],"type":"paragraph"}],"type":"step","media":null}],"anchor":"Invoke-your-Lambda-function"}],"kind":"tasks"}],"hierarchy":{"modules":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Before-getting-started","projects":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview","sections":[]},{"sections":[{"kind":"heading","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda#When-to-use-AWS-Lambda"}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","sections":[]}]},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Your-first-Lambda-function-in-Swift","projects":[{"sections":[{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Initialize-a-new-project"},{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Add-the-project-dependencies"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Write-the-function-code","kind":"task"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Test-Your-Code-Locally","kind":"task"}],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function"}]},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Deploy-your-code-to-the-cloud","projects":[{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function","sections":[{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Compile-for-Amazon-Linux"},{"kind":"task","reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Create-an-Lambda-Function"},{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Invoke-your-Lambda-function","kind":"task"}]}]}],"paths":[["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/$volume","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Deploy-your-code-to-the-cloud"]],"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content"},"kind":"project","references":{"https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html":{"type":"link","titleInlineContent":[{"type":"text","text":"Serverless Application Model (SAM)"}],"identifier":"https:\/\/docs.aws.amazon.com\/serverless-application-model\/latest\/developerguide\/what-is-sam.html","title":"Serverless Application Model (SAM)","url":"https:\/\/docs.aws.amazon.com\/serverless-application-model\/latest\/developerguide\/what-is-sam.html"},"04-01-01-docker-started.png":{"alt":"Docker icon and menu on macOS","type":"image","variants":[{"traits":["2x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/04-01-01-docker-started@2x.png"}],"identifier":"04-01-01-docker-started.png"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/01-overview":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview","url":"\/tutorials\/awslambdaruntimecore\/01-overview","abstract":[],"title":"Overview","kind":"article","role":"article","estimatedTime":"1min","type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content":{"title":"Your First Lambda Function Written in Swift","kind":"overview","role":"overview","url":"\/tutorials\/table-of-content","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","abstract":[{"type":"text","text":"A step-by-step tutorial to learn how to implement, build, test, and deploy your first Lambda function written in Swift."}],"type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Deploy-your-code-to-the-cloud":{"role":"article","abstract":[],"url":"\/tutorials\/table-of-content\/deploy-your-code-to-the-cloud","title":"Deploy your code to the cloud","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Deploy-your-code-to-the-cloud","kind":"article"},"04-03-03-lambda-invoke.sh":{"highlights":[{"line":13},{"line":14},{"line":15},{"line":16},{"line":17}],"fileType":"","syntax":"","type":"file","fileName":"Command to type in the Terminal","content":["# --region the AWS Region to send the command","# --function-name the name of your function","# --cli-binary-format tells the cli to use raw data as input (default is base64)","# --payload the payload to pass to your function code","# result.json the name of the file to store the response from the function","","aws lambda invoke \\"," --region us-west-2 \\"," --function-name PalindromeLambda \\"," --cli-binary-format raw-in-base64-out \\"," --payload '{\"text\": \"Was it a car or a cat I saw?\"}' \\"," result.json","","{"," \"StatusCode\": 200,"," \"ExecutedVersion\": \"$LATEST\"","}"],"identifier":"04-03-03-lambda-invoke.sh"},"04-02-09-test-lambda.png":{"variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-09-test-lambda@2x.png","traits":["2x","light"]},{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-09-test-lambda~dark@2x.png","traits":["2x","dark"]}],"identifier":"04-02-09-test-lambda.png","type":"image","alt":"Create function"},"04-02-01-console-login.png":{"alt":"AWS console login","type":"image","identifier":"04-02-01-console-login.png","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-01-console-login@2x.png","traits":["2x","light"]}]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Add-the-project-dependencies":{"title":"Add the project dependencies","url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Add-the-project-dependencies","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Add-the-project-dependencies","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"kind":"section","role":"pseudoSymbol"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Create-an-Lambda-Function":{"type":"section","title":"Create an Lambda Function","url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Create-an-Lambda-Function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"kind":"section","role":"pseudoSymbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Create-an-Lambda-Function"},"04-03-04-lambda-invoke.sh":{"highlights":[{"line":18},{"line":19}],"fileType":"","type":"file","syntax":"","identifier":"04-03-04-lambda-invoke.sh","fileName":"Command to type in the Terminal","content":["# --region the AWS Region to send the command","# --function-name the name of your function","# --cli-binary-format tells the cli to use raw data as input (default is base64)","# --payload the payload to pass to your function code","# result.json the name of the file to store the response from the function","","aws lambda invoke \\"," --region us-west-2 \\"," --function-name PalindromeLambda \\"," --cli-binary-format raw-in-base64-out \\"," --payload '{\"text\": \"Was it a car or a cat I saw?\"}' \\"," result.json","","{"," \"StatusCode\": 200,"," \"ExecutedVersion\": \"$LATEST\"","}","","cat result.json"]},"04-03-02-lambda-invoke.sh":{"highlights":[{"line":6},{"line":7},{"line":8},{"line":9},{"line":10},{"line":11},{"line":12},{"line":13}],"fileType":"","syntax":"","type":"file","fileName":"Command to type in the Terminal","content":["# --region the AWS Region to send the command","# --function-name the name of your function","# --cli-binary-format tells the cli to use raw data as input (default is base64)","# --payload the payload to pass to your function code","# result.json the name of the file to store the response from the function","","aws lambda invoke \\"," --region us-west-2 \\"," --function-name PalindromeLambda \\"," --cli-binary-format raw-in-base64-out \\"," --payload '{\"text\": \"Was it a car or a cat I saw?\"}' \\"," result.json"," "],"identifier":"04-03-02-lambda-invoke.sh"},"https://github.com/apple/swift-package-manager/blob/main/Documentation/Plugins.md":{"url":"https:\/\/github.com\/apple\/swift-package-manager\/blob\/main\/Documentation\/Plugins.md","title":"Swift Package Manager plugin","identifier":"https:\/\/github.com\/apple\/swift-package-manager\/blob\/main\/Documentation\/Plugins.md","type":"link","titleInlineContent":[{"text":"Swift Package Manager plugin","type":"text"}]},"04-02-10-test-lambda-result.png":{"variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-10-test-lambda-result@2x.png","traits":["2x","light"]},{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-10-test-lambda-result~dark@2x.png","traits":["2x","dark"]}],"alt":"Create function","type":"image","identifier":"04-02-10-test-lambda-result.png"},"https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html":{"url":"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/getting-started-quickstart.html","type":"link","title":"The AWS CLI documentation has more details","identifier":"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/getting-started-quickstart.html","titleInlineContent":[{"type":"text","text":"The AWS CLI documentation has more details"}]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Compile-for-Amazon-Linux":{"role":"pseudoSymbol","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Compile-for-Amazon-Linux","title":"Compile for Amazon Linux","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Compile-for-Amazon-Linux","kind":"section"},"04-02-05-create-function.png":{"type":"image","identifier":"04-02-05-create-function.png","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-05-create-function@2x.png","traits":["2x","light"]},{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-05-create-function~dark@2x.png","traits":["2x","dark"]}],"alt":"Create function"},"https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-with-lambda-integration.html":{"type":"link","titleInlineContent":[{"type":"text","text":"you will expose the Lambda function through a REST API"}],"identifier":"https:\/\/docs.aws.amazon.com\/apigateway\/latest\/developerguide\/getting-started-with-lambda-integration.html","title":"you will expose the Lambda function through a REST API","url":"https:\/\/docs.aws.amazon.com\/apigateway\/latest\/developerguide\/getting-started-with-lambda-integration.html"},"04-02-08-upload-zip.png":{"type":"image","alt":"Create function","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-08-upload-zip@2x.png","traits":["2x","light"]},{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-08-upload-zip~dark@2x.png","traits":["2x","dark"]}],"identifier":"04-02-08-upload-zip.png"},"04-02-create-lambda.png":{"alt":"Create a Lambda function","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-create-lambda.png","traits":["1x","light"]}],"identifier":"04-02-create-lambda.png","type":"image"},"https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-creating.html":{"url":"https:\/\/docs.aws.amazon.com\/accounts\/latest\/reference\/manage-acct-creating.html","title":"create an AWS Account by following these instructions","titleInlineContent":[{"type":"text","text":"create an AWS Account by following these instructions"}],"identifier":"https:\/\/docs.aws.amazon.com\/accounts\/latest\/reference\/manage-acct-creating.html","type":"link"},"https://docs.aws.amazon.com/lambda/latest/dg/lambda-urls.html":{"titleInlineContent":[{"type":"text","text":"associate an URL to your Lambda function"}],"url":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-urls.html","identifier":"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-urls.html","title":"associate an URL to your Lambda function","type":"link"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function","url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"title":"Deploy your function to AWS Lambda","kind":"project","role":"project","estimatedTime":"15min","type":"topic"},"04-02-02-console-login.png":{"type":"image","identifier":"04-02-02-console-login.png","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-02-console-login@2x.png","traits":["2x","light"]}],"alt":"AWS console login with IAM user"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Before-getting-started":{"abstract":[],"title":"Before getting started","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Before-getting-started","url":"\/tutorials\/table-of-content\/before-getting-started","role":"article","kind":"article","type":"topic"},"04-02-03-select-region.png":{"alt":"AWS console - Select Region","type":"image","identifier":"04-02-03-select-region.png","variants":[{"traits":["2x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/04-02-03-select-region@2x.png"}]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Write-the-function-code":{"role":"pseudoSymbol","type":"section","title":"Write the function code","kind":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Write-the-function-code","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Write-the-function-code"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/02-what-is-lambda":{"abstract":[],"url":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda","title":"What is AWS Lambda","estimatedTime":"3min","kind":"article","role":"article"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function":{"url":"\/tutorials\/awslambdaruntimecore\/03-write-function","estimatedTime":"15min","title":"Write your first Lambda function","kind":"project","type":"topic","role":"project","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function#Invoke-your-Lambda-function":{"role":"pseudoSymbol","type":"section","title":"Invoke your Lambda function","kind":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Invoke-your-Lambda-function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Invoke-your-Lambda-function"},"04-03-invoke-lambda.png":{"alt":"Invoke a Lambda function","type":"image","identifier":"04-03-invoke-lambda.png","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-03-invoke-lambda.png","traits":["1x","light"]}]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-prerequisites":{"type":"topic","title":"Prerequisites","role":"article","estimatedTime":"3min","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","url":"\/tutorials\/awslambdaruntimecore\/03-prerequisites","kind":"article","abstract":[]},"04-01-03-plugin-archive.sh":{"content":["swift package archive --allow-network-connections docker ","","-------------------------------------------------------------------------","building \"palindrome\" in docker","-------------------------------------------------------------------------","updating \"swift:amazonlinux2\" docker image"," amazonlinux2: Pulling from library\/swift"," Digest: sha256:df06a50f70e2e87f237bd904d2fc48195742ebda9f40b4a821c4d39766434009","Status: Image is up to date for swift:amazonlinux2"," docker.io\/library\/swift:amazonlinux2","building \"PalindromeLambda\""," [0\/1] Planning build"," Building for production..."," [0\/2] Write swift-version-24593BA9C3E375BF.txt"," Build of product 'PalindromeLambda' complete! (1.91s)","-------------------------------------------------------------------------","archiving \"PalindromeLambda\"","-------------------------------------------------------------------------","1 archive created"," * PalindromeLambda at \/Users\/sst\/Palindrome\/.build\/plugins\/AWSLambdaPackager\/outputs\/AWSLambdaPackager\/PalindromeLambda\/PalindromeLambda.zip"],"fileType":"","fileName":"Commands in a Terminal","highlights":[{"line":1},{"line":2},{"line":3},{"line":4},{"line":5},{"line":6},{"line":7},{"line":8},{"line":9},{"line":10},{"line":11},{"line":12},{"line":13},{"line":14},{"line":15},{"line":16},{"line":17},{"line":18},{"line":19},{"line":20}],"identifier":"04-01-03-plugin-archive.sh","type":"file","syntax":""},"04-02-07-upload-zip.png":{"variants":[{"traits":["2x","light"],"url":"\/images\/AWSLambdaRuntimeCore\/04-02-07-upload-zip@2x.png"},{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-07-upload-zip~dark@2x.png","traits":["2x","dark"]}],"alt":"Upload ","type":"image","identifier":"04-02-07-upload-zip.png"},"04-01-compile-for-linux.png":{"alt":"Compile for Amazon Linux","identifier":"04-01-compile-for-linux.png","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-01-compile-for-linux.png","traits":["1x","light"]}],"type":"image"},"04-01-02-plugin-archive.sh":{"fileName":"Commands in a Terminal","identifier":"04-01-02-plugin-archive.sh","syntax":"","fileType":"","highlights":[],"type":"file","content":["swift package archive --allow-network-connections docker"]},"https://aws.amazon.com/about-aws/global-infrastructure/regions_az/":{"identifier":"https:\/\/aws.amazon.com\/about-aws\/global-infrastructure\/regions_az\/","type":"link","url":"https:\/\/aws.amazon.com\/about-aws\/global-infrastructure\/regions_az\/","title":"AWS Global Infrastructure","titleInlineContent":[{"text":"AWS Global Infrastructure","type":"text"}]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/02-what-is-lambda#When-to-use-AWS-Lambda":{"type":"section","abstract":[],"title":"When to use AWS Lambda","url":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda#When-to-use-AWS-Lambda","kind":"section","role":"pseudoSymbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda#When-to-use-AWS-Lambda"},"04-03-05-lambda-invoke.sh":{"fileName":"Command to type in the Terminal","identifier":"04-03-05-lambda-invoke.sh","syntax":"","fileType":"","highlights":[{"line":20},{"line":21}],"type":"file","content":["# --region the AWS Region to send the command","# --function-name the name of your function","# --cli-binary-format tells the cli to use raw data as input (default is base64)","# --payload the payload to pass to your function code","# result.json the name of the file to store the response from the function","","aws lambda invoke \\"," --region us-west-2 \\"," --function-name PalindromeLambda \\"," --cli-binary-format raw-in-base64-out \\"," --payload '{\"text\": \"Was it a car or a cat I saw?\"}' \\"," result.json","","{"," \"StatusCode\": 200,"," \"ExecutedVersion\": \"$LATEST\"","}","","cat result.json","{\"text\":\"Was it a car or a cat I saw?\",\"isPalindrome\":true,\"message\":\"Your text is a palindrome\"}",""]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Initialize-a-new-project":{"role":"pseudoSymbol","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Initialize-a-new-project","title":"Initialize a new project","type":"section","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Initialize-a-new-project","kind":"section"},"https://aws.amazon.com/amazon-linux-2/":{"identifier":"https:\/\/aws.amazon.com\/amazon-linux-2\/","type":"link","url":"https:\/\/aws.amazon.com\/amazon-linux-2\/","title":"Amazon Linux 2","titleInlineContent":[{"text":"Amazon Linux 2","type":"text"}]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function#Test-Your-Code-Locally":{"type":"section","role":"pseudoSymbol","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}],"title":"Test Your Code Locally","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Test-Your-Code-Locally","url":"\/tutorials\/awslambdaruntimecore\/03-write-function#Test-Your-Code-Locally","kind":"section"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content/Your-first-Lambda-function-in-Swift":{"role":"article","type":"topic","title":"Your first Lambda function in Swift","kind":"article","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/Your-first-Lambda-function-in-Swift","abstract":[],"url":"\/tutorials\/table-of-content\/your-first-lambda-function-in-swift"},"04-02-04-select-lambda.png":{"type":"image","identifier":"04-02-04-select-lambda.png","alt":"AWS console - Select Lambda","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-04-select-lambda@2x.png","traits":["2x","light"]},{"traits":["2x","dark"],"url":"\/images\/AWSLambdaRuntimeCore\/04-02-04-select-lambda~dark@2x.png"}]},"04-03-01-aws-cli.sh":{"identifier":"04-03-01-aws-cli.sh","highlights":[],"syntax":"","fileName":"Command to type in the Terminal","fileType":"","content":["aws --version"],"type":"file"},"04-01-04-plugin-archive.sh":{"identifier":"04-01-04-plugin-archive.sh","type":"file","fileName":"Commands in a Terminal","fileType":"","highlights":[{"line":1},{"line":21},{"line":22}],"syntax":"","content":["swift package archive --allow-network-connections docker","","-------------------------------------------------------------------------","building \"palindrome\" in docker","-------------------------------------------------------------------------","updating \"swift:amazonlinux2\" docker image"," amazonlinux2: Pulling from library\/swift"," Digest: sha256:df06a50f70e2e87f237bd904d2fc48195742ebda9f40b4a821c4d39766434009","Status: Image is up to date for swift:amazonlinux2"," docker.io\/library\/swift:amazonlinux2","building \"PalindromeLambda\""," [0\/1] Planning build"," Building for production..."," [0\/2] Write swift-version-24593BA9C3E375BF.txt"," Build of product 'PalindromeLambda' complete! (1.91s)","-------------------------------------------------------------------------","archiving \"PalindromeLambda\"","-------------------------------------------------------------------------","1 archive created"," * PalindromeLambda at \/Users\/sst\/Palindrome\/.build\/plugins\/AWSLambdaPackager\/outputs\/AWSLambdaPackager\/PalindromeLambda\/PalindromeLambda.zip","","cp .build\/plugins\/AWSLambdaPackager\/outputs\/AWSLambdaPackager\/PalindromeLambda\/PalindromeLambda.zip ~\/Desktop"]},"04-02-06-create-function.png":{"alt":"Create function details","identifier":"04-02-06-create-function.png","type":"image","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-02-06-create-function@2x.png","traits":["2x","light"]},{"traits":["2x","dark"],"url":"\/images\/AWSLambdaRuntimeCore\/04-02-06-create-function~dark@2x.png"}]},"https://console.aws.amazon.com":{"type":"link","identifier":"https:\/\/console.aws.amazon.com","url":"https:\/\/console.aws.amazon.com","titleInlineContent":[{"text":"https:\/\/console.aws.amazon.com","type":"text"}],"title":"https:\/\/console.aws.amazon.com"}}} \ No newline at end of file diff --git a/docs/data/tutorials/table-of-content.json b/docs/data/tutorials/table-of-content.json new file mode 100644 index 00000000..1c68b5c8 --- /dev/null +++ b/docs/data/tutorials/table-of-content.json @@ -0,0 +1 @@ +{"metadata":{"categoryPathComponent":"table-of-content","category":"AWS Lambda functions in Swift","estimatedTime":"37min","role":"overview","title":"Your First Lambda Function Written in Swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content"},"hierarchy":{"reference":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","paths":[]},"kind":"overview","sections":[{"image":"00-swift_on_lambda.png","backgroundImage":"00-swift_on_lambda.png","action":{"type":"reference","isActive":true,"overridingTitleInlineContent":[{"type":"text","text":"Get started"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview","overridingTitle":"Get started"},"kind":"hero","content":[{"inlineContent":[{"type":"text","text":"A step-by-step tutorial to learn how to implement, build, test, and deploy your first Lambda function written in Swift."}],"type":"paragraph"}],"title":"Your First Lambda Function Written in Swift"},{"content":[],"kind":"volume","name":null,"image":null,"chapters":[{"image":"01-swift_on_lambda.png","tutorials":["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites"],"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"An overview of what to expect and what you need before getting started."}]}],"name":"Before getting started"},{"content":[{"inlineContent":[{"text":"Create your first function and test it locally","type":"text"}],"type":"paragraph"}],"image":"03-swift_on_lambda.png","tutorials":["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function"],"name":"Your first Lambda function in Swift"},{"image":"04-swift_on_lambda.png","content":[{"inlineContent":[{"type":"text","text":"Build, package, upload, and invoke your code on AWS Lambda."}],"type":"paragraph"}],"tutorials":["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function"],"name":"Deploy your code to the cloud"}]}],"variants":[{"paths":["\/tutorials\/table-of-content"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/02-what-is-lambda":{"abstract":[],"url":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda","title":"What is AWS Lambda","estimatedTime":"3min","kind":"article","role":"article"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-write-function":{"url":"\/tutorials\/awslambdaruntimecore\/03-write-function","estimatedTime":"15min","title":"Write your first Lambda function","kind":"project","type":"topic","role":"project","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function","abstract":[{"text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","type":"text"}]},"03-swift_on_lambda.png":{"type":"image","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/03-swift_on_lambda.png","traits":["1x","light"]}],"identifier":"03-swift_on_lambda.png","alt":"Swift Icon"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/01-overview":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview","url":"\/tutorials\/awslambdaruntimecore\/01-overview","abstract":[],"title":"Overview","kind":"article","role":"article","estimatedTime":"1min","type":"topic"},"doc://AWSLambdaRuntimeCore/tutorials/table-of-content":{"title":"Your First Lambda Function Written in Swift","kind":"overview","role":"overview","url":"\/tutorials\/table-of-content","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","abstract":[{"type":"text","text":"A step-by-step tutorial to learn how to implement, build, test, and deploy your first Lambda function written in Swift."}],"type":"topic"},"00-swift_on_lambda.png":{"type":"image","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/00-swift_on_lambda.png","traits":["1x","light"]}],"identifier":"00-swift_on_lambda.png","alt":"Swift on AWS Lambda icons"},"01-swift_on_lambda.png":{"type":"image","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/01-swift_on_lambda.png","traits":["1x","light"]}],"identifier":"01-swift_on_lambda.png","alt":"A Swift project open in Xcode"},"04-swift_on_lambda.png":{"alt":"Deploying Swift into AWS Lambda","identifier":"04-swift_on_lambda.png","variants":[{"url":"\/images\/AWSLambdaRuntimeCore\/04-swift_on_lambda.png","traits":["1x","light"]}],"type":"image"},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/03-prerequisites":{"type":"topic","title":"Prerequisites","role":"article","estimatedTime":"3min","identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","url":"\/tutorials\/awslambdaruntimecore\/03-prerequisites","kind":"article","abstract":[]},"doc://AWSLambdaRuntimeCore/tutorials/AWSLambdaRuntimeCore/04-deploy-function":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function","url":"\/tutorials\/awslambdaruntimecore\/04-deploy-function","abstract":[{"text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","type":"text"}],"title":"Deploy your function to AWS Lambda","kind":"project","role":"project","estimatedTime":"15min","type":"topic"}}} \ No newline at end of file diff --git a/docs/developer-og-twitter.jpg b/docs/developer-og-twitter.jpg new file mode 100644 index 00000000..63c48359 Binary files /dev/null and b/docs/developer-og-twitter.jpg differ diff --git a/docs/developer-og.jpg b/docs/developer-og.jpg new file mode 100644 index 00000000..4db84083 Binary files /dev/null and b/docs/developer-og.jpg differ diff --git a/docs/diagnostics.json b/docs/diagnostics.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/docs/diagnostics.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/0001-v2-api/index.html b/docs/documentation/awslambdaruntimecore/0001-v2-api/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/0001-v2-api/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/closurehandler/handle(_:context:)/index.html b/docs/documentation/awslambdaruntimecore/closurehandler/handle(_:context:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/closurehandler/handle(_:context:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/closurehandler/index.html b/docs/documentation/awslambdaruntimecore/closurehandler/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/closurehandler/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/closurehandler/init(body:)-5sz8r/index.html b/docs/documentation/awslambdaruntimecore/closurehandler/init(body:)-5sz8r/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/closurehandler/init(body:)-5sz8r/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/closurehandler/init(body:)-9o0yg/index.html b/docs/documentation/awslambdaruntimecore/closurehandler/init(body:)-9o0yg/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/closurehandler/init(body:)-9o0yg/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/deployment/index.html b/docs/documentation/awslambdaruntimecore/deployment/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/deployment/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/index.html b/docs/documentation/awslambdaruntimecore/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambda/defaulteventloop/index.html b/docs/documentation/awslambdaruntimecore/lambda/defaulteventloop/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambda/defaulteventloop/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambda/env(_:)/index.html b/docs/documentation/awslambdaruntimecore/lambda/env(_:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambda/env(_:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambda/index.html b/docs/documentation/awslambdaruntimecore/lambda/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambda/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacodableadapter/handle(_:responsewriter:context:)/index.html b/docs/documentation/awslambdaruntimecore/lambdacodableadapter/handle(_:responsewriter:context:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacodableadapter/handle(_:responsewriter:context:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacodableadapter/index.html b/docs/documentation/awslambdaruntimecore/lambdacodableadapter/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacodableadapter/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacodableadapter/init(decoder:handler:)/index.html b/docs/documentation/awslambdaruntimecore/lambdacodableadapter/init(decoder:handler:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacodableadapter/init(decoder:handler:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacodableadapter/init(encoder:decoder:handler:)/index.html b/docs/documentation/awslambdaruntimecore/lambdacodableadapter/init(encoder:decoder:handler:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacodableadapter/init(encoder:decoder:handler:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacodableresponsewriter/index.html b/docs/documentation/awslambdaruntimecore/lambdacodableresponsewriter/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacodableresponsewriter/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacodableresponsewriter/init(encoder:streamwriter:)/index.html b/docs/documentation/awslambdaruntimecore/lambdacodableresponsewriter/init(encoder:streamwriter:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacodableresponsewriter/init(encoder:streamwriter:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacodableresponsewriter/write(_:)/index.html b/docs/documentation/awslambdaruntimecore/lambdacodableresponsewriter/write(_:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacodableresponsewriter/write(_:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacontext/clientcontext/index.html b/docs/documentation/awslambdaruntimecore/lambdacontext/clientcontext/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacontext/clientcontext/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacontext/cognitoidentity/index.html b/docs/documentation/awslambdaruntimecore/lambdacontext/cognitoidentity/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacontext/cognitoidentity/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacontext/deadline/index.html b/docs/documentation/awslambdaruntimecore/lambdacontext/deadline/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacontext/deadline/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacontext/debugdescription/index.html b/docs/documentation/awslambdaruntimecore/lambdacontext/debugdescription/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacontext/debugdescription/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacontext/getremainingtime()/index.html b/docs/documentation/awslambdaruntimecore/lambdacontext/getremainingtime()/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacontext/getremainingtime()/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacontext/index.html b/docs/documentation/awslambdaruntimecore/lambdacontext/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacontext/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacontext/invokedfunctionarn/index.html b/docs/documentation/awslambdaruntimecore/lambdacontext/invokedfunctionarn/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacontext/invokedfunctionarn/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacontext/logger/index.html b/docs/documentation/awslambdaruntimecore/lambdacontext/logger/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacontext/logger/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacontext/requestid/index.html b/docs/documentation/awslambdaruntimecore/lambdacontext/requestid/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacontext/requestid/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdacontext/traceid/index.html b/docs/documentation/awslambdaruntimecore/lambdacontext/traceid/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdacontext/traceid/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaeventdecoder/decode(_:from:)/index.html b/docs/documentation/awslambdaruntimecore/lambdaeventdecoder/decode(_:from:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaeventdecoder/decode(_:from:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaeventdecoder/index.html b/docs/documentation/awslambdaruntimecore/lambdaeventdecoder/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaeventdecoder/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdahandler/event/index.html b/docs/documentation/awslambdaruntimecore/lambdahandler/event/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdahandler/event/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdahandler/handle(_:context:)/index.html b/docs/documentation/awslambdaruntimecore/lambdahandler/handle(_:context:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdahandler/handle(_:context:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdahandler/index.html b/docs/documentation/awslambdaruntimecore/lambdahandler/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdahandler/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdahandler/output/index.html b/docs/documentation/awslambdaruntimecore/lambdahandler/output/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdahandler/output/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdahandleradapter/handle(_:outputwriter:context:)/index.html b/docs/documentation/awslambdaruntimecore/lambdahandleradapter/handle(_:outputwriter:context:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdahandleradapter/handle(_:outputwriter:context:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdahandleradapter/index.html b/docs/documentation/awslambdaruntimecore/lambdahandleradapter/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdahandleradapter/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdahandleradapter/init(handler:)/index.html b/docs/documentation/awslambdaruntimecore/lambdahandleradapter/init(handler:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdahandleradapter/init(handler:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaoutputencoder/encode(_:into:)/index.html b/docs/documentation/awslambdaruntimecore/lambdaoutputencoder/encode(_:into:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaoutputencoder/encode(_:into:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaoutputencoder/index.html b/docs/documentation/awslambdaruntimecore/lambdaoutputencoder/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaoutputencoder/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaoutputencoder/output/index.html b/docs/documentation/awslambdaruntimecore/lambdaoutputencoder/output/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaoutputencoder/output/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/finish()/index.html b/docs/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/finish()/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/finish()/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/index.html b/docs/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/write(_:)/index.html b/docs/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/write(_:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/write(_:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/writeandfinish(_:)/index.html b/docs/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/writeandfinish(_:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaresponsestreamwriter/writeandfinish(_:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaresponsewriter/index.html b/docs/documentation/awslambdaruntimecore/lambdaresponsewriter/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaresponsewriter/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaresponsewriter/output/index.html b/docs/documentation/awslambdaruntimecore/lambdaresponsewriter/output/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaresponsewriter/output/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaresponsewriter/write(_:)/index.html b/docs/documentation/awslambdaruntimecore/lambdaresponsewriter/write(_:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaresponsewriter/write(_:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaruntime/index.html b/docs/documentation/awslambdaruntimecore/lambdaruntime/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaruntime/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaruntime/init(body:)/index.html b/docs/documentation/awslambdaruntimecore/lambdaruntime/init(body:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaruntime/init(body:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaruntime/init(decoder:body:)/index.html b/docs/documentation/awslambdaruntimecore/lambdaruntime/init(decoder:body:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaruntime/init(decoder:body:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaruntime/init(encoder:decoder:body:)/index.html b/docs/documentation/awslambdaruntimecore/lambdaruntime/init(encoder:decoder:body:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaruntime/init(encoder:decoder:body:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaruntime/init(handler:eventloop:logger:)/index.html b/docs/documentation/awslambdaruntimecore/lambdaruntime/init(handler:eventloop:logger:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaruntime/init(handler:eventloop:logger:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdaruntime/run()/index.html b/docs/documentation/awslambdaruntimecore/lambdaruntime/run()/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdaruntime/run()/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/event/index.html b/docs/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/event/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/event/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/handle(_:outputwriter:context:)/index.html b/docs/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/handle(_:outputwriter:context:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/handle(_:outputwriter:context:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/index.html b/docs/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/output/index.html b/docs/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/output/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/lambdawithbackgroundprocessinghandler/output/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/quick-setup/index.html b/docs/documentation/awslambdaruntimecore/quick-setup/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/quick-setup/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/streamingclosurehandler/handle(_:responsewriter:context:)/index.html b/docs/documentation/awslambdaruntimecore/streamingclosurehandler/handle(_:responsewriter:context:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/streamingclosurehandler/handle(_:responsewriter:context:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/streamingclosurehandler/index.html b/docs/documentation/awslambdaruntimecore/streamingclosurehandler/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/streamingclosurehandler/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/streamingclosurehandler/init(body:)/index.html b/docs/documentation/awslambdaruntimecore/streamingclosurehandler/init(body:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/streamingclosurehandler/init(body:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/streaminglambdahandler/handle(_:responsewriter:context:)/index.html b/docs/documentation/awslambdaruntimecore/streaminglambdahandler/handle(_:responsewriter:context:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/streaminglambdahandler/handle(_:responsewriter:context:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/streaminglambdahandler/index.html b/docs/documentation/awslambdaruntimecore/streaminglambdahandler/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/streaminglambdahandler/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/voidencoder/encode(_:into:)/index.html b/docs/documentation/awslambdaruntimecore/voidencoder/encode(_:into:)/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/voidencoder/encode(_:into:)/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/voidencoder/index.html b/docs/documentation/awslambdaruntimecore/voidencoder/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/voidencoder/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/voidencoder/init()/index.html b/docs/documentation/awslambdaruntimecore/voidencoder/init()/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/voidencoder/init()/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/awslambdaruntimecore/voidencoder/output/index.html b/docs/documentation/awslambdaruntimecore/voidencoder/output/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/documentation/awslambdaruntimecore/voidencoder/output/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 00000000..5231da6d Binary files /dev/null and b/docs/favicon.ico differ diff --git a/docs/favicon.svg b/docs/favicon.svg new file mode 100644 index 00000000..c54c53fb --- /dev/null +++ b/docs/favicon.svg @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/docs/images/AWSLambdaRuntimeCore/00-swift_on_lambda.png b/docs/images/AWSLambdaRuntimeCore/00-swift_on_lambda.png new file mode 100644 index 00000000..dcbeb6e0 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/00-swift_on_lambda.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/01-swift_on_lambda.png b/docs/images/AWSLambdaRuntimeCore/01-swift_on_lambda.png new file mode 100644 index 00000000..90c5ba74 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/01-swift_on_lambda.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/03-01-terminal-package-init.png b/docs/images/AWSLambdaRuntimeCore/03-01-terminal-package-init.png new file mode 100644 index 00000000..d12e5f9d Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/03-01-terminal-package-init.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/03-01-xcode@2x.png b/docs/images/AWSLambdaRuntimeCore/03-01-xcode@2x.png new file mode 100644 index 00000000..96347ebf Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/03-01-xcode@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/03-01-xcode~dark@2x.png b/docs/images/AWSLambdaRuntimeCore/03-01-xcode~dark@2x.png new file mode 100644 index 00000000..bdb286e6 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/03-01-xcode~dark@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/03-02-swift-package-manager.png b/docs/images/AWSLambdaRuntimeCore/03-02-swift-package-manager.png new file mode 100644 index 00000000..62f41427 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/03-02-swift-package-manager.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/03-03-swift-code-xcode.png b/docs/images/AWSLambdaRuntimeCore/03-03-swift-code-xcode.png new file mode 100644 index 00000000..90c5ba74 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/03-03-swift-code-xcode.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/03-04-01-compile-run@2x.png.png b/docs/images/AWSLambdaRuntimeCore/03-04-01-compile-run@2x.png.png new file mode 100644 index 00000000..7dfc7f64 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/03-04-01-compile-run@2x.png.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/03-04-01-compile-run~dark@2x.png b/docs/images/AWSLambdaRuntimeCore/03-04-01-compile-run~dark@2x.png new file mode 100644 index 00000000..3315a90c Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/03-04-01-compile-run~dark@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/03-04-test-locally.png b/docs/images/AWSLambdaRuntimeCore/03-04-test-locally.png new file mode 100644 index 00000000..dba46581 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/03-04-test-locally.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/03-swift_on_lambda.png b/docs/images/AWSLambdaRuntimeCore/03-swift_on_lambda.png new file mode 100644 index 00000000..ac9d2006 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/03-swift_on_lambda.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-01-01-docker-started@2x.png b/docs/images/AWSLambdaRuntimeCore/04-01-01-docker-started@2x.png new file mode 100644 index 00000000..e65aba1f Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-01-01-docker-started@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-01-compile-for-linux.png b/docs/images/AWSLambdaRuntimeCore/04-01-compile-for-linux.png new file mode 100644 index 00000000..16ec0b5d Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-01-compile-for-linux.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-01-console-login@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-01-console-login@2x.png new file mode 100644 index 00000000..e51f6d81 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-01-console-login@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-02-console-login@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-02-console-login@2x.png new file mode 100644 index 00000000..e4cf04b5 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-02-console-login@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-03-select-region@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-03-select-region@2x.png new file mode 100644 index 00000000..8460945b Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-03-select-region@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-04-select-lambda@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-04-select-lambda@2x.png new file mode 100644 index 00000000..c79c495f Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-04-select-lambda@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-04-select-lambda~dark@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-04-select-lambda~dark@2x.png new file mode 100644 index 00000000..2abd5056 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-04-select-lambda~dark@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-05-create-function@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-05-create-function@2x.png new file mode 100644 index 00000000..1c123d5a Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-05-create-function@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-05-create-function~dark@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-05-create-function~dark@2x.png new file mode 100644 index 00000000..c23355a9 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-05-create-function~dark@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-06-create-function@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-06-create-function@2x.png new file mode 100644 index 00000000..b8048d19 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-06-create-function@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-06-create-function~dark@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-06-create-function~dark@2x.png new file mode 100644 index 00000000..2fbdf277 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-06-create-function~dark@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-07-upload-zip@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-07-upload-zip@2x.png new file mode 100644 index 00000000..0e4ba22c Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-07-upload-zip@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-07-upload-zip~dark@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-07-upload-zip~dark@2x.png new file mode 100644 index 00000000..cf73d7f9 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-07-upload-zip~dark@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-08-upload-zip@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-08-upload-zip@2x.png new file mode 100644 index 00000000..ef3d8160 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-08-upload-zip@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-08-upload-zip~dark@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-08-upload-zip~dark@2x.png new file mode 100644 index 00000000..4273f810 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-08-upload-zip~dark@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-09-test-lambda@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-09-test-lambda@2x.png new file mode 100644 index 00000000..e9e7a309 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-09-test-lambda@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-09-test-lambda~dark@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-09-test-lambda~dark@2x.png new file mode 100644 index 00000000..61cf6147 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-09-test-lambda~dark@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-10-test-lambda-result@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-10-test-lambda-result@2x.png new file mode 100644 index 00000000..e962e7c2 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-10-test-lambda-result@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-10-test-lambda-result~dark@2x.png b/docs/images/AWSLambdaRuntimeCore/04-02-10-test-lambda-result~dark@2x.png new file mode 100644 index 00000000..54ca5198 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-10-test-lambda-result~dark@2x.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-02-create-lambda.png b/docs/images/AWSLambdaRuntimeCore/04-02-create-lambda.png new file mode 100644 index 00000000..70152ba5 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-02-create-lambda.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-03-invoke-lambda.png b/docs/images/AWSLambdaRuntimeCore/04-03-invoke-lambda.png new file mode 100644 index 00000000..71167f24 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-03-invoke-lambda.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/04-swift_on_lambda.png b/docs/images/AWSLambdaRuntimeCore/04-swift_on_lambda.png new file mode 100644 index 00000000..386bdef7 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/04-swift_on_lambda.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/console-10-regions.png b/docs/images/AWSLambdaRuntimeCore/console-10-regions.png new file mode 100644 index 00000000..afe97b53 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/console-10-regions.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/console-20-dashboard.png b/docs/images/AWSLambdaRuntimeCore/console-20-dashboard.png new file mode 100644 index 00000000..b48ea591 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/console-20-dashboard.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/console-30-create-function.png b/docs/images/AWSLambdaRuntimeCore/console-30-create-function.png new file mode 100644 index 00000000..e3bd131f Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/console-30-create-function.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/console-40-select-zip-file.png b/docs/images/AWSLambdaRuntimeCore/console-40-select-zip-file.png new file mode 100644 index 00000000..da4ff924 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/console-40-select-zip-file.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/console-50-upload-zip.png b/docs/images/AWSLambdaRuntimeCore/console-50-upload-zip.png new file mode 100644 index 00000000..89eedab9 Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/console-50-upload-zip.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/console-60-prepare-test-event.png b/docs/images/AWSLambdaRuntimeCore/console-60-prepare-test-event.png new file mode 100644 index 00000000..2f7b15ed Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/console-60-prepare-test-event.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/console-70-view-invocation-response.png b/docs/images/AWSLambdaRuntimeCore/console-70-view-invocation-response.png new file mode 100644 index 00000000..f4f712bc Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/console-70-view-invocation-response.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/console-80-delete-function.png b/docs/images/AWSLambdaRuntimeCore/console-80-delete-function.png new file mode 100644 index 00000000..f205f47b Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/console-80-delete-function.png differ diff --git a/docs/images/AWSLambdaRuntimeCore/console-80-delete-role.png b/docs/images/AWSLambdaRuntimeCore/console-80-delete-role.png new file mode 100644 index 00000000..2a335d5d Binary files /dev/null and b/docs/images/AWSLambdaRuntimeCore/console-80-delete-role.png differ diff --git a/docs/img/added-icon.832a5d2c.svg b/docs/img/added-icon.832a5d2c.svg new file mode 100644 index 00000000..6bb6d89a --- /dev/null +++ b/docs/img/added-icon.832a5d2c.svg @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/docs/img/deprecated-icon.7bf1740a.svg b/docs/img/deprecated-icon.7bf1740a.svg new file mode 100644 index 00000000..a0f80086 --- /dev/null +++ b/docs/img/deprecated-icon.7bf1740a.svg @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/docs/img/modified-icon.efb2697d.svg b/docs/img/modified-icon.efb2697d.svg new file mode 100644 index 00000000..3e0bd6f0 --- /dev/null +++ b/docs/img/modified-icon.efb2697d.svg @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/index/index.json b/docs/index/index.json new file mode 100644 index 00000000..040846f4 --- /dev/null +++ b/docs/index/index.json @@ -0,0 +1 @@ +{"includedArchiveIdentifiers":["AWSLambdaRuntimeCore"],"interfaceLanguages":{"swift":[{"children":[{"title":"Essentials","type":"groupMarker"},{"children":[{"title":"Before getting started","type":"groupMarker"},{"path":"\/tutorials\/awslambdaruntimecore\/01-overview","title":"Overview","type":"article"},{"path":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda","title":"What is AWS Lambda","type":"article"},{"path":"\/tutorials\/awslambdaruntimecore\/03-prerequisites","title":"Prerequisites","type":"article"},{"title":"Your first Lambda function in Swift","type":"groupMarker"},{"path":"\/tutorials\/awslambdaruntimecore\/03-write-function","title":"Write your first Lambda function","type":"project"},{"title":"Deploy your code to the cloud","type":"groupMarker"},{"path":"\/tutorials\/awslambdaruntimecore\/04-deploy-function","title":"Deploy your function to AWS Lambda","type":"project"}],"path":"\/tutorials\/table-of-content","title":"Your First Lambda Function Written in Swift","type":"overview"},{"path":"\/documentation\/awslambdaruntimecore\/quick-setup","title":"Getting Started Quickly","type":"article"},{"path":"\/documentation\/awslambdaruntimecore\/deployment","title":"Deploying your Swift Lambda functions","type":"article"},{"title":"Articles","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/0001-v2-api","title":"v2 API proposal for swift-aws-lambda-runtime","type":"article"},{"title":"Classes","type":"groupMarker"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(body:)","title":"convenience init(body: (ByteBuffer, any LambdaResponseStreamWriter, LambdaContext) async throws -> Void)","type":"init"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(decoder:body:)","title":"convenience init(decoder: Decoder, body: sending (Event, LambdaContext) async throws -> Void)","type":"init"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(encoder:decoder:body:)","title":"convenience init(encoder: Encoder, decoder: Decoder, body: sending (Event, LambdaContext) async throws -> Output)","type":"init"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(handler:eventloop:logger:)","title":"init(handler: sending Handler, eventLoop: any EventLoop, logger: Logger)","type":"init"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/run()","title":"func run() async throws","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/lambdaruntime","title":"LambdaRuntime","type":"class"},{"title":"Protocols","type":"groupMarker"},{"children":[{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaeventdecoder\/decode(_:from:)","title":"func decode(Event.Type, from: ByteBuffer) throws -> Event","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/lambdaeventdecoder","title":"LambdaEventDecoder","type":"protocol"},{"children":[{"title":"Associated Types","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","title":"Event","type":"associatedtype"},{"path":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","title":"Output","type":"associatedtype"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","title":"func handle(Self.Event, context: LambdaContext) async throws -> Self.Output","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/lambdahandler","title":"LambdaHandler","type":"protocol"},{"children":[{"title":"Associated Types","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/output","title":"Output","type":"associatedtype"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/encode(_:into:)","title":"func encode(Self.Output, into: inout ByteBuffer) throws","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder","title":"LambdaOutputEncoder","type":"protocol"},{"children":[{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/finish()","title":"func finish() async throws","type":"method"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)","title":"func write(ByteBuffer) async throws","type":"method"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","title":"func writeAndFinish(ByteBuffer) async throws","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","title":"LambdaResponseStreamWriter","type":"protocol"},{"children":[{"title":"Associated Types","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter\/output","title":"Output","type":"associatedtype"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter\/write(_:)","title":"func write(Self.Output) async throws","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","title":"LambdaResponseWriter","type":"protocol"},{"children":[{"title":"Associated Types","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/event","title":"Event","type":"associatedtype"},{"path":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/output","title":"Output","type":"associatedtype"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)","title":"func handle(Self.Event, outputWriter: some LambdaResponseWriter, context: LambdaContext) async throws","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","title":"LambdaWithBackgroundProcessingHandler","type":"protocol"},{"children":[{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler\/handle(_:responsewriter:context:)","title":"func handle(ByteBuffer, responseWriter: some LambdaResponseStreamWriter, context: LambdaContext) async throws","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","title":"StreamingLambdaHandler","type":"protocol"},{"title":"Structures","type":"groupMarker"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/closurehandler\/init(body:)-5sz8r","title":"init(body: (Event, LambdaContext) async throws -> Output)","type":"init"},{"path":"\/documentation\/awslambdaruntimecore\/closurehandler\/init(body:)-9o0yg","title":"init(body: (Event, LambdaContext) async throws -> Void)","type":"init"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/closurehandler\/handle(_:context:)","title":"func handle(Event, context: LambdaContext) async throws -> Output","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/closurehandler","title":"ClosureHandler","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/init(decoder:handler:)","title":"init(decoder: Decoder, handler: Handler)","type":"init"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/init(encoder:decoder:handler:)","title":"init(encoder: Encoder, decoder: Decoder, handler: Handler)","type":"init"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/handle(_:responsewriter:context:)","title":"func handle(ByteBuffer, responseWriter: Writer, context: LambdaContext) async throws","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter","title":"LambdaCodableAdapter","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter\/init(encoder:streamwriter:)","title":"init(encoder: Encoder, streamWriter: Base)","type":"init"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter\/write(_:)","title":"func write(Output) async throws","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter","title":"LambdaCodableResponseWriter","type":"struct"},{"children":[{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/clientcontext","title":"var clientContext: String?","type":"property"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/cognitoidentity","title":"var cognitoIdentity: String?","type":"property"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/deadline","title":"var deadline: DispatchWallTime","type":"property"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/debugdescription","title":"var debugDescription: String","type":"property"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/invokedfunctionarn","title":"var invokedFunctionARN: String","type":"property"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/logger","title":"var logger: Logger","type":"property"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/requestid","title":"var requestID: String","type":"property"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/traceid","title":"var traceID: String","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/getremainingtime()","title":"func getRemainingTime() -> Duration","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/lambdacontext","title":"LambdaContext","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter\/init(handler:)","title":"init(handler: Handler)","type":"init"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter\/handle(_:outputwriter:context:)","title":"func handle(Event, outputWriter: some LambdaResponseWriter, context: LambdaContext) async throws","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter","title":"LambdaHandlerAdapter","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler\/init(body:)","title":"init(body: (ByteBuffer, any LambdaResponseStreamWriter, LambdaContext) async throws -> Void)","type":"init"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler\/handle(_:responsewriter:context:)","title":"func handle(ByteBuffer, responseWriter: some LambdaResponseStreamWriter, context: LambdaContext) async throws","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler","title":"StreamingClosureHandler","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/voidencoder\/init()","title":"init()","type":"init"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/voidencoder\/encode(_:into:)","title":"func encode(Void, into: inout ByteBuffer) throws","type":"method"},{"title":"Type Aliases","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/voidencoder\/output","title":"VoidEncoder.Output","type":"typealias"}],"path":"\/documentation\/awslambdaruntimecore\/voidencoder","title":"VoidEncoder","type":"struct"},{"title":"Enumerations","type":"groupMarker"},{"children":[{"title":"Type Properties","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambda\/defaulteventloop","title":"static let defaultEventLoop: any EventLoop","type":"property"},{"title":"Type Methods","type":"groupMarker"},{"path":"\/documentation\/awslambdaruntimecore\/lambda\/env(_:)","title":"static func env(String) -> String?","type":"method"}],"path":"\/documentation\/awslambdaruntimecore\/lambda","title":"Lambda","type":"enum"}],"path":"\/documentation\/awslambdaruntimecore","title":"AWSLambdaRuntimeCore","type":"module"}]},"schemaVersion":{"major":0,"minor":1,"patch":2}} \ No newline at end of file diff --git a/docs/indexing-records.json b/docs/indexing-records.json new file mode 100644 index 00000000..23fa24c1 --- /dev/null +++ b/docs/indexing-records.json @@ -0,0 +1 @@ +[{"headings":[],"title":"init(body:)","rawIndexableTextContent":"Initialize an instance with a StreamingLambdaHandler in the form of a closure. The handler in the form of a closure.","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(body:)"}},"kind":"symbol","summary":"Initialize an instance with a StreamingLambdaHandler in the form of a closure."},{"headings":[],"kind":"symbol","location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output"},"type":"topLevelPage"},"rawIndexableTextContent":" ","summary":"","title":"Output"},{"title":"StreamingClosureHandler","kind":"symbol","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler","interfaceLanguage":"swift"}},"summary":"A StreamingLambdaHandler conforming handler object that can be constructed with a closure. Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax.","rawIndexableTextContent":"A StreamingLambdaHandler conforming handler object that can be constructed with a closure. Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax. ","headings":[]},{"summary":"Passes the generic Event object to the handle(_:context:) function, and the resulting output is then written to LambdaWithBackgroundProcessingHandler’s outputWriter.","rawIndexableTextContent":"Passes the generic Event object to the handle(_:context:) function, and the resulting output is then written to LambdaWithBackgroundProcessingHandler’s outputWriter. The received event. The writer to write the computed response to. The LambdaContext containing the invocation’s metadata.","kind":"symbol","title":"handle(_:outputWriter:context:)","location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/handle(_:outputWriter:context:)"},"type":"topLevelPage"},"headings":[]},{"location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output","interfaceLanguage":"swift"}},"kind":"symbol","headings":[],"rawIndexableTextContent":"Generic output type. This is the type that the handle function will send through the LambdaResponseWriter. ","title":"Output","summary":"Generic output type. This is the type that the handle function will send through the LambdaResponseWriter."},{"title":"init(decoder:handler:)","kind":"symbol","location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(decoder:handler:)","interfaceLanguage":"swift"},"type":"topLevelPage"},"summary":"Initializes an instance given a decoder, and a handler with a Void output.","headings":[],"rawIndexableTextContent":"Initializes an instance given a decoder, and a handler with a Void output. The decoder object that will be used to decode the received ByteBuffer event into the generic Event type served to the handler. The handler object."},{"summary":"Initializes an instance given an encoder, decoder, and a handler with a non-Void output.","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(encoder:decoder:handler:)"}},"kind":"symbol","title":"init(encoder:decoder:handler:)","headings":[],"rawIndexableTextContent":"Initializes an instance given an encoder, decoder, and a handler with a non-Void output. The encoder object that will be used to encode the generic Output obtained from the handler’s outputWriter into a ByteBuffer. The decoder object that will be used to decode the received ByteBuffer event into the generic Event type served to the handler. The handler object."},{"summary":"Inherited from LambdaOutputEncoder.encode(_:into:).","headings":[],"rawIndexableTextContent":"Inherited from LambdaOutputEncoder.encode(_:into:). ","title":"encode(_:into:)","kind":"symbol","location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/encode(_:into:)"},"type":"topLevelPage"}},{"rawIndexableTextContent":"The request ID, which identifies the request that triggered the function invocation. ","summary":"The request ID, which identifies the request that triggered the function invocation.","title":"requestID","kind":"symbol","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/requestID"}},"headings":[]},{"title":"AWSLambdaRuntimeCore","headings":["Overview"],"summary":"An AWS Lambda runtime for the Swift programming language","kind":"symbol","rawIndexableTextContent":"An AWS Lambda runtime for the Swift programming language Overview Many modern systems have client components like iOS, macOS or watchOS applications as well as server components that those clients interact with. Serverless functions are often the easiest and most efficient way for client application developers to extend their applications into the cloud. Serverless functions are increasingly becoming a popular choice for running event-driven or otherwise ad-hoc compute tasks in the cloud. They power mission critical microservices and data intensive workloads. In many cases, serverless functions allow developers to more easily scale and control compute costs given their on-demand nature. When using serverless functions, attention must be given to resource utilization as it directly impacts the costs of the system. This is where Swift shines! With its low memory footprint, deterministic performance, and quick start time, Swift is a fantastic match for the serverless functions architecture. Combine this with Swift’s developer friendliness, expressiveness, and emphasis on safety, and we have a solution that is great for developers at all skill levels, scalable, and cost effective. Swift AWS Lambda Runtime was designed to make building Lambda functions in Swift simple and safe. The library is an implementation of the AWS Lambda Runtime API and uses an embedded asynchronous HTTP client based on SwiftNIO that is fine-tuned for performance in the AWS Lambda Runtime context. The library provides a multi-tier API that allows building a range of Lambda functions: from quick and simple closures to complex, performance-sensitive event handlers.","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"}}},{"location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/deadline","interfaceLanguage":"swift"}},"summary":"The timestamp that the function times out.","rawIndexableTextContent":"The timestamp that the function times out. ","kind":"symbol","title":"deadline","headings":[]},{"location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"}},"kind":"symbol","summary":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","title":"writeAndFinish(_:)","headings":[],"rawIndexableTextContent":"Write a response part into the stream and then end the stream as well as the underlying HTTP response. The buffer to write."},{"kind":"overview","location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content"},"type":"topLevelPage"},"summary":"A step-by-step tutorial to learn how to implement, build, test, and deploy your first Lambda function written in Swift.","title":"Your First Lambda Function Written in Swift","headings":["Before getting started","Your first Lambda function in Swift","Deploy your code to the cloud"],"rawIndexableTextContent":"A step-by-step tutorial to learn how to implement, build, test, and deploy your first Lambda function written in Swift. "},{"kind":"symbol","title":"init(encoder:streamWriter:)","rawIndexableTextContent":"Initializes an instance given an encoder and an underlying LambdaResponseStreamWriter. The encoder object that will be used to encode the generic Output into a ByteBuffer, which will then be passed to streamWriter. The underlying LambdaResponseStreamWriter that will be wrapped.","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/init(encoder:streamWriter:)","interfaceLanguage":"swift"}},"summary":"Initializes an instance given an encoder and an underlying LambdaResponseStreamWriter.","headings":[]},{"rawIndexableTextContent":"Calls the provided self.body closure with the generic Event object representing the incoming event, and the LambdaContext The generic Event object representing the invocation’s input data. The LambdaContext containing the invocation’s metadata.","summary":"Calls the provided self.body closure with the generic Event object representing the incoming event, and the LambdaContext","headings":[],"title":"handle(_:context:)","kind":"symbol","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/handle(_:context:)"}}},{"title":"LambdaHandler","summary":"This handler protocol is intended to serve the most common use-cases. This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an Event object and encoding the returned Output object is handled by the library. Thehandle(_:context:) function simply receives the generic Event object as input and returns the generic Output object.","kind":"symbol","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","interfaceLanguage":"swift"}},"rawIndexableTextContent":"This handler protocol is intended to serve the most common use-cases. This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an Event object and encoding the returned Output object is handled by the library. Thehandle(_:context:) function simply receives the generic Event object as input and returns the generic Output object. Overview This handler protocol does not support response streaming because the output has to be encoded prior to it being sent, e.g. it is not possible to encode a partial\/incomplete JSON string. This protocol also does not support the execution of background work after the response has been returned – the LambdaWithBackgroundProcessingHandler protocol caters for such use-cases.","headings":["Overview"]},{"kind":"symbol","headings":["Discussion"],"summary":"The handler function – implement the business logic of the Lambda function here.","location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","interfaceLanguage":"swift"},"type":"topLevelPage"},"title":"handle(_:responseWriter:context:)","rawIndexableTextContent":"The handler function – implement the business logic of the Lambda function here. The invocation’s input data. A LambdaResponseStreamWriter to write the invocation’s response to. If no response or error is written to responseWriter an error will be reported to the invoker. The LambdaContext containing the invocation’s metadata. Discussion How the thrown error will be handled by the runtime: An invocation error will be reported if the error is thrown before the first call to write(_:). If the error is thrown after call(s) to write(_:) but before a call to finish(), the response stream will be closed and trailing headers will be sent. If finish() has already been called before the error is thrown, the error will be logged."},{"kind":"symbol","summary":"Used with LambdaWithBackgroundProcessingHandler. A mechanism to “return” an output from handle(_:outputWriter:context:) without the function needing to have a return type and exit at that point. This allows for background work to be executed after a response has been sent to the AWS Lambda response endpoint.","location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","interfaceLanguage":"swift"},"type":"topLevelPage"},"headings":[],"title":"LambdaResponseWriter","rawIndexableTextContent":"Used with LambdaWithBackgroundProcessingHandler. A mechanism to “return” an output from handle(_:outputWriter:context:) without the function needing to have a return type and exit at that point. This allows for background work to be executed after a response has been sent to the AWS Lambda response endpoint. "},{"rawIndexableTextContent":" This tutorial has been tested on macOS, since this is what most Swift developers work on. It should also work on Linux. To follow the instructions provided by this tutorial you’ll need to meet a couple of prerequisites. We expect you to have a basic understanding of the Swift programming language and be somewhat familiar with the terminal\/console. You can follow this guided tour to have an overview of Swift. You can follow this short tutorial to learn about macOS commands and the Terminal. You’ll need to have a text editor and the Swift toolchain installed. On macOS, you can use Xcode. On Linux, you must install the Swift runtime and toolchain. On macOS and Linux, you may also use VSCode and the Swift extension for VSCode. To compile your Lambda function to run on AWS Lambda, you will need to install Docker. This tutorial doesn’t go into much detail what Docker is and what it does. Just remember that AWS Lambda functions run on Linux. Therefore, you have to compile your Swift Lambda function code for Linux. Docker allows you to start a Linux virtual machine where you will compile your Swift code before to deploy it on AWS Lambda. This tutorial contains all the commands you will have to type to interact with Docker. Follow the instructions provided by Docker to install Docker on your machine. To deploy your Lambda function on AWS you need an Amazon Web Service (AWS) account. Follow these instructions to create an AWS account.","kind":"article","headings":[],"location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","interfaceLanguage":"swift"}},"title":"Prerequisites","summary":""},{"location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/debugDescription"}},"summary":"Inherited from CustomDebugStringConvertible.debugDescription.","rawIndexableTextContent":"Inherited from CustomDebugStringConvertible.debugDescription. ","kind":"symbol","headings":[],"title":"debugDescription"},{"headings":[],"title":"Lambda","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda","interfaceLanguage":"swift"}},"kind":"symbol","summary":"","rawIndexableTextContent":" "},{"summary":"swift-aws-lambda-runtime is an important library for the Swift on Server ecosystem. The initial API was written before async\/await was introduced to Swift. When async\/await was introduced, shims were added to bridge between the underlying SwiftNIO EventLoop interfaces and async\/await. However, just like gRPC-swift and postgres-nio, we now want to shift to solely using async\/await instead of EventLoop interfaces. For this, large parts of the current API have to be reconsidered.","rawIndexableTextContent":"swift-aws-lambda-runtime is an important library for the Swift on Server ecosystem. The initial API was written before async\/await was introduced to Swift. When async\/await was introduced, shims were added to bridge between the underlying SwiftNIO EventLoop interfaces and async\/await. However, just like gRPC-swift and postgres-nio, we now want to shift to solely using async\/await instead of EventLoop interfaces. For this, large parts of the current API have to be reconsidered. Overview Versions: v1 (2024-08-07): Initial version v1.1: Remove the reportError(_:) method from LambdaResponseStreamWriter and instead make the handle(...) method of StreamingLambdaHandler throwing. Remove the addBackgroundTask(_:) method from LambdaContext due to structured concurrency concerns and introduce the LambdaWithBackgroundProcessingHandler protocol as a solution. Introduce LambdaHandlerAdapter, which adapts handlers conforming to LambdaHandler with LambdaWithBackgroundProcessingHandler. Update LambdaCodableAdapter to now be generic over any handler conforming to LambdaWithBackgroundProcessingHandler instead of LambdaHandler. v1.2: Remove ~Copyable from LambdaResponseStreamWriter and LambdaResponseWriter. Instead throw an error when finish() is called multiple times or when write\/writeAndFinish is called after finish(). Motivation Current Limitations EventLoop interfaces The current API extensively uses the EventLoop family of interfaces from SwiftNIO in many areas. To use these interfaces correctly though, it requires developers to exercise great care and understand the various transform methods that are used to work with EventLoops and EventLoopFutures. This results in a lot of cognitive complexity and makes the code in the current API hard to reason about and maintain. For these reasons, the overarching trend in the Swift on Server ecosystem is to shift to newer, more readable, Swift concurrency constructs and de-couple from SwiftNIO’s EventLoop interfaces. No ownership of the main() function A Lambda function can currently be implemented through conformance to the various handler protocols defined in AWSLambdaRuntimeCore\/LambdaHandler. Each of these protocols have an extension which implements a static func main(). This allows users to annotate their LambdaHandler conforming object with @main. The static func main() calls the internal Lambda.run() function, which starts the Lambda function. Since the Lambda.run() method is internal, users cannot override the default implementation. This has proven challenging for users who want to set up global properties before the Lambda starts-up. Setting up global properties is required to customize the Swift Logging, Metric and Tracing backend. Non-trivial transition from SimpleLambdaHandler to LambdaHandler The SimpleLambdaHandler protocol provides a quick and easy way to implement a basic Lambda function. It only requires an implementation of the handle function where the business logic of the Lambda function can be written. SimpleLambdaHandler is perfectly sufficient for small use-cases as the user does not need to spend much time looking into the library. However, SimpleLambdaHandler cannot be used when services such as a database client need to be initialized before the Lambda runtime starts and then also gracefully shutdown prior to the runtime terminating. This is because the only way to register termination logic is through the LambdaInitializationContext (containing a field terminator: LambdaTerminator) which is created and used internally within LambdaRuntime and never exposed through SimpleLambdaHandler. For such use-cases, other handler protocols like LambdaHandler must be used. LambdaHandler exposes a context argument of type LambdaInitializationContext through its initializer. Within the initializer, required services can be initialized and their graceful shutdown logic can be registered with the context.terminator.register function. Yet, LambdaHandler is quite cumbersome to use in such use-cases as users have to deviate from the established norms of the Swift on Server ecosystem in order to cleanly manage the lifecycle of the services intended to be used. This is because the convenient swift-service-lifecycle v2 library — which is commonly used for cleanly managing the lifecycles of required services and widely supported by many libraries — cannot be used in a structured concurrency manner. Does not integrate well with swift-service-lifecycle in a structured concurrency manner The Lambda runtime can only be started using the internal Lambda.run() function. This function is called by the main() function defined by the LambdaHandler protocol, preventing users from injecting initialized services into the runtime prior to it starting. As shown below, this forces users to use an unstructured concurrency approach and manually initialize services, leading to the issue of the user then perhaps forgetting to gracefully shutdown the initialized services: Verbose Codable support In the current API, there are extensions and Codable wrapper classes for decoding events and encoding computed responses for each different handler protocol and for both String and JSON formats. This has resulted in a lot of boilerplate code which can very easily be made generic and simplified in v2. New features Support response streaming In April 2023 AWS introduced support for response streaming in Lambda. The current API does not support streaming. For v2 we want to change this. Scheduling background work In May AWS described in a blog post that you can run background tasks in Lambda until the runtime asks for more work from the control plane. We want to support this by adding new API that allows background processing, even after the response has been returned. Proposed Solution async\/await-first API Large parts of Lambda, LambdaHandler, and LambdaRuntime will be re-written to use async\/await constructs in place of the EventLoop family of interfaces. Providing ownership of main() and support for swift-service-lifecycle Instead of conforming to a handler protocol, users can now create a LambdaRuntime by passing in a handler closure. LambdaRuntime conforms to ServiceLifecycle.Service by implementing a run() method that contains initialization and graceful shutdown logic. This allows the lifecycle of the LambdaRuntime to be managed with swift-service-lifecycle alongside and in the same way the lifecycles of the required services are managed, e.g. try await ServiceGroup(services: [postgresClient, ..., lambdaRuntime], ...).run(). Dependencies can now be injected into LambdaRuntime. With swift-service-lifecycle, services will be initialized together with LambdaRuntime. The required services can then be used within the handler in a structured concurrency manner. swift-service-lifecycle takes care of listening for termination signals and terminating the services as well as the LambdaRuntime in correct order. LambdaTerminator can now be eliminated because its role is replaced with swift-service-lifecycle. The termination logic of the Lambda function will be implemented in the conforming run() function of LambdaRuntime. With this, the earlier code snippet can be replaced with something much easier to read, maintain, and debug: Simplifying Codable support A detailed explanation is provided in the Codable Support section. In short, much of the boilerplate code defined for each handler protocol in Lambda+Codable and Lambda+String will be replaced with a single LambdaCodableAdapter struct. This adapter struct is generic over (1) any handler conforming to a new handler protocol LambdaWithBackgroundProcessingHandler, (2) the user-specified input and output types, and (3) any decoder and encoder conforming to protocols LambdaEventDecoder and LambdaOutputDecoder. The adapter will wrap the underlying handler with encoding\/decoding logic. Detailed Solution Below are explanations for all types that we want to use in AWS Lambda Runtime v2. LambdaResponseStreamWriter We will introduce a new LambdaResponseStreamWriter protocol. It is used in the new StreamingLambdaHandler (defined below), which is the new base protocol for the LambdaRuntime (defined below as well). If the user does not call finish(), the library will automatically finish the stream after the last write. Appropriate errors will be thrown if finish() is called multiple times, or if write\/writeAndFinish is called after finish(). LambdaContext LambdaContext will be largely unchanged, but the eventLoop property will be removed. The allocator property of type ByteBufferAllocator will also be removed because (1), we generally want to reduce the number of SwiftNIO types exposed in the API, and (2), ByteBufferAllocator does not optimize the allocation strategies. The common pattern observed across many libraries is to re-use existing ByteBuffers as much as possible. This is also what we do for the LambdaCodableAdapter (explained in the Codable Support section) implementation. Handlers We introduce three handler protocols: StreamingLambdaHandler, LambdaHandler, and LambdaWithBackgroundProcessingHandler. StreamingLambdaHandler The new StreamingLambdaHandler protocol is the base protocol to implement a Lambda function. Most users will not use this protocol and instead use the LambdaHandler protocol defined below. Using this protocol requires the handle method to receive the incoming event as a ByteBuffer and return the output as a ByteBuffer too. Through the LambdaResponseStreamWriter, which is passed as an argument in the handle function, the response can be streamed by calling the write(_:) function of the LambdaResponseStreamWriter with partial data repeatedly before finally closing the response stream by calling finish(). Users can also choose to return the entire output and not stream the response by calling writeAndFinish(_:). This protocol also allows for background tasks to be run after a result has been reported to the AWS Lambda control plane, since the handle(...) function is free to implement any background work after the call to responseWriter.finish(). The protocol is defined in a way that supports a broad range of use-cases. The handle method is marked as mutating to allow handlers to be implemented with a struct. An implementation that sends the number 1 to 10 every 500ms could look like this: LambdaHandler: This handler protocol will be the go-to choice for most use-cases because it is completely agnostic to any encoding\/decoding logic – conforming objects simply have to implement the handle function where the input and return types are Swift objects. Note that the handle function does not receive a LambdaResponseStreamWriter as an argument. Response streaming is not viable for LambdaHandler because the output has to be encoded prior to it being sent, e.g. it is not possible to encode a partial\/incomplete JSON string. LambdaWithBackgroundProcessingHandler: This protocol is exactly like LambdaHandler, with the only difference being the added support for executing background work after the result has been sent to the AWS Lambda control plane. This is achieved by not having a return type in the handle function. The output is instead written into a LambdaResponseWriter that is passed in as an argument, meaning that the handle function is then free to implement any background work after the result has been sent to the AWS Lambda control plane. LambdaResponseWriter has different semantics to the LambdaResponseStreamWriter. Where the write(_:) function of LambdaResponseStreamWriter means writing into a response stream, the write(_:) function of LambdaResponseWriter simply serves as a mechanism to return the output without explicitly returning from the handle function. Example Usage: Handler Adapters Since the StreamingLambdaHandler protocol is the base protocol the LambdaRuntime works with, there are adapters to make both LambdaHandler and LambdaWithBackgroundProcessingHandler compatible with StreamingLambdaHandler. LambdaHandlerAdapter accepts a LambdaHandler and conforms it to LambdaWithBackgroundProcessingHandler. This is achieved by taking the generic Output object returned from the handle function of LambdaHandler and passing it to the write(_:) function of the LambdaResponseWriter. LambdaCodableAdapter accepts a LambdaWithBackgroundProcessingHandler and conforms it to StreamingLambdaHandler. This is achieved by wrapping the LambdaResponseWriter with the LambdaResponseStreamWriter provided by StreamingLambdaHandler. A call to the write(_:) function of LambdaResponseWriter is translated into a call to the writeAndFinish(_:) function of LambdaResponseStreamWriter. Both LambdaHandlerAdapter and LambdaCodableAdapter are described in greater detail in the Codable Support section. To summarize, LambdaHandler can be used with the LambdaRuntime by first going through LambdaHandlerAdapter and then through LambdaCodableAdapter. LambdaWithBackgroundHandler just requires LambdaCodableAdapter. For the common JSON-in and JSON-out use-case, there is an extension on LambdaRuntime that abstracts away this wrapping from the user. LambdaRuntime LambdaRuntime is the class that communicates with the Lambda control plane as defined in Building a custom runtime for AWS Lambda and forward the invocations to the provided StreamingLambdaHandler. It will conform to ServiceLifecycle.Service to provide support for swift-service-lifecycle. The current API allows for a Lambda function to be tested locally through a mock server by requiring an environment variable named LOCAL_LAMBDA_SERVER_ENABLED to be set to true. If this environment variable is not set, the program immediately crashes as the user will not have the AWS_LAMBDA_RUNTIME_API environment variable on their local machine (set automatically when deployed to AWS Lambda). However, making the user set the LOCAL_LAMBDA_SERVER_ENABLED environment variable is an unnecessary step that can be avoided. In the v2 API, the run() function will automatically start the mock server when the AWS_LAMBDA_RUNTIME_API environment variable cannot be found. Lambda We also add an enum to store a static function and a property on. We put this on the static Lambda because LambdaRuntime is generic and thus has bad ergonomics for static properties and functions. Since the library now provides ownership of the main() function and allows users to initialize services before the LambdaRuntime is initialized, the library cannot implicitly report errors that occur during initialization to the dedicated endpoint AWS exposes like it currently does through the initialize() function of LambdaRunner which wraps the handler’s init(...) and handles any errors thrown by reporting it to the dedicated AWS endpoint. To retain support for initialization error reporting, the Lambda.reportStartupError(any Error) function gives users the option to manually report initialization errors in their closure handler. Although this should ideally happen implicitly like it currently does in v1, we believe this is a small compromise in comparison to the benefits gained in now being able to cleanly manage the lifecycles of required services in a structured concurrency manner. Assume we want to load a secret for the Lambda function from a secret vault first. If this fails, we want to report the error to the control plane: Codable support The LambdaHandler and LambdaWithBackgroundProcessingHandler protocols abstract away encoding\/decoding logic from the conformers as they are generic over custom Event and Output types. We introduce two adapters LambdaHandlerAdapter and CodableLambdaAdapter that implement the encoding\/decoding logic and in turn allow the respective handlers to conform to StreamingLambdaHandler. LambdaHandlerAdapter Any handler conforming to LambdaHandler can be conformed to LambdaWithBackgroundProcessingHandler through LambdaHandlerAdapter. LambdaCodableAdapter LambdaCodableAdapter accepts any generic underlying handler conforming to LambdaWithBackgroundProcessingHandler. It also accepts any encoder and decoder object conforming to the LambdaEventDecoder and LambdaOutputEncoder protocols: LambdaEventDecoder and LambdaOutputEncoder protocols We provide conformances for Foundation’s JSONDecoder to LambdaEventDecoder and JSONEncoder to LambdaOutputEncoder. LambdaCodableAdapter implements its handle() method by: Decoding the ByteBuffer event into the generic Event type. Wrapping the LambdaResponseStreamWriter with a concrete LambdaResponseWriter such that calls to LambdaResponseWriters write(_:) are mapped to LambdaResponseStreamWriters writeAndFinish(_:). Note that the argument to LambdaResponseWriters write(_:) is a generic Output object whereas LambdaResponseStreamWriters writeAndFinish(_:) requires a ByteBuffer. Therefore, the concrete implementation of LambdaResponseWriter also accepts an encoder. Its write(_:) function first encodes the generic Output object and then passes it to the underlying LambdaResponseStreamWriter. Passing the generic Event instance, the concrete LambdaResponseWriter, as well as the LambdaContext to the underlying handler’s handle() method. LambdaCodableAdapter can implement encoding\/decoding for any handler conforming to LambdaWithBackgroundProcessingHandler if Event is Decodable and the Output is Encodable or Void, meaning that the encoding\/decoding stubs do not need to be implemented by the user. Handler as a Closure To create a Lambda function using the current API, a user first has to create an object and conform it to one of the handler protocols by implementing the initializer and the handle(...) function. Now that LambdaRuntime is public, this verbosity can very easily be simplified. ClosureHandler This handler is generic over any Event type conforming to Decodable and any Output type conforming to Encodable or Void. Given that ClosureHandler conforms to LambdaHandler: We can extend the LambdaRuntime initializer such that it accepts a closure as an argument. Within the initializer, the closure handler is wrapped with LambdaCodableAdapter. We can now significantly reduce the verbosity and leverage Swift’s trailing closure syntax to cleanly create and run a Lambda function, abstracting away the decoding and encoding logic from the user: We also add a StreamingClosureHandler conforming to StreamingLambdaHandler for use-cases where the user wants to handle encoding\/decoding themselves: Alternatives considered [UInt8] instead of ByteBuffer We considered using [UInt8] instead of ByteBuffer in the base LambdaHandler API. We decided to use ByteBuffer for two reasons. 99% of use-cases will use the JSON codable API and will not directly get in touch with ByteBuffer anyway. For those users it does not matter if the base API uses ByteBuffer or [UInt8]. The incoming and outgoing data must be in the ByteBuffer format anyway, as Lambda uses SwiftNIO under the hood and SwiftNIO uses ByteBuffer in its APIs. By using ByteBuffer we can save a copies to and from [UInt8]. This will reduce the invocation time for all users. The base LambdaHandler API is most likely mainly being used by developers that want to integrate their web framework with Lambda (examples: Vapor, Hummingbird, …). Those developers will most likely prefer to get the data in the ByteBuffer format anyway, as their lower level networking stack also depends on SwiftNIO. Users create a LambdaResponse, that supports streaming instead of being passed a LambdaResponseStreamWriter Instead of passing the LambdaResponseStreamWriter in the invocation we considered a new type LambdaResponse, that users must return in the StreamingLambdaHandler. Its API would look like this: The StreamingLambdaHandler would look like this: There are pros and cons for the API that returns the LambdaResponses and there are pros and cons for the API that receives a LambdaResponseStreamWriter as a parameter. Concerning following structured concurrency principles the approach that receives a LambdaResponseStreamWriter as a parameter has benefits as the lifetime of the handle function is tied to the invocation runtime. The approach that returns a LambdaResponse splits the invocation into two separate function calls. First the handle method is invoked, second the LambdaResponse writer closure is invoked. This means that it is impossible to use Swift APIs that use with style lifecycle management patterns from before creating the response until sending the full response stream off. For example, users instrumenting their lambdas with Swift tracing likely can not use the withSpan API for the full lifetime of the request, if they return a streamed response. However, if it comes to consistency with the larger Swift on server ecosystem, the API that returns a LambdaResponse is likely the better choice. Hummingbird v2, OpenAPI and the new Swift gRPC v2 implementation all use this approach. This might be due to the fact that writing middleware becomes easier, if a Response is explicitly returned. We decided to implement the approach in which a LambdaResponseStreamWriter is passed to the function, since the approach in which a LambdaResponse is returned can trivially be built on top of it. This is not true vice versa. We welcome the discussion on this topic and are open to change our minds and API here. Adding a function `addBackgroundTask(_ body: sending @escaping () async -> ())` in `LambdaContext` Initially we proposed an explicit addBackgroundTask(_:) function in LambdaContext that users could call from their handler object to schedule a background task to be run after the result is reported to AWS. We received feedback that this approach for supporting background tasks does not exhibit structured concurrency, as code could still be in execution after leaving the scope of the handle(...) function. For handlers conforming to the StreamingLambdaHandler, addBackgroundTask(_:) was anyways unnecessary as background work could be executed in a structured concurrency manner within the handle(...) function after the call to LambdaResponseStreamWriter.finish(). For handlers conforming to the LambdaHandler protocol, we considered extending LambdaHandler with a performPostHandleWork(...) function that will be called after the handle function by the library. Users wishing to add background work can override this function in their LambdaHandler conforming object. Yet this poses difficulties when the user wishes to use any state created in the handle(...) function as part of the background work. In general, the most common use-case for this library will be to implement simple Lambda functions that do not have requirements for response streaming, nor to perform any background work after returning the output. To keep things easy for the common use-case, and with Swift’s principle of progressive disclosure of complexity in mind, we settled on three handler protocols: LambdaHandler: Most common use-case. JSON-in, JSON-out. Does not support background work execution. An intuitive handle(event: Event, context: LambdaContext) -> Output API that is simple to understand, i.e. users are not exposed to the concept of sending their response through a writer. LambdaHandler can be very cleanly implemented and used with LambdaRuntime, especially with ClosureHandler. LambdaWithBackgroundProcessingHandler: If users wish to augment their LambdaHandler with the ability to run background tasks, they can easily migrate. A user simply has to: Change the conformance to LambdaWithBackgroundProcessingHandler. Add an additional outputWriter: some LambdaResponseWriter argument to the handle function. Replace the return ... with outputWriter.write(...). Implement any background work after outputWriter.write(...). StreamingLambdaHandler: This is the base handler protocol which is intended to be used directly only for advanced use-cases. Users are provided the invocation event as a ByteBuffer and a LambdaResponseStreamWriter where the computed result (as ByteBuffer) can either be streamed (with repeated calls to write(_:)) or sent all at once (with a single call to writeAndFinish(_:)). After closing the LambdaResponseStreamWriter, any background work can be implemented. Making LambdaResponseStreamWriter and LambdaResponseWriter ~Copyable We initially proposed to make the LambdaResponseStreamWriter and LambdaResponseWriter protocols ~Copyable, with the functions that close the response having the consuming ownership keyword. This was so that the compiler could enforce the restriction of not being able to interact with the writer after the response stream has closed. However, non-copyable types do not compose nicely and add complexity for users. Further, for the compiler to actually enforce the consuming restrictions, user’s have to explicitly mark the writer argument as consuming in the handle function. Therefore, throwing appropriate errors to prevent abnormal interaction with the writers seems to be the simplest approach. A word about versioning We are aware that AWS Lambda Runtime has not reached a proper 1.0. We intend to keep the current implementation around at 1.0-alpha. We don’t want to change the current API without releasing a new major. We think there are lots of adopters out there that depend on the API in v1. Because of this we intend to release the proposed API here as AWS Lambda Runtime v2.","headings":["Overview","Motivation","Current Limitations","EventLoop interfaces","No ownership of the main() function","Non-trivial transition from SimpleLambdaHandler to LambdaHandler","Does not integrate well with swift-service-lifecycle in a structured concurrency manner","Verbose Codable support","New features","Support response streaming","Scheduling background work","Proposed Solution","async\/await-first API","Providing ownership of main() and support for swift-service-lifecycle","Simplifying Codable support","Detailed Solution","LambdaResponseStreamWriter","LambdaContext","Handlers","StreamingLambdaHandler","LambdaHandler:","LambdaWithBackgroundProcessingHandler:","Example Usage:","Handler Adapters","LambdaRuntime","Lambda","Codable support","LambdaHandlerAdapter","LambdaCodableAdapter","LambdaEventDecoder and LambdaOutputEncoder protocols","Handler as a Closure","ClosureHandler","Alternatives considered","[UInt8] instead of ByteBuffer","Users create a LambdaResponse, that supports streaming instead of being passed a LambdaResponseStreamWriter","Adding a function `addBackgroundTask(_ body: sending @escaping () async -> ())` in `LambdaContext`","Making LambdaResponseStreamWriter and LambdaResponseWriter ~Copyable","A word about versioning"],"location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/0001-v2-api"}},"title":"v2 API proposal for swift-aws-lambda-runtime","kind":"article"},{"rawIndexableTextContent":" ","summary":"","title":"Output","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","interfaceLanguage":"swift"}},"headings":[],"kind":"symbol"},{"title":"write(_:)","summary":"Write a response part into the stream. Bytes written are streamed continually.","headings":[],"kind":"symbol","rawIndexableTextContent":"Write a response part into the stream. Bytes written are streamed continually. The buffer to write.","location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)"},"type":"topLevelPage"}},{"rawIndexableTextContent":" ","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(handler:eventLoop:logger:)"}},"title":"init(handler:eventLoop:logger:)","summary":"","headings":[],"kind":"symbol"},{"headings":[],"rawIndexableTextContent":"The base handler protocol that receives a ByteBuffer representing the incoming event and returns the response as a ByteBuffer too. This handler protocol supports response streaming. Bytes can be streamed outwards through the LambdaResponseStreamWriter passed as an argument in the handle(_:responseWriter:context:) function. Background work can also be executed after returning the response. After closing the response stream by calling finish() or writeAndFinish(_:), the handle(_:responseWriter:context:) function is free to execute any background work. ","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","interfaceLanguage":"swift"}},"title":"StreamingLambdaHandler","kind":"symbol","summary":"The base handler protocol that receives a ByteBuffer representing the incoming event and returns the response as a ByteBuffer too. This handler protocol supports response streaming. Bytes can be streamed outwards through the LambdaResponseStreamWriter passed as an argument in the handle(_:responseWriter:context:) function. Background work can also be executed after returning the response. After closing the response stream by calling finish() or writeAndFinish(_:), the handle(_:responseWriter:context:) function is free to execute any background work."},{"kind":"article","headings":["Overview","Prerequisites","Choosing the AWS Region where to deploy","The Lambda execution IAM role","Deploy your Lambda function with the AWS Console","Create the function","Invoke the function","Delete the function","Deploy your Lambda function with the AWS Command Line Interface (CLI)","Create the function","Invoke the function","Delete the function","Deploy your Lambda function with AWS Serverless Application Model (SAM)","Create the function","Invoke the function","Delete the function","Deploy your Lambda function with the AWS Cloud Development Kit (CDK)","Create a CDK project","Deploy the infrastructure","Invoke your Lambda function","Delete the infrastructure","Third-party tools"],"title":"Deploying your Swift Lambda functions","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Deployment"}},"summary":"Learn how to deploy your Swift Lambda functions to AWS.","rawIndexableTextContent":"Learn how to deploy your Swift Lambda functions to AWS. Overview There are multiple ways to deploy your Swift code to AWS Lambda. The very first time, you’ll probably use the AWS Console to create a new Lambda function and upload your code as a zip file. However, as you iterate on your code, you’ll want to automate the deployment process. To take full advantage of the cloud, we recommend using Infrastructure as Code (IaC) tools like the AWS Serverless Application Model (SAM) or AWS Cloud Development Kit (CDK). These tools allow you to define your infrastructure and deployment process as code, which can be version-controlled and automated. In this section, we show you how to deploy your Swift Lambda functions using different AWS Tools. Alternatively, you might also consider using popular third-party tools like Serverless Framework, Terraform, or Pulumi to deploy Lambda functions and create and manage AWS infrastructure. Here is the content of this guide: Prerequisites Choosing the AWS Region where to deploy The Lambda execution IAM role Deploy your Lambda function with the AWS Console Deploy your Lambda function with the AWS Command Line Interface (CLI) Deploy your Lambda function with AWS Serverless Application Model (SAM) Deploy your Lambda function with AWS Cloud Development Kit (CDK) Third-party tools Prerequisites Your AWS Account To deploy a Lambda function on AWS, you need an AWS account. If you don’t have one yet, you can create a new account at aws.amazon.com. It takes a few minutes to register. A credit card is required. We do not recommend using the root credentials you entered at account creation time for day-to-day work. Instead, create an Identity and Access Manager (IAM) user with the necessary permissions and use its credentials. Follow the steps in Create an IAM User in your AWS account. We suggest to attach the AdministratorAccess policy to the user for the initial setup. For production workloads, you should follow the principle of least privilege and grant only the permissions required for your users. The ‘AdministratorAccess’ gives the user permission to manage all resources on the AWS account. AWS Security Credentials AWS Security Credentials are required to access the AWS console, AWS APIs, or to let tools access your AWS account. AWS Security Credentials can be long-term credentials (for example, an Access Key ID and a Secret Access Key attached to your IAM user) or temporary credentials obtained via other AWS API, such as when accessing AWS through single sign-on (SSO) or when assuming an IAM role. To follow the steps in this guide, you need to know your AWS Access Key ID and Secret Access Key. If you don’t have them, you can create them in the AWS Management Console. Follow the steps in Creating access keys for an IAM user. When you use SSO with your enterprise identity tools (such as Microsoft entra ID –formerly Active Directory–, Okta, and others) or when you write scripts or code assuming an IAM role, you receive temporary credentials. These credentials are valid for a limited time, have a limited scope, and are rotated automatically. You can use them in the same way as long-term credentials. In addition to an AWS Access Key and Secret Access Key, temporary credentials include a session token. Here is a typical set of temporary credentials (redacted for security). A Swift Lambda function to deploy. You need a Swift Lambda function to deploy. If you don’t have one yet, you can use one of the examples in the Examples directory. Compile and package the function using the following command This command creates a ZIP file with the compiled Swift code. The ZIP file is located in the .build\/plugins\/AWSLambdaPackager\/outputs\/AWSLambdaPackager\/MyLambda\/MyLambda.zip folder. The name of the ZIP file depends on the target name you entered in the Package.swift file. [!NOTE] When building on Linux, your current user must have permission to use docker. On most Linux distributions, you can do so by adding your user to the docker group with the following command: sudo usermod -aG docker $USER. You must log out and log back in for the changes to take effect. Choosing the AWS Region where to deploy AWS Global infrastructure spans over 34 geographic Regions (and continuously expanding). When you create a resource on AWS, such as a Lambda function, you have to select a geographic region where the resource will be created. The two main factors to consider to select a Region are the physical proximity with your users and geographical compliance. Physical proximity helps you reduce the network latency between the Lambda function and your customers. For example, when the majority of your users are located in South-East Asia, you might consider deploying in the Singapore, the Malaysia, or Jakarta Region. Geographical compliance, also known as data residency compliance, involves following location-specific regulations about how and where data can be stored and processed. The Lambda execution IAM role A Lambda execution role is an AWS Identity and Access Management (IAM) role that grants your Lambda function the necessary permissions to interact with other AWS services and resources. Think of it as a security passport that determines what your function is allowed to do within AWS. For example, if your Lambda function needs to read files from Amazon S3, write logs to Amazon CloudWatch, or access an Amazon DynamoDB table, the execution role must include the appropriate permissions for these actions. When you create a Lambda function, you must specify an execution role. This role contains two main components: a trust policy that allows the Lambda service itself to assume the role, and permission policies that determine what AWS resources the function can access. By default, Lambda functions get basic permissions to write logs to CloudWatch Logs, but any additional permissions (like accessing S3 buckets or sending messages to SQS queues) must be explicitly added to the role’s policies. Following the principle of least privilege, it’s recommended to grant only the minimum permissions necessary for your function to operate, helping maintain the security of your serverless applications. Deploy your Lambda function with the AWS Console In this section, we deploy the HelloWorld example function using the AWS Console. The HelloWorld function is a simple function that takes a String as input and returns a String. Authenticate on the AWS console using your IAM username and password. On the top right side, select the AWS Region where you want to deploy, then navigate to the Lambda section. Create the function Select Create a function to create a function. Select Author function from scratch. Enter a Function name (HelloWorld) and select Amazon Linux 2 as Runtime. Select the architecture. When you compile your Swift code on a x84_64 machine, such as an Intel Mac, select x86_64. When you compile your Swift code on an Arm machine, such as the Apple Silicon M1 or more recent, select arm64. Select Create function On the right side, select Upload from and select .zip file. Select the zip file created with the swift package archive --allow-network-connections docker command as described in the Prerequisites section. Select Save You’re now ready to test your function. Invoke the function Select the Test tab in the console and prepare a payload to send to your Lambda function. In this example, you’ve deployed the HelloWorld example function. As explained, the function takes a String as input and returns a String. we will therefore create a test event with a JSON payload that contains a String. Select Create new event. Enter an Event name. Enter \"Swift on Lambda\" as Event JSON. Note that the payload must be a valid JSON document, hence we use surrounding double quotes (\"). Select Test on the upper right side of the screen. The response of the invocation and additional meta data appear in the green section of the page. You can see the response from the Swift code: Hello Swift on Lambda. The function consumed 109.60ms of execution time, out of this 83.72ms where spent to initialize this new runtime. This initialization time is known as Lambda cold start time. Lambda cold start time refers to the initial delay that occurs when a Lambda function is invoked for the first time or after being idle for a while. Cold starts happen because AWS needs to provision and initialize a new container, load your code, and start your runtime environment (in this case, the Swift runtime). This delay is particularly noticeable for the first invocation, but subsequent invocations (known as “warm starts”) are typically much faster because the container and runtime are already initialized and ready to process requests. Cold starts are an important consideration when architecting serverless applications, especially for latency-sensitive workloads. Usually, compiled languages, such as Swift, Go, and Rust, have shorter cold start times compared to interpreted languages, such as Python, Java, Ruby, and Node.js. AWS lambda charges usage per number of invocations and the CPU time, rounded to the next millisecond. AWS Lambda offers a generous free-tier of 1 million invocation each month and 400,000 GB-seconds of compute time per month. See Lambda pricing for the details. Delete the function When you’re finished with testing, you can delete the Lambda function and the IAM execution role that the console created automatically. While you are on the HelloWorld function page in the AWS console, select Actions, then Delete function in the menu on the top-right part of the page. Then, navigate to the IAM section of the AWS console. Select Roles on the right-side menu and search for HelloWorld. The console appended some random characters to role name. The name you see on your console is different that the one on the screenshot. Select the HelloWorld-role-xxxx role and select Delete. Confirm the deletion by entering the role name again, and select Delete on the confirmation box. Deploy your Lambda function with the AWS Command Line Interface (CLI) You can deploy your Lambda function using the AWS Command Line Interface (CLI). The CLI is a unified tool to manage your AWS services from the command line and automate your operations through scripts. The CLI is available for Windows, macOS, and Linux. Follow the installation and configuration instructions in the AWS CLI User Guide. In this example, we’re building the HelloWorld example from the Examples directory. Create the function To create a function, you must first create the function execution role and define the permission. Then, you create the function with the create-function command. The command assumes you’ve already created the ZIP file with the swift package archive --allow-network-connections docker command, as described in the Prerequisites section. The --architectures flag is only required when you build the binary on an Apple Silicon machine (Apple M1 or more recent). It defaults to x64. To update the function, use the update-function-code command after you’ve recompiled and archived your code again with the swift package archive command. Invoke the function Use the invoke-function command to invoke the function. You can pass a well-formed JSON payload as input to the function. The payload must be encoded in base64. The CLI returns the status code and stores the response in a file. Delete the function To cleanup, first delete the Lambda funtion, then delete the IAM role. Deploy your Lambda function with AWS Serverless Application Model (SAM) AWS Serverless Application Model (SAM) is an open-source framework for building serverless applications. It provides a simplified way to define the Amazon API Gateway APIs, AWS Lambda functions, and Amazon DynamoDB tables needed by your serverless application. You can define your serverless application in a single file, and SAM will use it to deploy your function and all its dependencies. To use SAM, you need to install the SAM CLI on your machine. The SAM CLI provides a set of commands to package, deploy, and manage your serverless applications. Use SAM when you want to deploy more than a Lambda function. SAM helps you to create additional resources like an API Gateway, an S3 bucket, or a DynamoDB table, and manage the permissions between them. Create the function We assume your Swift function is compiled and packaged, as described in the Prerequisites section. When using SAM, you describe the infrastructure you want to deploy in a YAML file. The file contains the definition of the Lambda function, the IAM role, and the permissions needed by the function. The SAM CLI uses this file to package and deploy your function. You can create a SAM template to define a REST API implemented by AWS API Gateway and a Lambda function with the following command In this example, the Lambda function must accept an APIGateway v2 JSON payload as input parameter and return a valid APIGAteway v2 JSON response. See the example code in the APIGateway example README file. To deploy the function with SAM, use the sam deploy command. The very first time you deploy a function, you should use the --guided flag to configure the deployment. The command will ask you a series of questions to configure the deployment. Here is the command to deploy the function with SAM: To update your function or any other AWS service defined in your YAML file, you can use the sam deploy command without the --guided flag. Invoke the function SAM allows you to invoke the function locally and remotely. Local invocations allows you to test your code before uploading it. It requires docker to run. If you’ve previously authenticated to Amazon ECR Public and your auth token has expired, you may receive an authentication error when attempting to do unauthenticated docker pulls from Amazon ECR Public. To resolve this issue, it may be necessary to run docker logout public.ecr.aws to avoid the error. This will result in an unauthenticated pull. For more information, see Authentication issues. Remote invocations are done with the sam remote invoke command. SAM allows you to access the function logs from Amazon Cloudwatch. You can also tail the logs with the -t, --tail flag. Delete the function SAM allows you to delete your function and all infrastructure that is defined in the YAML template with just one command. Deploy your Lambda function with the AWS Cloud Development Kit (CDK) The AWS Cloud Development Kit is an open-source software development framework to define cloud infrastructure in code and provision it through AWS CloudFormation. The CDK provides high-level constructs that preconfigure AWS resources with best practices, and you can use familiar programming languages like TypeScript, Javascript, Python, Java, C#, and Go to define your infrastructure. To use the CDK, you need to install the CDK CLI on your machine. The CDK CLI provides a set of commands to manage your CDK projects. Use the CDK when you want to define your infrastructure in code and manage the deployment of your Lambda function and other AWS services. This example deploys the [APIGateway]((https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime\/blob\/main\/Examples\/APIGateway\/) example code. It comprises a Lambda function that implements a REST API and an API Gateway to expose the function over HTTPS. Create a CDK project To create a new CDK project, use the cdk init command. The command creates a new directory with the project structure and the necessary files to define your infrastructure. In this example, the code to create a Swift Lambda function with the CDK is written in TypeScript. The following code creates a new Lambda function with the swift runtime. It requires the @aws-cdk\/aws-lambda package to define the Lambda function. You can install the dependency with the following command: Then, in the lib folder, create a new file named swift-lambda-stack.ts with the following content: The code assumes you already built and packaged the APIGateway Lambda function with the swift package archive --allow-network-connections docker command, as described in the Prerequisites section. You can write code to add an API Gateway to invoke your Lambda function. The following code creates an HTTP API Gateway that triggers the Lambda function. Deploy the infrastructure To deploy the infrastructure, type the following commands. Invoke your Lambda function To invoke the Lambda function, use this curl command line. Be sure to replace the URL with the API Gateway endpoint returned in the previous step. This should print a JSON similar to If you have jq installed, you can use it to pretty print the output. Delete the infrastructure When done testing, you can delete the infrastructure with this command. Third-party tools We welcome contributions to this section. If you have experience deploying Swift Lambda functions with third-party tools like Serverless Framework, Terraform, or Pulumi, please share your knowledge with the community."},{"summary":"The protocol a decoder must conform to so that it can be used with LambdaCodableAdapter to decode incoming ByteBuffer events.","rawIndexableTextContent":"The protocol a decoder must conform to so that it can be used with LambdaCodableAdapter to decode incoming ByteBuffer events. ","kind":"symbol","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder","interfaceLanguage":"swift"}},"title":"LambdaEventDecoder","headings":[]},{"rawIndexableTextContent":"For invocations from the AWS Mobile SDK, data about the client application and device. ","kind":"symbol","summary":"For invocations from the AWS Mobile SDK, data about the client application and device.","title":"clientContext","location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/clientContext"},"type":"topLevelPage"},"headings":[]},{"rawIndexableTextContent":"Initialize an instance with a LambdaHandler defined in the form of a closure with a Void return type, an encoder, and a decoder. The decoder object that will be used to decode the incoming ByteBuffer event into the generic Event type. The handler in the form of a closure.","headings":[],"kind":"symbol","location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(decoder:body:)","interfaceLanguage":"swift"},"type":"topLevelPage"},"title":"init(decoder:body:)","summary":"Initialize an instance with a LambdaHandler defined in the form of a closure with a Void return type, an encoder, and a decoder."},{"summary":"Adapts a LambdaHandler conforming handler to conform to LambdaWithBackgroundProcessingHandler.","title":"LambdaHandlerAdapter","kind":"symbol","headings":[],"location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter"},"type":"topLevelPage"},"rawIndexableTextContent":"Adapts a LambdaHandler conforming handler to conform to LambdaWithBackgroundProcessingHandler. "},{"location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-9o0yg","interfaceLanguage":"swift"}},"headings":[],"summary":"Initialize with a closure handler over a generic Input type, and a Void Output.","title":"init(body:)","rawIndexableTextContent":"Initialize with a closure handler over a generic Input type, and a Void Output. The handler function written as a closure.","kind":"symbol"},{"kind":"symbol","summary":"Initialize an instance with a LambdaHandler defined in the form of a closure with a non-Void return type, an encoder, and a decoder.","title":"init(encoder:decoder:body:)","headings":[],"rawIndexableTextContent":"Initialize an instance with a LambdaHandler defined in the form of a closure with a non-Void return type, an encoder, and a decoder. The encoder object that will be used to encode the generic Output into a ByteBuffer. The decoder object that will be used to decode the incoming ByteBuffer event into the generic Event type. The handler in the form of a closure.","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(encoder:decoder:body:)","interfaceLanguage":"swift"}}},{"location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/Output","interfaceLanguage":"swift"}},"kind":"symbol","rawIndexableTextContent":"Inherited from LambdaOutputEncoder.Output. ","title":"VoidEncoder.Output","summary":"Inherited from LambdaOutputEncoder.Output.","headings":[]},{"summary":"The ARN of the Lambda function, version, or alias that’s specified in the invocation.","title":"invokedFunctionARN","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/invokedFunctionARN"}},"headings":[],"rawIndexableTextContent":"The ARN of the Lambda function, version, or alias that’s specified in the invocation. ","kind":"symbol"},{"title":"Event","headings":[],"rawIndexableTextContent":"Generic input type. The body of the request sent to Lambda will be decoded into this type for the handler to consume. ","summary":"Generic input type. The body of the request sent to Lambda will be decoded into this type for the handler to consume.","kind":"symbol","location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","interfaceLanguage":"swift"},"type":"topLevelPage"}},{"rawIndexableTextContent":" AWS Lambda is a compute service that lets you run code without provisioning or managing servers. Lambda runs your code on a high-availability compute infrastructure and performs all of the administration of the compute resources, including server and operating system maintenance, capacity provisioning and automatic scaling, and logging. With Lambda, you can run code for virtually any type of application or backend service. All you need to do is supply your code in one of the languages that Lambda supports, including Swift. You organize your code into Lambda functions. Lambda runs your function only when needed and scales automatically, from a few requests per day to thousands per second. You pay only for the compute time that you consume—there is no charge when your code is not running. For more information, see AWS Lambda Pricing. Lambda is a highly available service. For more information, see the AWS Lambda Service Level Agreement. When to use AWS Lambda Lambda is an ideal compute service for many application scenarios, as long as you can run your application code using the Lambda standard runtime environment and within the resources that Lambda provides. For example, you can use Lambda for: Mobile backends: Build backends using Lambda and Amazon API Gateway to authenticate and process API requests. Use AWS Amplify to easily integrate your backend with your iOS, Android, Web, and React Native front ends. Web applications: Combine Lambda with other AWS services to build powerful web applications that automatically scale up and down and run in a highly available configuration across multiple data centers. File processing: Use Amazon Simple Storage Service (Amazon S3) to trigger Lambda data processing in real time after an upload. Stream processing: Use Lambda and Amazon Kinesis to process real-time streaming data for application activity tracking, transaction order processing, click stream analysis, data cleansing, log filtering, indexing, social media analysis, Internet of Things (IoT) device data telemetry, and metering. IoT backends: Build serverless backends using Lambda to handle web, mobile, IoT, and third-party API requests. When using Lambda, you are responsible only for your code. Lambda manages the compute fleet that offers a balance of memory, CPU, network, and other resources to run your code. Because Lambda manages these resources, you cannot log in to compute instances or customize the operating system on provided runtimes. Lambda performs operational and administrative activities on your behalf, including managing capacity, monitoring, and logging your Lambda functions.","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda"}},"title":"What is AWS Lambda","summary":"","headings":["When to use AWS Lambda"],"kind":"article"},{"title":"handle(_:responseWriter:context:)","headings":["Discussion"],"summary":"A handle(_:responseWriter:context:) wrapper.","kind":"symbol","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/handle(_:responseWriter:context:)","interfaceLanguage":"swift"}},"rawIndexableTextContent":"A handle(_:responseWriter:context:) wrapper. Discussion event: The received event. outputWriter: The writer to write the computed response to. context: The LambdaContext containing the invocation’s metadata."},{"kind":"symbol","summary":"","location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/run()","interfaceLanguage":"swift"},"type":"topLevelPage"},"title":"run()","rawIndexableTextContent":" ","headings":[]},{"summary":"The AWS X-Ray tracing header.","title":"traceID","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/traceID"}},"kind":"symbol","headings":[],"rawIndexableTextContent":"The AWS X-Ray tracing header. "},{"title":"LambdaWithBackgroundProcessingHandler","summary":"This protocol is exactly like LambdaHandler, with the only difference being the added support for executing background work after the result has been sent to the AWS Lambda control plane. This is achieved by not having a return type in the handle function. The output is instead written into a LambdaResponseWriterthat is passed in as an argument, meaning that the handle(_:outputWriter:context:) function is then free to implement any background work after the result has been sent to the AWS Lambda control plane.","location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"},"type":"topLevelPage"},"headings":[],"rawIndexableTextContent":"This protocol is exactly like LambdaHandler, with the only difference being the added support for executing background work after the result has been sent to the AWS Lambda control plane. This is achieved by not having a return type in the handle function. The output is instead written into a LambdaResponseWriterthat is passed in as an argument, meaning that the handle(_:outputWriter:context:) function is then free to implement any background work after the result has been sent to the AWS Lambda control plane. ","kind":"symbol"},{"location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/init(body:)","interfaceLanguage":"swift"}},"kind":"symbol","summary":"Initialize an instance from a handler function in the form of a closure.","headings":[],"rawIndexableTextContent":"Initialize an instance from a handler function in the form of a closure. The handler function written as a closure.","title":"init(body:)"},{"rawIndexableTextContent":"Encode the generic type Output the handler has returned into a ByteBuffer. The object to encode into a ByteBuffer. The ByteBuffer where the encoded value will be written to.","location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/encode(_:into:)","interfaceLanguage":"swift"},"type":"topLevelPage"},"headings":[],"title":"encode(_:into:)","kind":"symbol","summary":"Encode the generic type Output the handler has returned into a ByteBuffer."},{"kind":"symbol","title":"ClosureHandler","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","interfaceLanguage":"swift"}},"summary":"A LambdaHandler conforming handler object that can be constructed with a closure. Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax.","headings":[],"rawIndexableTextContent":"A LambdaHandler conforming handler object that can be constructed with a closure. Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax. "},{"kind":"symbol","summary":"","headings":[],"rawIndexableTextContent":" ","location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder","interfaceLanguage":"swift"},"type":"topLevelPage"},"title":"VoidEncoder"},{"kind":"symbol","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder\/decode(_:from:)"}},"title":"decode(_:from:)","rawIndexableTextContent":"Decode the ByteBuffer representing the received event into the generic Event type the handler will receive. The type of the object to decode the buffer into. The buffer to be decoded. Return Value An object containing the decoded data.","summary":"Decode the ByteBuffer representing the received event into the generic Event type the handler will receive.","headings":["Return Value"]},{"title":"Output","kind":"symbol","summary":"Generic output type. This is the return type of the handle(_:context:) function.","rawIndexableTextContent":"Generic output type. This is the return type of the handle(_:context:) function. ","headings":[],"location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","interfaceLanguage":"swift"},"type":"topLevelPage"}},{"kind":"symbol","headings":["Return Value"],"location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},"type":"topLevelPage"},"summary":"Implement the business logic of the Lambda function here.","rawIndexableTextContent":"Implement the business logic of the Lambda function here. The generic Event object representing the invocation’s input data. The LambdaContext containing the invocation’s metadata. Return Value A generic Output object representing the computed result.","title":"handle(_:context:)"},{"headings":[],"title":"handle(_:responseWriter:context:)","location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/handle(_:responseWriter:context:)"},"type":"topLevelPage"},"summary":"Calls the provided self.body closure with the ByteBuffer invocation event, the LambdaResponseStreamWriter, and the LambdaContext","kind":"symbol","rawIndexableTextContent":"Calls the provided self.body closure with the ByteBuffer invocation event, the LambdaResponseStreamWriter, and the LambdaContext The invocation’s input data. A LambdaResponseStreamWriter to write the invocation’s response to. If no response or error is written to responseWriter an error will be reported to the invoker. The LambdaContext containing the invocation’s metadata."},{"headings":["Discussion"],"rawIndexableTextContent":"Logger to log with. Discussion The LogLevel can be configured using the LOG_LEVEL environment variable.","kind":"symbol","title":"logger","location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/logger"},"type":"topLevelPage"},"summary":"Logger to log with."},{"rawIndexableTextContent":"The default EventLoop the Lambda is scheduled on. ","kind":"symbol","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/defaultEventLoop","interfaceLanguage":"swift"}},"summary":"The default EventLoop the Lambda is scheduled on.","title":"defaultEventLoop","headings":[]},{"rawIndexableTextContent":"For invocations from the AWS Mobile SDK, data about the Amazon Cognito identity provider. ","kind":"symbol","location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/cognitoIdentity","interfaceLanguage":"swift"},"type":"topLevelPage"},"title":"cognitoIdentity","headings":[],"summary":"For invocations from the AWS Mobile SDK, data about the Amazon Cognito identity provider."},{"title":"init(handler:)","headings":[],"kind":"symbol","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/init(handler:)","interfaceLanguage":"swift"}},"rawIndexableTextContent":"Initializes an instance given a concrete handler. The LambdaHandler conforming handler that is to be adapted to LambdaWithBackgroundProcessingHandler.","summary":"Initializes an instance given a concrete handler."},{"summary":"","location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/getRemainingTime()"},"type":"topLevelPage"},"title":"getRemainingTime()","headings":[],"rawIndexableTextContent":" ","kind":"symbol"},{"summary":"A writer object to write the Lambda response stream into. The HTTP response is started lazily. before the first call to write(_:) or writeAndFinish(_:).","kind":"symbol","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"}},"rawIndexableTextContent":"A writer object to write the Lambda response stream into. The HTTP response is started lazily. before the first call to write(_:) or writeAndFinish(_:). ","headings":[],"title":"LambdaResponseStreamWriter"},{"title":"LambdaRuntime","rawIndexableTextContent":" ","location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime"},"type":"topLevelPage"},"kind":"symbol","headings":[],"summary":""},{"headings":[],"summary":"Inherited from LambdaResponseWriter.write(_:).","location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/write(_:)"},"type":"topLevelPage"},"title":"write(_:)","rawIndexableTextContent":"Inherited from LambdaResponseWriter.write(_:). ","kind":"symbol"},{"title":"finish()","summary":"End the response stream and the underlying HTTP response.","rawIndexableTextContent":"End the response stream and the underlying HTTP response. ","headings":[],"kind":"symbol","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","interfaceLanguage":"swift"}}},{"kind":"symbol","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","interfaceLanguage":"swift"}},"rawIndexableTextContent":"The protocol an encoder must conform to so that it can be used with LambdaCodableAdapter to encode the generic Output object into a ByteBuffer. ","headings":[],"title":"LambdaOutputEncoder","summary":"The protocol an encoder must conform to so that it can be used with LambdaCodableAdapter to encode the generic Output object into a ByteBuffer."},{"location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/env(_:)","interfaceLanguage":"swift"},"type":"topLevelPage"},"kind":"symbol","title":"env(_:)","headings":[],"rawIndexableTextContent":"Utility to access\/read environment variables ","summary":"Utility to access\/read environment variables"},{"headings":[],"rawIndexableTextContent":"Initialize with a closure handler over generic Input and Output types. The handler function written as a closure.","kind":"symbol","location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-5sz8r","interfaceLanguage":"swift"},"type":"topLevelPage"},"title":"init(body:)","summary":"Initialize with a closure handler over generic Input and Output types."},{"location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Event","interfaceLanguage":"swift"}},"headings":[],"title":"Event","summary":"Generic input type. The body of the request sent to Lambda will be decoded into this type for the handler to consume.","rawIndexableTextContent":"Generic input type. The body of the request sent to Lambda will be decoded into this type for the handler to consume. ","kind":"symbol"},{"summary":"Implement the business logic of the Lambda function here.","kind":"symbol","title":"handle(_:outputWriter:context:)","rawIndexableTextContent":"Implement the business logic of the Lambda function here. The generic Event object representing the invocation’s input data. The writer to send the computed response to. A call to outputWriter.write(_:) will return the response to the AWS Lambda response endpoint. Any background work can then be executed before returning. The LambdaContext containing the invocation’s metadata.","headings":[],"location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","interfaceLanguage":"swift"},"type":"topLevelPage"}},{"title":"Getting Started Quickly","rawIndexableTextContent":"Learn how to create your first project in 3 minutes. Overview Follow these instructions to get a high-level overview of the steps to write, test, and deploy your first Lambda function written in Swift. For a detailed step-by-step instruction, follow the tutorial instead. Your First Lambda Function Written in Swift For the impatient, keep reading. High-level instructions Follow these 6 steps to write, test, and deploy a Lambda function in Swift. Create a Swift project for an executable target Add dependencies on AWSLambdaRuntime library Write your function code. Create an instance of LambdaRuntime and pass a function as a closure. The function has this signature: (_: Event, context: LambdaContext) async throws -> Output (as defined in the LambdaHandler protocol). Event must be Decodable. Output must be Encodable. If your Lambda function is invoked by another AWS service, use the AWSLambdaEvent library at https:\/\/github.com\/swift-server\/swift-aws-lambda-events to represent the input event. Finally, call runtime.run() to start the event loop. Test your code locally Build and package your code for AWS Lambda AWS Lambda runtime runs on Amazon Linux. You must compile your code for Amazon Linux. Be sure to have Docker installed for this step. Deploy on AWS Lambda Be sure to have an AWS Account to follow these steps. Connect to the AWS Console Navigate to Lambda Create a function Select Provide your own bootstrap on Amazon Linux 2 as Runtime Select an Architecture that matches the one of the machine where you build the code. Select x86_64 when you build on Intel-based Macs or arm64 for Apple Silicon-based Macs. Upload the ZIP create during step 5 Select the Test tab, enter a test event such as {\"name\": \"Seb\", \"age\": 50} and select Test If the test succeeds, you will see the result: {\"greetings\":\"Hello Seb. You look younger than your age.\"}. Congratulations 🎉! You just wrote, test, build, and deployed a Lambda function written in Swift.","summary":"Learn how to create your first project in 3 minutes.","headings":["Overview","High-level instructions"],"kind":"article","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/quick-setup","interfaceLanguage":"swift"}}},{"location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview","interfaceLanguage":"swift"},"type":"topLevelPage"},"rawIndexableTextContent":" This tutorial helps you to get started writing your first AWS Lambda function in Swift. You will use the AWSLambdaRuntime package to write code that can be deployed on AWS Lambda. You will learn three things: How to implement simple Lambda function and test it locally How to build a Lambda function for deployment on AWS How to deploy your Lambda function on AWS and invoke it It’s a beginners’ tutorial. The business logic of the function is very simple, it computes the square of a number passed as input parameter. This simplicity allows you to focus on the project setup and the deployment. You will deploy your code using the AWS Management Console. It is the easiest way to get started with AWS Lambda. If you have any questions or recommendations, please leave your feedback on GitHub so that you can get your question answered and this tutorial can be improved. The following instructions were recorded on January 2025 and the AWS Management Console may have changed since then. Feel free to raise an issue if you spot differences with our screenshots","kind":"article","title":"Overview","summary":"","headings":[]},{"rawIndexableTextContent":" ","title":"init()","summary":"","kind":"symbol","headings":[],"location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/init()","interfaceLanguage":"swift"}}},{"headings":[],"title":"LambdaCodableResponseWriter","rawIndexableTextContent":"A LambdaResponseStreamWriter wrapper that conforms to LambdaResponseWriter. ","location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter","interfaceLanguage":"swift"},"type":"topLevelPage"},"summary":"A LambdaResponseStreamWriter wrapper that conforms to LambdaResponseWriter.","kind":"symbol"},{"location":{"reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","interfaceLanguage":"swift"},"type":"topLevelPage"},"headings":[],"summary":"Adapts a LambdaWithBackgroundProcessingHandler conforming handler to conform to StreamingLambdaHandler.","kind":"symbol","title":"LambdaCodableAdapter","rawIndexableTextContent":"Adapts a LambdaWithBackgroundProcessingHandler conforming handler to conform to StreamingLambdaHandler. "},{"rawIndexableTextContent":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console Learn how to compile your code to run it on Amazon Linux. AWS Lambda runs on top of Amazon Linux 2. You must therefore compile your code for Linux. The AWS Lambda Runtime for Swift uses Docker to do so. Once the code is compiled, it must be assembled in a ZIP file before being deployed in the cloud. The AWS Lambda Runtime for Swift provides a Swift Package Manager plugin to compile and zip your Lambda function in one simple step. Be sure Docker is started on your machine. On macOS, you can check the Docker icon in the menu bar. In a terminal, invoke the archive command to build and zip your Lambda function. The plugin starts a Docker container running Amazon Linux 2 and compile your Lambda function code. It then creates a zip file. When everything goes well, you should see an output similar to this one. Copy the generated zip files to your Desktop or Download directory for easy access. I choose the Desktop. Learn how to create a Lambda function using the AWS Management Console and to deploy your zip file You will now deploy your code to AWS Lambda. To complete the remaining steps in this tutorial, you must have an AWS Account. You can create an AWS Account by following these instructions. Open a web browser and navigate to https:\/\/console.aws.amazon.com. If you have an IAM user ID and password, select IAM User, otherwise proceed by entering your Root user email address and password. For this tutorial, I sign in using my IAM User ID. On the top right side of the console, select the AWS Region where you want to deploy your Lambda function. You typically choose a Region close to your customers to minimize the network latency. For this demo, I selected Oregon (us-west-2) AWS has multiple Regions across all continents. You can learn more about AWS Global Infrastructure here. On the top left side of the console, select the Lambda service to navigate to the Lambda section of the console. On the top right side of the Lambda page, select Create function. Enter a Function name. I choose PalindromeLambda. Select Provide your own bootstrap on Amazon Linux 2 as Runtime. And select arm64 as Architecture when you build on a Mac with Apple Silicon. Leave all other parameter as default, and select Create function on the bottom right part. The runtime architecture for Lambda (arm64 or x86_64) must match the one of the machine where you compiled the code. When you compiled on an Intel-based Mac, use x86_64. When compiling on an Apple Silicon-based Mac select arm64. On the next screen, select .zip file from the Upload from selection box on the middle right part of the screen. Select the zip file that was generated earlier and select Save. To verify everything works well, create a test event and invoke the function from the Test tab in the console. Enter MyTestEvent as Event name. Enter {\"text\": \"Was it a car or a cat I saw?\"} as Event JSON. Then, select Test. When the invocation succeeds, you can see the execution details and the result: { \"message\": \"Your text is a palindrome\",\"isPalindrome\": true, \"text\": \"Was it a car or a cat I saw?\"}. The execution result also shares the execution duration, the actual memory consumed and the logs generated by the function. These are important data to help you to fine-tune your function. Providing the function with more memory will also give it more compute power, resulting in lower execution time. Learn how to invoke the Lambda function using the AWS Lambda API and the AWS command line. Typically you will associate an URL to your Lambda function, or you will expose the Lambda function through a REST API. You might use the Serverless Application Model (SAM) to do so. We’ll leave tasks for another tutorial. In the remaining section of this tutorial, you will learn how to invoke your Lambda function from the AWS command-line tool. First, check that you have the aws command line tool installed and configured. You can install the aws CLI with the command brew awscli. You need to configure the aws CLI with your AWS credentials. You may use the command aws configure to configure the CLI. The AWS CLI documentation has more details. Enter the following command to invoke your Lambda function. The command returns with the invocation status. Type cat result.json to see the value returned by your function. When everything goes well, you will see {\"text\":\"Was it a car or a cat I saw?\",\"isPalindrome\":true,\"message\":\"Your text is a palindrome\"}. Congratulation 🎉 !","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function"}},"summary":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console","title":"Deploy your function to AWS Lambda","headings":[],"kind":"tutorial"},{"title":"Compile for Amazon Linux","kind":"tutorialSection","rawIndexableTextContent":"Learn how to compile your code to run it on Amazon Linux. AWS Lambda runs on top of Amazon Linux 2. You must therefore compile your code for Linux. The AWS Lambda Runtime for Swift uses Docker to do so. Once the code is compiled, it must be assembled in a ZIP file before being deployed in the cloud. The AWS Lambda Runtime for Swift provides a Swift Package Manager plugin to compile and zip your Lambda function in one simple step. Be sure Docker is started on your machine. On macOS, you can check the Docker icon in the menu bar. In a terminal, invoke the archive command to build and zip your Lambda function. The plugin starts a Docker container running Amazon Linux 2 and compile your Lambda function code. It then creates a zip file. When everything goes well, you should see an output similar to this one. Copy the generated zip files to your Desktop or Download directory for easy access. I choose the Desktop.","summary":"Learn how to compile your code to run it on Amazon Linux.","headings":[],"location":{"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Compile-for-Amazon-Linux"},"type":"contained","inPage":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function"}}},{"location":{"type":"contained","inPage":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function","interfaceLanguage":"swift"},"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Create-an-Lambda-Function"}},"title":"Create an Lambda Function","headings":[],"summary":"Learn how to create a Lambda function using the AWS Management Console and to deploy your zip file","rawIndexableTextContent":"Learn how to create a Lambda function using the AWS Management Console and to deploy your zip file You will now deploy your code to AWS Lambda. To complete the remaining steps in this tutorial, you must have an AWS Account. You can create an AWS Account by following these instructions. Open a web browser and navigate to https:\/\/console.aws.amazon.com. If you have an IAM user ID and password, select IAM User, otherwise proceed by entering your Root user email address and password. For this tutorial, I sign in using my IAM User ID. On the top right side of the console, select the AWS Region where you want to deploy your Lambda function. You typically choose a Region close to your customers to minimize the network latency. For this demo, I selected Oregon (us-west-2) AWS has multiple Regions across all continents. You can learn more about AWS Global Infrastructure here. On the top left side of the console, select the Lambda service to navigate to the Lambda section of the console. On the top right side of the Lambda page, select Create function. Enter a Function name. I choose PalindromeLambda. Select Provide your own bootstrap on Amazon Linux 2 as Runtime. And select arm64 as Architecture when you build on a Mac with Apple Silicon. Leave all other parameter as default, and select Create function on the bottom right part. The runtime architecture for Lambda (arm64 or x86_64) must match the one of the machine where you compiled the code. When you compiled on an Intel-based Mac, use x86_64. When compiling on an Apple Silicon-based Mac select arm64. On the next screen, select .zip file from the Upload from selection box on the middle right part of the screen. Select the zip file that was generated earlier and select Save. To verify everything works well, create a test event and invoke the function from the Test tab in the console. Enter MyTestEvent as Event name. Enter {\"text\": \"Was it a car or a cat I saw?\"} as Event JSON. Then, select Test. When the invocation succeeds, you can see the execution details and the result: { \"message\": \"Your text is a palindrome\",\"isPalindrome\": true, \"text\": \"Was it a car or a cat I saw?\"}. The execution result also shares the execution duration, the actual memory consumed and the logs generated by the function. These are important data to help you to fine-tune your function. Providing the function with more memory will also give it more compute power, resulting in lower execution time.","kind":"tutorialSection"},{"location":{"type":"contained","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Invoke-your-Lambda-function","interfaceLanguage":"swift"},"inPage":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function","interfaceLanguage":"swift"}},"summary":"Learn how to invoke the Lambda function using the AWS Lambda API and the AWS command line.","kind":"tutorialSection","rawIndexableTextContent":"Learn how to invoke the Lambda function using the AWS Lambda API and the AWS command line. Typically you will associate an URL to your Lambda function, or you will expose the Lambda function through a REST API. You might use the Serverless Application Model (SAM) to do so. We’ll leave tasks for another tutorial. In the remaining section of this tutorial, you will learn how to invoke your Lambda function from the AWS command-line tool. First, check that you have the aws command line tool installed and configured. You can install the aws CLI with the command brew awscli. You need to configure the aws CLI with your AWS credentials. You may use the command aws configure to configure the CLI. The AWS CLI documentation has more details. Enter the following command to invoke your Lambda function. The command returns with the invocation status. Type cat result.json to see the value returned by your function. When everything goes well, you will see {\"text\":\"Was it a car or a cat I saw?\",\"isPalindrome\":true,\"message\":\"Your text is a palindrome\"}. Congratulation 🎉 !","headings":[],"title":"Invoke your Lambda function"},{"kind":"tutorial","location":{"type":"topLevelPage","reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function"}},"summary":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift.","headings":[],"title":"Write your first Lambda function","rawIndexableTextContent":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift. In this example, we will create a Lambda function that receives a text and checks if this text is a palindrome or not. A palindrome is a word or phrase that reads the same forward and backward. Create a new swift project and open Xcode. Start in your development folder. Open a Terminal and create a directory for your Lambda function. Initialize a new Swift package for an executable target. Open Xcode in this newly created directory. Alternatively, if you use VSCode, use the code command to open VSCode in your project repository. In your development environment, expand the project if necessary and open the file Package.swift. If you are an iOS developer, you might wonder what is a Package.swift. In simple terms, your Package.swift defines the dependencies your code has and what products (libraries and\/or executables) your code offers. Prepare Package.swift to define the project targets and dependencies. In the Xcode editor, replace the content of Package.swift with the file on the right side of the screen. It defines a package for a project named Palindrome. The package name only matters when you build a library that is used by other Swift packages. Comments are important here, do not skip them. They define the minimum version of Swift to use. Add the platform section. It defines on which Apple platforms the code can be executed. Since Lambda functions are supposed to be run on Linux servers with Amazon Linux 2, it is reasonable to make them run only on macOS, for debugging for example. It does not make sense to run this code on iOS, iPadOS, tvOS, and watchOS. Add the dependencies section. It defines what external libraries your code depends on. To run code within AWS Lambda you’ll need a runtime that handles the communication with the Lambda Runtime Interface. This is what the AWSLambdaRuntime is for. You import it by specifying its GitHub url: https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime.git. Add the target section. In the targets section you specify your own targets. They are pretty comparable to targets you specify within an Xcode project (that’s probably why they share the name 😎). In our example we only want to create an executable that is called PalindromeLambda. An executable must have an entrypoint. This can be either a main.swift or an object that is marked with @main. For Lambda we will use the @main approach. Add the product section. To advertise our executableTarget as a product of our package, we add it to the products section. Now that our project structure is ready, let’s write the code of your Lambda function. Perform the following steps in Xcode or another IDE of your choice. Open the main.swift file, remove the code generated and write the code to represent the request sent to your Lambda function. Input parameters must conform to the Decodable protocol. This ensures that your Lambda function accepts any JSON input. When your function is triggered by another AWS service, we modeled most of the input and output data format for you. You can add the dependency on https:\/\/github.com\/swift-server\/swift-aws-lambda-events and import AWSLambdaEvents in your code. Write the code to represent the response returned by your Lambda function. Output parameters must conform to the Encodable protocol. This ensures that your Lambda function returns a valid JSON output. Your function might also return Void if it does not return any value. You can also write function that stream a response back to the caller. This is useful when you have a large amount of data to return. See the Lambda Streaming example for more information. Write your business logic. In real life project, this will be the most complex part of your code. It will live in spearate files or libraries. For this example, we will keep it simple and just return true if a String is a palindrome. Add an import statement to import the AWSLambdaRuntime library. Create a LambdaRuntime struct and add a handler function that will be called by the Lambda runtime. This function is passed as a closure to the initializer of the LambdaRuntime struct. It accepts two parameters: the input event and the context. The input event is the JSON payload sent to your Lambda function. The context provides information about the function, such as the function name, memory limit, and log group name. The function returns the output event, which is the JSON payload returned by your Lambda function or Void if your function does not return any value. Add the business logic to the handler function and return the response. In this example, we call the isPalindrome(_:) function to check if the input string is a palindrome. Then, we create a response with the result of the check. Start the runtime by calling the run() function. This function starts the Lambda runtime and listens for incoming requests. When a request is received, it calls the handler function with the input event and context. The handler function processes the request and returns the output event. The runtime sends the output event back to the caller. This function might throw an error if the runtime fails to process an event or if the handler function throws an error. This function is asynchronous and does not return until the runtime is stopped. Before to deploy your Lambda to AWS, you want to ensure that it works on your local machine. The AWSLambdaRuntime embeds a simple web server you can start and use to send your requests to your Lambda function. The embedded web server starts only when compiling in DEBUG mode and when the code is not run inside a Lambda function environment. You will start the test server directly from Xcode. Compile and run your project. Click on the Run button (▶️) in Xcode. Verify the server is correctlys started. You should see the following output in the console. Now that the local server started, open a Terminal and use curl or any other HTTP client to POST your input payload to 127.0.0.1:7000. When you pass '{\"text\": \"Was it a car or a cat I saw?\"}', you should receive the response {\"message\":\"Your text is a palindrome\",\"isPalindrome\":true,\"text\":\"Was it a car or a cat I saw?\"} Do not forget to stop the running scheme in Xcode (⏹️) when you’re done. Alternatively, you can use the command line from the Terminal. Use the command swift run to start the local embedded web server. You should see the following output in the console. Now that the local server started, open a second tab in the Terminal and use curl or any other HTTP client to POST your input payload to 127.0.0.1:7000. Do not forget to stop the local server with CTRL-C when you’re done."},{"title":"Initialize a new project","rawIndexableTextContent":"Create a new swift project and open Xcode. Start in your development folder. Open a Terminal and create a directory for your Lambda function. Initialize a new Swift package for an executable target. Open Xcode in this newly created directory. Alternatively, if you use VSCode, use the code command to open VSCode in your project repository. In your development environment, expand the project if necessary and open the file Package.swift. If you are an iOS developer, you might wonder what is a Package.swift. In simple terms, your Package.swift defines the dependencies your code has and what products (libraries and\/or executables) your code offers.","kind":"tutorialSection","location":{"inPage":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function","interfaceLanguage":"swift"},"type":"contained","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Initialize-a-new-project","interfaceLanguage":"swift"}},"summary":"Create a new swift project and open Xcode.","headings":[]},{"headings":[],"kind":"tutorialSection","summary":"Prepare Package.swift to define the project targets and dependencies.","rawIndexableTextContent":"Prepare Package.swift to define the project targets and dependencies. In the Xcode editor, replace the content of Package.swift with the file on the right side of the screen. It defines a package for a project named Palindrome. The package name only matters when you build a library that is used by other Swift packages. Comments are important here, do not skip them. They define the minimum version of Swift to use. Add the platform section. It defines on which Apple platforms the code can be executed. Since Lambda functions are supposed to be run on Linux servers with Amazon Linux 2, it is reasonable to make them run only on macOS, for debugging for example. It does not make sense to run this code on iOS, iPadOS, tvOS, and watchOS. Add the dependencies section. It defines what external libraries your code depends on. To run code within AWS Lambda you’ll need a runtime that handles the communication with the Lambda Runtime Interface. This is what the AWSLambdaRuntime is for. You import it by specifying its GitHub url: https:\/\/github.com\/swift-server\/swift-aws-lambda-runtime.git. Add the target section. In the targets section you specify your own targets. They are pretty comparable to targets you specify within an Xcode project (that’s probably why they share the name 😎). In our example we only want to create an executable that is called PalindromeLambda. An executable must have an entrypoint. This can be either a main.swift or an object that is marked with @main. For Lambda we will use the @main approach. Add the product section. To advertise our executableTarget as a product of our package, we add it to the products section.","title":"Add the project dependencies","location":{"type":"contained","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Add-the-project-dependencies","interfaceLanguage":"swift"},"inPage":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function"}}},{"summary":"Now that our project structure is ready, let’s write the code of your Lambda function. Perform the following steps in Xcode or another IDE of your choice.","kind":"tutorialSection","rawIndexableTextContent":"Now that our project structure is ready, let’s write the code of your Lambda function. Perform the following steps in Xcode or another IDE of your choice. Open the main.swift file, remove the code generated and write the code to represent the request sent to your Lambda function. Input parameters must conform to the Decodable protocol. This ensures that your Lambda function accepts any JSON input. When your function is triggered by another AWS service, we modeled most of the input and output data format for you. You can add the dependency on https:\/\/github.com\/swift-server\/swift-aws-lambda-events and import AWSLambdaEvents in your code. Write the code to represent the response returned by your Lambda function. Output parameters must conform to the Encodable protocol. This ensures that your Lambda function returns a valid JSON output. Your function might also return Void if it does not return any value. You can also write function that stream a response back to the caller. This is useful when you have a large amount of data to return. See the Lambda Streaming example for more information. Write your business logic. In real life project, this will be the most complex part of your code. It will live in spearate files or libraries. For this example, we will keep it simple and just return true if a String is a palindrome. Add an import statement to import the AWSLambdaRuntime library. Create a LambdaRuntime struct and add a handler function that will be called by the Lambda runtime. This function is passed as a closure to the initializer of the LambdaRuntime struct. It accepts two parameters: the input event and the context. The input event is the JSON payload sent to your Lambda function. The context provides information about the function, such as the function name, memory limit, and log group name. The function returns the output event, which is the JSON payload returned by your Lambda function or Void if your function does not return any value. Add the business logic to the handler function and return the response. In this example, we call the isPalindrome(_:) function to check if the input string is a palindrome. Then, we create a response with the result of the check. Start the runtime by calling the run() function. This function starts the Lambda runtime and listens for incoming requests. When a request is received, it calls the handler function with the input event and context. The handler function processes the request and returns the output event. The runtime sends the output event back to the caller. This function might throw an error if the runtime fails to process an event or if the handler function throws an error. This function is asynchronous and does not return until the runtime is stopped.","title":"Write the function code","headings":[],"location":{"type":"contained","inPage":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function","interfaceLanguage":"swift"},"reference":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Write-the-function-code"}}},{"kind":"tutorialSection","title":"Test Your Code Locally","location":{"inPage":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function","interfaceLanguage":"swift"},"type":"contained","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Test-Your-Code-Locally","interfaceLanguage":"swift"}},"summary":"Before to deploy your Lambda to AWS, you want to ensure that it works on your local machine.","headings":[],"rawIndexableTextContent":"Before to deploy your Lambda to AWS, you want to ensure that it works on your local machine. The AWSLambdaRuntime embeds a simple web server you can start and use to send your requests to your Lambda function. The embedded web server starts only when compiling in DEBUG mode and when the code is not run inside a Lambda function environment. You will start the test server directly from Xcode. Compile and run your project. Click on the Run button (▶️) in Xcode. Verify the server is correctlys started. You should see the following output in the console. Now that the local server started, open a Terminal and use curl or any other HTTP client to POST your input payload to 127.0.0.1:7000. When you pass '{\"text\": \"Was it a car or a cat I saw?\"}', you should receive the response {\"message\":\"Your text is a palindrome\",\"isPalindrome\":true,\"text\":\"Was it a car or a cat I saw?\"} Do not forget to stop the running scheme in Xcode (⏹️) when you’re done. Alternatively, you can use the command line from the Terminal. Use the command swift run to start the local embedded web server. You should see the following output in the console. Now that the local server started, open a second tab in the Terminal and use curl or any other HTTP client to POST your input payload to 127.0.0.1:7000. Do not forget to stop the local server with CTRL-C when you’re done."},{"kind":"symbol","summary":"Sends the generic Output object (representing the computed result of the handler) to the AWS Lambda response endpoint. This function simply serves as a mechanism to return the computed result from a handler function without an explicit return.","headings":[],"rawIndexableTextContent":"Sends the generic Output object (representing the computed result of the handler) to the AWS Lambda response endpoint. This function simply serves as a mechanism to return the computed result from a handler function without an explicit return. ","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/write(_:)","interfaceLanguage":"swift"}},"title":"write(_:)"},{"headings":[],"kind":"symbol","rawIndexableTextContent":"Lambda runtime context. The Lambda runtime generates and passes the LambdaContext to the Lambda handler as an argument. ","summary":"Lambda runtime context. The Lambda runtime generates and passes the LambdaContext to the Lambda handler as an argument.","location":{"type":"topLevelPage","reference":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","interfaceLanguage":"swift"}},"title":"LambdaContext"}] \ No newline at end of file diff --git a/docs/js/104.fe5974d0.js b/docs/js/104.fe5974d0.js new file mode 100644 index 00000000..14132875 --- /dev/null +++ b/docs/js/104.fe5974d0.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +"use strict";(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[104],{6137:function(e,t,n){n.d(t,{Z:function(){return d}});var r=function(){var e=this,t=e._self._c;return t("span",{staticClass:"badge",class:{[`badge-${e.variant}`]:e.variant},attrs:{role:"presentation"}},[e._t("default",(function(){return[e._v(e._s(e.text?e.$t(e.text):""))]}))],2)},a=[];const i={beta:"aside-kind.beta",deprecated:"aside-kind.deprecated"};var s={name:"Badge",props:{variant:{type:String,default:()=>""}},computed:{text:({variant:e})=>i[e]}},o=s,l=n(1001),c=(0,l.Z)(o,r,a,!1,null,"04624022",null),d=c.exports},8846:function(e,t,n){n.d(t,{Z:function(){return d}});var r=function(){var e=this,t=e._self._c;return t("BaseContentNode",e._b({},"BaseContentNode",e.$props,!1))},a=[],i=n(9519),s={name:"ContentNode",components:{BaseContentNode:i["default"]},props:i["default"].props,methods:i["default"].methods,BlockType:i["default"].BlockType,InlineType:i["default"].InlineType},o=s,l=n(1001),c=(0,l.Z)(o,r,a,!1,null,"3a32ffd0",null),d=c.exports},7120:function(e,t,n){n.d(t,{Z:function(){return c}});var r=function(e,t){return e("p",{staticClass:"requirement-metadata",class:t.data.staticClass},[e("strong",[t._v(t._s(t.parent.$t("required")))]),t.props.defaultImplementationsCount?[t._v(" "+t._s(t.parent.$tc("metadata.default-implementation",t.props.defaultImplementationsCount))+" ")]:t._e()],2)},a=[],i={name:"RequirementMetadata",props:{defaultImplementationsCount:{type:Number,default:0}}},s=i,o=n(1001),l=(0,o.Z)(s,r,a,!0,null,null,null),c=l.exports},7913:function(e,t,n){n.d(t,{default:function(){return z}});var r,a,i,s,o,l,c=n(352),d={name:"ChangedToken",render(e){const{kind:t,tokens:n}=this;return e("span",{class:[`token-${t}`,"token-changed"]},n.map((t=>e(z,{props:t}))))},props:{kind:{type:String,required:!0},tokens:{type:Array,required:!0}}},p=d,u=n(1001),f=(0,u.Z)(p,r,a,!1,null,null,null),m=f.exports,h=n(4260),g=n(5953),k={name:"LinkableToken",mixins:[g.Z],render(e){const t=this.references[this.identifier];return t&&t.url?e(h.Z,{props:{url:t.url,kind:t.kind,role:t.role}},this.$slots.default):e("span",{},this.$slots.default)},props:{identifier:{type:String,required:!0,default:()=>""}}},y=k,v=(0,u.Z)(y,i,s,!1,null,null,null),b=v.exports,_=function(){var e=this,t=e._self._c;return t("span",[e._v(e._s(e.text))])},C=[],x={name:"RawText",props:{text:{type:String,required:!0}}},Z=x,B=(0,u.Z)(Z,_,C,!1,null,null,null),T=B.exports,S={name:"SyntaxToken",render(e){return e("span",{class:`token-${this.kind}`},this.text)},props:{kind:{type:String,required:!0},text:{type:String,required:!0}}},I=S,$=(0,u.Z)(I,o,l,!1,null,null,null),q=$.exports;const w={attribute:"attribute",externalParam:"externalParam",genericParameter:"genericParameter",identifier:"identifier",internalParam:"internalParam",keyword:"keyword",label:"label",number:"number",string:"string",text:"text",typeIdentifier:"typeIdentifier",added:"added",removed:"removed"};var L,A,P={name:"DeclarationToken",render:function(e){const{kind:t,text:n,tokens:r}=this;switch(t){case w.text:{const t={text:n};return e(T,{props:t})}case w.typeIdentifier:{const t={identifier:this.identifier};return e(b,{class:"type-identifier-link",props:t},[e(c.Z,n)])}case w.attribute:{const{identifier:r}=this;return r?e(b,{class:"attribute-link",props:{identifier:r}},[e(c.Z,n)]):e(q,{props:{kind:t,text:n}})}case w.added:case w.removed:return e(m,{props:{tokens:r,kind:t}});default:{const r={kind:t,text:n};return e(q,{props:r})}}},constants:{TokenKind:w},props:{kind:{type:String,required:!0},identifier:{type:String,required:!1},text:{type:String,required:!1},tokens:{type:Array,required:!1,default:()=>[]}}},F=P,O=(0,u.Z)(F,L,A,!1,null,"295ad0ff",null),z=O.exports},2970:function(e,t,n){n.d(t,{Z:function(){return $}});var r=function(){var e=this,t=e._self._c;return e.icon?t("div",{staticClass:"topic-icon-wrapper"},[t(e.icon,{tag:"component",staticClass:"topic-icon"})],1):e._e()},a=[],i=n(5692),s=n(7775),o=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"api-reference-icon",attrs:{viewBox:"0 0 14 14",themeId:"api-reference"}},[t("title",[e._v(e._s(e.$t("api-reference")))]),t("path",{attrs:{d:"m1 1v12h12v-12zm11 11h-10v-10h10z"}}),t("path",{attrs:{d:"m3 4h8v1h-8zm0 2.5h8v1h-8zm0 2.5h8v1h-8z"}}),t("path",{attrs:{d:"m3 4h8v1h-8z"}}),t("path",{attrs:{d:"m3 6.5h8v1h-8z"}}),t("path",{attrs:{d:"m3 9h8v1h-8z"}})])},l=[],c=n(9742),d={name:"APIReferenceIcon",components:{SVGIcon:c.Z}},p=d,u=n(1001),f=(0,u.Z)(p,o,l,!1,null,null,null),m=f.exports,h=function(){var e=this,t=e._self._c;return t("SVGIcon",{attrs:{viewBox:"0 0 14 14",themeId:"endpoint"}},[t("title",[e._v(e._s(e.$t("icons.web-service-endpoint")))]),t("path",{attrs:{d:"M4.052 8.737h-1.242l-1.878 5.263h1.15l0.364-1.081h1.939l0.339 1.081h1.193zM2.746 12.012l0.678-2.071 0.653 2.071z"}}),t("path",{attrs:{d:"M11.969 8.737h1.093v5.263h-1.093v-5.263z"}}),t("path",{attrs:{d:"M9.198 8.737h-2.295v5.263h1.095v-1.892h1.12c0.040 0.003 0.087 0.004 0.134 0.004 0.455 0 0.875-0.146 1.217-0.394l-0.006 0.004c0.296-0.293 0.48-0.699 0.48-1.148 0-0.060-0.003-0.118-0.010-0.176l0.001 0.007c0.003-0.039 0.005-0.085 0.005-0.131 0-0.442-0.183-0.842-0.476-1.128l-0-0c-0.317-0.256-0.724-0.41-1.168-0.41-0.034 0-0.069 0.001-0.102 0.003l0.005-0zM9.628 11.014c-0.15 0.118-0.341 0.188-0.548 0.188-0.020 0-0.040-0.001-0.060-0.002l0.003 0h-1.026v-1.549h1.026c0.017-0.001 0.037-0.002 0.058-0.002 0.206 0 0.396 0.066 0.551 0.178l-0.003-0.002c0.135 0.13 0.219 0.313 0.219 0.515 0 0.025-0.001 0.050-0.004 0.074l0-0.003c0.002 0.020 0.003 0.044 0.003 0.068 0 0.208-0.083 0.396-0.219 0.534l0-0z"}}),t("path",{attrs:{d:"M13.529 4.981c0-1.375-1.114-2.489-2.489-2.49h-0l-0.134 0.005c-0.526-1.466-1.903-2.496-3.522-2.496-0.892 0-1.711 0.313-2.353 0.835l0.007-0.005c-0.312-0.243-0.709-0.389-1.14-0.389-1.030 0-1.865 0.834-1.866 1.864v0c0 0.001 0 0.003 0 0.004 0 0.123 0.012 0.242 0.036 0.358l-0.002-0.012c-0.94 0.37-1.593 1.27-1.593 2.323 0 1.372 1.11 2.485 2.482 2.49h8.243c1.306-0.084 2.333-1.164 2.333-2.484 0-0.001 0-0.002 0-0.003v0zM11.139 6.535h-8.319c-0.799-0.072-1.421-0.739-1.421-1.551 0-0.659 0.41-1.223 0.988-1.45l0.011-0.004 0.734-0.28-0.148-0.776-0.012-0.082v-0.088c0-0 0-0.001 0-0.001 0-0.515 0.418-0.933 0.933-0.933 0.216 0 0.416 0.074 0.574 0.197l-0.002-0.002 0.584 0.453 0.575-0.467 0.169-0.127c0.442-0.306 0.991-0.489 1.581-0.489 1.211 0 2.243 0.769 2.633 1.846l0.006 0.019 0.226 0.642 0.814-0.023 0.131 0.006c0.805 0.067 1.432 0.736 1.432 1.552 0 0.836-0.659 1.518-1.486 1.556l-0.003 0z"}})])},g=[],k={name:"EndpointIcon",components:{SVGIcon:c.Z}},y=k,v=(0,u.Z)(y,h,g,!1,null,null,null),b=v.exports,_=n(8633),C=n(9001),x=n(8638),Z=n(7192);const B={[Z.L.article]:i.Z,[Z.L.collection]:C.Z,[Z.L.collectionGroup]:m,[Z.L.learn]:_.Z,[Z.L.overview]:_.Z,[Z.L.project]:x.Z,[Z.L.tutorial]:x.Z,[Z.L.resources]:_.Z,[Z.L.sampleCode]:s.Z,[Z.L.restRequestSymbol]:b};var T={components:{SVGIcon:c.Z},props:{role:{type:String,required:!0}},computed:{icon:({role:e})=>B[e]}},S=T,I=(0,u.Z)(S,r,a,!1,null,"55f9d05d",null),$=I.exports},8104:function(e,t,n){n.r(t),n.d(t,{default:function(){return q}});var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"link-block",class:e.linkBlockClasses},[t(e.linkComponent,e._b({ref:"apiChangesDiff",tag:"component",staticClass:"link",class:e.linkClasses},"component",e.linkProps,!1),[e.topic.role&&!e.change?t("TopicLinkBlockIcon",{attrs:{role:e.topic.role}}):e._e(),e.topic.fragments?t("DecoratedTopicTitle",{attrs:{tokens:e.topic.fragments}}):t("WordBreak",{attrs:{tag:e.titleTag}},[e._v(e._s(e.topic.title))]),e.change?t("span",{staticClass:"visuallyhidden"},[e._v("- "+e._s(e.$t(e.changeName)))]):e._e()],1),e.hasAbstractElements?t("div",{staticClass:"abstract"},[e.topic.abstract?t("ContentNode",{attrs:{content:e.topic.abstract}}):e._e(),e.topic.ideTitle?t("div",{staticClass:"topic-keyinfo"},[e.topic.titleStyle===e.titleStyles.title?[t("strong",[e._v("Key:")]),e._v(" "+e._s(e.topic.name)+" ")]:e.topic.titleStyle===e.titleStyles.symbol?[t("strong",[e._v("Name:")]),e._v(" "+e._s(e.topic.ideTitle)+" ")]:e._e()],2):e._e(),e.topic.required||e.topic.defaultImplementations?t("RequirementMetadata",{staticClass:"topic-required",attrs:{defaultImplementationsCount:e.topic.defaultImplementations}}):e._e()],1):e._e(),e.showDeprecatedBadge?t("Badge",{attrs:{variant:"deprecated"}}):e.showBetaBadge?t("Badge",{attrs:{variant:"beta"}}):e._e(),e._l(e.tags,(function(n){return t("Badge",{key:`${n.type}-${n.text}`,attrs:{variant:n.type}},[e._v(" "+e._s(n.text)+" ")])}))],2)},a=[],i=n(7192),s=n(2449),o=n(6137),l=n(352),c=n(8846),d=n(2970),p=function(){var e=this,t=e._self._c;return t("code",{staticClass:"decorated-title"},[e._l(e.tokens,(function(n,r){return[t(e.componentFor(n),{key:r,tag:"component",class:[e.classFor(n),e.emptyTokenClass(n)]},[e._v(e._s(n.text))]),t("wbr",{key:`wbr-${r}`})]}))],2)},u=[],f=n(7913);const{TokenKind:m}=f["default"].constants,h={decorator:"decorator",identifier:"identifier",label:"label"};var g={name:"DecoratedTopicTitle",components:{WordBreak:l.Z},props:{tokens:{type:Array,required:!0,default:()=>[]}},constants:{TokenKind:m},methods:{emptyTokenClass:({text:e})=>({"empty-token":" "===e}),classFor({kind:e}){switch(e){case m.externalParam:case m.identifier:return h.identifier;case m.label:return h.label;default:return h.decorator}},componentFor(e){return/^\s+$/.test(e.text)?"span":l.Z}}},k=g,y=n(1001),v=(0,y.Z)(k,p,u,!1,null,"17c84f82",null),b=v.exports,_=n(7120),C=n(1842),x=n(5953);const Z={article:"article",symbol:"symbol"},B={title:"title",symbol:"symbol"},T={link:"link"};var S={name:"TopicsLinkBlock",components:{Badge:o.Z,WordBreak:l.Z,ContentNode:c.Z,TopicLinkBlockIcon:d.Z,DecoratedTopicTitle:b,RequirementMetadata:_.Z},mixins:[C.JY,C.PH,x.Z],constants:{ReferenceType:T,TopicKind:Z,TitleStyles:B},props:{isSymbolBeta:Boolean,isSymbolDeprecated:Boolean,topic:{type:Object,required:!0,validator:e=>(!("abstract"in e)||Array.isArray(e.abstract))&&"string"===typeof e.identifier&&(e.type===T.link&&!e.kind||"string"===typeof e.kind)&&(e.type===T.link&&!e.role||"string"===typeof e.role)&&"string"===typeof e.title&&"string"===typeof e.url&&(!("defaultImplementations"in e)||"number"===typeof e.defaultImplementations)&&(!("required"in e)||"boolean"===typeof e.required)}},data(){return{state:this.store.state}},computed:{linkComponent:({topic:e})=>e.type===T.link?"a":"router-link",linkProps({topic:e}){const t=(0,s.Q2)(e.url,this.$route.query);return e.type===T.link?{href:t}:{to:t}},linkBlockClasses:({changesClasses:e,hasAbstractElements:t,displaysMultipleLinesAfterAPIChanges:n,multipleLinesClass:r})=>({"has-inline-element":!t,[r]:n,...!t&&e}),linkClasses:({changesClasses:e,deprecated:t,hasAbstractElements:n})=>({deprecated:t,"has-adjacent-elements":n,...n&&e}),changesClasses:({getChangesClasses:e,change:t})=>e(t),titleTag({topic:e}){if(e.titleStyle===B.title)return e.ideTitle?"span":"code";if(e.role&&(e.role===i.L.collection||e.role===i.L.dictionarySymbol))return"span";switch(e.kind){case Z.symbol:return"code";default:return"span"}},titleStyles:()=>B,deprecated:({showDeprecatedBadge:e,topic:t})=>e||t.deprecated,showBetaBadge:({topic:e,isSymbolBeta:t})=>Boolean(!t&&e.beta),showDeprecatedBadge:({topic:e,isSymbolDeprecated:t})=>Boolean(!t&&e.deprecated),change({topic:{identifier:e},state:{apiChanges:t}}){return this.changeFor(e,t)},changeName:({change:e,getChangeName:t})=>t(e),hasAbstractElements:({topic:{abstract:e,required:t,defaultImplementations:n}}={})=>e&&e.length>0||t||n,tags:({topic:e})=>(e.tags||[]).slice(0,1),iconOverride:({topic:{images:e=[]}})=>{const t=e.find((({type:e})=>"icon"===e));return t?t.identifier:null}}},I=S,$=(0,y.Z)(I,r,a,!1,null,"0d9c6bcc",null),q=$.exports},4733:function(e,t,n){n.d(t,{_:function(){return r}});const r="displays-multiple-lines"},1842:function(e,t,n){n.d(t,{JY:function(){return c},PH:function(){return l}});var r=n(9426),a=n(4733),i=n(3112);const s="latest_",o={xcode:{value:"xcode",label:"Xcode"},other:{value:"other",label:"Other"}},l={constants:{multipleLinesClass:a._},data(){return{multipleLinesClass:a._}},computed:{displaysMultipleLinesAfterAPIChanges:({change:e,changeType:t,$refs:n})=>!(!e&&!t)&&(0,i.s)(n.apiChangesDiff)}},c={methods:{toVersionRange({platform:e,versions:t}){return`${e} ${t[0]} – ${e} ${t[1]}`},toOptionValue:e=>`${s}${e}`,toScope:e=>e.slice(s.length,e.length),getOptionsForDiffAvailability(e={}){return this.getOptionsForDiffAvailabilities([e])},getOptionsForDiffAvailabilities(e=[]){const t=e.reduce(((e,t={})=>Object.keys(t).reduce(((e,n)=>({...e,[n]:(e[n]||[]).concat(t[n])})),e)),{}),n=Object.keys(t),r=n.reduce(((e,n)=>{const r=t[n];return{...e,[n]:r.find((e=>e.platform===o.xcode.label))||r[0]}}),{}),a=e=>({label:this.toVersionRange(r[e]),value:this.toOptionValue(e),platform:r[e].platform}),{sdk:i,beta:s,minor:l,major:c,...d}=r,p=[].concat(i?a("sdk"):[]).concat(s?a("beta"):[]).concat(l?a("minor"):[]).concat(c?a("major"):[]).concat(Object.keys(d).map(a));return this.splitOptionsPerPlatform(p)},changesClassesFor(e,t){const n=this.changeFor(e,t);return this.getChangesClasses(n)},getChangesClasses:e=>({[`changed changed-${e}`]:!!e}),changeFor(e,t){const{change:n}=(t||{})[e]||{};return n},splitOptionsPerPlatform(e){return e.reduce(((e,t)=>{const n=t.platform===o.xcode.label?o.xcode.value:o.other.value;return e[n].push(t),e}),{[o.xcode.value]:[],[o.other.value]:[]})},getChangeName(e){return r.Ag[e]}},computed:{availableOptions({diffAvailability:e={},toOptionValue:t}){return new Set(Object.keys(e).map(t))}}}},3112:function(e,t,n){function r(e){if(!e)return!1;const t=window.getComputedStyle(e.$el||e),n=(e.$el||e).offsetHeight,r=t.lineHeight?parseFloat(t.lineHeight):1,a=t.paddingTop?parseFloat(t.paddingTop):0,i=t.paddingBottom?parseFloat(t.paddingBottom):0,s=t.borderTopWidth?parseFloat(t.borderTopWidth):0,o=t.borderBottomWidth?parseFloat(t.borderBottomWidth):0,l=n-(a+i+s+o),c=l/r;return c>=2}n.d(t,{s:function(){return r}})}}]); \ No newline at end of file diff --git a/docs/js/337.274a8ccc.js b/docs/js/337.274a8ccc.js new file mode 100644 index 00000000..460601cd --- /dev/null +++ b/docs/js/337.274a8ccc.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[337],{6337:function(){(function(){"use strict";if("object"===typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=function(t){var e=t,n=i(e);while(n)e=n.ownerDocument,n=i(e);return e}(window.document),e=[],n=null,o=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return n||(n=function(t,n){o=t&&n?g(t,n):p(),e.forEach((function(t){t._checkForIntersections()}))}),n},s._resetCrossOriginUpdater=function(){n=null,o=null},s.prototype.observe=function(t){var e=this._observationTargets.some((function(e){return e.element==t}));if(!e){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},s.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t})),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},s.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter((function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]}))},s.prototype._parseRootMargin=function(t){var e=t||"0px",n=e.split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}}));return n[1]=n[1]||n[0],n[2]=n[2]||n[0],n[3]=n[3]||n[1],n},s.prototype._monitorIntersections=function(e){var n=e.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(e)){var o=this._checkForIntersections,r=null,s=null;this.POLL_INTERVAL?r=n.setInterval(o,this.POLL_INTERVAL):(c(n,"resize",o,!0),c(e,"scroll",o,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(s=new n.MutationObserver(o),s.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push((function(){var t=e.defaultView;t&&(r&&t.clearInterval(r),a(t,"resize",o,!0)),a(e,"scroll",o,!0),s&&s.disconnect()}));var h=this.root&&(this.root.ownerDocument||this.root)||t;if(e!=h){var u=i(e);u&&this._monitorIntersections(u.ownerDocument)}}},s.prototype._unmonitorIntersections=function(e){var n=this._monitoringDocuments.indexOf(e);if(-1!=n){var o=this.root&&(this.root.ownerDocument||this.root)||t,r=this._observationTargets.some((function(t){var n=t.element.ownerDocument;if(n==e)return!0;while(n&&n!=o){var r=i(n);if(n=r&&r.ownerDocument,n==e)return!0}return!1}));if(!r){var s=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),s(),e!=o){var h=i(e);h&&this._unmonitorIntersections(h.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e=0&&h>=0&&{top:n,bottom:o,left:i,right:r,width:s,height:h}||null}function f(t){var e;try{e=t.getBoundingClientRect()}catch(n){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):p()}function p(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function d(t){return!t||"x"in t?t:{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function g(t,e){var n=e.top-t.top,o=e.left-t.left;return{top:n,left:o,height:e.height,width:e.width,bottom:n+e.height,right:o+e.width}}function m(t,e){var n=e;while(n){if(n==t)return!0;n=_(n)}return!1}function _(e){var n=e.parentNode;return 9==e.nodeType&&e!=t?i(e):(n&&n.assignedSlot&&(n=n.assignedSlot.parentNode),n&&11==n.nodeType&&n.host?n.host:n)}function v(t){return t&&9===t.nodeType}})()}}]); \ No newline at end of file diff --git a/docs/js/842.9b3ff1dd.js b/docs/js/842.9b3ff1dd.js new file mode 100644 index 00000000..87975b1a --- /dev/null +++ b/docs/js/842.9b3ff1dd.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +"use strict";(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[842],{5590:function(t,e,n){n.d(e,{Z:function(){return m}});var s=function(){var t=this,e=t._self._c;return e("PortalSource",{attrs:{to:"modal-destination",disabled:!t.isVisible}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],staticClass:"generic-modal",class:[t.stateClasses,t.themeClass],style:t.modalColors,attrs:{role:"dialog"}},[e("div",{staticClass:"backdrop",on:{click:t.onClickOutside}}),e("div",{ref:"container",staticClass:"container",style:{width:t.width}},[t.showClose?e("button",{ref:"close",staticClass:"close",attrs:{"aria-label":t.$t("verbs.close")},on:{click:function(e){return e.preventDefault(),t.closeModal.apply(null,arguments)}}},[e("CloseIcon")],1):t._e(),e("div",{ref:"content",staticClass:"modal-content"},[t._t("default")],2)])])])},r=[],o=n(9652),i=n(114),a=n(1147),l=n(2433),c=n(1970);const u={light:"light",dark:"dark",dynamic:"dynamic",code:"code"};var h={name:"GenericModal",model:{prop:"visible",event:"update:visible"},components:{CloseIcon:c.Z,PortalSource:l.h_},props:{visible:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},theme:{type:String,validator:t=>Object.keys(u).includes(t),default:u.light},codeBackgroundColorOverride:{type:String,default:""},backdropBackgroundColorOverride:{type:String,default:""},width:{type:String,default:null},showClose:{type:Boolean,default:!0}},data(){return{lastFocusItem:null,prefersDarkStyle:!1,focusTrapInstance:null}},computed:{isVisible:{get:({visible:t})=>t,set(t){this.$emit("update:visible",t)}},modalColors(){return{"--code-background":this.codeBackgroundColorOverride,"--backdrop-background":this.backdropBackgroundColorOverride}},themeClass({theme:t,prefersDarkStyle:e,isThemeDynamic:n}){let s={};return n&&(s={"theme-light":!e,"theme-dark":e}),[`theme-${t}`,s]},stateClasses:({isFullscreen:t,isVisible:e,showClose:n})=>({"modal-fullscreen":t,"modal-standard":!t,"modal-open":e,"modal-with-close":n}),isThemeDynamic:({theme:t})=>t===u.dynamic||t===u.code},watch:{isVisible(t){t?this.onShow():this.onHide()}},mounted(){if(this.focusTrapInstance=new i.Z,document.addEventListener("keydown",this.onKeydown),this.isThemeDynamic){const t=window.matchMedia("(prefers-color-scheme: dark)");t.addListener(this.onColorSchemePreferenceChange),this.$once("hook:beforeDestroy",(()=>{t.removeListener(this.onColorSchemePreferenceChange)})),this.onColorSchemePreferenceChange(t)}},beforeDestroy(){this.isVisible&&o.Z.unlockScroll(this.$refs.container),document.removeEventListener("keydown",this.onKeydown),this.focusTrapInstance.destroy()},methods:{async onShow(){await this.$nextTick(),o.Z.lockScroll(this.$refs.container),await this.focusCloseButton(),this.focusTrapInstance.updateFocusContainer(this.$refs.container),this.focusTrapInstance.start(),a.Z.hide(this.$refs.container)},onHide(){o.Z.unlockScroll(this.$refs.container),this.focusTrapInstance.stop(),this.lastFocusItem&&(this.lastFocusItem.focus({preventScroll:!0}),this.lastFocusItem=null),this.$emit("close"),a.Z.show(this.$refs.container)},closeModal(){this.isVisible=!1},selectContent(){window.getSelection().selectAllChildren(this.$refs.content)},onClickOutside(){this.closeModal()},onKeydown(t){const{metaKey:e=!1,ctrlKey:n=!1,key:s}=t;this.isVisible&&("a"===s&&(e||n)&&(t.preventDefault(),this.selectContent()),"Escape"===s&&(t.preventDefault(),this.closeModal()))},onColorSchemePreferenceChange({matches:t}){this.prefersDarkStyle=t},async focusCloseButton(){this.lastFocusItem=document.activeElement,await this.$nextTick(),this.$refs.close&&this.$refs.close.focus(),this.$emit("open")}}},d=h,f=n(1001),p=(0,f.Z)(d,s,r,!1,null,"795f7b59",null),m=p.exports},5151:function(t,e,n){n.d(e,{Z:function(){return u}});var s=function(){var t=this,e=t._self._c;return e("SVGIcon",{staticClass:"inline-chevron-down-icon",attrs:{viewBox:"0 0 14 14",themeId:"inline-chevron-down"}},[e("path",{attrs:{d:"M12.634 2.964l0.76 0.649-6.343 7.426-6.445-7.423 0.755-0.655 5.683 6.545 5.59-6.542z"}})])},r=[],o=n(9742),i={name:"InlineChevronDownIcon",components:{SVGIcon:o.Z}},a=i,l=n(1001),c=(0,l.Z)(a,s,r,!1,null,null,null),u=c.exports},6772:function(t,e,n){n.d(e,{Z:function(){return u}});var s=function(){var t=this,e=t._self._c;return e("SVGIcon",{staticClass:"inline-plus-circle-icon",attrs:{viewBox:"0 0 14 14",themeId:"inline-plus-circle"}},[e("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5v0c0-3.038-2.462-5.5-5.5-5.5v0z"}}),e("path",{attrs:{d:"M4 6.52h6v1h-6v-1z"}}),e("path",{attrs:{d:"M6.5 4.010h1v6h-1v-6z"}})])},r=[],o=n(9742),i={name:"InlinePlusCircleIcon",components:{SVGIcon:o.Z}},a=i,l=n(1001),c=(0,l.Z)(a,s,r,!1,null,null,null),u=c.exports},8093:function(t,e,n){n.d(e,{Z:function(){return y}});var s=function(){var t=this,e=t._self._c;return e("div",{style:t.codeStyle},[t._t("default")],2)},r=[],o=n(8571);const i=0,a=255;function l(t){const e=t.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d+\.?\d*|\.\d+)\s*\)/);if(!e)throw new Error("invalid rgba() input");const n=10;return{r:parseInt(e[1],n),g:parseInt(e[2],n),b:parseInt(e[3],n),a:parseFloat(e[4])}}function c(t){const{r:e,g:n,b:s}=l(t);return.2126*e+.7152*n+.0722*s}function u(t,e){const n=Math.round(a*e),s=l(t),{a:r}=s,[o,c,u]=[s.r,s.g,s.b].map((t=>Math.max(i,Math.min(a,t+n))));return`rgba(${o}, ${c}, ${u}, ${r})`}function h(t,e){return u(t,e)}function d(t,e){return u(t,-1*e)}var f={name:"CodeTheme",data(){return{codeThemeState:o.Z.state}},computed:{codeStyle(){const{codeColors:t}=this.codeThemeState;return t?{"--text":t.text,"--background":t.background,"--line-highlight":t.lineHighlight,"--url":t.commentURL,"--syntax-comment":t.comment,"--syntax-quote":t.comment,"--syntax-keyword":t.keyword,"--syntax-literal":t.keyword,"--syntax-selector-tag":t.keyword,"--syntax-string":t.stringLiteral,"--syntax-bullet":t.stringLiteral,"--syntax-meta":t.keyword,"--syntax-number":t.stringLiteral,"--syntax-symbol":t.stringLiteral,"--syntax-tag":t.stringLiteral,"--syntax-attr":t.typeAnnotation,"--syntax-built_in":t.typeAnnotation,"--syntax-builtin-name":t.typeAnnotation,"--syntax-class":t.typeAnnotation,"--syntax-params":t.typeAnnotation,"--syntax-section":t.typeAnnotation,"--syntax-title":t.typeAnnotation,"--syntax-type":t.typeAnnotation,"--syntax-attribute":t.keyword,"--syntax-identifier":t.text,"--syntax-subst":t.text,"--color-syntax-param-internal-name":this.internalParamNameColor}:null},internalParamNameColor(){const{background:t,text:e}=this.codeThemeState.codeColors;try{const n=c(t),s=n1&&void 0!==arguments[1]?arguments[1]:{};return t.reduce((function(t,n){var s=n.passengers[0],r="function"===typeof s?s(e):n.passengers;return t.concat(r)}),[])}function f(t,e){return t.map((function(t,e){return[e,t]})).sort((function(t,n){return e(t[1],n[1])||t[0]-n[0]})).map((function(t){return t[1]}))}function p(t,e){return e.reduce((function(e,n){return t.hasOwnProperty(n)&&(e[n]=t[n]),e}),{})}var m={},g={},y={},b=r.extend({data:function(){return{transports:m,targets:g,sources:y,trackInstances:u}},methods:{open:function(t){if(u){var e=t.to,n=t.from,s=t.passengers,o=t.order,i=void 0===o?1/0:o;if(e&&n&&s){var a={to:e,from:n,passengers:h(s),order:i},l=Object.keys(this.transports);-1===l.indexOf(e)&&r.set(this.transports,e,[]);var c=this.$_getTransportIndex(a),d=this.transports[e].slice(0);-1===c?d.push(a):d[c]=a,this.transports[e]=f(d,(function(t,e){return t.order-e.order}))}}},close:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.to,s=t.from;if(n&&(s||!1!==e)&&this.transports[n])if(e)this.transports[n]=[];else{var r=this.$_getTransportIndex(t);if(r>=0){var o=this.transports[n].slice(0);o.splice(r,1),this.transports[n]=o}}},registerTarget:function(t,e,n){u&&(this.trackInstances&&!n&&this.targets[t]&&console.warn("[portal-vue]: Target ".concat(t," already exists")),this.$set(this.targets,t,Object.freeze([e])))},unregisterTarget:function(t){this.$delete(this.targets,t)},registerSource:function(t,e,n){u&&(this.trackInstances&&!n&&this.sources[t]&&console.warn("[portal-vue]: source ".concat(t," already exists")),this.$set(this.sources,t,Object.freeze([e])))},unregisterSource:function(t){this.$delete(this.sources,t)},hasTarget:function(t){return!(!this.targets[t]||!this.targets[t][0])},hasSource:function(t){return!(!this.sources[t]||!this.sources[t][0])},hasContentFor:function(t){return!!this.transports[t]&&!!this.transports[t].length},$_getTransportIndex:function(t){var e=t.to,n=t.from;for(var s in this.transports[e])if(this.transports[e][s].from===n)return+s;return-1}}}),v=new b(m),T=1,S=r.extend({name:"portal",props:{disabled:{type:Boolean},name:{type:String,default:function(){return String(T++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}}},created:function(){var t=this;this.$nextTick((function(){v.registerSource(t.name,t)}))},mounted:function(){this.disabled||this.sendUpdate()},updated:function(){this.disabled?this.clear():this.sendUpdate()},beforeDestroy:function(){v.unregisterSource(this.name),this.clear()},watch:{to:function(t,e){e&&e!==t&&this.clear(e),this.sendUpdate()}},methods:{clear:function(t){var e={from:this.name,to:t||this.to};v.close(e)},normalizeSlots:function(){return this.$scopedSlots.default?[this.$scopedSlots.default]:this.$slots.default},normalizeOwnChildren:function(t){return"function"===typeof t?t(this.slotProps):t},sendUpdate:function(){var t=this.normalizeSlots();if(t){var e={from:this.name,to:this.to,passengers:i(t),order:this.order};v.open(e)}else this.clear()}},render:function(t){var e=this.$slots.default||this.$scopedSlots.default||[],n=this.tag;return e&&this.disabled?e.length<=1&&this.slim?this.normalizeOwnChildren(e)[0]:t(n,[this.normalizeOwnChildren(e)]):this.slim?t():t(n,{class:{"v-portal":!0},style:{display:"none"},key:"v-portal-placeholder"})}}),w=r.extend({name:"portalTarget",props:{multiple:{type:Boolean,default:!1},name:{type:String,required:!0},slim:{type:Boolean,default:!1},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},data:function(){return{transports:v.transports,firstRender:!0}},created:function(){var t=this;this.$nextTick((function(){v.registerTarget(t.name,t)}))},watch:{ownTransports:function(){this.$emit("change",this.children().length>0)},name:function(t,e){v.unregisterTarget(e),v.registerTarget(t,this)}},mounted:function(){var t=this;this.transition&&this.$nextTick((function(){t.firstRender=!1}))},beforeDestroy:function(){v.unregisterTarget(this.name)},computed:{ownTransports:function(){var t=this.transports[this.name]||[];return this.multiple?t:0===t.length?[]:[t[t.length-1]]},passengers:function(){return d(this.ownTransports,this.slotProps)}},methods:{children:function(){return 0!==this.passengers.length?this.passengers:this.$scopedSlots.default?this.$scopedSlots.default(this.slotProps):this.$slots.default||[]},noWrapper:function(){var t=this.slim&&!this.transition;return t&&this.children().length>1&&console.warn("[portal-vue]: PortalTarget with `slim` option received more than one child element."),t}},render:function(t){var e=this.noWrapper(),n=this.children(),s=this.transition||this.tag;return e?n[0]:this.slim&&!s?t():t(s,{props:{tag:this.transition&&this.tag?this.tag:void 0},class:{"vue-portal-target":!0}},n)}}),C=0,$=["disabled","name","order","slim","slotProps","tag","to"],k=["multiple","transition"],x=r.extend({name:"MountingPortal",inheritAttrs:!1,props:{append:{type:[Boolean,String]},bail:{type:Boolean},mountTo:{type:String,required:!0},disabled:{type:Boolean},name:{type:String,default:function(){return"mounted_"+String(C++)}},order:{type:Number,default:0},slim:{type:Boolean},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"DIV"},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}},multiple:{type:Boolean,default:!1},targetSlim:{type:Boolean},targetSlotProps:{type:Object,default:function(){return{}}},targetTag:{type:String,default:"div"},transition:{type:[String,Object,Function]}},created:function(){if("undefined"!==typeof document){var t=document.querySelector(this.mountTo);if(t){var e=this.$props;if(v.targets[e.name])e.bail?console.warn("[portal-vue]: Target ".concat(e.name," is already mounted.\n Aborting because 'bail: true' is set")):this.portalTarget=v.targets[e.name];else{var n=e.append;if(n){var s="string"===typeof n?n:"DIV",r=document.createElement(s);t.appendChild(r),t=r}var o=p(this.$props,k);o.slim=this.targetSlim,o.tag=this.targetTag,o.slotProps=this.targetSlotProps,o.name=this.to,this.portalTarget=new w({el:t,parent:this.$parent||this,propsData:o})}}else console.error("[portal-vue]: Mount Point '".concat(this.mountTo,"' not found in document"))}},beforeDestroy:function(){var t=this.portalTarget;if(this.append){var e=t.$el;e.parentNode.removeChild(e)}t.$destroy()},render:function(t){if(!this.portalTarget)return console.warn("[portal-vue] Target wasn't mounted"),t();if(!this.$scopedSlots.manual){var e=p(this.$props,$);return t(S,{props:e,attrs:this.$attrs,on:this.$listeners,scopedSlots:this.$scopedSlots},this.$slots.default)}var n=this.$scopedSlots.manual({to:this.to});return Array.isArray(n)&&(n=n[0]),n||t()}});function I(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.component(e.portalName||"Portal",S),t.component(e.portalTargetName||"PortalTarget",w),t.component(e.MountingPortalName||"MountingPortal",x)}var P={install:I};e.h_=S,e.YC=w},8571:function(t,e){e["Z"]={state:{codeColors:null},reset(){this.state.codeColors=null},updateCodeColors(t){const e=t=>t?`rgba(${t.red}, ${t.green}, ${t.blue}, ${t.alpha})`:null;this.state.codeColors=Object.entries(t).reduce(((t,[n,s])=>({...t,[n]:e(s)})),{})}}},114:function(t,e,n){function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:function(){return o}});var r=n(7486);class o{constructor(t){s(this,"focusContainer",null),s(this,"tabTargets",[]),s(this,"firstTabTarget",null),s(this,"lastTabTarget",null),s(this,"lastFocusedElement",null),this.focusContainer=t,this.onFocus=this.onFocus.bind(this)}updateFocusContainer(t){this.focusContainer=t}start(){this.collectTabTargets(),this.firstTabTarget?this.focusContainer.contains(document.activeElement)&&r.ZP.isTabbableElement(document.activeElement)||this.firstTabTarget.focus():console.warn("There are no focusable elements. FocusTrap needs at least one."),this.lastFocusedElement=document.activeElement,document.addEventListener("focus",this.onFocus,!0)}stop(){document.removeEventListener("focus",this.onFocus,!0)}collectTabTargets(){this.tabTargets=r.ZP.getTabbableElements(this.focusContainer),this.firstTabTarget=this.tabTargets[0],this.lastTabTarget=this.tabTargets[this.tabTargets.length-1]}onFocus(t){if(this.focusContainer.contains(t.target))this.lastFocusedElement=t.target;else{if(t.preventDefault(),this.collectTabTargets(),this.lastFocusedElement===this.lastTabTarget||!this.lastFocusedElement||!document.contains(this.lastFocusedElement))return this.firstTabTarget.focus(),void(this.lastFocusedElement=this.firstTabTarget);this.lastFocusedElement===this.firstTabTarget&&(this.lastTabTarget.focus(),this.lastFocusedElement=this.lastTabTarget)}}destroy(){this.stop(),this.focusContainer=null,this.tabTargets=[],this.firstTabTarget=null,this.lastTabTarget=null,this.lastFocusedElement=null}}}}]); \ No newline at end of file diff --git a/docs/js/866.5699f408.js b/docs/js/866.5699f408.js new file mode 100644 index 00000000..eb689e81 --- /dev/null +++ b/docs/js/866.5699f408.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[866],{4655:function(e,t,n){"use strict";n.d(t,{Z:function(){return F}});var r,i,s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"asset"},[t(e.assetComponent,e._g(e._b({tag:"component"},"component",e.assetProps,!1),e.assetListeners))],1)},a=[],o=n(6769),l=function(){var e=this,t=e._self._c;return t("ConditionalWrapper",{ref:"wrapper",attrs:{tag:e.DeviceFrameComponent,"should-wrap":!!e.deviceFrame,device:e.deviceFrame}},[t("div",[t("video",{key:e.videoAttributes.url,ref:"video",attrs:{id:e.id,controls:e.showsDefaultControls,"data-orientation":e.orientation,autoplay:e.autoplays,poster:e.normalisedPosterPath,width:e.optimalWidth,"aria-roledescription":e.$t("video.title"),"aria-labelledby":e.showsDefaultControls&&e.alt?e.altTextId:null,playsinline:""},domProps:{muted:e.muted},on:{loadedmetadata:e.setOrientation,playing:function(t){return e.$emit("playing")},pause:function(t){return e.$emit("pause")},ended:function(t){return e.$emit("ended")}}},[t("source",{attrs:{src:e.normalizePath(e.videoAttributes.url)}})]),e.alt?t("span",{attrs:{id:e.altTextId,hidden:""}},[e._v(" "+e._s(e.$t("video.description",{alt:e.alt}))+" ")]):e._e()])])},c=[],u=n(5947),d=n(4030),A=n(9804),p={functional:!0,name:"ConditionalWrapper",props:{tag:[Object,String],shouldWrap:Boolean},render(e,t){return t.props.shouldWrap?e(t.props.tag,t.data,t.children):t.children}},h=p,g=n(1001),f=(0,g.Z)(h,r,i,!1,null,null,null),m=f.exports,v=n(889),b={name:"VideoAsset",components:{ConditionalWrapper:m},props:{variants:{type:Array,required:!0},showsDefaultControls:{type:Boolean,default:()=>!1},autoplays:{type:Boolean,default:()=>!1},posterVariants:{type:Array,required:!1,default:()=>[]},muted:{type:Boolean,default:!1},deviceFrame:{type:String,required:!1},alt:{type:String,required:!1},id:{type:String,required:!0}},data:()=>({appState:d["default"].state,optimalWidth:null,orientation:null}),computed:{DeviceFrameComponent:()=>v.Z,preferredColorScheme:({appState:e})=>e.preferredColorScheme,systemColorScheme:({appState:e})=>e.systemColorScheme,altTextId:({id:e})=>`${e}-alt`,userPrefersDark:({preferredColorScheme:e,systemColorScheme:t})=>e===A.Z.dark||e===A.Z.auto&&t===A.Z.dark,shouldShowDarkVariant:({darkVideoVariantAttributes:e,userPrefersDark:t})=>e&&t,defaultVideoAttributes(){return this.videoVariantsGroupedByAppearance.light[0]||this.darkVideoVariantAttributes||{}},darkVideoVariantAttributes(){return this.videoVariantsGroupedByAppearance.dark[0]},videoVariantsGroupedByAppearance(){return(0,u.XV)(this.variants)},posterVariantsGroupedByAppearance(){const{light:e,dark:t}=(0,u.XV)(this.posterVariants);return{light:(0,u.u)(e),dark:(0,u.u)(t)}},defaultPosterAttributes:({posterVariantsGroupedByAppearance:e,userPrefersDark:t})=>t&&e.dark.length?e.dark[0]:e.light[0]||{},normalisedPosterPath:({defaultPosterAttributes:e})=>(0,u.AH)(e.src),videoAttributes:({darkVideoVariantAttributes:e,defaultVideoAttributes:t,shouldShowDarkVariant:n})=>n?e:t},watch:{normalisedPosterPath:{immediate:!0,handler:"getPosterDimensions"}},methods:{normalizePath:u.AH,async getPosterDimensions(e){if(!e)return void(this.optimalWidth=null);const{density:t}=this.defaultPosterAttributes,n=parseInt(t.match(/\d+/)[0],10),{width:r}=await(0,u.RY)(e);this.optimalWidth=r/n},setOrientation(){const{videoWidth:e,videoHeight:t}=this.$refs.video;this.orientation=(0,u.T8)(e,t)}}},y=b,C=(0,g.Z)(y,l,c,!1,null,null,null),I=C.exports,w=function(){var e=this,t=e._self._c;return t("div",{staticClass:"video-replay-container",attrs:{role:"group","aria-roledescription":e.$t("video.title"),"aria-labelledby":e.showsDefaultControls?null:e.ariaLabelledByContainer}},[t("span",{attrs:{id:`${e.id}-custom-controls`,hidden:""}},[e._v(" "+e._s(e.$t("video.custom-controls"))+" ")]),t("VideoAsset",{ref:"asset",attrs:{variants:e.variants,autoplays:e.autoplays,showsDefaultControls:e.showsDefaultControls,muted:e.muted,posterVariants:e.posterVariants,deviceFrame:e.deviceFrame,alt:e.alt,id:e.id},on:{pause:e.onPause,playing:e.onVideoPlaying,ended:e.onVideoEnd}}),e.showsDefaultControls?e._e():t("a",{staticClass:"control-button",attrs:{href:"#","aria-controls":e.id},on:{click:function(t){return t.preventDefault(),e.togglePlayStatus.apply(null,arguments)}}},[e._v(" "+e._s(e.text)+" "),e.videoEnded?t("InlineReplayIcon",{staticClass:"control-icon icon-inline"}):e.isPlaying?t("PauseIcon",{staticClass:"control-icon icon-inline"}):t("PlayIcon",{staticClass:"control-icon icon-inline"})],1)],1)},E=[],B=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"inline-replay-icon",attrs:{viewBox:"0 0 14 14",themeId:"inline-replay"}},[t("path",{attrs:{d:"M2.254 10.201c-1.633-2.613-0.838-6.056 1.775-7.689 2.551-1.594 5.892-0.875 7.569 1.592l0.12 0.184-0.848 0.53c-1.34-2.145-4.166-2.797-6.311-1.457s-2.797 4.166-1.457 6.311 4.166 2.797 6.311 1.457c1.006-0.629 1.71-1.603 2.003-2.723l0.056-0.242 0.98 0.201c-0.305 1.487-1.197 2.792-2.51 3.612-2.613 1.633-6.056 0.838-7.689-1.775z"}}),t("path",{attrs:{d:"M10.76 1.355l0.984-0.18 0.851 4.651-4.56-1.196 0.254-0.967 3.040 0.796z"}})])},x=[],k=n(9742),_={name:"InlineReplayIcon",components:{SVGIcon:k.Z}},S=_,T=(0,g.Z)(S,B,x,!1,null,null,null),L=T.exports,P=n(6698),Q=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"pause-icon",attrs:{viewBox:"0 0 14 14",themeId:"pause"}},[t("path",{attrs:{d:"M5 4h1v6h-1z"}}),t("path",{attrs:{d:"M8 4h1v6h-1z"}}),t("path",{attrs:{d:"M7 0.5c-3.6 0-6.5 2.9-6.5 6.5s2.9 6.5 6.5 6.5 6.5-2.9 6.5-6.5-2.9-6.5-6.5-6.5zM7 12.5c-3 0-5.5-2.5-5.5-5.5s2.5-5.5 5.5-5.5 5.5 2.5 5.5 5.5-2.5 5.5-5.5 5.5z"}})])},M=[],Z={name:"PauseIcon",components:{SVGIcon:k.Z}},D=Z,O=(0,g.Z)(D,Q,M,!1,null,null,null),R=O.exports,N={name:"ReplayableVideoAsset",components:{PauseIcon:R,PlayIcon:P.Z,InlineReplayIcon:L,VideoAsset:I},props:{variants:{type:Array,required:!0},alt:{type:String,required:!1},id:{type:String,required:!0},showsDefaultControls:{type:Boolean,default:()=>!1},autoplays:{type:Boolean,default:()=>!1},muted:{type:Boolean,default:!1},posterVariants:{type:Array,default:()=>[]},deviceFrame:{type:String,required:!1}},computed:{text(){return this.videoEnded?this.$t("video.replay"):this.isPlaying?this.$t("video.pause"):this.$t("video.play")},ariaLabelledByContainer:({id:e,alt:t})=>t?`${e}-custom-controls ${e}-alt`:`${e}-custom-controls`},data(){return{isPlaying:!1,videoEnded:!1}},methods:{async togglePlayStatus(){const e=this.$refs.asset.$refs.video;e&&(this.isPlaying&&!this.videoEnded?await e.pause():await e.play())},onVideoEnd(){this.isPlaying=!1,this.videoEnded=!0},onVideoPlaying(){const{video:e}=this.$refs.asset.$refs;this.isPlaying=!e.paused,this.videoEnded=e.ended},onPause(){const{video:e}=this.$refs.asset.$refs;!this.showsDefaultControls&&this.isPlaying&&(this.isPlaying=!1),this.videoEnded=e.ended}}},j=N,V=(0,g.Z)(j,w,E,!1,null,"3fb37a97",null),G=V.exports,$=n(5953);const z={video:"video",image:"image"};var q={name:"Asset",components:{ImageAsset:o.Z,VideoAsset:I},constants:{AssetTypes:z},mixins:[$.Z],props:{identifier:{type:String,required:!0},showsReplayButton:{type:Boolean,default:()=>!0},showsVideoControls:{type:Boolean,default:()=>!1},videoAutoplays:{type:Boolean,default:()=>!1},videoMuted:{type:Boolean,default:!1},deviceFrame:{type:String,required:!1}},computed:{rawAsset(){return this.references[this.identifier]||{}},isRawAssetVideo:({rawAsset:e})=>e.type===z.video,videoPoster(){return this.isRawAssetVideo&&this.references[this.rawAsset.poster]},asset(){return this.isRawAssetVideo&&this.prefersReducedMotion&&this.videoPoster||this.rawAsset},assetComponent(){switch(this.asset.type){case z.image:return o.Z;case z.video:return this.showsReplayButton?G:I;default:return}},prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion)").matches},assetProps(){return{[z.image]:this.imageProps,[z.video]:this.videoProps}[this.asset.type]},imageProps(){return{alt:this.asset.alt,variants:this.asset.variants}},videoProps(){return{variants:this.asset.variants,showsDefaultControls:this.showsVideoControls,muted:this.videoMuted,autoplays:!this.prefersReducedMotion&&this.videoAutoplays,posterVariants:this.videoPoster?this.videoPoster.variants:[],deviceFrame:this.deviceFrame,alt:this.asset.alt,id:this.identifier}},assetListeners(){return{[z.image]:null,[z.video]:{ended:()=>this.$emit("videoEnded")}}[this.asset.type]}}},H=q,W=(0,g.Z)(H,s,a,!1,null,"6ab0b718",null),F=W.exports},7188:function(e,t,n){"use strict";n.d(t,{default:function(){return h}});var r=n(5381);const i=e=>e?`(max-width: ${e}px)`:"",s=e=>e?`(min-width: ${e}px)`:"";function a({minWidth:e,maxWidth:t}){return["only screen",s(e),i(t)].filter(Boolean).join(" and ")}function o({maxWidth:e,minWidth:t}){return window.matchMedia(a({minWidth:t,maxWidth:e}))}var l,c,u={name:"BreakpointEmitter",constants:{BreakpointAttributes:r.kB,BreakpointName:r.L3,BreakpointScopes:r.lU},props:{scope:{type:String,default:()=>r.lU["default"],validator:e=>e in r.lU}},render(){return this.$scopedSlots.default?this.$scopedSlots.default({matchingBreakpoint:this.matchingBreakpoint}):null},data:()=>({matchingBreakpoint:null}),methods:{initMediaQuery(e,t){const n=o(t),r=t=>this.handleMediaQueryChange(t,e);n.addListener(r),this.$once("hook:beforeDestroy",(()=>{n.removeListener(r)})),r(n)},handleMediaQueryChange(e,t){e.matches&&(this.matchingBreakpoint=t,this.$emit("change",t))}},mounted(){const e=r.kB[this.scope]||{};Object.entries(e).forEach((([e,t])=>{this.initMediaQuery(e,t)}))}},d=u,A=n(1001),p=(0,A.Z)(d,l,c,!1,null,null,null),h=p.exports},5281:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t(e.resolvedComponent,e._b({tag:"component",staticClass:"button-cta",class:{"is-dark":e.isDark}},"component",e.componentProps,!1),[e._t("default")],2)},i=[],s=n(4260),a={name:"ButtonLink",components:{Reference:s.Z},props:{url:{type:String,required:!1},isDark:{type:Boolean,default:!1}},computed:{resolvedComponent:({url:e})=>e?s.Z:"button",componentProps:({url:e})=>e?{url:e}:{}}},o=a,l=n(1001),c=(0,l.Z)(o,r,i,!1,null,"c9c81868",null),u=c.exports},7605:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=function(){var e=this,t=e._self._c;return e.action?t("DestinationDataProvider",{attrs:{destination:e.action},scopedSlots:e._u([{key:"default",fn:function({url:n,title:r}){return[t("ButtonLink",{attrs:{url:n,isDark:e.isDark}},[e._v(" "+e._s(r)+" ")])]}}],null,!1,710653997)}):e._e()},i=[],s=n(5281),a=n(1295),o={name:"CallToActionButton",components:{DestinationDataProvider:a.Z,ButtonLink:s.Z},props:{action:{type:Object,required:!0},isDark:{type:Boolean,default:!1}}},l=o,c=n(1001),u=(0,c.Z)(l,r,i,!1,null,null,null),d=u.exports},3917:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=function(){var e=this,t=e._self._c;return t("code",{attrs:{tabindex:"0","data-before-code":e.$t("accessibility.code.start"),"data-after-code":e.$t("accessibility.code.end")}},[e._t("default")],2)},i=[],s={name:"CodeBlock"},a=s,o=n(1001),l=(0,o.Z)(a,r,i,!1,null,"08295b2f",null),c=l.exports},9519:function(e,t,n){"use strict";n.r(t),n.d(t,{BlockType:function(){return _t},default:function(){return Nt}});var r=n(5953),i=n(7587),s=n(5996),a=n(8039),o=n(2020),l=function(){var e=this,t=e._self._c;return t("div",{staticClass:"DictionaryExample"},[e._t("default"),t("CollapsibleCodeListing",{attrs:{content:e.example.content,showLineNumbers:""}})],2)},c=[],u=function(){var e=this,t=e._self._c;return t("div",{staticClass:"collapsible-code-listing",class:{"single-line":1===e.content[0].code.length}},[t("pre",[t("CodeBlock",e._l(this.content,(function(n,r){return t("div",{key:r,class:["container-general",{collapsible:!0===n.collapsible},{collapsed:!0===n.collapsible&&e.collapsed}]},e._l(n.code,(function(n,r){return t("div",{key:r,staticClass:"code-line-container"},[e._v("\n "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.showLineNumbers,expression:"showLineNumbers"}],staticClass:"code-number"}),e._v("\n "),t("div",{staticClass:"code-line"},[e._v(e._s(n))]),e._v("\n ")])})),0)})),0)],1)])},d=[],A=n(3917),p={name:"CollapsibleCodeListing",components:{CodeBlock:A.Z},props:{collapsed:{type:Boolean,required:!1},content:{type:Array,required:!0},showLineNumbers:{type:Boolean,default:()=>!0}}},h=p,g=n(1001),f=(0,g.Z)(h,u,d,!1,null,"25a17a0e",null),m=f.exports,v={name:"DictionaryExample",components:{CollapsibleCodeListing:m},props:{example:{type:Object,required:!0}}},b=v,y=(0,g.Z)(b,l,c,!1,null,null,null),C=y.exports,I=function(){var e=this,t=e._self._c;return t("Row",{staticClass:"endpoint-example"},[t("Column",{staticClass:"example-code"},[e._t("default"),t("Tabnav",{model:{value:e.currentTab,callback:function(t){e.currentTab=t},expression:"currentTab"}},[t("TabnavItem",{attrs:{value:e.Tab.request}},[e._v(e._s(e.$t("tab.request")))]),t("TabnavItem",{attrs:{value:e.Tab.response}},[e._v(e._s(e.$t("tab.response")))])],1),t("div",{staticClass:"output"},[e.isCurrent(e.Tab.request)?t("div",{staticClass:"code"},[t("CollapsibleCodeListing",e._b({attrs:{collapsed:e.isCollapsed,showLineNumbers:""}},"CollapsibleCodeListing",e.request,!1))],1):e._e(),e.isCurrent(e.Tab.response)?t("div",{staticClass:"code"},[t("CollapsibleCodeListing",e._b({attrs:{collapsed:e.isCollapsed,showLineNumbers:""}},"CollapsibleCodeListing",e.response,!1))],1):e._e()]),e.isCollapsible?t("div",{staticClass:"controls"},[e.isCollapsed?t("a",{staticClass:"toggle",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.showMore.apply(null,arguments)}}},[t("InlinePlusCircleSolidIcon",{staticClass:"control-icon icon-inline"}),e._v(" "+e._s(e.$t("more"))+" ")],1):t("a",{staticClass:"toggle",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.showLess.apply(null,arguments)}}},[t("InlineMinusCircleSolidIcon",{staticClass:"control-icon icon-inline"}),e._v(" "+e._s(e.$t("less"))+" ")],1)]):e._e()],2)],1)},w=[],E=n(9649),B=n(1576),x=function(){var e=this,t=e._self._c;return t("nav",{staticClass:"tabnav",class:{[`tabnav--${e.position}`]:e.position,"tabnav--vertical":e.vertical}},[t("ul",{staticClass:"tabnav-items"},[e._t("default")],2)])},k=[];const _="tabnavData";var S={name:"Tabnav",constants:{ProvideKey:_},provide(){const e={selectTab:this.selectTab};return Object.defineProperty(e,"activeTab",{enumerable:!0,get:()=>this.value}),{[_]:e}},props:{position:{type:String,required:!1,validator:e=>new Set(["start","center","end"]).has(e)},vertical:{type:Boolean,default:!1},value:{type:[String,Number],required:!0}},methods:{selectTab(e){this.$emit("input",e)}}},T=S,L=(0,g.Z)(T,x,k,!1,null,"5572fe1d",null),P=L.exports,Q=function(){var e=this,t=e._self._c;return t("li",{staticClass:"tabnav-item"},[t("a",{staticClass:"tabnav-link",class:{active:e.isActive},attrs:{href:"#","aria-current":e.isActive?"true":"false"},on:{click:function(t){return t.preventDefault(),e.tabnavData.selectTab(e.value)}}},[e._t("default")],2)])},M=[],Z={name:"TabnavItem",inject:{tabnavData:{default:{activeTab:null,selectTab:()=>{}}}},props:{value:{type:[String,Number],default:null}},computed:{isActive({tabnavData:e,value:t}){return e.activeTab===t}}},D=Z,O=(0,g.Z)(D,Q,M,!1,null,"6aa9882a",null),R=O.exports,N=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"inline-plus-circle-solid-icon",attrs:{viewBox:"0 0 14 14",themeId:"inline-plus-circle-solid"}},[t("path",{attrs:{d:"M7.005 0.5h-0.008c-1.791 0.004-3.412 0.729-4.589 1.9l0-0c-1.179 1.177-1.908 2.803-1.908 4.6 0 3.59 2.91 6.5 6.5 6.5s6.5-2.91 6.5-6.5c0-3.587-2.906-6.496-6.492-6.5h-0zM4.005 7.52v-1h2.5v-2.51h1v2.51h2.5v1h-2.501v2.49h-1v-2.49z"}})])},j=[],V=n(9742),G={name:"InlinePlusCircleSolidIcon",components:{SVGIcon:V.Z}},$=G,z=(0,g.Z)($,N,j,!1,null,null,null),q=z.exports,H=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"inline-minus-circle-solid-icon",attrs:{viewBox:"0 0 14 14",themeId:"inline-minus-circle-solid"}},[t("path",{attrs:{d:"m6.98999129.48999129c3.58985091 0 6.50000001 2.91014913 6.50000001 6.5 0 3.58985091-2.9101491 6.50000001-6.50000001 6.50000001-3.58985087 0-6.5-2.9101491-6.5-6.50000001 0-3.58985087 2.91014913-6.5 6.5-6.5zm3 6.02001742h-6v1h6z","fill-rule":"evenodd"}})])},W=[],F={name:"InlineMinusCircleSolidIcon",components:{SVGIcon:V.Z}},U=F,Y=(0,g.Z)(U,H,W,!1,null,null,null),X=Y.exports;const K={request:"Request",response:"Response"};var J={name:"EndpointExample",components:{InlineMinusCircleSolidIcon:X,InlinePlusCircleSolidIcon:q,TabnavItem:R,Tabnav:P,CollapsibleCodeListing:m,Row:E.Z,Column:B.Z},constants:{Tab:K},props:{request:{type:Object,required:!0},response:{type:Object,required:!0}},data(){return{isCollapsed:!0,currentTab:K.request}},computed:{Tab:()=>K,isCollapsible:({response:e,request:t,currentTab:n})=>{const r={[K.request]:t.content,[K.response]:e.content}[n]||[];return r.some((({collapsible:e})=>e))}},methods:{isCurrent(e){return this.currentTab===e},showMore(){this.isCollapsed=!1},showLess(){this.isCollapsed=!0}}},ee=J,te=(0,g.Z)(ee,I,w,!1,null,"c84e62a6",null),ne=te.exports,re=function(){var e=this,t=e._self._c;return t("figure",{attrs:{id:e.anchor}},[e._t("default")],2)},ie=[],se={name:"Figure",props:{anchor:{type:String,required:!1}}},ae=se,oe=(0,g.Z)(ae,re,ie,!1,null,null,null),le=oe.exports,ce=function(){var e=this,t=e._self._c;return t(e.tag,{tag:"component",staticClass:"caption",class:{trailing:e.trailing}},[e.title?[t("strong",[e._v(e._s(e.title))]),e._v(" "),e._t("default")]:[e._t("default")]],2)},ue=[];const de={caption:"caption",figcaption:"figcaption"},Ae={leading:"leading",trailing:"trailing"};var pe={name:"Caption",constants:{CaptionPosition:Ae,CaptionTag:de},props:{title:{type:String,required:!1},tag:{type:String,required:!0,validator:e=>Object.hasOwnProperty.call(de,e)},position:{type:String,default:()=>Ae.leading,validator:e=>Object.hasOwnProperty.call(Ae,e)}},computed:{trailing:({position:e})=>e===Ae.trailing}},he=pe,ge=(0,g.Z)(he,ce,ue,!1,null,"869c6f6e",null),fe=ge.exports,me=function(){var e=this,t=e._self._c;return t("ImageAsset",{attrs:{alt:e.alt,variants:e.variants}})},ve=[],be=n(6769),ye={name:"InlineImage",components:{ImageAsset:be.Z},props:{alt:{type:String,default:""},variants:{type:Array,required:!0}}},Ce=ye,Ie=(0,g.Z)(Ce,me,ve,!1,null,"bf997940",null),we=Ie.exports,Ee=n(4260),Be=function(){var e=this,t=e._self._c;return t("div",{staticClass:"table-wrapper"},[t("table",{class:{spanned:e.spanned}},[e._t("default")],2)])},xe=[],ke={name:"Table",props:{spanned:{type:Boolean,default:!1}}},_e=ke,Se=(0,g.Z)(_e,Be,xe,!1,null,"f3322390",null),Te=Se.exports,Le=function(){var e=this,t=e._self._c;return t("s",{attrs:{"data-before-text":e.$t("accessibility.strike.start"),"data-after-text":e.$t("accessibility.strike.end")}},[e._t("default")],2)},Pe=[],Qe={name:"StrikeThrough"},Me=Qe,Ze=(0,g.Z)(Me,Le,Pe,!1,null,"7fc51673",null),De=Ze.exports,Oe=function(){var e=this,t=e._self._c;return t("small",[e._t("default")],2)},Re=[],Ne={name:"Small"},je=Ne,Ve=(0,g.Z)(je,Oe,Re,!1,null,"77035f61",null),Ge=Ve.exports,$e=function(){var e=this,t=e._self._c;return t("Asset",{attrs:{identifier:e.identifier,deviceFrame:e.deviceFrame}})},ze=[],qe=n(4655),He={name:"BlockVideo",components:{Asset:qe.Z},props:{identifier:{type:String,required:!0},deviceFrame:{type:String,required:!1}}},We=He,Fe=(0,g.Z)(We,$e,ze,!1,null,"4f18340d",null),Ue=Fe.exports,Ye=n(3938),Xe=n(3002),Ke=function(){var e=this,t=e._self._c;return t("div",{staticClass:"TabNavigator",class:[{"tabs--vertical":e.vertical}]},[t("Tabnav",e._b({model:{value:e.currentTitle,callback:function(t){e.currentTitle=t},expression:"currentTitle"}},"Tabnav",{position:e.position,vertical:e.vertical},!1),e._l(e.titles,(function(n){return t("TabnavItem",{key:n,attrs:{value:n}},[e._v(" "+e._s(n)+" ")])})),1),t("div",{staticClass:"tabs-content"},[t("div",{staticClass:"tabs-content-container"},[t("transition-group",{attrs:{name:"fade"}},[e._l(e.titles,(function(n){return[t("div",{directives:[{name:"show",rawName:"v-show",value:n===e.currentTitle,expression:"title === currentTitle"}],key:n,staticClass:"tab-container",class:{active:n===e.currentTitle}},[e._t(n)],2)]}))],2)],1)])],1)},Je=[],et={name:"TabNavigator",components:{TabnavItem:R,Tabnav:P},props:{vertical:{type:Boolean,default:!1},position:{type:String,default:"start",validator:e=>new Set(["start","center","end"]).has(e)},titles:{type:Array,required:!0,default:()=>[]}},data(){return{currentTitle:this.titles[0]}},watch:{titles(e,t){if(e.length!t.includes(e)));this.currentTitle=n||this.currentTitle}}}},tt=et,nt=(0,g.Z)(tt,Ke,Je,!1,null,"e671a734",null),rt=nt.exports,it=function(){var e=this,t=e._self._c;return t("ul",{staticClass:"tasklist"},e._l(e.tasks,(function(n,r){return t("li",{key:r},[e.showCheckbox(n)?t("input",{attrs:{type:"checkbox",disabled:""},domProps:{checked:n.checked}}):e._e(),e._t("task",null,{task:n})],2)})),0)},st=[];const at="checked",ot=e=>Object.hasOwnProperty.call(e,at);var lt={name:"TaskList",props:{tasks:{required:!0,type:Array,validator:e=>e.some(ot)}},methods:{showCheckbox:ot}},ct=lt,ut=(0,g.Z)(ct,it,st,!1,null,"6a56a858",null),dt=ut.exports,At=function(){var e=this,t=e._self._c;return e.isListStyle?t("div",{staticClass:"links-block"},e._l(e.items,(function(e){return t("TopicsLinkBlock",{key:e.identifier,staticClass:"topic-link-block",attrs:{topic:e}})})),1):t("TopicsLinkCardGrid",{staticClass:"links-block",attrs:{items:e.items,"topic-style":e.blockStyle}})},pt=[],ht=n(1105),gt=n(3946),ft={name:"LinksBlock",mixins:[r.Z],components:{TopicsLinkBlock:()=>Promise.all([n.e(104),n.e(989)]).then(n.bind(n,8104)),TopicsLinkCardGrid:ht.Z},props:{identifiers:{type:Array,required:!0},blockStyle:{type:String,default:gt.o.compactGrid}},computed:{isListStyle:({blockStyle:e})=>e===gt.o.list,items:({identifiers:e,references:t})=>e.reduce(((e,n)=>t[n]?e.concat(t[n]):e),[])}},mt=ft,vt=(0,g.Z)(mt,At,pt,!1,null,"b1a75c1c",null),bt=vt.exports,yt=n(889),Ct=function(){var e=this,t=e._self._c;return t("hr",{staticClass:"thematic-break"})},It=[],wt={},Et=(0,g.Z)(wt,Ct,It,!1,null,"62d2922a",null),Bt=Et.exports;const{CaptionPosition:xt,CaptionTag:kt}=fe.constants,_t={aside:"aside",codeListing:"codeListing",endpointExample:"endpointExample",heading:"heading",orderedList:"orderedList",paragraph:"paragraph",table:"table",termList:"termList",unorderedList:"unorderedList",dictionaryExample:"dictionaryExample",small:"small",video:"video",row:"row",tabNavigator:"tabNavigator",links:"links",thematicBreak:"thematicBreak"},St={codeVoice:"codeVoice",emphasis:"emphasis",image:"image",inlineHead:"inlineHead",link:"link",newTerm:"newTerm",reference:"reference",strong:"strong",text:"text",superscript:"superscript",subscript:"subscript",strikethrough:"strikethrough"},Tt={both:"both",column:"column",none:"none",row:"row"},Lt={left:"left",right:"right",center:"center",unset:"unset"},Pt=7;function Qt(e,t){const n=n=>n.map(Qt(e,t)),r=t=>t.map((t=>e("li",{},n(t.content)))),l=(t,r,i,s,a,o,l)=>{const{colspan:c,rowspan:u}=o[`${a}_${s}`]||{};if(0===c||0===u)return null;const d=l[s]||Lt.unset;let A=null;return d!==Lt.unset&&(A=`${d}-cell`),e(t,{attrs:{...r,colspan:c,rowspan:u},class:A},n(i))},c=(t,n=Tt.none,r={},i=[])=>{switch(n){case Tt.both:{const[n,...s]=t;return[e("thead",{},[e("tr",{},n.map(((e,t)=>l("th",{scope:"col"},e,t,0,r,i))))]),e("tbody",{},s.map((([t,...n],s)=>e("tr",{},[l("th",{scope:"row"},t,0,s+1,r,i),...n.map(((e,t)=>l("td",{},e,t+1,s+1,r,i)))]))))]}case Tt.column:return[e("tbody",{},t.map((([t,...n],s)=>e("tr",{},[l("th",{scope:"row"},t,0,s,r,i),...n.map(((e,t)=>l("td",{},e,t+1,s,r,i)))]))))];case Tt.row:{const[n,...s]=t;return[e("thead",{},[e("tr",{},n.map(((e,t)=>l("th",{scope:"col"},e,t,0,r,i))))]),e("tbody",{},s.map(((t,n)=>e("tr",{},t.map(((e,t)=>l("td",{},e,t,n+1,r,i)))))))]}default:return[e("tbody",{},t.map(((t,n)=>e("tr",{},t.map(((e,t)=>l("td",{},e,t,n,r,i)))))))]}},u=({metadata:{abstract:t=[],anchor:r,title:i,...s},...a})=>{const o={...a,metadata:s},l=[n([o])];if(i&&t.length||t.length){const r=i?xt.leading:xt.trailing,s=r===xt.trailing?1:0,a=kt.figcaption;l.splice(s,0,e(fe,{props:{title:i,position:r,tag:a}},n(t)))}return e(le,{props:{anchor:r}},l)},d=({metadata:{deviceFrame:t},...r})=>e(yt.Z,{props:{device:t}},n([r]));return function(l){switch(l.type){case _t.aside:{const t={kind:l.style,name:l.name};return e(i.Z,{props:t},n(l.content))}case _t.codeListing:{if(l.metadata&&l.metadata.anchor)return u(l);const t={syntax:l.syntax,fileType:l.fileType,content:l.code,showLineNumbers:l.showLineNumbers};return e(s.Z,{props:t})}case _t.endpointExample:{const t={request:l.request,response:l.response};return e(ne,{props:t},n(l.summary||[]))}case _t.heading:{const t={anchor:l.anchor,level:l.level};return e(a.Z,{props:t},l.text)}case _t.orderedList:return e("ol",{attrs:{start:l.start}},r(l.items));case _t.paragraph:{const t=1===l.inlineContent.length&&l.inlineContent[0].type===St.image,r=t?{class:["inline-image-container"]}:{};return e("p",r,n(l.inlineContent))}case _t.table:{const t=c(l.rows,l.header,l.extendedData,l.alignments);if(l.metadata&&l.metadata.abstract){const{title:r}=l.metadata,i=r?xt.leading:xt.trailing,s=kt.caption;t.unshift(e(fe,{props:{title:r,position:i,tag:s}},n(l.metadata.abstract)))}return e(Te,{attrs:{id:l.metadata&&l.metadata.anchor},props:{spanned:!!l.extendedData}},t)}case _t.termList:return e("dl",{},l.items.map((({term:t,definition:r})=>[e("dt",{},n(t.inlineContent)),e("dd",{},n(r.content))])));case _t.unorderedList:{const t=e=>dt.props.tasks.validator(e.items);return t(l)?e(dt,{props:{tasks:l.items},scopedSlots:{task:e=>n(e.task.content)}}):e("ul",{},r(l.items))}case _t.dictionaryExample:{const t={example:l.example};return e(C,{props:t},n(l.summary||[]))}case _t.small:return e("p",{},[e(Ge,{},n(l.inlineContent))]);case _t.video:{if(l.metadata&&l.metadata.abstract)return u(l);if(!t[l.identifier])return null;const{deviceFrame:n}=l.metadata||{};return e(Ue,{props:{identifier:l.identifier,deviceFrame:n}})}case _t.row:{const t=l.numberOfColumns?{large:l.numberOfColumns}:void 0;return e(Xe.Z,{props:{columns:t}},l.columns.map((t=>e(Ye.Z,{props:{span:t.size}},n(t.content)))))}case _t.tabNavigator:{const t=l.tabs.length>Pt,r=l.tabs.map((e=>e.title)),i=l.tabs.reduce(((e,t)=>({...e,[t.title]:()=>n(t.content)})),{});return e(rt,{props:{titles:r,vertical:t},scopedSlots:i})}case _t.links:return e(bt,{props:{blockStyle:l.style,identifiers:l.items}});case _t.thematicBreak:return e(Bt);case St.codeVoice:return e(o.Z,{},l.code);case St.emphasis:case St.newTerm:return e("em",n(l.inlineContent));case St.image:{if(l.metadata&&(l.metadata.anchor||l.metadata.abstract))return u(l);const n=t[l.identifier];return n?l.metadata&&l.metadata.deviceFrame?d(l):e(we,{props:{alt:n.alt,variants:n.variants}}):null}case St.link:return e("a",{attrs:{href:l.destination},class:"inline-link"},l.title);case St.reference:{const r=t[l.identifier];if(!r)return null;const i=l.overridingTitleInlineContent||r.titleInlineContent,s=l.overridingTitle||r.title;return e(Ee.Z,{props:{url:r.url,kind:r.kind,role:r.role,isActive:l.isActive,ideTitle:r.ideTitle,titleStyle:r.titleStyle,hasInlineFormatting:!!i},class:"inline-link"},i?n(i):s)}case St.strong:case St.inlineHead:return e("strong",n(l.inlineContent));case St.text:return"\n"===l.text?e("br"):l.text;case St.superscript:return e("sup",n(l.inlineContent));case St.subscript:return e("sub",n(l.inlineContent));case St.strikethrough:return e(De,n(l.inlineContent));default:return null}}}var Mt,Zt,Dt={name:"ContentNode",constants:{TableHeaderStyle:Tt,TableColumnAlignments:Lt},mixins:[r.Z],render:function(e){return e(this.tag,{class:"content"},this.content.map(Qt(e,this.references),this))},props:{content:{type:Array,required:!0},tag:{type:String,default:()=>"div"}},methods:{map(e){function t(n=[]){return n.map((n=>{switch(n.type){case _t.aside:return e({...n,content:t(n.content)});case _t.dictionaryExample:return e({...n,summary:t(n.summary)});case _t.paragraph:case St.emphasis:case St.strong:case St.inlineHead:case St.superscript:case St.subscript:case St.strikethrough:case St.newTerm:return e({...n,inlineContent:t(n.inlineContent)});case _t.orderedList:case _t.unorderedList:return e({...n,items:n.items.map((e=>({...e,content:t(e.content)})))});case _t.table:return e({...n,rows:n.rows.map((e=>e.map(t)))});case _t.termList:return e({...n,items:n.items.map((e=>({...e,term:{inlineContent:t(e.term.inlineContent)},definition:{content:t(e.definition.content)}})))});default:return e(n)}}))}return t(this.content)},forEach(e){function t(n=[]){n.forEach((n=>{switch(e(n),n.type){case _t.aside:t(n.content);break;case _t.paragraph:case St.emphasis:case St.strong:case St.inlineHead:case St.newTerm:case St.superscript:case St.subscript:case St.strikethrough:t(n.inlineContent);break;case _t.orderedList:case _t.unorderedList:n.items.forEach((e=>t(e.content)));break;case _t.dictionaryExample:t(n.summary);break;case _t.table:n.rows.forEach((e=>{e.forEach(t)}));break;case _t.termList:n.items.forEach((e=>{t(e.term.inlineContent),t(e.definition.content)}));break}}))}return t(this.content)},reduce(e,t){let n=t;return this.forEach((t=>{n=e(n,t)})),n}},computed:{plaintext(){const{references:e={}}=this;return this.reduce(((t,n)=>{if(n.type===_t.paragraph)return`${t}\n`;if(n.type===St.codeVoice)return`${t}${n.code}`;if(n.type===St.text)return`${t}${n.text}`;if(n.type===St.reference){const r=e[n.identifier]?.title??"";return`${t}${r}`}return t}),"").trim()}},BlockType:_t,InlineType:St},Ot=Dt,Rt=(0,g.Z)(Ot,Mt,Zt,!1,null,null,null),Nt=Rt.exports},7587:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("aside",{class:e.kind,attrs:{"aria-label":e.kind}},[t("p",{staticClass:"label"},[e._v(e._s(e.name||e.$t(e.label)))]),e._t("default")],2)},i=[];const s={deprecated:"deprecated",experiment:"experiment",important:"important",note:"note",tip:"tip",warning:"warning"};var a={name:"Aside",props:{kind:{type:String,required:!0,validator:e=>Object.prototype.hasOwnProperty.call(s,e)},name:{type:String,required:!1}},computed:{label:({kind:e})=>`aside-kind.${e}`}},o=a,l=n(1001),c=(0,l.Z)(o,r,i,!1,null,"3ccce809",null),u=c.exports},5996:function(e,t,n){"use strict";n.d(t,{Z:function(){return J}});var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"code-listing",class:{"single-line":1===e.syntaxHighlightedLines.length},attrs:{"data-syntax":e.syntaxNameNormalized}},[e.fileName?t("Filename",{attrs:{isActionable:e.isFileNameActionable,fileType:e.fileType},on:{click:function(t){return e.$emit("file-name-click")}}},[e._v(e._s(e.fileName)+" ")]):e._e(),t("div",{staticClass:"container-general"},[t("pre",[t("CodeBlock",[e._l(e.syntaxHighlightedLines,(function(n,r){return[t("span",{key:r,class:["code-line-container",{highlighted:e.isHighlighted(r)}]},[e.showLineNumbers?t("span",{staticClass:"code-number",attrs:{"data-line-number":e.lineNumberFor(r)}}):e._e(),t("span",{staticClass:"code-line",domProps:{innerHTML:e._s(n)}})]),e._v("\n")]}))],2)],1)])],1)},i=[],s=n(3208),a=n(3078),o=n(3917),l=n(3390),c=l;const u={objectivec:["objective-c"]},d={bash:["sh","zsh"],c:["h"],cpp:["cc","c++","h++","hpp","hh","hxx","cxx"],css:[],diff:["patch"],http:["https"],java:["jsp"],javascript:["js","jsx","mjs","cjs"],json:[],llvm:[],markdown:["md","mkdown","mkd"],objectivec:["mm","objc","obj-c"].concat(u.objectivec),perl:["pl","pm"],php:[],python:["py","gyp","ipython"],ruby:["rb","gemspec","podspec","thor","irb"],scss:[],shell:["console","shellsession"],swift:[],xml:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],...{NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}.VUE_APP_HLJS_LANGUAGES?Object.fromEntries({NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}.VUE_APP_HLJS_LANGUAGES.split(",").map((e=>[e,[]]))):void 0},A=new Set(["markdown","swift"]),p=Object.entries(d),h=new Set(Object.keys(d)),g=new Map;async function f(e){const t=[e];try{return await t.reduce((async(e,t)=>{let r;await e,r=A.has(t)?await n(3685)(`./${t}`):await n(2122)(`./${t}.js`),c.registerLanguage(t,r.default)}),Promise.resolve()),!0}catch(r){return console.error(`Could not load ${e} file`),!1}}function m(e){if(h.has(e))return e;const t=p.find((([,t])=>t.includes(e)));return t?t[0]:null}function v(e){if(g.has(e))return g.get(e);const t=m(e);return g.set(e,t),t}c.configure({classPrefix:"syntax-",languages:[...h]});const b=async e=>{const t=v(e);return!(!t||c.listLanguages().includes(t))&&f(t)},y=/\r\n|\r|\n/g,C=/syntax-/;function I(e){return 0===e.length?[]:e.split(y)}function w(e){return(e.trim().match(y)||[]).length}function E(e){const t=document.createElement("template");return t.innerHTML=e,t.content.childNodes}function B(e){const{className:t}=e;if(!C.test(t))return null;const n=I(e.innerHTML).reduce(((e,n)=>`${e}${n}\n`),"");return E(n.trim())}function x(e){return Array.from(e.childNodes).forEach((e=>{if(w(e.textContent))try{const t=e.childNodes.length?x(e):B(e);t&&e.replaceWith(...t)}catch(t){console.error(t)}})),B(e)}function k(e,t){const n=m(t);if(!c.getLanguage(n))throw new Error(`Unsupported language for syntax highlighting: ${t}`);return c.highlight(e,{language:n,ignoreIllegals:!0}).value}function _(e,t){const n=e.join("\n"),r=k(n,t),i=document.createElement("code");return i.innerHTML=r,x(i),I(i.innerHTML)}var S=function(){var e=this,t=e._self._c;return t("span",{staticClass:"filename"},[e.isActionable?t("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.$emit("click")}}},[t("FileIcon",{attrs:{fileType:e.fileType}}),e._t("default")],2):t("span",[t("FileIcon",{attrs:{fileType:e.fileType}}),e._t("default")],2)])},T=[],L=function(){var e=this,t=e._self._c;return"swift"===e.fileType?t("SwiftFileIcon",{staticClass:"file-icon"}):t("GenericFileIcon",{staticClass:"file-icon"})},P=[],Q=n(7834),M=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"generic-file-icon",attrs:{viewBox:"0 0 14 14",themeId:"generic-file"}},[t("path",{attrs:{d:"M8.033 1l3.967 4.015v7.985h-10v-12zM7.615 2h-4.615v10h8v-6.574z"}}),t("path",{attrs:{d:"M7 1h1v4h-1z"}}),t("path",{attrs:{d:"M7 5h5v1h-5z"}})])},Z=[],D=n(9742),O={name:"GenericFileIcon",components:{SVGIcon:D.Z}},R=O,N=n(1001),j=(0,N.Z)(R,M,Z,!1,null,null,null),V=j.exports,G={name:"CodeListingFileIcon",components:{SwiftFileIcon:Q.Z,GenericFileIcon:V},props:{fileType:String}},$=G,z=(0,N.Z)($,L,P,!1,null,"7c381064",null),q=z.exports,H={name:"CodeListingFilename",components:{FileIcon:q},props:{isActionable:{type:Boolean,default:()=>!1},fileType:String}},W=H,F=(0,N.Z)(W,S,T,!1,null,"c8c40662",null),U=F.exports,Y={name:"CodeListing",components:{Filename:U,CodeBlock:o.Z},data(){return{syntaxHighlightedLines:[]}},props:{fileName:String,isFileNameActionable:{type:Boolean,default:()=>!1},syntax:String,fileType:String,content:{type:Array,required:!0},startLineNumber:{type:Number,default:()=>1},highlights:{type:Array,default:()=>[]},showLineNumbers:{type:Boolean,default:()=>!1}},computed:{escapedContent:({content:e})=>e.map(s.Xv),highlightedLineNumbers(){return new Set(this.highlights.map((({line:e})=>e)))},syntaxNameNormalized(){const e={occ:a.Z.objectiveC.key.url};return e[this.syntax]||this.syntax}},watch:{content:{handler:"syntaxHighlightLines",immediate:!0}},methods:{isHighlighted(e){return this.highlightedLineNumbers.has(this.lineNumberFor(e))},lineNumberFor(e){return this.startLineNumber+e},async syntaxHighlightLines(){let e;try{await b(this.syntaxNameNormalized),e=_(this.content,this.syntaxNameNormalized)}catch(t){e=this.escapedContent}this.syntaxHighlightedLines=e.map((e=>""===e?"\n":e))}}},X=Y,K=(0,N.Z)(X,r,i,!1,null,"13e6923e",null),J=K.exports},2020:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("WordBreak",{attrs:{tag:"code"}},[e._t("default")],2)},i=[],s=n(352),a={name:"CodeVoice",components:{WordBreak:s.Z}},o=a,l=n(1001),c=(0,l.Z)(o,r,i,!1,null,"05f4a5b7",null),u=c.exports},3938:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"column",style:e.style},[e._t("default")],2)},i=[],s={name:"Column",props:{span:{type:Number,default:null}},computed:{style:({span:e})=>({"--col-span":e})}},a=s,o=n(1001),l=(0,o.Z)(a,r,i,!1,null,"0f654188",null),c=l.exports},889:function(e,t,n){"use strict";n.d(t,{Z:function(){return A}});var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"device-frame",class:e.classes,style:e.styles,attrs:{"data-device":e.device}},[t("div",{staticClass:"device-screen",class:{"with-device":e.currentDeviceAttrs}},[e._t("default")],2),t("div",{staticClass:"device"})])},i=[],s={},a=n(9089);const o=e=>e&&e!==1/0;var l={name:"DeviceFrame",props:{device:{type:String,required:!0}},provide:{insideDeviceFrame:!0},computed:{currentDeviceAttrs:({device:e})=>(0,a.$8)(["theme","device-frames",e],s[e]),styles:({toPixel:e,toUrl:t,toPct:n,currentDeviceAttrs:r={},toVal:i})=>{const{screenTop:s,screenLeft:a,screenWidth:o,frameWidth:l,lightUrl:c,darkUrl:u,screenHeight:d,frameHeight:A}=r;return{"--screen-top":n(s/A),"--screen-left":n(a/l),"--screen-width":n(o/l),"--screen-height":n(d/A),"--screen-aspect":i(o/d),"--frame-width":e(l),"--frame-aspect":i(l/A),"--device-light-url":t(c),"--device-dark-url":t(u)}},classes:({currentDeviceAttrs:e})=>({"no-device":!e})},methods:{toPixel:e=>o(e)?`${e}px`:null,toUrl:e=>o(e)?`url(${e})`:null,toPct:e=>o(e)?100*e+"%":null,toVal:e=>o(e)?e:null}},c=l,u=n(1001),d=(0,u.Z)(c,r,i,!1,null,"c2eac128",null),A=d.exports},8039:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=function(){var e=this,t=e._self._c;return t(`h${e.level}`,{tag:"component",attrs:{id:e.anchor}},[e.shouldLink?t("router-link",{staticClass:"header-anchor",attrs:{to:{hash:`#${e.anchor}`},"data-after-text":e.$t("accessibility.in-page-link")},on:{click:function(t){return e.handleFocusAndScroll(e.anchor)}}},[e._t("default"),t("LinkIcon",{staticClass:"icon",attrs:{"aria-hidden":"true"}})],2):[e._t("default")]],2)},i=[],s=n(3704),a=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"link-icon",attrs:{viewBox:"0 0 20 20"}},[t("path",{attrs:{d:"M19.34,4.88L15.12,.66c-.87-.87-2.3-.87-3.17,0l-3.55,3.56-1.38,1.38-1.4,1.4c-.47,.47-.68,1.09-.64,1.7,.02,.29,.09,.58,.21,.84,.11,.23,.24,.44,.43,.63l4.22,4.22h0l.53-.53,.53-.53h0l-4.22-4.22c-.29-.29-.29-.77,0-1.06l1.4-1.4,.91-.91,.58-.58,.55-.55,2.9-2.9c.29-.29,.77-.29,1.06,0l4.22,4.22c.29,.29,.29,.77,0,1.06l-2.9,2.9c.14,.24,.24,.49,.31,.75,.08,.32,.11,.64,.09,.96l3.55-3.55c.87-.87,.87-2.3,0-3.17Z"}}),t("path",{attrs:{d:"M14.41,9.82s0,0,0,0l-4.22-4.22h0l-.53,.53-.53,.53h0l4.22,4.22c.29,.29,.29,.77,0,1.06l-1.4,1.4-.91,.91-.58,.58-.55,.55h0l-2.9,2.9c-.29,.29-.77,.29-1.06,0L1.73,14.04c-.29-.29-.29-.77,0-1.06l2.9-2.9c-.14-.24-.24-.49-.31-.75-.08-.32-.11-.64-.09-.97L.68,11.93c-.87,.87-.87,2.3,0,3.17l4.22,4.22c.87,.87,2.3,.87,3.17,0l3.55-3.55,1.38-1.38,1.4-1.4c.47-.47,.68-1.09,.64-1.7-.02-.29-.09-.58-.21-.84-.11-.22-.24-.44-.43-.62Z"}})])},o=[],l=n(9742),c={name:"LinkIcon",components:{SVGIcon:l.Z}},u=c,d=n(1001),A=(0,d.Z)(u,a,o,!1,null,null,null),p=A.exports,h={name:"LinkableHeading",mixins:[s.Z],components:{LinkIcon:p},props:{anchor:{type:String,required:!1},level:{type:Number,default:()=>2,validator:e=>e>=1&&e<=6}},inject:{enableMinimized:{default:()=>!1},isTargetIDE:{default:()=>!1}},computed:{shouldLink:({anchor:e,enableMinimized:t,isTargetIDE:n})=>!!e&&!t&&!n}},g=h,f=(0,d.Z)(g,r,i,!1,null,"24fddf6a",null),m=f.exports},4260:function(e,t,n){"use strict";n.d(t,{Z:function(){return O}});var r=function(){var e=this,t=e._self._c;return t(e.refComponent,{tag:"component",attrs:{url:e.urlWithParams,"is-active":e.isActiveComputed}},[e._t("default")],2)},i=[],s=n(2449),a=n(7192),o=n(4589),l=function(){var e=this,t=e._self._c;return t("ReferenceExternal",e._b({},"ReferenceExternal",e.$props,!1),[t("CodeVoice",[e._t("default")],2)],1)},c=[],u=function(){var e=this,t=e._self._c;return e.url&&e.isActive?t("a",{attrs:{href:e.url}},[e._t("default")],2):t("span",[e._t("default")],2)},d=[],A={name:"ReferenceExternal",props:{url:{type:String,required:!1},isActive:{type:Boolean,default:!0}}},p=A,h=n(1001),g=(0,h.Z)(p,u,d,!1,null,null,null),f=g.exports,m=n(2020),v={name:"ReferenceExternalSymbol",props:f.props,components:{ReferenceExternal:f,CodeVoice:m.Z}},b=v,y=(0,h.Z)(b,l,c,!1,null,null,null),C=y.exports,I=function(){var e=this,t=e._self._c;return t("ReferenceInternal",e._b({},"ReferenceInternal",e.$props,!1),[t("CodeVoice",[e._t("default")],2)],1)},w=[],E=function(){var e=this,t=e._self._c;return e.url&&e.isActive?t("router-link",{attrs:{to:e.url}},[e._t("default")],2):t("span",[e._t("default")],2)},B=[],x={name:"ReferenceInternal",props:{url:{type:String,required:!1},isActive:{type:Boolean,default:!0}}},k=x,_=(0,h.Z)(k,E,B,!1,null,null,null),S=_.exports,T={name:"ReferenceInternalSymbol",props:S.props,components:{ReferenceInternal:S,CodeVoice:m.Z}},L=T,P=(0,h.Z)(L,I,w,!1,null,null,null),Q=P.exports,M={name:"Reference",computed:{isInternal({url:e}){if(!e)return!1;if(!e.startsWith("/")&&!e.startsWith("#"))return!1;const{resolved:{name:t}={}}=this.$router.resolve(e)||{};return t!==o.vL},isSymbolReference(){return"symbol"===this.kind&&!this.hasInlineFormatting&&(this.role===a.L.symbol||this.role===a.L.dictionarySymbol)},isDisplaySymbol({isSymbolReference:e,titleStyle:t,ideTitle:n}){return n?e&&"symbol"===t:e},refComponent({isInternal:e,isDisplaySymbol:t}){return e?t?Q:S:t?C:f},urlWithParams({isInternal:e}){return e?(0,s.Q2)(this.url,this.$route.query):this.url},isActiveComputed({url:e,isActive:t}){return!(!e||!t)}},props:{url:{type:String,required:!1},kind:{type:String,required:!1},role:{type:String,required:!1},isActive:{type:Boolean,required:!1,default:!0},ideTitle:{type:String,required:!1},titleStyle:{type:String,required:!1},hasInlineFormatting:{type:Boolean,default:!1}}},Z=M,D=(0,h.Z)(Z,r,i,!1,null,null,null),O=D.exports},3002:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"row",class:{"with-columns":e.columns},style:e.style},[e._t("default")],2)},i=[],s=n(5381),a={name:"Row",props:{columns:{type:Object,required:!1,validator:e=>Object.entries(e).every((([e,t])=>s.L3[e]&&"number"===typeof t))},gap:{type:Number,required:!1}},computed:{style:({columns:e={},gap:t})=>({"--col-count-large":e.large,"--col-count-medium":e.medium,"--col-count-small":e.small||1,"--col-gap":t&&`${t}px`})}},o=a,l=n(1001),c=(0,l.Z)(o,r,i,!1,null,"1bcb2d0f",null),u=c.exports},1295:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(5953);const i={link:"link",reference:"reference",text:"text"};var s,a,o={name:"DestinationDataProvider",mixins:[r.Z],props:{destination:{type:Object,required:!0,default:()=>({})}},inject:{isTargetIDE:{default:()=>!1}},constants:{DestinationType:i},computed:{isExternal:({reference:e,destination:t})=>e.type===i.link||t.type===i.link,shouldAppendOpensInBrowser:({isExternal:e,isTargetIDE:t})=>e&&t,reference:({references:e,destination:t})=>e[t.identifier]||{},linkUrl:({destination:e,reference:t})=>({[i.link]:e.destination,[i.reference]:t.url,[i.text]:e.text}[e.type]),linkTitle:({reference:e,destination:t})=>({[i.link]:t.title,[i.reference]:t.overridingTitle||e.title,[i.text]:""}[t.type])},methods:{formatAriaLabel(e){return this.shouldAppendOpensInBrowser?`${e} (opens in browser)`:e}},render(){return this.$scopedSlots.default({url:this.linkUrl||"",title:this.linkTitle||"",formatAriaLabel:this.formatAriaLabel,isExternal:this.isExternal})}},l=o,c=n(1001),u=(0,c.Z)(l,s,a,!1,null,null,null),d=u.exports},1105:function(e,t,n){"use strict";n.d(t,{Z:function(){return Ae}});var r=function(){var e=this,t=e._self._c;return t("Pager",{class:["TopicsLinkCardGrid",e.topicStyle],attrs:{"aria-label":e.$t("links-grid.label"),pages:e.pages},scopedSlots:e._u([{key:"page",fn:function({page:n}){return[t("Row",{attrs:{columns:{large:e.compactCards?3:2,medium:e.compactCards?3:2}}},e._l(n,(function(n){return t("Column",{key:n.title},[t("TopicsLinkCardGridItem",{attrs:{item:n,compact:e.compactCards}})],1)})),1)]}}])},[t("BreakpointEmitter",{on:{change:e.handleBreakpointChange}})],1)},i=[],s=n(7188),a=n(3938),o=function(){var e=this,t=e._self._c;return t("div",{class:["pager",{"with-compact-controls":e.shouldUseCompactControls}],attrs:{role:"region","aria-roledescription":e.$t("pager.roledescription")}},[1===e.pages.length?[e._t("page",null,{page:e.pages[0]})]:[t("div",{staticClass:"container"},[t("Gutter",{staticClass:"left"},[t("ControlPrevious",{attrs:{disabled:!e.hasPreviousPage},nativeOn:{click:function(t){return e.previous.apply(null,arguments)}}})],1),t("div",{ref:"viewport",staticClass:"viewport",attrs:{role:"group"}},e._l(e.keyedPages,(function({page:n,key:r},i){return t("div",{key:r,ref:"pages",refInFor:!0,class:["page",e.pageStates(i)],attrs:{"aria-label":e.$t("pager.page.label",{index:i+1,count:e.keyedPages.length}),id:r}},[e._t("page",null,{page:n})],2)})),0),t("Gutter",{staticClass:"right"},[t("ControlNext",{attrs:{disabled:!e.hasNextPage},nativeOn:{click:function(t){return e.next.apply(null,arguments)}}})],1)],1),t("div",{staticClass:"compact-controls",attrs:{role:"group","aria-label":"Controls"}},[t("ControlPrevious",{attrs:{disabled:!e.hasPreviousPage},nativeOn:{click:function(t){return e.previous.apply(null,arguments)}}}),t("ControlNext",{attrs:{disabled:!e.hasNextPage},nativeOn:{click:function(t){return e.next.apply(null,arguments)}}})],1),t("div",{staticClass:"indicators"},e._l(e.keyedPages,(function({key:n},r){return t("a",{key:n,class:["indicator",e.pageStates(r)],attrs:{"aria-current":e.isActivePage(r),href:`#${n}`},on:{click:function(t){return e.setActivePage(t,r)}}})})),0)],e._t("default")],2)},l=[],c=function(){var e=this,t=e._self._c;return t("button",{class:["pager-control",e.action],attrs:{"aria-label":e.$t(`pager.control.navigate-${e.action}`)}},[t("ChevronRoundedIcon",{staticClass:"icon"})],1)},u=[],d=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"chevron-rounded-icon",attrs:{viewBox:"0 0 14 25",themeId:"chevron-rounded"}},[t("path",{attrs:{d:"M1,24.4a.9.9,0,0,0,.7-.3L13.4,13a1,1,0,0,0,0-1.6L1.7.3A.9.9,0,0,0,1,0,.9.9,0,0,0,0,1a.9.9,0,0,0,.3.7l11,10.5L.3,22.7a.9.9,0,0,0-.3.7A.9.9,0,0,0,1,24.4Z"}})])},A=[],p=n(9742),h={name:"ChevronRoundedIcon",components:{SVGIcon:p.Z}},g=h,f=n(1001),m=(0,f.Z)(g,d,A,!1,null,null,null),v=m.exports;const b={previous:"previous",next:"next"};var y={name:"PagerControl",components:{ChevronRoundedIcon:v},props:{action:{type:String,required:!0,validator:e=>Object.hasOwnProperty.call(b,e)}},Action:b},C=y,I=(0,f.Z)(C,c,u,!1,null,"58c8390a",null),w=I.exports,E=n(5381),B=n(4630);const x=174;function k(e){return e.scrollIntoView({behavior:"auto",block:"nearest",inline:"start"}),new Promise((t=>{const n=60,r=2;let i=null,s=0;function a(){const o=e.getBoundingClientRect().left;s>r&&(o===i||s>=n)?t():(i=o,s+=1,requestAnimationFrame(a))}requestAnimationFrame(a)}))}var _={name:"Pager",components:{ControlNext:{render(e){return e(w,{props:{action:w.Action.next}})}},ControlPrevious:{render(e){return e(w,{props:{action:w.Action.previous}})}},Gutter:{render(e){return e("div",{class:"gutter"},this.$slots.default)}}},props:{pages:{type:Array,required:!0,validator:e=>e.length>0}},data:()=>({activePageIndex:0,appState:B.Z.state}),computed:{indices:({keyedPages:e})=>e.reduce(((e,t,n)=>({...e,[t.key]:n})),{}),keyedPages:({_uid:e,pages:t})=>t.map(((t,n)=>({key:`pager-${e}-page-${n}`,page:t}))),hasNextPage:({activePageIndex:e,pages:t})=>ee>0,contentWidth:({appState:e})=>e.contentWidth,shouldUseCompactControls:({contentWidth:e})=>window.innerWidth>E.kB["default"].large.minWidth?e=this.$refs.pages.length)return;const n=this.$refs.pages[t];this.pauseObservingPages(),await k(n),this.startObservingPages(),this.activePageIndex=t},next(e){this.setActivePage(e,this.activePageIndex+1)},previous(e){this.setActivePage(e,this.activePageIndex-1)},observePages(e){const t=e.find((e=>e.isIntersecting))?.target?.id;t&&(this.activePageIndex=this.indices[t])},setupObserver(){this.observer=new IntersectionObserver(this.observePages,{root:this.$refs.viewport,threshold:.5}),this.startObservingPages()},startObservingPages(){this.$refs.pages.forEach((e=>{this.observer?.observe(e)}))},pauseObservingPages(){this.$refs.pages.forEach((e=>{this.observer?.unobserve(e)}))}},mounted(){this.pages.length>1&&this.setupObserver()},beforeDestroy(){this.observer?.disconnect()}},S=_,T=(0,f.Z)(S,o,l,!1,null,"1ed6aae0",null),L=T.exports,P=n(3002),Q=n(3946),M=n(5654),Z=function(){var e=this,t=e._self._c;return t("Card",{staticClass:"reference-card-grid-item",attrs:{url:e.item.url,image:e.imageReferences.card,title:e.item.title,"floating-style":"",size:e.cardSize,"link-text":e.compact?"":e.$t(e.linkText)},scopedSlots:e._u([e.imageReferences.card?null:{key:"cover",fn:function({classes:n}){return[t("div",{staticClass:"reference-card-grid-item__image",class:n},[t("TopicTypeIcon",{staticClass:"reference-card-grid-item__icon",attrs:{type:e.item.role,"image-override":e.references[e.imageReferences.icon]}})],1)]}}],null,!0)},[e.compact?e._e():t("ContentNode",{attrs:{content:e.item.abstract}})],1)},D=[],O=function(){var e=this,t=e._self._c;return t("Reference",e._b({staticClass:"card",class:e.classes,attrs:{url:e.url}},"Reference",e.linkAriaTags,!1),[t("CardCover",{attrs:{variants:e.imageVariants,rounded:e.floatingStyle,alt:e.imageReference.alt,"aria-hidden":"true"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._t("cover",null,null,t)]}}],null,!0)}),t("div",{staticClass:"details",attrs:{"aria-hidden":"true"}},[e.eyebrow?t("div",{staticClass:"eyebrow",attrs:{id:e.eyebrowId,"aria-label":e.formatAriaLabel(`- ${e.eyebrow}`)}},[e._v(" "+e._s(e.eyebrow)+" ")]):e._e(),t("div",{staticClass:"title",attrs:{id:e.titleId}},[e._v(" "+e._s(e.title)+" ")]),e.$slots.default?t("div",{staticClass:"card-content",attrs:{id:e.contentId}},[e._t("default")],2):e._e(),e.linkText?t(e.hasButton?"ButtonLink":"div",{tag:"component",staticClass:"link"},[e._v(" "+e._s(e.linkText)+" "),e.showExternalLinks?t("DiagonalArrowIcon",{staticClass:"icon-inline link-icon"}):e.hasButton?e._e():t("InlineChevronRightIcon",{staticClass:"icon-inline link-icon"})],1):e._e()],1)],1)},R=[],N=n(5281),j=n(8785),V=n(6817),G=n(4260),$={small:"small",large:"large"},z=n(5953),q=function(){var e=this,t=e._self._c;return t("div",{staticClass:"card-cover-wrap",class:{rounded:e.rounded}},[e._t("default",(function(){return[t("ImageAsset",{staticClass:"card-cover",attrs:{variants:e.variants,alt:e.alt}})]}),{classes:"card-cover"})],2)},H=[],W=n(6769),F={name:"CardCover",components:{ImageAsset:W.Z},props:{variants:{type:Array,required:!0},rounded:{type:Boolean,default:!1},alt:{type:String,default:null}}},U=F,Y=(0,f.Z)(U,q,H,!1,null,"28b14a83",null),X=Y.exports,K={name:"Card",components:{Reference:G.Z,DiagonalArrowIcon:V.Z,InlineChevronRightIcon:j.Z,CardCover:X,ButtonLink:N.Z},constants:{CardSize:$},mixins:[z.Z],computed:{titleId:({_uid:e})=>`card_title_${e}`,contentId:({_uid:e})=>`card_content_${e}`,eyebrowId:({_uid:e})=>`card_eyebrow_${e}`,linkAriaTags:({titleId:e,eyebrowId:t,contentId:n,eyebrow:r,$slots:i})=>({"aria-labelledby":e.concat(r?` ${t}`:""),"aria-describedby":i.default?`${n}`:null}),classes:({size:e,floatingStyle:t})=>[e,{"floating-style":t}],imageReference:({image:e,references:t})=>t[e]||{},imageVariants:({imageReference:e})=>e.variants||[]},props:{linkText:{type:String,required:!1},url:{type:String,required:!1,default:""},eyebrow:{type:String,required:!1},image:{type:String,required:!1},size:{type:String,validator:e=>Object.prototype.hasOwnProperty.call($,e)},title:{type:String,required:!0},hasButton:{type:Boolean,default:()=>!1},floatingStyle:{type:Boolean,default:!1},showExternalLinks:{type:Boolean,default:!1},formatAriaLabel:{type:Function,default:e=>e}}},J=K,ee=(0,f.Z)(J,O,R,!1,null,"0f7a4f31",null),te=ee.exports,ne=n(5921),re=n(7192);const ie={[re.L.article]:"documentation.card.read-article",[re.L.overview]:"documentation.card.start-tutorial",[re.L.collection]:"documentation.card.view-api",[re.L.symbol]:"documentation.card.view-symbol",[re.L.sampleCode]:"documentation.card.view-sample-code"};var se={name:"TopicsLinkCardGridItem",components:{TopicTypeIcon:ne.Z,Card:te,ContentNode:()=>Promise.resolve().then(n.bind(n,9519))},mixins:[z.Z],props:{item:{type:Object,required:!0},compact:{type:Boolean,default:!0}},computed:{imageReferences:({item:e})=>(e.images||[]).reduce(((e,t)=>(e[t.type]=t.identifier,e)),{icon:null,card:null}),linkText:({item:e})=>ie[e.role]||"documentation.card.learn-more",cardSize:({compact:e})=>e?void 0:$.large}},ae=se,oe=(0,f.Z)(ae,Z,D,!1,null,"87dd3302",null),le=oe.exports,ce={name:"TopicsLinkCardGrid",components:{BreakpointEmitter:s["default"],Column:a.Z,Pager:L,Row:P.Z,TopicsLinkCardGridItem:le},data:()=>({breakpoint:E.L3.large}),props:{items:{type:Array,required:!0},pageSize:{type:Number,required:!1},topicStyle:{type:String,default:Q.o.compactGrid,validator:e=>e===Q.o.compactGrid||e===Q.o.detailedGrid},usePager:{type:Boolean,default:!1}},computed:{compactCards:({topicStyle:e})=>e===Q.o.compactGrid,defaultPageSize:({breakpoint:e,items:t,topicStyle:n,usePager:r})=>r?{[Q.o.compactGrid]:{[E.L3.large]:6,[E.L3.medium]:6,[E.L3.small]:1},[Q.o.detailedGrid]:{[E.L3.large]:4,[E.L3.medium]:2,[E.L3.small]:1}}[n][e]:t.length,pages:({items:e,defaultPageSize:t,pageSize:n})=>(0,M.Md)(e,n||t)},methods:{handleBreakpointChange(e){this.breakpoint=e}}},ue=ce,de=(0,f.Z)(ue,r,i,!1,null,null,null),Ae=de.exports},1576:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"col",class:e.classes},[e._t("default")],2)},i=[];const s=0,a=12,o=new Set(["large","medium","small"]),l=e=>({type:Object,default:()=>({}),validator:t=>Object.keys(t).every((n=>o.has(n)&&e(t[n])))}),c=l((e=>"boolean"===typeof e)),u=l((e=>"number"===typeof e&&e>=s&&e<=a));var d={name:"GridColumn",props:{isCentered:c,isUnCentered:c,span:{...u,default:()=>({large:a})}},computed:{classes:function(){return{[`large-${this.span.large}`]:void 0!==this.span.large,[`medium-${this.span.medium}`]:void 0!==this.span.medium,[`small-${this.span.small}`]:void 0!==this.span.small,"large-centered":!!this.isCentered.large,"medium-centered":!!this.isCentered.medium,"small-centered":!!this.isCentered.small,"large-uncentered":!!this.isUnCentered.large,"medium-uncentered":!!this.isUnCentered.medium,"small-uncentered":!!this.isUnCentered.small}}}},A=d,p=n(1001),h=(0,p.Z)(A,r,i,!1,null,"2ee3ad8b",null),g=h.exports},9649:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"row"},[e._t("default")],2)},i=[],s={name:"GridRow"},a=s,o=n(1001),l=(0,o.Z)(a,r,i,!1,null,"be73599c",null),c=l.exports},5692:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"article-icon",attrs:{viewBox:"0 0 14 14",themeId:"article"}},[t("path",{attrs:{d:"M8.033 1l3.967 4.015v7.985h-10v-12zM7.615 2h-4.615v10h8v-6.574z"}}),t("path",{attrs:{d:"M7 1h1v4h-1z"}}),t("path",{attrs:{d:"M7 5h5v1h-5z"}})])},i=[],s=n(9742),a={name:"ArticleIcon",components:{SVGIcon:s.Z}},o=a,l=n(1001),c=(0,l.Z)(o,r,i,!1,null,null,null),u=c.exports},7775:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"curly-brackets-icon",attrs:{viewBox:"0 0 14 14",themeId:"curly-brackets"}},[t("path",{attrs:{d:"M9.987 14h-0.814v-0.916h0.36c0.137 0 0.253-0.038 0.349-0.116 0.099-0.080 0.179-0.188 0.239-0.318 0.064-0.134 0.11-0.298 0.139-0.483 0.031-0.186 0.045-0.38 0.045-0.58v-2.115c0-0.417 0.046-0.781 0.139-1.083 0.092-0.3 0.2-0.554 0.322-0.754 0.127-0.203 0.246-0.353 0.366-0.458 0.087-0.076 0.155-0.131 0.207-0.169-0.052-0.037-0.12-0.093-0.207-0.167-0.12-0.105-0.239-0.255-0.366-0.459-0.122-0.2-0.23-0.453-0.322-0.754-0.093-0.3-0.139-0.665-0.139-1.082v-2.13c0-0.199-0.014-0.392-0.045-0.572-0.029-0.182-0.076-0.345-0.139-0.483-0.060-0.137-0.141-0.246-0.239-0.328-0.095-0.076-0.212-0.115-0.349-0.115h-0.36v-0.916h0.814c0.442 0 0.788 0.18 1.030 0.538 0.238 0.352 0.358 0.826 0.358 1.407v2.236c0 0.3 0.015 0.597 0.044 0.886 0.030 0.287 0.086 0.544 0.164 0.765 0.077 0.216 0.184 0.392 0.318 0.522 0.129 0.124 0.298 0.188 0.503 0.188h0.058v0.916h-0.058c-0.206 0-0.374 0.064-0.503 0.188-0.134 0.129-0.242 0.305-0.318 0.521-0.078 0.223-0.134 0.48-0.164 0.766-0.029 0.288-0.044 0.587-0.044 0.884v2.236c0 0.582-0.12 1.055-0.358 1.409-0.242 0.358-0.588 0.538-1.030 0.538z"}}),t("path",{attrs:{d:"M4.827 14h-0.814c-0.442 0-0.788-0.18-1.030-0.538-0.238-0.352-0.358-0.825-0.358-1.409v-2.221c0-0.301-0.015-0.599-0.045-0.886-0.029-0.287-0.085-0.544-0.163-0.764-0.077-0.216-0.184-0.393-0.318-0.522-0.131-0.127-0.296-0.188-0.503-0.188h-0.058v-0.916h0.058c0.208 0 0.373-0.063 0.503-0.188 0.135-0.129 0.242-0.304 0.318-0.522 0.078-0.22 0.134-0.477 0.163-0.765 0.030-0.286 0.045-0.585 0.045-0.886v-2.251c0-0.582 0.12-1.055 0.358-1.407 0.242-0.358 0.588-0.538 1.030-0.538h0.814v0.916h-0.36c-0.138 0-0.252 0.038-0.349 0.116-0.099 0.079-0.179 0.189-0.239 0.327-0.064 0.139-0.11 0.302-0.141 0.483-0.029 0.18-0.044 0.373-0.044 0.572v2.13c0 0.417-0.046 0.782-0.138 1.082-0.092 0.302-0.201 0.556-0.324 0.754-0.123 0.201-0.246 0.356-0.366 0.459-0.086 0.074-0.153 0.13-0.206 0.167 0.052 0.038 0.12 0.093 0.206 0.169 0.12 0.103 0.243 0.258 0.366 0.458s0.232 0.453 0.324 0.754c0.092 0.302 0.138 0.666 0.138 1.083v2.115c0 0.2 0.015 0.394 0.044 0.58 0.030 0.186 0.077 0.349 0.139 0.482 0.062 0.132 0.142 0.239 0.241 0.32 0.096 0.079 0.21 0.116 0.349 0.116h0.36z"}})])},i=[],s=n(9742),a={name:"CurlyBracketsIcon",components:{SVGIcon:s.Z}},o=a,l=n(1001),c=(0,l.Z)(o,r,i,!1,null,null,null),u=c.exports},6817:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"diagonal-arrow",attrs:{viewBox:"0 0 14 14",themeId:"diagonal-arrow"}},[t("path",{attrs:{d:"M0.010 12.881l10.429-10.477-3.764 0.824-0.339-1.549 7.653-1.679-1.717 7.622-1.546-0.349 0.847-3.759-10.442 10.487z"}})])},i=[],s=n(9742),a={name:"DiagonalArrowIcon",components:{SVGIcon:s.Z}},o=a,l=n(1001),c=(0,l.Z)(o,r,i,!1,null,null,null),u=c.exports},8633:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("SVGIcon",{attrs:{viewBox:"0 0 14 14",themeId:"path"}},[t("path",{attrs:{d:"M0 0.948h2.8v2.8h-2.8z"}}),t("path",{attrs:{d:"M11.2 10.252h2.8v2.8h-2.8z"}}),t("path",{attrs:{d:"M6.533 1.852h0.933v10.267h-0.933z"}}),t("path",{attrs:{d:"M2.8 1.852h4.667v0.933h-4.667z"}}),t("path",{attrs:{d:"M6.533 11.186h4.667v0.933h-4.667z"}})])},i=[],s=n(9742),a={name:"PathIcon",components:{SVGIcon:s.Z}},o=a,l=n(1001),c=(0,l.Z)(o,r,i,!1,null,null,null),u=c.exports},6698:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"play-icon",attrs:{viewBox:"0 0 14 14",themeId:"play"}},[t("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5v0c0-3.038-2.462-5.5-5.5-5.5v0z"}}),t("path",{attrs:{d:"M10.195 7.010l-5 3v-6l5 3z"}})])},i=[],s=n(9742),a={name:"PlayIcon",components:{SVGIcon:s.Z}},o=a,l=n(1001),c=(0,l.Z)(o,r,i,!1,null,null,null),u=c.exports},7834:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"swift-file-icon",attrs:{viewBox:"0 0 15 14",themeId:"swift-file"}},[t("path",{attrs:{d:"M14.93,13.56A2.15,2.15,0,0,0,15,13a5.37,5.37,0,0,0-1.27-3.24A6.08,6.08,0,0,0,14,7.91,9.32,9.32,0,0,0,9.21.31a8.51,8.51,0,0,1,1.78,5,6.4,6.4,0,0,1-.41,2.18A45.06,45.06,0,0,1,3.25,1.54,44.57,44.57,0,0,0,7.54,6.9,45.32,45.32,0,0,1,1.47,2.32,35.69,35.69,0,0,0,8.56,9.94a6.06,6.06,0,0,1-3.26.85A9.48,9.48,0,0,1,0,8.91a10,10,0,0,0,8.1,4.72c2.55,0,3.25-1.2,4.72-1.2a2.09,2.09,0,0,1,1.91,1.15C14.79,13.69,14.88,13.75,14.93,13.56Z"}})])},i=[],s=n(9742),a={name:"SwiftFileIcon",components:{SVGIcon:s.Z}},o=a,l=n(1001),c=(0,l.Z)(o,r,i,!1,null,"c01a6890",null),u=c.exports},9001:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"technology-icon",attrs:{viewBox:"0 0 14 14",themeId:"technology"}},[t("path",{attrs:{d:"M3.39,9l3.16,1.84.47.28.47-.28L10.61,9l.45.26,1.08.63L7,12.91l-5.16-3,1.08-.64L3.39,9M7,0,0,4.1,2.47,5.55,0,7,2.47,8.44,0,9.9,7,14l7-4.1L11.53,8.45,14,7,11.53,5.56,14,4.1ZM7,7.12,5.87,6.45l-1.54-.9L3.39,5,1.85,4.1,7,1.08l5.17,3L10.6,5l-.93.55-1.54.91ZM7,10,3.39,7.9,1.85,7,3.4,6.09,4.94,7,7,8.2,9.06,7,10.6,6.1,12.15,7l-1.55.9Z"}})])},i=[],s=n(9742),a={name:"TechnologyIcon",components:{SVGIcon:s.Z}},o=a,l=n(1001),c=(0,l.Z)(o,r,i,!1,null,null,null),u=c.exports},8638:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"tutorial-icon",attrs:{viewBox:"0 0 14 14",themeId:"tutorial"}},[t("path",{attrs:{d:"M0.933 6.067h3.733v1.867h-3.733v-1.867z"}}),t("path",{attrs:{d:"M0.933 1.867h3.733v1.867h-3.733v-1.867z"}}),t("path",{attrs:{d:"M13.067 1.867v10.267h-7.467v-10.267zM12.133 2.8h-5.6v8.4h5.6z"}}),t("path",{attrs:{d:"M0.933 10.267h3.733v1.867h-3.733v-1.867z"}})])},i=[],s=n(9742),a={name:"TutorialIcon",components:{SVGIcon:s.Z}},o=a,l=n(1001),c=(0,l.Z)(o,r,i,!1,null,null,null),u=c.exports},6769:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=function(){var e=this,t=e._self._c;return e.fallbackImageSrcSet?t("img",{staticClass:"fallback",attrs:{title:e.$t("error.image"),decoding:"async",alt:e.alt,srcset:e.fallbackImageSrcSet}}):t("picture",[e.prefersAuto&&e.darkVariantAttributes?t("source",{attrs:{media:"(prefers-color-scheme: dark)",srcset:e.darkVariantAttributes.srcSet}}):e._e(),e.prefersDark&&e.darkVariantAttributes?t("img",e._b({ref:"img",attrs:{decoding:"async","data-orientation":e.orientation,loading:e.loading,alt:e.alt,width:e.darkVariantAttributes.width||e.optimalWidth,height:e.darkVariantAttributes.width||e.optimalWidth?"auto":null},on:{error:e.handleImageLoadError}},"img",e.darkVariantAttributes,!1)):t("img",e._b({ref:"img",attrs:{decoding:"async","data-orientation":e.orientation,loading:e.loading,alt:e.alt,width:e.defaultAttributes.width||e.optimalWidth,height:e.defaultAttributes.width||e.optimalWidth?"auto":null},on:{error:e.handleImageLoadError}},"img",e.defaultAttributes,!1))])},i=[],s=n(5947),a={props:{variants:{type:Array,required:!0}},computed:{variantsGroupedByAppearance(){return(0,s.XV)(this.variants)},lightVariants(){return(0,s.u)(this.variantsGroupedByAppearance.light)},darkVariants(){return(0,s.u)(this.variantsGroupedByAppearance.dark)}}},o=n(4030),l=n(9804),c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJZCAYAAABRKlHVAAAACXBIWXMAABYlAAAWJQFJUiTwAAAXvUlEQVR4nO3d72pU57vH4aWmSoIBqSGpQaFgsVDoMexj22e2D6Cvav8plVq0amK0rbGJ9V83d+hs/Llb80wy6ztr1lwXBPoizcyamRfz8XmedZ/56quv/qcDAAAIWOm67r+80AAAQMJZrzIAAJAiQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQs+KlBmBR3L59u1tdXe0uX77cra2ted8AFpAAAWAhHBwcdPv7+0c/u7u73fnz57utra3u0qVLR/8NwGIQIAAshCdPnvzH03z58mV37969o5+KkPqplREAhk2AALAQ3g+Qd/32229HPxUjm5ub3fb2tjcVYKAcQgdg8Cou3rx5c+zTrN9ZWfFvawBDJkAAGLwKkFa2YQEMmwABYNBqVeND26/eVedAzp075w0FGDABAsCgTbP6UQECwLAJEAAGbWdnp+np1cqH7VcAwydAABisutXu4eFh09Oz+gGwGAQIAIO1t7fX/NTq9rsADJ8AAWCwWg+f1yT0tbU1byTAAhAgAAzS/v7+0RasFs5+ACwOAQLAILWufpSNjQ1vIsCCECAADFLr7XfX19ePtmABsBgECACDU6sfNYCwhe1XAItFgAAwOK2rHzX7w+13ARbLivcL4MNu377tFZqRGzduHPuH6uB5a4CcPXu2u3PnziCubaLlGgGWmQABOEbdjYnTa90q9fTp0+bHevXq1dEPAIvDFiwAIlq3Su3s7HhDAEZMgADQu9azGgcHB93r16+9IQAjJkAA6F3r6sfe3p43A2DkBAgAvWs9/zHN8EEAFpMAAaBXNSSwhgUep+589fbtW28GwMgJEAB61br96vHjx94IgCUgQADoVcv2q5p6/uzZM28EwBIQIAD0prZfra2tHfvnWwcPArD4DCIEmIH6ot160HqZtJz96KaY/XHmzJnuk08+mcsrWAfka0o7AKcjQABm4MKFC9329raX8gTqS/3h4WHT//jxxx/P7XV+/vy5AAGYAVuwAJiraSafb25uerMAFpwAAWCuWs9/tJ4nAWDYBAgAc7O/v9+8rWlra8sbBTACAgSAuZlm8nnrPBEAhk2AADAXNfujdftV3U2rtmABsPgECABzUfFREdLCLY4BxkOAADAXrasf586ds/0KYEQECABxdfC8NUAqPipCABgHAQJAXGt8dLZfAYyOAAEgrnX4YB08rwPoAIyHAAEg6uDgoHn2h7MfAOOz4j0FWCz1Bf758+fd69ev/+N5r6ysdBcvXhz8tPDd3d3m3zV8EGB8BAjAAqgVg9q2VIP7jrt1bW1bqnMT9eV9iIe3W89/rK6umv0BMEICBGDgHjx40D18+LD5SVas1O/XSsP29na3ubk5mAucZvaH1Q+AcRIgAANVX9Rv3brVHR4enugJ1v9/7969oy/9169fH8RqSK3gtHL+A2CcHEIHGKA653Hz5s0Tx8e79vf3j0KmdeWhL/X4Zn8AIEAABqa+qN+9e3emwVAhUxEyT9Osfpj9ATBeAgRgYCo+ZrHy8b76m7Ula1729vaaHrlWPmy/AhgvAQIwILVFaZop4dOqg+m1vSutDsa3RpXVD4BxEyAAA5JYobh//378glsnn3cCBGD0BAjAQNTKR+uE8NOoQ+mJx3lX66pOzf0Y+iBFAE5HgAAMRJ9br96XfqzW4DH7A2D8BAjAQNTKRMpQY8fhc4DxEyAAA5HcFpU6iD7t7I/aggXAuAkQgAFIrn50f4dBQsVH62NZ/QBYDgIEgN60Dh+s2R/ufgWwHAQIAL2oLWWtKztWPwCWhwABGID19fXok6gVh761Tj7vzP4AWCoCBGAgElEwkZi10br9qg6epwMMgPkRIAADkfwSfvHixV7/ft1lq/WuXlY/AJaLAAEYiOQ5iL4fa3d3t/l3NzY2en0uAAyLAAEYiFoJSMzBqJWWvrdgtc7+WF1dNfsDYMkIEIAB2d7e7v3JXLlypde/X2c/Wmd/bG1t9fpcABgeAQIwILUKUqsCfamtV32fNWld/ejcfhdgKQkQgIH57LPPerkjVoXNp59+2uvF1spHa4BUbCXv/AXAMAgQgIGpMxE3btyY6Zfz+lt9hc27Wm+9251i9aN1excAwyRAAAaoDolXhMzigHatfHz55ZeRw96twwcrhE4SIBUft27d6u7du3eCZwfAEAgQgIGqCPniiy9ONSdjc3Oz+/zzzyNbnWr2x+HhYdPvnuSaJvFRj1G3+Z1mtQWA4VjxXgAMV4VDnduoL+z1hbvlS/dkdaHuqJW8xe00QTBtgLwbHxO1ClKrO4mp7gDMjgABWAB156r6uXbtWre/v/9/k8Yn08bri3iFx+T35mGa2R/TRsP78dH9HSW3b98+2l7mMDvA4hAgAAtksroxtNvXVnxMYug4004+v3v37r9u7ZqsjNRWNQAWgzMgAJxaX7M/Kj6O29pVcVK/B8BiECAAnEqtQrSe/6j4aD2X0hIfE63nYwCYPwECwKn0sfoxTXy8+//U2RgAhk2AAHAqraFQ51da7n51kviYqEPpBhUCDJsAAeDE6uB53ZWrRcvqx2nio3vnUDoAwyVAADix1snn3d9DET/ktPEx4VA6wLAJEABOrDUY6uD5h2Z/zCo+Jupv1bR0AIZHgABwIrX1qnX2x4fOfsw6PiZqUnrr9jAAcgQIwIKoL/tDOmA9TTT82/DBvuJj4s6dO82RBECGAAFYAPUv+d99993RAeuhREjr7XfX19f/cfZHYnZHvVY//vijO2MBDIgAARi4+pI+ub1sHbAeQoTUc2p9Dv+0/ar+/9RB8XrNajsWAMMgQAAG7J++qNcX6ps3b8516N5phg8m4+Pdx3QoHWAYBAjAQNWX9H/7ol6rD7UqMo8IqTMVrQFSqx81gHBiHvExUasg04QTAP0QIAAD1HI4ezJ0L/2l+qSrH/OMj4l6/HmuHAEgQAAGpaLi22+/bT6c/fbt26M7Pe3s7MQuo3X4YB08nwTIEOKj+/v1refhUDrA/AgQgIGoL8V1p6sXL15M/YTu37/f/fzzz71fSK0e1BmUFkOLjwmT0gHmS4AADEB9sf/mm29ONbOiViZ++OGHXi9mmtvm1vmPocXHRG0je/DgwTCeDMCSESAAc1bxUWc5Xr9+feon8scffxyFTF9aA2R1dXXwKw0PHz50KB1gDgQIwBzVF/pataizHLPy559/Ht2md9bnHOrLeuvfrABZhG1ODqUD5AkQgDmZbE/666+/Zv4EaivX119/faotXe+bZrXg6dOnM3vcPjmUDpAnQADm4Jdfful9haBWVeqOWq2Hxj+kvqC3br86c+bMqR8vqV6fupMYABkCBCDsp59+6h49ehR50IqQurPWaVckpln96GNFp2/7+/tHgwoB6J8AAQiZTC+fx/akip7TPG5yzsi87O7uTnWXLwBORoAABFR81GHz+pf2eakIqa1f06pzJLPYxrUIahXEoXSAfgkQgJ7VF9rvv//+RAMGZ622fk07sLB18vkYVCjWeRCH0gH6I0AAejSZ8VG3xh2KCopaDWn1+PHjpfqI1IqPQ+kA/REgAD2p7VYVH7Oc8TErredB6hpmMSBx0dR1L8IcE4BFJEAAelCHmevA+RDjo6yvrzf93jJtv3pfvYcOpQPMngABmLG6m9LQ//X86tWrx/5OnYOY5va7Y2RSOsDsCRCAGaqzFUOfJ/HRRx91a2trx/5excdQV3CSaiXLoXSA2REgADNy2lkbKRsbG02PtAjXklDxUWd5AJiNFa8jwOnVLXbnOeNjGi0BUneCevbs2ZCe9lzVHJQLFy4s8SsAMDtWQABm4NWrVwvxMq6urnbnz58/9veW/ezHPxnSrZQBFpkAAVgiW1tbTRdbAwsBoA8CBGCJXLp06diLrbs+LcqKDgCLR4AALImKj3Pnzh17sWZfANAnAQKwJC5fvtx0ocs8fBCA/gkQgCVQKx8t26/M/gCgbwIEYAm0xEdn9QOAAAECsAQ2NzePvcgauPf777/7OADQKwECMHI192Ntbe3YizT7A4AEAQIwcq2Hz83+ACBBgACM3MbGxrEX+PLly+7Fixc+CgD0ToAAjNjq6urRFqzj7Ozs+BgAECFAAEZsa2ur6eJ+/fVXHwMAIgQIwIi13H53f3+/e/XqlY8BABECBGCkKj5qAOFxnjx54iMAQIwAARiplrtf1ewP268ASBIgACNUKx8t269q9sfbt299BACIESAAI9QSH2Vvb8/bD0CUAAEYoc3NzWMvqmZ/PH/+3NsPQJQAARiZmvuxtrZ27EXV9isASBMgACPTcvi8PHr0yFsPQJwAARiZjY2NYy/o4ODA7A8A5kKAAIzI6urq0Ras4+zu7nrbAZgLAQIwIltbW00XY/YHAPMiQABGxOwPAIZuxTsE8GFXrlxZiFfowoULRwMIj/PkyZPmv1krKmfP+rcqAGZHgAAcY3t7ezQv0Zs3b5pvv1urKVevXu39OQGwXPyzFsASmWb1o/V2vgAwDQECsET29vaaLra2crWcJwGAaQkQgCXx8uXL7vDwsOlirX4A0BcBArAkdnZ2mi9UgADQFwECsCRaD5/XIMO1tTUfCwB6IUAAlkDFR23BatE6zBAATkKAACyB1tWPrnGYIQCclAABGLlpZ3/UFiwA6IsAARi5io+KkBZWPwDomwABGLnW4YM1+8PdrwDomwABGLE6eL6/v990gVY/AEgQIAAj1jr5vDP7A4AQAQIwYq3br+rg+fr6uo8CAL0TIAAjdXBw0Dz7w+oHACkCBGDEWs91bGxs+BgAELHiZQYYp7W1te769etHt+CtrVh1HuTw8PD/Xevq6qrZHwDECBCAkavb625ubh791JasnZ2do9kgk+1ZW1tbPgIAxAgQgCVSKx3Xrl07+qkIqR+33wUgSYAALKkKD/EBQJpD6AAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAECMAAEAAGIECAAAECNAAACAGAECAADECBAAACBGgAAAADECBAAAiBEgAABAjAABAABiBAgAABAjQAAAgBgBAgAAxAgQAAAgRoAAAAAxAgQAAIgRIAAAQIwAAQAAYgQIAAAQI0AAAIAYAQIAAMQIEAAAIEaAAAAAMQIEAACIESAAAEDMStd1/+3lBgAAetd13f8C5ofqtHojInUAAAAASUVORK5CYII=";const u=10;function d(e){if(!e.length)return null;const t=e.map((e=>`${(0,s.AH)(e.src)} ${e.density}`)).join(", "),n=e[0],r={srcSet:t,src:(0,s.AH)(n.src)},{width:i}=n.size||{width:null};return i&&(r.width=i,r.height="auto"),r}var A={name:"ImageAsset",mixins:[a],inject:{imageLoadingStrategy:{default:null}},data:()=>({appState:o["default"].state,fallbackImageSrcSet:null,optimalWidth:null,optimalHeight:null}),computed:{allVariants:({lightVariants:e=[],darkVariants:t=[]})=>e.concat(t),defaultAttributes:({lightVariantAttributes:e,darkVariantAttributes:t})=>e||t,darkVariantAttributes:({darkVariants:e})=>d(e),lightVariantAttributes:({lightVariants:e})=>d(e),loading:({appState:e,imageLoadingStrategy:t})=>t||e.imageLoadingStrategy,preferredColorScheme:({appState:e})=>e.preferredColorScheme,prefersAuto:({preferredColorScheme:e})=>e===l.Z.auto,prefersDark:({preferredColorScheme:e})=>e===l.Z.dark,orientation:({optimalWidth:e,optimalHeight:t})=>(0,s.T8)(e,t)},props:{alt:{type:String,default:""},variants:{type:Array,required:!0},shouldCalculateOptimalWidth:{type:Boolean,default:!0}},methods:{handleImageLoadError(){this.fallbackImageSrcSet=`${c} 2x`},async calculateOptimalDimensions(){const{$refs:{img:{currentSrc:e}},allVariants:t}=this,{density:n}=t.find((({src:t})=>e.endsWith(t))),r=parseInt(n.match(/\d+/)[0],u),i=await(0,s.RY)(e),a=i.width/r,o=i.height/r;return{width:a,height:o}},async optimizeImageSize(){if(!this.defaultAttributes.width&&this.$refs.img)try{const e=await this.calculateOptimalDimensions();this.optimalWidth=e.width,this.optimalHeight=e.height}catch{console.error("Unable to calculate optimal image width")}}},mounted(){this.shouldCalculateOptimalWidth&&this.$refs.img.addEventListener("load",this.optimizeImageSize)}},p=A,h=n(1001),g=(0,h.Z)(p,r,i,!1,null,null,null),f=g.exports},2586:function(e,t,n){"use strict";n.d(t,{Z:function(){return I}});var r=function(){var e=this,t=e._self._c;return t("nav",{ref:"nav",staticClass:"nav",class:e.rootClasses,attrs:{role:"navigation"}},[t("div",{ref:"wrapper",staticClass:"nav__wrapper"},[t("div",{staticClass:"nav__background"}),e.hasOverlay?t("div",{staticClass:"nav-overlay",on:{click:e.closeNav}}):e._e(),t("div",{staticClass:"nav-content"},[e._t("pre-title",null,{className:"pre-title"},{closeNav:e.closeNav,inBreakpoint:e.inBreakpoint,currentBreakpoint:e.currentBreakpoint,isOpen:e.isOpen}),e.$slots.default?t("div",{staticClass:"nav-title"},[e._t("default")],2):e._e(),e._t("after-title"),t("div",{staticClass:"nav-menu"},[t("a",{ref:"axToggle",staticClass:"nav-ax-toggle",attrs:{href:"#",role:"button"},on:{click:function(t){return t.preventDefault(),e.toggleNav.apply(null,arguments)}}},[t("span",{staticClass:"visuallyhidden"},[e.isOpen?[e._v(" "+e._s(e.$t("documentation.nav.close-menu"))+" ")]:[e._v(" "+e._s(e.$t("documentation.nav.open-menu"))+" ")]],2)]),t("div",{ref:"tray",staticClass:"nav-menu-tray",on:{transitionend:function(t){return t.target!==t.currentTarget?null:e.onTransitionEnd.apply(null,arguments)},click:e.handleTrayClick}},[e._t("tray",(function(){return[t("NavMenuItems",[e._t("menu-items")],2)]}),{closeNav:e.closeNav})],2)]),e.showActions?t("div",{staticClass:"nav-actions"},[t("a",{ref:"toggle",staticClass:"nav-menucta",attrs:{href:"#",tabindex:"-1","aria-hidden":"true"},on:{click:function(t){return t.preventDefault(),e.toggleNav.apply(null,arguments)}}},[t("span",{staticClass:"nav-menucta-chevron"})])]):e._e()],2),e._t("after-content")],2),t("BreakpointEmitter",{attrs:{scope:e.BreakpointScopes.nav},on:{change:e.onBreakpointChange}})],1)},i=[],s=n(9146),a=n(2853),o=n(7188),l=n(9652),c=n(1716),u=n(5381),d=n(1147),A=n(5657);const{noClose:p}=c.MenuLinkModifierClasses,{BreakpointName:h,BreakpointScopes:g}=o["default"].constants,f=8,m={isDark:"theme-dark",isOpen:"nav--is-open",inBreakpoint:"nav--in-breakpoint-range",isTransitioning:"nav--is-transitioning",isSticking:"nav--is-sticking",hasSolidBackground:"nav--solid-background",hasNoBorder:"nav--noborder",hasFullWidthBorder:"nav--fullwidth-border",isWideFormat:"nav--is-wide-format",noBackgroundTransition:"nav--no-bg-transition"};var v={name:"NavBase",components:{NavMenuItems:a.Z,BreakpointEmitter:o["default"]},constants:{NavStateClasses:m,NoBGTransitionFrames:f},props:{breakpoint:{type:String,default:h.small},hasOverlay:{type:Boolean,default:!0},hasSolidBackground:{type:Boolean,default:!1},hasNoBorder:{type:Boolean,default:!1},hasFullWidthBorder:{type:Boolean,default:!1},isDark:{type:Boolean,default:!1},isWideFormat:{type:Boolean,default:!1},showActions:{type:Boolean,default:!0}},mixins:[s["default"]],data(){return{isOpen:!1,isTransitioning:!1,isSticking:!1,noBackgroundTransition:!0,currentBreakpoint:h.large}},computed:{BreakpointScopes:()=>g,inBreakpoint:({currentBreakpoint:e,breakpoint:t})=>!(0,u.fr)(e,t),rootClasses:({isOpen:e,inBreakpoint:t,isTransitioning:n,isSticking:r,hasSolidBackground:i,hasNoBorder:s,hasFullWidthBorder:a,isDark:o,isWideFormat:l,noBackgroundTransition:c})=>({[m.isDark]:o,[m.isOpen]:e,[m.inBreakpoint]:t,[m.isTransitioning]:n,[m.isSticking]:r,[m.hasSolidBackground]:i,[m.hasNoBorder]:s,[m.hasFullWidthBorder]:a,[m.isWideFormat]:l,[m.noBackgroundTransition]:c})},watch:{isOpen(e){this.$emit("change",e),e?this.onExpand():this.onClose()}},async mounted(){window.addEventListener("keydown",this.onEscape),window.addEventListener("popstate",this.closeNav),window.addEventListener("orientationchange",this.closeNav),document.addEventListener("click",this.handleClickOutside),this.handleFlashOnMount(),await this.$nextTick()},beforeDestroy(){window.removeEventListener("keydown",this.onEscape),window.removeEventListener("popstate",this.closeNav),window.removeEventListener("orientationchange",this.closeNav),document.removeEventListener("click",this.handleClickOutside),this.isOpen&&this.toggleScrollLock(!1)},methods:{getIntersectionTargets(){return[document.getElementById(c.EA)||this.$el]},toggleNav(){this.isOpen=!this.isOpen,this.isTransitioning=!0},closeNav(){const e=this.isOpen;return this.isOpen=!1,this.resolveOnceTransitionsEnd(e)},resolveOnceTransitionsEnd(e){return e&&this.inBreakpoint?(this.isTransitioning=!0,new Promise((e=>{const t=this.$watch("isTransitioning",(()=>{e(),t()}))}))):Promise.resolve()},async onTransitionEnd({propertyName:e}){"max-height"===e&&(this.$emit("changed",this.isOpen),this.isTransitioning=!1,this.isOpen?(this.$emit("opened"),this.toggleScrollLock(!0)):this.$emit("closed"))},onBreakpointChange(e){this.currentBreakpoint=e,this.inBreakpoint||this.closeNav()},onIntersect({intersectionRatio:e}){window.scrollY<0||(this.isSticking=1!==e)},onEscape({key:e}){"Escape"===e&&this.isOpen&&(this.closeNav(),this.$refs.axToggle.focus())},handleTrayClick({target:e}){e.href&&!e.classList.contains(p)&&this.closeNav()},handleClickOutside({target:e}){this.$refs.nav.contains(e)||this.closeNav()},toggleScrollLock(e){e?l.Z.lockScroll(this.$refs.tray):l.Z.unlockScroll(this.$refs.tray)},onExpand(){this.$emit("open"),d.Z.hide(this.$refs.wrapper),document.activeElement===this.$refs.toggle&&document.activeElement.blur()},onClose(){this.$emit("close"),this.toggleScrollLock(!1),d.Z.show(this.$refs.wrapper)},async handleFlashOnMount(){await(0,A.J)(f),this.noBackgroundTransition=!1}}},b=v,y=n(1001),C=(0,y.Z)(b,r,i,!1,null,"40ae4336",null),I=C.exports},535:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=function(){var e=this,t=e._self._c;return t("li",{staticClass:"nav-menu-item",class:{"nav-menu-item--animated":e.animate}},[e._t("default")],2)},i=[],s={name:"NavMenuItemBase",props:{animate:{type:Boolean,default:!0}}},a=s,o=n(1001),l=(0,o.Z)(a,r,i,!1,null,"296e4e0c",null),c=l.exports},2853:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=function(){var e=this,t=e._self._c;return t("ul",{staticClass:"nav-menu-items"},[e._t("default")],2)},i=[],s={name:"NavMenuItems"},a=s,o=n(1001),l=(0,o.Z)(a,r,i,!1,null,"a101abb4",null),c=l.exports},5921:function(e,t,n){"use strict";n.d(t,{Z:function(){return le}});var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"TopicTypeIcon",style:e.styles},[e.imageOverride?t("OverridableAsset",{staticClass:"icon-inline",attrs:{imageOverride:e.imageOverride,shouldCalculateOptimalWidth:e.shouldCalculateOptimalWidth}}):t(e.icon,e._b({tag:"component",staticClass:"icon-inline"},"component",e.iconProps,!1))],1)},i=[],s=n(8633),a=n(9001),o=n(5692),l=n(8638),c=function(){var e=this,t=e._self._c;return t("SVGIcon",{attrs:{viewBox:"0 0 14 14",height:"14",themeId:"topic-func"}},[t("path",{attrs:{d:"M13 1v12h-12v-12zM12.077 1.923h-10.154v10.154h10.154z"}}),t("path",{attrs:{d:"M5.191 9.529c0.044 0.002 0.089 0.004 0.133 0.004 0.108 0 0.196-0.025 0.262-0.074s0.122-0.113 0.166-0.188c0.044-0.077 0.078-0.159 0.103-0.247s0.049-0.173 0.074-0.251l0.598-2.186h-0.709l0.207-0.702h0.702l0.288-1.086c0.083-0.384 0.256-0.667 0.517-0.849s0.591-0.273 0.99-0.273c0.108 0 0.212 0.007 0.314 0.022s0.203 0.027 0.306 0.037l-0.207 0.761c-0.054-0.006-0.106-0.011-0.155-0.018s-0.102-0.011-0.155-0.011c-0.108 0-0.196 0.016-0.262 0.048s-0.122 0.075-0.166 0.129-0.080 0.115-0.107 0.185c-0.028 0.068-0.055 0.14-0.085 0.214l-0.222 0.842h0.768l-0.192 0.702h-0.783l-0.628 2.319c-0.059 0.222-0.129 0.419-0.21 0.594s-0.182 0.322-0.303 0.443-0.269 0.214-0.443 0.281-0.385 0.1-0.631 0.1c-0.084 0-0.168-0.004-0.251-0.011s-0.168-0.014-0.251-0.018l0.207-0.768c0.040 0 0.081 0.001 0.126 0.004z"}})])},u=[],d=n(9742),A={name:"TopicFuncIcon",components:{SVGIcon:d.Z}},p=A,h=n(1001),g=(0,h.Z)(p,c,u,!1,null,null,null),f=g.exports,m=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"collection-icon",attrs:{viewBox:"0 0 14 14",themeId:"collection"}},[t("path",{attrs:{d:"m1 1v12h12v-12zm11 11h-10v-10h10z"}}),t("path",{attrs:{d:"m3 4h8v1h-8zm0 2.5h8v1h-8zm0 2.5h8v1h-8z"}}),t("path",{attrs:{d:"m3 4h8v1h-8z"}}),t("path",{attrs:{d:"m3 6.5h8v1h-8z"}}),t("path",{attrs:{d:"m3 9h8v1h-8z"}})])},v=[],b={name:"CollectionIcon",components:{SVGIcon:d.Z}},y=b,C=(0,h.Z)(y,m,v,!1,null,null,null),I=C.exports,w=function(){var e=this,t=e._self._c;return t("SVGIcon",{attrs:{viewBox:"0 0 14 14",height:"14",themeId:"topic-func-op"}},[t("path",{attrs:{d:"M13 13h-12v-12h12zM1.923 12.077h10.154v-10.154h-10.154z"}}),t("path",{attrs:{d:"M5.098 4.968v-1.477h-0.738v1.477h-1.477v0.738h1.477v1.477h0.738v-1.477h1.477v-0.738z"}}),t("path",{attrs:{d:"M8.030 4.807l-2.031 5.538h0.831l2.031-5.538z"}}),t("path",{attrs:{d:"M8.894 8.805v0.923h2.215v-0.923z"}})])},E=[],B={name:"TopicFuncOpIcon",components:{SVGIcon:d.Z}},x=B,k=(0,h.Z)(x,w,E,!1,null,null,null),_=k.exports,S=n(7775),T=function(){var e=this,t=e._self._c;return t("SVGIcon",{attrs:{viewBox:"0 0 14 14",height:"14",themeId:"topic-subscript"}},[t("path",{attrs:{d:"M13 13h-12v-12h12zM1.923 12.077h10.154v-10.154h-10.154z"}}),t("path",{attrs:{d:"M4.133 3.633v6.738h1.938v-0.831h-0.923v-5.077h0.923v-0.831z"}}),t("path",{attrs:{d:"M9.856 10.371v-6.738h-1.938v0.831h0.923v5.077h-0.923v0.831z"}})])},L=[],P={name:"TopicSubscriptIcon",components:{SVGIcon:d.Z}},Q=P,M=(0,h.Z)(Q,T,L,!1,null,null,null),Z=M.exports,D=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"two-letter-icon",attrs:{width:"16px",height:"16px",viewBox:"0 0 16 16",themeId:"two-letter"}},[t("g",{attrs:{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[t("g",{attrs:{transform:"translate(1.000000, 1.000000)"}},[t("rect",{attrs:{stroke:"currentColor",x:"0.5",y:"0.5",width:"13",height:"13"}}),t("text",{attrs:{"font-size":"8","font-weight":"bold",fill:"currentColor"}},[t("tspan",{attrs:{x:"8.2",y:"11"}},[e._v(e._s(e.second))])]),t("text",{attrs:{"font-size":"11","font-weight":"bold",fill:"currentColor"}},[t("tspan",{attrs:{x:"1.7",y:"11"}},[e._v(e._s(e.first))])])])])])},O=[],R={name:"TwoLetterSymbolIcon",components:{SVGIcon:d.Z},props:{first:{type:String,required:!0},second:{type:String,required:!0}}},N=R,j=(0,h.Z)(N,D,O,!1,null,null,null),V=j.exports,G=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"single-letter-icon",attrs:{width:"16px",height:"16px",viewBox:"0 0 16 16",themeId:"single-letter"}},[t("g",{attrs:{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"}},[t("rect",{attrs:{stroke:"currentColor",x:"1",y:"1",width:"14",height:"14"}}),t("text",{attrs:{"font-size":"11","font-weight":"bold",fill:"currentColor",x:"49%",y:"12","text-anchor":"middle"}},[t("tspan",[e._v(e._s(e.symbol))])])])])},$=[],z={name:"SingleLetterSymbolIcon",components:{SVGIcon:d.Z},props:{symbol:{type:String,required:!0}}},q=z,H=(0,h.Z)(q,G,$,!1,null,null,null),W=H.exports,F=n(5629),U=n(1869),Y=function(){var e=this,t=e._self._c;return e.shouldUseAsset?t("ImageAsset",e._b({},"ImageAsset",{variants:e.variants,loading:null,shouldCalculateOptimalWidth:e.shouldCalculateOptimalWidth,alt:e.alt},!1)):t("SVGIcon",{attrs:{"icon-url":e.iconUrl,themeId:e.themeId}})},X=[],K=n(6769),J={name:"OverridableAsset",components:{SVGIcon:d.Z,ImageAsset:K.Z},props:{imageOverride:{type:Object,default:null},shouldCalculateOptimalWidth:{type:Boolean,default:!0}},computed:{variants:({imageOverride:e})=>e?e.variants:[],alt:({imageOverride:e})=>e.alt,firstVariant:({variants:e})=>e[0],iconUrl:({firstVariant:e})=>e&&e.url,themeId:({firstVariant:e})=>e&&e.svgID,isSameOrigin:({iconUrl:e,sameOrigin:t})=>t(e),shouldUseAsset:({isSameOrigin:e,themeId:t})=>!e||!t},methods:{sameOrigin(e){if(!e)return!1;const t=new URL(e,window.location),n=new URL(window.location);return t.origin===n.origin}}},ee=J,te=(0,h.Z)(ee,Y,X,!1,null,null,null),ne=te.exports;const re={[F.t.article]:o.Z,[F.t.associatedtype]:I,[F.t.buildSetting]:I,[F.t["class"]]:W,[F.t.collection]:I,[F.t.dictionarySymbol]:W,[F.t.container]:I,[F.t["enum"]]:W,[F.t.extension]:V,[F.t.func]:f,[F.t.op]:_,[F.t.httpRequest]:W,[F.t.languageGroup]:I,[F.t.learn]:s.Z,[F.t.method]:W,[F.t.macro]:W,[F.t.module]:a.Z,[F.t.namespace]:W,[F.t.overview]:s.Z,[F.t.protocol]:V,[F.t.property]:W,[F.t.propertyListKey]:W,[F.t.resources]:s.Z,[F.t.sampleCode]:S.Z,[F.t.struct]:W,[F.t.subscript]:Z,[F.t.symbol]:I,[F.t.tutorial]:l.Z,[F.t.typealias]:W,[F.t.union]:W,[F.t["var"]]:W},ie={[F.t["class"]]:{symbol:"C"},[F.t.dictionarySymbol]:{symbol:"O"},[F.t["enum"]]:{symbol:"E"},[F.t.extension]:{first:"E",second:"x"},[F.t.httpRequest]:{symbol:"E"},[F.t.method]:{symbol:"M"},[F.t.macro]:{symbol:"#"},[F.t.namespace]:{symbol:"N"},[F.t.protocol]:{first:"P",second:"r"},[F.t.property]:{symbol:"P"},[F.t.propertyListKey]:{symbol:"K"},[F.t.struct]:{symbol:"S"},[F.t.typealias]:{symbol:"T"},[F.t.union]:{symbol:"U"},[F.t["var"]]:{symbol:"V"}};var se={name:"TopicTypeIcon",components:{OverridableAsset:ne,SVGIcon:d.Z,SingleLetterSymbolIcon:W},constants:{TopicTypeIcons:re,TopicTypeProps:ie},props:{type:{type:String,required:!0},withColors:{type:Boolean,default:!1},imageOverride:{type:Object,default:null},shouldCalculateOptimalWidth:{type:Boolean,default:!0}},computed:{normalisedType:({type:e})=>F.$[e]||e,icon:({normalisedType:e})=>re[e]||I,iconProps:({normalisedType:e})=>ie[e]||{},color:({normalisedType:e})=>U.g[e],styles:({color:e,withColors:t})=>t&&e?{"--icon-color":`var(--color-type-icon-${e})`}:{}}},ae=se,oe=(0,h.Z)(ae,r,i,!1,null,"3b1b4787",null),le=oe.exports},352:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r,i,s={functional:!0,name:"WordBreak",render(e,{props:t,slots:n,data:r}){const i=n().default||[],s=i.filter((e=>e.text&&!e.tag));if(0===s.length||s.length!==i.length)return e(t.tag,r,i);const a=s.map((({text:e})=>e)).join(),o=[];let l=null,c=0;while(null!==(l=t.safeBoundaryPattern.exec(a))){const t=l.index+1;o.push(a.slice(c,t)),o.push(e("wbr",{key:l.index})),c=t}return o.push(a.slice(c,a.length)),e(t.tag,r,o)},props:{safeBoundaryPattern:{type:RegExp,default:()=>/([a-z](?=[A-Z])|(:)\w|\w(?=[._]\w))/g},tag:{type:String,default:()=>"span"}}},a=s,o=n(1001),l=(0,o.Z)(a,r,i,!1,null,null,null),c=l.exports},2122:function(e,t,n){var r={"./bash.js":[8780,393],"./c.js":[612,546],"./cpp.js":[6248,621],"./css.js":[5064,864],"./diff.js":[7731,213],"./http.js":[8937,878],"./java.js":[8257,788],"./javascript.js":[978,814],"./json.js":[14,82],"./llvm.js":[4972,133],"./markdown.js":[1312,113],"./objectivec.js":[2446,637],"./perl.js":[2482,645],"./php.js":[2656,596],"./python.js":[8245,435],"./ruby.js":[7905,623],"./scss.js":[1062,392],"./shell.js":[7874,176],"./swift.js":[7690,527],"./xml.js":[4610,490]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((function(){return n.t(i,23)}))}i.keys=function(){return Object.keys(r)},i.id=2122,e.exports=i},9426:function(e,t,n){"use strict";n.d(t,{Ag:function(){return s},UG:function(){return i},yf:function(){return r}});const r={added:"added",modified:"modified",deprecated:"deprecated"},i=[r.modified,r.added,r.deprecated],s={[r.modified]:"change-type.modified",[r.added]:"change-type.added",[r.deprecated]:"change-type.deprecated"}},1869:function(e,t,n){"use strict";n.d(t,{c:function(){return s},g:function(){return a}});var r=n(5629),i=n(7192);const s={blue:"blue",teal:"teal",orange:"orange",purple:"purple",green:"green",sky:"sky",pink:"pink"},a={[r.t.article]:s.teal,[r.t.init]:s.blue,[r.t["case"]]:s.orange,[r.t["class"]]:s.purple,[r.t.collection]:s.pink,[i.L.collectionGroup]:s.teal,[r.t.dictionarySymbol]:s.purple,[r.t["enum"]]:s.orange,[r.t.extension]:s.orange,[r.t.func]:s.green,[r.t.op]:s.green,[r.t.httpRequest]:s.green,[r.t.module]:s.sky,[r.t.method]:s.blue,[r.t.macro]:s.pink,[r.t.protocol]:s.purple,[r.t.property]:s.teal,[r.t.propertyListKey]:s.green,[r.t.propertyListKeyReference]:s.green,[r.t.sampleCode]:s.purple,[r.t.struct]:s.purple,[r.t.subscript]:s.blue,[r.t.typealias]:s.orange,[r.t.union]:s.purple,[r.t["var"]]:s.purple}},3078:function(e,t){"use strict";t["Z"]={objectiveC:{name:"Objective-C",key:{api:"occ",url:"objc"}},swift:{name:"Swift",key:{api:"swift",url:"swift"}}}},3946:function(e,t,n){"use strict";n.d(t,{o:function(){return r}});const r={list:"list",compactGrid:"compactGrid",detailedGrid:"detailedGrid",hidden:"hidden"}},5629:function(e,t,n){"use strict";n.d(t,{$:function(){return i},t:function(){return r}});const r={article:"article",associatedtype:"associatedtype",buildSetting:"buildSetting",case:"case",collection:"collection",class:"class",container:"container",dictionarySymbol:"dictionarySymbol",enum:"enum",extension:"extension",func:"func",groupMarker:"groupMarker",httpRequest:"httpRequest",init:"init",languageGroup:"languageGroup",learn:"learn",macro:"macro",method:"method",module:"module",namespace:"namespace",op:"op",overview:"overview",project:"project",property:"property",propertyListKey:"propertyListKey",propertyListKeyReference:"propertyListKeyReference",protocol:"protocol",resources:"resources",root:"root",sampleCode:"sampleCode",section:"section",struct:"struct",subscript:"subscript",symbol:"symbol",tutorial:"tutorial",typealias:"typealias",union:"union",var:"var"},i={[r.init]:r.method,[r.case]:r.enum,[r.propertyListKeyReference]:r.propertyListKey,[r.project]:r.tutorial}},7192:function(e,t,n){"use strict";n.d(t,{L:function(){return r}});const r={article:"article",codeListing:"codeListing",collection:"collection",collectionGroup:"collectionGroup",containerSymbol:"containerSymbol",devLink:"devLink",dictionarySymbol:"dictionarySymbol",generic:"generic",link:"link",media:"media",pseudoCollection:"pseudoCollection",pseudoSymbol:"pseudoSymbol",restRequestSymbol:"restRequestSymbol",sampleCode:"sampleCode",symbol:"symbol",table:"table",learn:"learn",overview:"overview",project:"project",tutorial:"tutorial",resources:"resources"}},1789:function(e,t){"use strict";t["Z"]={inject:{performanceMetricsEnabled:{default:!1},isTargetIDE:{default:!1}},methods:{newContentMounted(){let e;this.performanceMetricsEnabled&&(e=Math.round(window.performance.now()),window.renderedTimes||(window.renderedTimes=[]),window.renderedTimes.push(e)),this.$bridge.send({type:"rendered",data:{time:e}})},handleContentUpdateFromBridge(e){this.topicData=e}}}},2974:function(e,t,n){"use strict";var r=n(3465),i=n(3208),s=n(2449),a=n(9519);t["Z"]={methods:{extractFirstParagraphText(e=[]){const{references:t={}}=this,n=a["default"].computed.plaintext.bind({...a["default"].methods,content:e,references:t})();return(0,i.id)(n)}},computed:{pagePath:({$route:{path:e="/"}={}})=>e,pageURL:({pagePath:e="/"})=>(0,s.HH)(e),disableMetadata:()=>!1},mounted(){this.disableMetadata||(0,r.X)({title:this.pageTitle,description:this.pageDescription,url:this.pageURL,currentLocale:this.$i18n.locale})}}},9146:function(e,t,n){"use strict";const r={up:"up",down:"down"};t["default"]={constants:{IntersectionDirections:r},data(){return{intersectionObserver:null,intersectionPreviousScrollY:0,intersectionScrollDirection:r.down}},computed:{intersectionThreshold(){const e=[];for(let t=0;t<=1;t+=.01)e.push(t);return e},intersectionRoot(){return null},intersectionRootMargin(){return"0px 0px 0px 0px"},intersectionObserverOptions(){return{root:this.intersectionRoot,rootMargin:this.intersectionRootMargin,threshold:this.intersectionThreshold}}},async mounted(){await n.e(337).then(n.t.bind(n,6337,23)),this.intersectionObserver=new IntersectionObserver((e=>{this.detectIntersectionScrollDirection();const t=this.onIntersect;t?e.forEach(t):console.warn("onIntersect not implemented")}),this.intersectionObserverOptions),this.getIntersectionTargets().forEach((e=>{this.intersectionObserver.observe(e)}))},beforeDestroy(){this.intersectionObserver&&this.intersectionObserver.disconnect()},methods:{getIntersectionTargets(){return[this.$el]},detectIntersectionScrollDirection(){window.scrollYthis.intersectionPreviousScrollY&&(this.intersectionScrollDirection=r.up),this.intersectionPreviousScrollY=window.scrollY}}}},5184:function(e,t,n){"use strict";var r=n(4030),i=n(1265),s=n(3704);function a(e){return new Promise(((t,n)=>{e.complete?t():(e.addEventListener("load",t,{once:!0}),e.addEventListener("error",n,{once:!0}))}))}function o(){return Promise.allSettled([...document.getElementsByTagName("img")].map(a))}t["Z"]={mixins:[s.Z],mounted(){this.scrollToElementIfAnchorPresent()},updated(){this.scrollToElementIfAnchorPresent()},methods:{async scrollToElementIfAnchorPresent(){const{hash:e}=this.$route;if(!e)return;const{imageLoadingStrategy:t}=r["default"].state;r["default"].setImageLoadingStrategy(i.Z.eager),await this.$nextTick(),await o(),this.scrollToElement(e),r["default"].setImageLoadingStrategy(t)}}}},5953:function(e,t){"use strict";t["Z"]={inject:{store:{default:()=>({state:{references:{}},setReferences(){},reset(){}})}},computed:{references:({store:e})=>e.state.references}}},3704:function(e,t,n){"use strict";var r=n(5657);t["Z"]={methods:{async scrollToElement(e){await(0,r.J)(8);const t=this.$router.resolve({hash:e}),{selector:n,offset:i}=await this.$router.options.scrollBehavior(t.route),s=document.querySelector(n);return s?(s.scrollIntoView(),window.scrollY+window.innerHeighte?.startsWith(`doc://${t}/`)))}function a(e={}){return Object.keys(e).reduce(((t,n)=>{const r=e[n],{url:a,...o}=r;return i.has(r.type)?{...t,[n]:s(n)?r:o}:{...t,[n]:r}}),{})}var o=n(144),l=n(9426);const c=()=>({[l.yf.modified]:0,[l.yf.added]:0,[l.yf.deprecated]:0});var u={state:{apiChanges:null,apiChangesCounts:c(),selectedAPIChangesVersion:null},setAPIChanges(e){this.state.apiChanges=e},setSelectedAPIChangesVersion(e){this.state.selectedAPIChangesVersion=e},resetApiChanges(){this.state.apiChanges=null,this.state.apiChangesCounts=c()},async updateApiChangesCounts(){await o["default"].nextTick(),Object.keys(this.state.apiChangesCounts).forEach((e=>{this.state.apiChangesCounts[e]=this.countChangeType(e)}))},countChangeType(e){if(document&&document.querySelectorAll){const t=`.changed-${e}:not(.changed-total)`;return document.querySelectorAll(t).length}return 0}},d={state:{onThisPageSections:[],currentPageAnchor:null},resetPageSections(){this.state.onThisPageSections=[],this.state.currentPageAnchor=null},addOnThisPageSection(e,{i18n:t=!0}={}){this.state.onThisPageSections.push({...e,i18n:t})},setCurrentPageSection(e){const t=this.state.onThisPageSections.findIndex((({anchor:t})=>t===e));-1!==t&&(this.state.currentPageAnchor=e)}},A=n(5394);const{state:p,...h}=u,{state:g,...f}=d;var m={state:{preferredLanguage:A.Z.preferredLanguage,contentWidth:0,...p,...g,references:{}},reset(){this.state.preferredLanguage=A.Z.preferredLanguage,this.state.references={},this.resetApiChanges()},setPreferredLanguage(e){this.state.preferredLanguage=e,A.Z.preferredLanguage=this.state.preferredLanguage},setContentWidth(e){this.state.contentWidth=e},setReferences(e){this.state.references=a(e)},updateReferences(){this.setReferences(this.state.references)},...h,...f}},6511:function(e,t){"use strict";t["default"]={state:{flatChildren:null,references:{},apiChanges:null,apiChangesVersion:null,includedArchiveIdentifiers:[],errorFetching:!1,errorFetchingDiffs:!1,technologyProps:{}},reset(){this.state.flatChildren=null,this.state.references={},this.state.apiChanges=null,this.state.apiChangesVersion=null,this.state.includedArchiveIdentifiers=[],this.state.errorFetching=!1,this.state.errorFetchingDiffs=!1,this.state.technologyProps={}},setFlatChildren(e){this.state.flatChildren=e},setReferences(e){this.state.references=e},setApiChanges(e){this.state.apiChanges=e},setApiChangesVersion(e){this.state.apiChangesVersion=e},setIncludedArchiveIdentifiers(e){this.state.includedArchiveIdentifiers=e},setErrorFetching(e){this.state.errorFetching=e},setErrorFetchingDiffs(e){this.state.errorFetchingDiffs=e},setTechnologyProps(e){this.state.technologyProps=e}}},7486:function(e,t,n){"use strict";const r=["input","select","textarea","button","optgroup","option","menuitem","fieldset","object","a[href]","*[tabindex]","*[contenteditable]"],i=r.join(",");t["ZP"]={getTabbableElements(e){const t=e.querySelectorAll(i),n=t.length;let r;const s=[];for(r=0;r=0},isFocusableElement(e){const t=e.nodeName.toLowerCase(),n=r.includes(t);return!("a"!==t||!e.getAttribute("href"))||(n?!e.disabled:"true"===e.getAttribute("contenteditable")||!Number.isNaN(parseFloat(e.getAttribute("tabindex"))))}}},5654:function(e,t,n){"use strict";n.d(t,{Md:function(){return a},Xy:function(){return i},Z$:function(){return r}});const r=e=>e[e.length-1],i=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function*s(e,t){for(let n=0;n{o(e,s),o(e,a),e.setAttribute(s,"true"),e.setAttribute(a,"-1");const t=r.ZP.getTabbableElements(e);let n=t.length-1;while(n>=0)o(t[n],a),t[n].setAttribute(a,"-1"),n-=1},d=e=>{l(e,s),l(e,a);const t=e.querySelectorAll(`[${i+a}]`);let n=t.length-1;while(n>=0)l(t[n],a),n-=1};t["Z"]={hide(e){c(e,u)},show(e){c(e,d)}}},8841:function(e,t,n){"use strict";n.d(t,{d9:function(){return h},rQ:function(){return l},k_:function(){return p},Ek:function(){return d},Us:function(){return A}});var r=n(5947),i=n(2449),s=n(1944);class a extends Error{constructor({location:e,response:t}){super("Request redirected"),this.location=e,this.response=t}}class o extends Error{constructor(e){super("Unable to fetch data"),this.route=e}}async function l(e,t={},n={}){function r(e){return("ide"!=={NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}.VUE_APP_TARGET||0!==e.status)&&!e.ok}const o=(0,i.WN)(e),l=(0,i.Ex)(t);l&&(o.search=l);const c=await fetch(o.href,n);if(r(c))throw c;if(c.redirected)throw new a({location:c.url,response:c});const u=await c.json();return(0,s.ZP)(u.schemaVersion),u}function c(e){const t=e.replace(/\/$/,"");return`${(0,r.AH)(["/data",t])}.json`}function u(e){const{pathname:t,search:n}=new URL(e),r=/\/data(\/.*).json$/,i=r.exec(t);return i?i[1]+n:t+n}async function d(e,t,n){const r=c(e.path);let i;try{i=await l(r,e.query)}catch(s){if("ide"==={NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}.VUE_APP_TARGET)throw console.error(s),!1;if(s instanceof a)throw u(s.location);s.status&&404===s.status?n({name:"not-found",params:[e.path]}):n(new o(e))}return i}function A(e,t){return!(0,i.Lp)(e,t)}async function p(e,t={}){const n=c(e);return l(n,{},t)}function h(e){return JSON.parse(JSON.stringify(e))}},1944:function(e,t,n){"use strict";n.d(t,{W1:function(){return i},ZP:function(){return d},n4:function(){return a}});const r={major:0,minor:3,patch:0};function i({major:e,minor:t,patch:n}){return[e,t,n].join(".")}function s(e){const[t=0,n=0,r=0]=e.split(".");return[Number(t),Number(n),Number(r)]}function a(e,t){const n=s(e),r=s(t);for(let i=0;ir[i])return 1;if(n[i]`[Swift-DocC-Render] The render node version for this page (${e}) has a different major version component than Swift-DocC-Render supports (${o}). Compatibility is not guaranteed.`;function u(e){const{major:t,minor:n}=e,{major:s,minor:a}=r;return t!==s?c(i(e)):n>a?l(i(e)):""}function d(e){if(!e)return;const t=u(e);t&&console.warn(t)}},9652:function(e,t,n){"use strict";n.d(t,{n:function(){return a}});let r=!1,i=-1,s=0;const a="data-scroll-lock-disable",o=()=>window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1);function l(e){e.touches.length>1||e.preventDefault()}const c=e=>!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight;function u(){s=document.body.getBoundingClientRect().top,document.body.style.overflow="hidden scroll",document.body.style.top=`${s}px`,document.body.style.position="fixed",document.body.style.width="100%"}function d(e){e&&(e.ontouchstart=null,e.ontouchmove=null),document.removeEventListener("touchmove",l)}function A(e,t){const n=e.targetTouches[0].clientY-i,r=e.target.closest(`[${a}]`)||t;return 0===r.scrollTop&&n>0||c(r)&&n<0?l(e):(e.stopPropagation(),!0)}function p(e){document.addEventListener("touchmove",l,{passive:!1}),e&&(e.ontouchstart=e=>{1===e.targetTouches.length&&(i=e.targetTouches[0].clientY)},e.ontouchmove=t=>{1===t.targetTouches.length&&A(t,e)})}t["Z"]={lockScroll(e){r||(o()?p(e):u(),r=!0)},unlockScroll(e){r&&(o()?d(e):(document.body.style.removeProperty("overflow"),document.body.style.removeProperty("top"),document.body.style.removeProperty("position"),document.body.style.removeProperty("width"),window.scrollTo(0,Math.abs(s))),r=!1)}}},3685:function(e,t,n){var r={"./markdown":[2003,642],"./markdown.js":[2003,642],"./swift":[7467,217],"./swift.js":[7467,217]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((function(){return n(i)}))}i.keys=function(){return Object.keys(r)},i.id=3685,e.exports=i},3390:function(e){var t={exports:{}};function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var r=e[t];"object"!=typeof r||Object.isFrozen(r)||n(r)})),e}t.exports=n,t.exports.default=n;var r=t.exports;class i{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function s(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function a(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const o="",l=e=>!!e.kind,c=(e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`};class u{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=s(e)}openNode(e){if(!l(e))return;let t=e.kind;t=e.sublanguage?`language-${t}`:c(t,{prefix:this.classPrefix}),this.span(t)}closeNode(e){l(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=``}}class d{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){while(this.closeNode());}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"===typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!==typeof e&&e.children&&(e.children.every((e=>"string"===typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{d._collapse(e)})))}}class A extends d{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){const e=new u(this,this.options);return e.value()}finalize(){return!0}}function p(e){return e?"string"===typeof e?e:e.source:null}function h(e){return m("(?=",e,")")}function g(e){return m("(?:",e,")*")}function f(e){return m("(?:",e,")?")}function m(...e){const t=e.map((e=>p(e))).join("");return t}function v(e){const t=e[e.length-1];return"object"===typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function b(...e){const t=v(e),n="("+(t.capture?"":"?:")+e.map((e=>p(e))).join("|")+")";return n}function y(e){return new RegExp(e.toString()+"|").exec("").length-1}function C(e,t){const n=e&&e.exec(t);return n&&0===n.index}const I=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function w(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=p(e),i="";while(r.length>0){const e=I.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}const E=/\b\B/,B="[a-zA-Z]\\w*",x="[a-zA-Z_]\\w*",k="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",S="\\b(0b[01]+)",T="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",L=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=m(t,/.*\b/,e.binary,/\b.*/)),a({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},P={begin:"\\\\[\\s\\S]",relevance:0},Q={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[P]},M={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[P]},Z={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},D=function(e,t,n={}){const r=a({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=b("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:m(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},O=D("//","$"),R=D("/\\*","\\*/"),N=D("#","$"),j={scope:"number",begin:k,relevance:0},V={scope:"number",begin:_,relevance:0},G={scope:"number",begin:S,relevance:0},$={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[P,{begin:/\[/,end:/\]/,relevance:0,contains:[P]}]}]},z={scope:"title",begin:B,relevance:0},q={scope:"title",begin:x,relevance:0},H={begin:"\\.\\s*"+x,relevance:0},W=function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})};var F=Object.freeze({__proto__:null,MATCH_NOTHING_RE:E,IDENT_RE:B,UNDERSCORE_IDENT_RE:x,NUMBER_RE:k,C_NUMBER_RE:_,BINARY_NUMBER_RE:S,RE_STARTERS_RE:T,SHEBANG:L,BACKSLASH_ESCAPE:P,APOS_STRING_MODE:Q,QUOTE_STRING_MODE:M,PHRASAL_WORDS_MODE:Z,COMMENT:D,C_LINE_COMMENT_MODE:O,C_BLOCK_COMMENT_MODE:R,HASH_COMMENT_MODE:N,NUMBER_MODE:j,C_NUMBER_MODE:V,BINARY_NUMBER_MODE:G,REGEXP_MODE:$,TITLE_MODE:z,UNDERSCORE_TITLE_MODE:q,METHOD_GUARD:H,END_SAME_AS_BEGIN:W});function U(e,t){const n=e.input[e.index-1];"."===n&&t.ignoreMatch()}function Y(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function X(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=U,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function K(e,t){Array.isArray(e.illegal)&&(e.illegal=b(...e.illegal))}function J(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function ee(e,t){void 0===e.relevance&&(e.relevance=1)}const te=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=m(n.beforeMatch,h(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},ne=["of","and","for","in","not","or","if","then","parent","list","value"],re="keyword";function ie(e,t,n=re){const r=Object.create(null);return"string"===typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,ie(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,se(n[0],n[1])]}))}}function se(e,t){return t?Number(t):ae(e)?0:1}function ae(e){return ne.includes(e.toLowerCase())}const oe={},le=e=>{console.error(e)},ce=(e,...t)=>{console.log(`WARN: ${e}`,...t)},ue=(e,t)=>{oe[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),oe[`${e}/${t}`]=!0)},de=new Error;function Ae(e,t,{key:n}){let r=0;const i=e[n],s={},a={};for(let o=1;o<=t.length;o++)a[o+r]=i[o],s[o+r]=!0,r+=y(t[o-1]);e[n]=a,e[n]._emit=s,e[n]._multi=!0}function pe(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw le("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),de;if("object"!==typeof e.beginScope||null===e.beginScope)throw le("beginScope must be object"),de;Ae(e,e.begin,{key:"beginScope"}),e.begin=w(e.begin,{joinWith:""})}}function he(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw le("skip, excludeEnd, returnEnd not compatible with endScope: {}"),de;if("object"!==typeof e.endScope||null===e.endScope)throw le("endScope must be object"),de;Ae(e,e.end,{key:"endScope"}),e.end=w(e.end,{joinWith:""})}}function ge(e){e.scope&&"object"===typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}function fe(e){ge(e),"string"===typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"===typeof e.endScope&&(e.endScope={_wrap:e.endScope}),pe(e),he(e)}function me(e){function t(t,n){return new RegExp(p(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=y(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(w(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){const t=new r;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}function s(n,r){const a=n;if(n.isCompiled)return a;[Y,J,fe,te].forEach((e=>e(n,r))),e.compilerExtensions.forEach((e=>e(n,r))),n.__beforeBegin=null,[X,K,ee].forEach((e=>e(n,r))),n.isCompiled=!0;let o=null;return"object"===typeof n.keywords&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),o=n.keywords.$pattern,delete n.keywords.$pattern),o=o||/\w+/,n.keywords&&(n.keywords=ie(n.keywords,e.case_insensitive)),a.keywordPatternRe=t(o,!0),r&&(n.begin||(n.begin=/\B|\b/),a.beginRe=t(a.begin),n.end||n.endsWithParent||(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||"",n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?"|":"")+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||(n.contains=[]),n.contains=[].concat(...n.contains.map((function(e){return be("self"===e?n:e)}))),n.contains.forEach((function(e){s(e,a)})),n.starts&&s(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),s(e)}function ve(e){return!!e&&(e.endsWithParent||ve(e.starts))}function be(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return a(e,{variants:null},t)}))),e.cachedVariants?e.cachedVariants:ve(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var ye="11.3.1";class Ce extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Ie=s,we=a,Ee=Symbol("nomatch"),Be=7,xe=function(e){const t=Object.create(null),n=Object.create(null),s=[];let a=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let c={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:A};function u(e){return c.noHighlightRe.test(e)}function d(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=c.languageDetectRe.exec(t);if(n){const t=M(n[1]);return t||(ce(o.replace("{}",n[1])),ce("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>u(e)||M(e)))}function p(e,t,n){let r="",i="";"object"===typeof t?(r=e,n=t.ignoreIllegals,i=t.language):(ue("10.7.0","highlight(lang, code, ...args) has been deprecated."),ue("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=e,r=t),void 0===n&&(n=!0);const s={code:r,language:i};N("before:highlight",s);const a=s.result?s.result:v(s.language,s.code,n);return a.code=s.code,N("after:highlight",a),a}function v(e,n,r,s){const l=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!S.keywords)return void L.addText(P);let e=0;S.keywordPatternRe.lastIndex=0;let t=S.keywordPatternRe.exec(P),n="";while(t){n+=P.substring(e,t.index);const r=x.case_insensitive?t[0].toLowerCase():t[0],i=u(S,r);if(i){const[e,s]=i;if(L.addText(n),n="",l[r]=(l[r]||0)+1,l[r]<=Be&&(Q+=s),e.startsWith("_"))n+=t[0];else{const n=x.classNameAliases[e]||e;L.addKeyword(t[0],n)}}else n+=t[0];e=S.keywordPatternRe.lastIndex,t=S.keywordPatternRe.exec(P)}n+=P.substr(e),L.addText(n)}function A(){if(""===P)return;let e=null;if("string"===typeof S.subLanguage){if(!t[S.subLanguage])return void L.addText(P);e=v(S.subLanguage,P,!0,T[S.subLanguage]),T[S.subLanguage]=e._top}else e=I(P,S.subLanguage.length?S.subLanguage:null);S.relevance>0&&(Q+=e.relevance),L.addSublanguage(e._emitter,e.language)}function p(){null!=S.subLanguage?A():d(),P=""}function h(e,t){let n=1;while(void 0!==t[n]){if(!e._emit[n]){n++;continue}const r=x.classNameAliases[e[n]]||e[n],i=t[n];r?L.addKeyword(i,r):(P=i,d(),P=""),n++}}function g(e,t){return e.scope&&"string"===typeof e.scope&&L.openNode(x.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(L.addKeyword(P,x.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),P=""):e.beginScope._multi&&(h(e.beginScope,t),P="")),S=Object.create(e,{parent:{value:S}}),S}function f(e,t,n){let r=C(e.endRe,n);if(r){if(e["on:end"]){const n=new i(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){while(e.endsParent&&e.parent)e=e.parent;return e}}if(e.endsWithParent)return f(e.parent,t,n)}function m(e){return 0===S.matcher.regexIndex?(P+=e[0],1):(O=!0,0)}function b(e){const t=e[0],n=e.rule,r=new i(n),s=[n.__beforeBegin,n["on:begin"]];for(const i of s)if(i&&(i(e,r),r.isMatchIgnored))return m(t);return n.skip?P+=t:(n.excludeBegin&&(P+=t),p(),n.returnBegin||n.excludeBegin||(P=t)),g(n,e),n.returnBegin?0:t.length}function y(e){const t=e[0],r=n.substr(e.index),i=f(S,e,r);if(!i)return Ee;const s=S;S.endScope&&S.endScope._wrap?(p(),L.addKeyword(t,S.endScope._wrap)):S.endScope&&S.endScope._multi?(p(),h(S.endScope,e)):s.skip?P+=t:(s.returnEnd||s.excludeEnd||(P+=t),p(),s.excludeEnd&&(P=t));do{S.scope&&L.closeNode(),S.skip||S.subLanguage||(Q+=S.relevance),S=S.parent}while(S!==i.parent);return i.starts&&g(i.starts,e),s.returnEnd?0:t.length}function w(){const e=[];for(let t=S;t!==x;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>L.openNode(e)))}let E={};function B(t,i){const s=i&&i[0];if(P+=t,null==s)return p(),0;if("begin"===E.type&&"end"===i.type&&E.index===i.index&&""===s){if(P+=n.slice(i.index,i.index+1),!a){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=E.rule,t}return 1}if(E=i,"begin"===i.type)return b(i);if("illegal"===i.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(S.scope||"")+'"');throw e.mode=S,e}if("end"===i.type){const e=y(i);if(e!==Ee)return e}if("illegal"===i.type&&""===s)return 1;if(D>1e5&&D>3*i.index){const e=new Error("potential infinite loop, way more iterations than matches");throw e}return P+=s,s.length}const x=M(e);if(!x)throw le(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const k=me(x);let _="",S=s||k;const T={},L=new c.__emitter(c);w();let P="",Q=0,Z=0,D=0,O=!1;try{for(S.matcher.considerAll();;){D++,O?O=!1:S.matcher.considerAll(),S.matcher.lastIndex=Z;const e=S.matcher.exec(n);if(!e)break;const t=n.substring(Z,e.index),r=B(t,e);Z=e.index+r}return B(n.substr(Z)),L.closeAllNodes(),L.finalize(),_=L.toHTML(),{language:e,value:_,relevance:Q,illegal:!1,_emitter:L,_top:S}}catch(R){if(R.message&&R.message.includes("Illegal"))return{language:e,value:Ie(n),illegal:!0,relevance:0,_illegalBy:{message:R.message,index:Z,context:n.slice(Z-100,Z+100),mode:R.mode,resultSoFar:_},_emitter:L};if(a)return{language:e,value:Ie(n),illegal:!1,relevance:0,errorRaised:R,_emitter:L,_top:S};throw R}}function y(e){const t={value:Ie(e),illegal:!1,relevance:0,_top:l,_emitter:new c.__emitter(c)};return t._emitter.addText(e),t}function I(e,n){n=n||c.languages||Object.keys(t);const r=y(e),i=n.filter(M).filter(D).map((t=>v(t,e,!1)));i.unshift(r);const s=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(M(e.language).supersetOf===t.language)return 1;if(M(t.language).supersetOf===e.language)return-1}return 0})),[a,o]=s,l=a;return l.secondBest=o,l}function w(e,t,r){const i=t&&n[t]||r;e.classList.add("hljs"),e.classList.add(`language-${i}`)}function E(e){let t=null;const n=d(e);if(u(n))return;if(N("before:highlightElement",{el:e,language:n}),e.children.length>0&&(c.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/issues/2886"),console.warn(e)),c.throwUnescapedHTML)){const t=new Ce("One of your code blocks includes unescaped HTML.",e.innerHTML);throw t}t=e;const r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):I(r);e.innerHTML=i.value,w(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),N("after:highlightElement",{el:e,result:i,text:r})}function B(e){c=we(c,e)}const x=()=>{S(),ue("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function k(){S(),ue("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let _=!1;function S(){if("loading"===document.readyState)return void(_=!0);const e=document.querySelectorAll(c.cssSelector);e.forEach(E)}function T(){_&&S()}function L(n,r){let i=null;try{i=r(e)}catch(s){if(le("Language definition for '{}' could not be registered.".replace("{}",n)),!a)throw s;le(s),i=l}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&Z(i.aliases,{languageName:n})}function P(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]}function Q(){return Object.keys(t)}function M(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function Z(e,{languageName:t}){"string"===typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function D(e){const t=M(e);return t&&!t.disableAutodetect}function O(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}function R(e){O(e),s.push(e)}function N(e,t){const n=e;s.forEach((function(e){e[n]&&e[n](t)}))}function j(e){return ue("10.7.0","highlightBlock will be removed entirely in v12.0"),ue("10.7.0","Please use highlightElement now."),E(e)}"undefined"!==typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",T,!1),Object.assign(e,{highlight:p,highlightAuto:I,highlightAll:S,highlightElement:E,highlightBlock:j,configure:B,initHighlighting:x,initHighlightingOnLoad:k,registerLanguage:L,unregisterLanguage:P,listLanguages:Q,getLanguage:M,registerAliases:Z,autoDetection:D,inherit:we,addPlugin:R}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString=ye,e.regex={concat:m,lookahead:h,either:b,optional:f,anyNumberOfTimes:g};for(const i in F)"object"===typeof F[i]&&r(F[i]);return Object.assign(e,F),e};var ke=xe({});e.exports=ke,ke.HighlightJS=ke,ke.default=ke}}]); \ No newline at end of file diff --git a/docs/js/chunk-vendors.bdb7cbba.js b/docs/js/chunk-vendors.bdb7cbba.js new file mode 100644 index 00000000..2b84f94c --- /dev/null +++ b/docs/js/chunk-vendors.bdb7cbba.js @@ -0,0 +1,26 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[998],{1001:function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}n.d(e,{Z:function(){return r}})},8269:function(t,e,n){(function(e,n){t.exports=n(e)})("undefined"!=typeof n.g?n.g:this,(function(t){if(t.CSS&&t.CSS.escape)return t.CSS.escape;var e=function(t){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");var e,n=String(t),r=n.length,o=-1,i="",a=n.charCodeAt(0);while(++o=1&&e<=31||127==e||0==o&&e>=48&&e<=57||1==o&&e>=48&&e<=57&&45==a?"\\"+e.toString(16)+" ":(0!=o||1!=r||45!=e)&&(e>=128||45==e||95==e||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122)?n.charAt(o):"\\"+n.charAt(o):"�";return i};return t.CSS||(t.CSS={}),t.CSS.escape=e,e}))},7152:function(t,e){"use strict"; +/*! + * vue-i18n v8.28.2 + * (c) 2022 kazuya kawaguchi + * Released under the MIT License. + */var n=["compactDisplay","currency","currencyDisplay","currencySign","localeMatcher","notation","numberingSystem","signDisplay","style","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"],r=["dateStyle","timeStyle","calendar","localeMatcher","hour12","hourCycle","timeZone","formatMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function o(t,e){"undefined"!==typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}function i(t,e){"undefined"!==typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}var a=Array.isArray;function s(t){return null!==t&&"object"===typeof t}function c(t){return"boolean"===typeof t}function u(t){return"string"===typeof t}var l=Object.prototype.toString,f="[object Object]";function p(t){return l.call(t)===f}function h(t){return null===t||void 0===t}function d(t){return"function"===typeof t}function v(){var t=[],e=arguments.length;while(e--)t[e]=arguments[e];var n=null,r=null;return 1===t.length?s(t[0])||a(t[0])?r=t[0]:"string"===typeof t[0]&&(n=t[0]):2===t.length&&("string"===typeof t[0]&&(n=t[0]),(s(t[1])||a(t[1]))&&(r=t[1])),{locale:n,params:r}}function m(t){return JSON.parse(JSON.stringify(t))}function y(t,e){if(t.delete(e))return t}function g(t){var e=[];return t.forEach((function(t){return e.push(t)})),e}function _(t,e){return!!~t.indexOf(e)}var b=Object.prototype.hasOwnProperty;function w(t,e){return b.call(t,e)}function C(t){for(var e=arguments,n=Object(t),r=1;r/g,">").replace(/"/g,""").replace(/'/g,"'")}function x(t){return null!=t&&Object.keys(t).forEach((function(e){"string"==typeof t[e]&&(t[e]=$(t[e]))})),t}function O(t){t.prototype.hasOwnProperty("$i18n")||Object.defineProperty(t.prototype,"$i18n",{get:function(){return this._i18n}}),t.prototype.$t=function(t){var e=[],n=arguments.length-1;while(n-- >0)e[n]=arguments[n+1];var r=this.$i18n;return r._t.apply(r,[t,r.locale,r._getMessages(),this].concat(e))},t.prototype.$tc=function(t,e){var n=[],r=arguments.length-2;while(r-- >0)n[r]=arguments[r+2];var o=this.$i18n;return o._tc.apply(o,[t,o.locale,o._getMessages(),this,e].concat(n))},t.prototype.$te=function(t,e){var n=this.$i18n;return n._te(t,n.locale,n._getMessages(),e)},t.prototype.$d=function(t){var e,n=[],r=arguments.length-1;while(r-- >0)n[r]=arguments[r+1];return(e=this.$i18n).d.apply(e,[t].concat(n))},t.prototype.$n=function(t){var e,n=[],r=arguments.length-1;while(r-- >0)n[r]=arguments[r+1];return(e=this.$i18n).n.apply(e,[t].concat(n))}}function S(t){function e(){this!==this.$root&&this.$options.__INTLIFY_META__&&this.$el&&this.$el.setAttribute("data-intlify",this.$options.__INTLIFY_META__)}return void 0===t&&(t=!1),t?{mounted:e}:{beforeCreate:function(){var t=this.$options;if(t.i18n=t.i18n||(t.__i18nBridge||t.__i18n?{}:null),t.i18n)if(t.i18n instanceof xt){if(t.__i18nBridge||t.__i18n)try{var e=t.i18n&&t.i18n.messages?t.i18n.messages:{},n=t.__i18nBridge||t.__i18n;n.forEach((function(t){e=C(e,JSON.parse(t))})),Object.keys(e).forEach((function(n){t.i18n.mergeLocaleMessage(n,e[n])}))}catch(c){0}this._i18n=t.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(p(t.i18n)){var r=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof xt?this.$root.$i18n:null;if(r&&(t.i18n.root=this.$root,t.i18n.formatter=r.formatter,t.i18n.fallbackLocale=r.fallbackLocale,t.i18n.formatFallbackMessages=r.formatFallbackMessages,t.i18n.silentTranslationWarn=r.silentTranslationWarn,t.i18n.silentFallbackWarn=r.silentFallbackWarn,t.i18n.pluralizationRules=r.pluralizationRules,t.i18n.preserveDirectiveContent=r.preserveDirectiveContent),t.__i18nBridge||t.__i18n)try{var o=t.i18n&&t.i18n.messages?t.i18n.messages:{},i=t.__i18nBridge||t.__i18n;i.forEach((function(t){o=C(o,JSON.parse(t))})),t.i18n.messages=o}catch(c){0}var a=t.i18n,s=a.sharedMessages;s&&p(s)&&(t.i18n.messages=C(t.i18n.messages,s)),this._i18n=new xt(t.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===t.i18n.sync||t.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),r&&r.onComponentInstanceCreated(this._i18n)}else 0;else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof xt?this._i18n=this.$root.$i18n:t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof xt&&(this._i18n=t.parent.$i18n)},beforeMount:function(){var t=this.$options;t.i18n=t.i18n||(t.__i18nBridge||t.__i18n?{}:null),t.i18n?(t.i18n instanceof xt||p(t.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof xt||t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof xt)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0)},mounted:e,beforeDestroy:function(){if(this._i18n){var t=this;this.$nextTick((function(){t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}}var T={name:"i18n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render:function(t,e){var n=e.data,r=e.parent,o=e.props,i=e.slots,a=r.$i18n;if(a){var s=o.path,c=o.locale,u=o.places,l=i(),f=a.i(s,c,E(l)||u?j(l.default,u):l),p=o.tag&&!0!==o.tag||!1===o.tag?o.tag:"span";return p?t(p,n,f):f}}};function E(t){var e;for(e in t)if("default"!==e)return!1;return Boolean(e)}function j(t,e){var n=e?A(e):{};if(!t)return n;t=t.filter((function(t){return t.tag||""!==t.text.trim()}));var r=t.every(R);return t.reduce(r?F:I,n)}function A(t){return Array.isArray(t)?t.reduce(I,{}):Object.assign({},t)}function F(t,e){return e.data&&e.data.attrs&&e.data.attrs.place&&(t[e.data.attrs.place]=e),t}function I(t,e,n){return t[n]=e,t}function R(t){return Boolean(t.data&&t.data.attrs&&t.data.attrs.place)}var M,L={name:"i18n-n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},value:{type:Number,required:!0},format:{type:[String,Object]},locale:{type:String}},render:function(t,e){var r=e.props,o=e.parent,i=e.data,a=o.$i18n;if(!a)return null;var c=null,l=null;u(r.format)?c=r.format:s(r.format)&&(r.format.key&&(c=r.format.key),l=Object.keys(r.format).reduce((function(t,e){var o;return _(n,e)?Object.assign({},t,(o={},o[e]=r.format[e],o)):t}),null));var f=r.locale||a.locale,p=a._ntp(r.value,f,c,l),h=p.map((function(t,e){var n,r=i.scopedSlots&&i.scopedSlots[t.type];return r?r((n={},n[t.type]=t.value,n.index=e,n.parts=p,n)):t.value})),d=r.tag&&!0!==r.tag||!1===r.tag?r.tag:"span";return d?t(d,{attrs:i.attrs,class:i["class"],staticClass:i.staticClass},h):h}};function P(t,e,n){V(t,n)&&B(t,e,n)}function D(t,e,n,r){if(V(t,n)){var o=n.context.$i18n;U(t,n)&&k(e.value,e.oldValue)&&k(t._localeMessage,o.getLocaleMessage(o.locale))||B(t,e,n)}}function N(t,e,n,r){var i=n.context;if(i){var a=n.context.$i18n||{};e.modifiers.preserve||a.preserveDirectiveContent||(t.textContent=""),t._vt=void 0,delete t["_vt"],t._locale=void 0,delete t["_locale"],t._localeMessage=void 0,delete t["_localeMessage"]}else o("Vue instance does not exists in VNode context")}function V(t,e){var n=e.context;return n?!!n.$i18n||(o("VueI18n instance does not exists in Vue instance"),!1):(o("Vue instance does not exists in VNode context"),!1)}function U(t,e){var n=e.context;return t._locale===n.$i18n.locale}function B(t,e,n){var r,i,a=e.value,s=W(a),c=s.path,u=s.locale,l=s.args,f=s.choice;if(c||u||l)if(c){var p=n.context;t._vt=t.textContent=null!=f?(r=p.$i18n).tc.apply(r,[c,f].concat(H(u,l))):(i=p.$i18n).t.apply(i,[c].concat(H(u,l))),t._locale=p.$i18n.locale,t._localeMessage=p.$i18n.getLocaleMessage(p.$i18n.locale)}else o("`path` is required in v-t directive");else o("value type not supported")}function W(t){var e,n,r,o;return u(t)?e=t:p(t)&&(e=t.path,n=t.locale,r=t.args,o=t.choice),{path:e,locale:n,args:r,choice:o}}function H(t,e){var n=[];return t&&n.push(t),e&&(Array.isArray(e)||p(e))&&n.push(e),n}function z(t,e){void 0===e&&(e={bridge:!1}),z.installed=!0,M=t;M.version&&Number(M.version.split(".")[0]);O(M),M.mixin(S(e.bridge)),M.directive("t",{bind:P,update:D,unbind:N}),M.component(T.name,T),M.component(L.name,L);var n=M.config.optionMergeStrategies;n.i18n=function(t,e){return void 0===e?t:e}}var q=function(){this._caches=Object.create(null)};q.prototype.interpolate=function(t,e){if(!e)return[t];var n=this._caches[t];return n||(n=G(t),this._caches[t]=n),J(n,e)};var K=/^(?:\d)+/,Z=/^(?:\w)+/;function G(t){var e=[],n=0,r="";while(n0)f--,l=it,p[X]();else{if(f=0,void 0===n)return!1;if(n=vt(n),!1===n)return!1;p[Y]()}};while(null!==l)if(u++,e=t[u],"\\"!==e||!h()){if(o=dt(e),s=lt[l],i=s[o]||s["else"]||ut,i===ut)return;if(l=i[0],a=p[i[1]],a&&(r=i[2],r=void 0===r?e:r,!1===a()))return;if(l===ct)return c}}var yt=function(){this._cache=Object.create(null)};yt.prototype.parsePath=function(t){var e=this._cache[t];return e||(e=mt(t),e&&(this._cache[t]=e)),e||[]},yt.prototype.getPathValue=function(t,e){if(!s(t))return null;var n=this.parsePath(e);if(0===n.length)return null;var r=n.length,o=t,i=0;while(i/,bt=/(?:@(?:\.[a-zA-Z]+)?:(?:[\w\-_|./]+|\([\w\-_:|./]+\)))/g,wt=/^@(?:\.([a-zA-Z]+))?:/,Ct=/[()]/g,kt={upper:function(t){return t.toLocaleUpperCase()},lower:function(t){return t.toLocaleLowerCase()},capitalize:function(t){return""+t.charAt(0).toLocaleUpperCase()+t.substr(1)}},$t=new q,xt=function(t){var e=this;void 0===t&&(t={}),!M&&"undefined"!==typeof window&&window.Vue&&z(window.Vue);var n=t.locale||"en-US",r=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),o=t.messages||{},i=t.dateTimeFormats||t.datetimeFormats||{},a=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||$t,this._modifiers=t.modifiers||{},this._missing=t.missing||null,this._root=t.root||null,this._sync=void 0===t.sync||!!t.sync,this._fallbackRoot=void 0===t.fallbackRoot||!!t.fallbackRoot,this._fallbackRootWithEmptyString=void 0===t.fallbackRootWithEmptyString||!!t.fallbackRootWithEmptyString,this._formatFallbackMessages=void 0!==t.formatFallbackMessages&&!!t.formatFallbackMessages,this._silentTranslationWarn=void 0!==t.silentTranslationWarn&&t.silentTranslationWarn,this._silentFallbackWarn=void 0!==t.silentFallbackWarn&&!!t.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new yt,this._dataListeners=new Set,this._componentInstanceCreatedListener=t.componentInstanceCreatedListener||null,this._preserveDirectiveContent=void 0!==t.preserveDirectiveContent&&!!t.preserveDirectiveContent,this.pluralizationRules=t.pluralizationRules||{},this._warnHtmlInMessage=t.warnHtmlInMessage||"off",this._postTranslation=t.postTranslation||null,this._escapeParameterHtml=t.escapeParameterHtml||!1,"__VUE_I18N_BRIDGE__"in t&&(this.__VUE_I18N_BRIDGE__=t.__VUE_I18N_BRIDGE__),this.getChoiceIndex=function(t,n){var r=Object.getPrototypeOf(e);if(r&&r.getChoiceIndex){var o=r.getChoiceIndex;return o.call(e,t,n)}var i=function(t,e){return t=Math.abs(t),2===e?t?t>1?1:0:1:t?Math.min(t,2):0};return e.locale in e.pluralizationRules?e.pluralizationRules[e.locale].apply(e,[t,n]):i(t,n)},this._exist=function(t,n){return!(!t||!n)&&(!h(e._path.getPathValue(t,n))||!!t[n])},"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(o).forEach((function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,o[t])})),this._initVM({locale:n,fallbackLocale:r,messages:o,dateTimeFormats:i,numberFormats:a})},Ot={vm:{configurable:!0},messages:{configurable:!0},dateTimeFormats:{configurable:!0},numberFormats:{configurable:!0},availableLocales:{configurable:!0},locale:{configurable:!0},fallbackLocale:{configurable:!0},formatFallbackMessages:{configurable:!0},missing:{configurable:!0},formatter:{configurable:!0},silentTranslationWarn:{configurable:!0},silentFallbackWarn:{configurable:!0},preserveDirectiveContent:{configurable:!0},warnHtmlInMessage:{configurable:!0},postTranslation:{configurable:!0},sync:{configurable:!0}};xt.prototype._checkLocaleMessage=function(t,e,n){var r=[],s=function(t,e,n,r){if(p(n))Object.keys(n).forEach((function(o){var i=n[o];p(i)?(r.push(o),r.push("."),s(t,e,i,r),r.pop(),r.pop()):(r.push(o),s(t,e,i,r),r.pop())}));else if(a(n))n.forEach((function(n,o){p(n)?(r.push("["+o+"]"),r.push("."),s(t,e,n,r),r.pop(),r.pop()):(r.push("["+o+"]"),s(t,e,n,r),r.pop())}));else if(u(n)){var c=_t.test(n);if(c){var l="Detected HTML in message '"+n+"' of keypath '"+r.join("")+"' at '"+e+"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===t?o(l):"error"===t&&i(l)}}};s(e,t,n,r)},xt.prototype._initVM=function(t){var e=M.config.silent;M.config.silent=!0,this._vm=new M({data:t,__VUE18N__INSTANCE__:!0}),M.config.silent=e},xt.prototype.destroyVM=function(){this._vm.$destroy()},xt.prototype.subscribeDataChanging=function(t){this._dataListeners.add(t)},xt.prototype.unsubscribeDataChanging=function(t){y(this._dataListeners,t)},xt.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",(function(){var e=g(t._dataListeners),n=e.length;while(n--)M.nextTick((function(){e[n]&&e[n].$forceUpdate()}))}),{deep:!0})},xt.prototype.watchLocale=function(t){if(t){if(!this.__VUE_I18N_BRIDGE__)return null;var e=this,n=this._vm;return this.vm.$watch("locale",(function(r){n.$set(n,"locale",r),e.__VUE_I18N_BRIDGE__&&t&&(t.locale.value=r),n.$forceUpdate()}),{immediate:!0})}if(!this._sync||!this._root)return null;var r=this._vm;return this._root.$i18n.vm.$watch("locale",(function(t){r.$set(r,"locale",t),r.$forceUpdate()}),{immediate:!0})},xt.prototype.onComponentInstanceCreated=function(t){this._componentInstanceCreatedListener&&this._componentInstanceCreatedListener(t,this)},Ot.vm.get=function(){return this._vm},Ot.messages.get=function(){return m(this._getMessages())},Ot.dateTimeFormats.get=function(){return m(this._getDateTimeFormats())},Ot.numberFormats.get=function(){return m(this._getNumberFormats())},Ot.availableLocales.get=function(){return Object.keys(this.messages).sort()},Ot.locale.get=function(){return this._vm.locale},Ot.locale.set=function(t){this._vm.$set(this._vm,"locale",t)},Ot.fallbackLocale.get=function(){return this._vm.fallbackLocale},Ot.fallbackLocale.set=function(t){this._localeChainCache={},this._vm.$set(this._vm,"fallbackLocale",t)},Ot.formatFallbackMessages.get=function(){return this._formatFallbackMessages},Ot.formatFallbackMessages.set=function(t){this._formatFallbackMessages=t},Ot.missing.get=function(){return this._missing},Ot.missing.set=function(t){this._missing=t},Ot.formatter.get=function(){return this._formatter},Ot.formatter.set=function(t){this._formatter=t},Ot.silentTranslationWarn.get=function(){return this._silentTranslationWarn},Ot.silentTranslationWarn.set=function(t){this._silentTranslationWarn=t},Ot.silentFallbackWarn.get=function(){return this._silentFallbackWarn},Ot.silentFallbackWarn.set=function(t){this._silentFallbackWarn=t},Ot.preserveDirectiveContent.get=function(){return this._preserveDirectiveContent},Ot.preserveDirectiveContent.set=function(t){this._preserveDirectiveContent=t},Ot.warnHtmlInMessage.get=function(){return this._warnHtmlInMessage},Ot.warnHtmlInMessage.set=function(t){var e=this,n=this._warnHtmlInMessage;if(this._warnHtmlInMessage=t,n!==t&&("warn"===t||"error"===t)){var r=this._getMessages();Object.keys(r).forEach((function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,r[t])}))}},Ot.postTranslation.get=function(){return this._postTranslation},Ot.postTranslation.set=function(t){this._postTranslation=t},Ot.sync.get=function(){return this._sync},Ot.sync.set=function(t){this._sync=t},xt.prototype._getMessages=function(){return this._vm.messages},xt.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},xt.prototype._getNumberFormats=function(){return this._vm.numberFormats},xt.prototype._warnDefault=function(t,e,n,r,o,i){if(!h(n))return n;if(this._missing){var a=this._missing.apply(null,[t,e,r,o]);if(u(a))return a}else 0;if(this._formatFallbackMessages){var s=v.apply(void 0,o);return this._render(e,i,s.params,e)}return e},xt.prototype._isFallbackRoot=function(t){return(this._fallbackRootWithEmptyString?!t:h(t))&&!h(this._root)&&this._fallbackRoot},xt.prototype._isSilentFallbackWarn=function(t){return this._silentFallbackWarn instanceof RegExp?this._silentFallbackWarn.test(t):this._silentFallbackWarn},xt.prototype._isSilentFallback=function(t,e){return this._isSilentFallbackWarn(e)&&(this._isFallbackRoot()||t!==this.fallbackLocale)},xt.prototype._isSilentTranslationWarn=function(t){return this._silentTranslationWarn instanceof RegExp?this._silentTranslationWarn.test(t):this._silentTranslationWarn},xt.prototype._interpolate=function(t,e,n,r,o,i,s){if(!e)return null;var c,l=this._path.getPathValue(e,n);if(a(l)||p(l))return l;if(h(l)){if(!p(e))return null;if(c=e[n],!u(c)&&!d(c))return null}else{if(!u(l)&&!d(l))return null;c=l}return u(c)&&(c.indexOf("@:")>=0||c.indexOf("@.")>=0)&&(c=this._link(t,e,c,r,"raw",i,s)),this._render(c,o,i,n)},xt.prototype._link=function(t,e,n,r,o,i,s){var c=n,u=c.match(bt);for(var l in u)if(u.hasOwnProperty(l)){var f=u[l],p=f.match(wt),h=p[0],d=p[1],v=f.replace(h,"").replace(Ct,"");if(_(s,v))return c;s.push(v);var m=this._interpolate(t,e,v,r,"raw"===o?"string":o,"raw"===o?void 0:i,s);if(this._isFallbackRoot(m)){if(!this._root)throw Error("unexpected error");var y=this._root.$i18n;m=y._translate(y._getMessages(),y.locale,y.fallbackLocale,v,r,o,i)}m=this._warnDefault(t,v,m,r,a(i)?i:[i],o),this._modifiers.hasOwnProperty(d)?m=this._modifiers[d](m):kt.hasOwnProperty(d)&&(m=kt[d](m)),s.pop(),c=m?c.replace(f,m):c}return c},xt.prototype._createMessageContext=function(t,e,n,r){var o=this,i=a(t)?t:[],c=s(t)?t:{},u=function(t){return i[t]},l=function(t){return c[t]},f=this._getMessages(),p=this.locale;return{list:u,named:l,values:t,formatter:e,path:n,messages:f,locale:p,linked:function(t){return o._interpolate(p,f[p]||{},t,null,r,void 0,[t])}}},xt.prototype._render=function(t,e,n,r){if(d(t))return t(this._createMessageContext(n,this._formatter||$t,r,e));var o=this._formatter.interpolate(t,n,r);return o||(o=$t.interpolate(t,n,r)),"string"!==e||u(o)?o:o.join("")},xt.prototype._appendItemToChain=function(t,e,n){var r=!1;return _(t,e)||(r=!0,e&&(r="!"!==e[e.length-1],e=e.replace(/!/g,""),t.push(e),n&&n[e]&&(r=n[e]))),r},xt.prototype._appendLocaleToChain=function(t,e,n){var r,o=e.split("-");do{var i=o.join("-");r=this._appendItemToChain(t,i,n),o.splice(-1,1)}while(o.length&&!0===r);return r},xt.prototype._appendBlockToChain=function(t,e,n){for(var r=!0,o=0;o0)i[a]=arguments[a+4];if(!t)return"";var s=v.apply(void 0,i);this._escapeParameterHtml&&(s.params=x(s.params));var c=s.locale||e,u=this._translate(n,c,this.fallbackLocale,t,r,"string",s.params);if(this._isFallbackRoot(u)){if(!this._root)throw Error("unexpected error");return(o=this._root).$t.apply(o,[t].concat(i))}return u=this._warnDefault(c,t,u,r,i,"string"),this._postTranslation&&null!==u&&void 0!==u&&(u=this._postTranslation(u,t)),u},xt.prototype.t=function(t){var e,n=[],r=arguments.length-1;while(r-- >0)n[r]=arguments[r+1];return(e=this)._t.apply(e,[t,this.locale,this._getMessages(),null].concat(n))},xt.prototype._i=function(t,e,n,r,o){var i=this._translate(n,e,this.fallbackLocale,t,r,"raw",o);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,o)}return this._warnDefault(e,t,i,r,[o],"raw")},xt.prototype.i=function(t,e,n){return t?(u(e)||(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""},xt.prototype._tc=function(t,e,n,r,o){var i,a=[],s=arguments.length-5;while(s-- >0)a[s]=arguments[s+5];if(!t)return"";void 0===o&&(o=1);var c={count:o,n:o},u=v.apply(void 0,a);return u.params=Object.assign(c,u.params),a=null===u.locale?[u.params]:[u.locale,u.params],this.fetchChoice((i=this)._t.apply(i,[t,e,n,r].concat(a)),o)},xt.prototype.fetchChoice=function(t,e){if(!t||!u(t))return null;var n=t.split("|");return e=this.getChoiceIndex(e,n.length),n[e]?n[e].trim():t},xt.prototype.tc=function(t,e){var n,r=[],o=arguments.length-2;while(o-- >0)r[o]=arguments[o+2];return(n=this)._tc.apply(n,[t,this.locale,this._getMessages(),null,e].concat(r))},xt.prototype._te=function(t,e,n){var r=[],o=arguments.length-3;while(o-- >0)r[o]=arguments[o+3];var i=v.apply(void 0,r).locale||e;return this._exist(n[i],t)},xt.prototype.te=function(t,e){return this._te(t,this.locale,this._getMessages(),e)},xt.prototype.getLocaleMessage=function(t){return m(this._vm.messages[t]||{})},xt.prototype.setLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,e)},xt.prototype.mergeLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,C("undefined"!==typeof this._vm.messages[t]&&Object.keys(this._vm.messages[t]).length?Object.assign({},this._vm.messages[t]):{},e))},xt.prototype.getDateTimeFormat=function(t){return m(this._vm.dateTimeFormats[t]||{})},xt.prototype.setDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,e),this._clearDateTimeFormat(t,e)},xt.prototype.mergeDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,C(this._vm.dateTimeFormats[t]||{},e)),this._clearDateTimeFormat(t,e)},xt.prototype._clearDateTimeFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._dateTimeFormatters.hasOwnProperty(r)&&delete this._dateTimeFormatters[r]}},xt.prototype._localizeDateTime=function(t,e,n,r,o,i){for(var a=e,s=r[a],c=this._getLocaleChain(e,n),u=0;u0)e[n]=arguments[n+1];var o=this.locale,i=null,a=null;return 1===e.length?(u(e[0])?i=e[0]:s(e[0])&&(e[0].locale&&(o=e[0].locale),e[0].key&&(i=e[0].key)),a=Object.keys(e[0]).reduce((function(t,n){var o;return _(r,n)?Object.assign({},t,(o={},o[n]=e[0][n],o)):t}),null)):2===e.length&&(u(e[0])&&(i=e[0]),u(e[1])&&(o=e[1])),this._d(t,o,i,a)},xt.prototype.getNumberFormat=function(t){return m(this._vm.numberFormats[t]||{})},xt.prototype.setNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,e),this._clearNumberFormat(t,e)},xt.prototype.mergeNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,C(this._vm.numberFormats[t]||{},e)),this._clearNumberFormat(t,e)},xt.prototype._clearNumberFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._numberFormatters.hasOwnProperty(r)&&delete this._numberFormatters[r]}},xt.prototype._getNumberFormatter=function(t,e,n,r,o,i){for(var a=e,s=r[a],c=this._getLocaleChain(e,n),u=0;u0)e[r]=arguments[r+1];var o=this.locale,i=null,a=null;return 1===e.length?u(e[0])?i=e[0]:s(e[0])&&(e[0].locale&&(o=e[0].locale),e[0].key&&(i=e[0].key),a=Object.keys(e[0]).reduce((function(t,r){var o;return _(n,r)?Object.assign({},t,(o={},o[r]=e[0][r],o)):t}),null)):2===e.length&&(u(e[0])&&(i=e[0]),u(e[1])&&(o=e[1])),this._n(t,o,i,a)},xt.prototype._ntp=function(t,e,n,r){if(!xt.availabilities.numberFormat)return[];if(!n){var o=r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e);return o.formatToParts(t)}var i=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),a=i&&i.formatToParts(t);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,r)}return a||[]},Object.defineProperties(xt.prototype,Ot),Object.defineProperty(xt,"availabilities",{get:function(){if(!gt){var t="undefined"!==typeof Intl;gt={dateTimeFormat:t&&"undefined"!==typeof Intl.DateTimeFormat,numberFormat:t&&"undefined"!==typeof Intl.NumberFormat}}return gt}}),xt.install=z,xt.version="8.28.2",e["Z"]=xt},8345:function(t,e){"use strict"; +/*! + * vue-router v3.5.2 + * (c) 2021 Evan You + * @license MIT + */function n(t,e){0}function r(t,e){for(var n in e)t[n]=e[n];return t}var o=/[!'()*]/g,i=function(t){return"%"+t.charCodeAt(0).toString(16)},a=/%2C/g,s=function(t){return encodeURIComponent(t).replace(o,i).replace(a,",")};function c(t){try{return decodeURIComponent(t)}catch(e){0}return t}function u(t,e,n){void 0===e&&(e={});var r,o=n||f;try{r=o(t||"")}catch(s){r={}}for(var i in e){var a=e[i];r[i]=Array.isArray(a)?a.map(l):l(a)}return r}var l=function(t){return null==t||"object"===typeof t?t:String(t)};function f(t){var e={};return t=t.trim().replace(/^(\?|#|&)/,""),t?(t.split("&").forEach((function(t){var n=t.replace(/\+/g," ").split("="),r=c(n.shift()),o=n.length>0?c(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]})),e):e}function p(t){var e=t?Object.keys(t).map((function(e){var n=t[e];if(void 0===n)return"";if(null===n)return s(e);if(Array.isArray(n)){var r=[];return n.forEach((function(t){void 0!==t&&(null===t?r.push(s(e)):r.push(s(e)+"="+s(t)))})),r.join("&")}return s(e)+"="+s(n)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var h=/\/?$/;function d(t,e,n,r){var o=r&&r.options.stringifyQuery,i=e.query||{};try{i=v(i)}catch(s){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:g(e,o),matched:t?y(t):[]};return n&&(a.redirectedFrom=g(n,o)),Object.freeze(a)}function v(t){if(Array.isArray(t))return t.map(v);if(t&&"object"===typeof t){var e={};for(var n in t)e[n]=v(t[n]);return e}return t}var m=d(null,{path:"/"});function y(t){var e=[];while(t)e.unshift(t),t=t.parent;return e}function g(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var o=t.hash;void 0===o&&(o="");var i=e||p;return(n||"/")+i(r)+o}function _(t,e,n){return e===m?t===e:!!e&&(t.path&&e.path?t.path.replace(h,"")===e.path.replace(h,"")&&(n||t.hash===e.hash&&b(t.query,e.query)):!(!t.name||!e.name)&&(t.name===e.name&&(n||t.hash===e.hash&&b(t.query,e.query)&&b(t.params,e.params))))}function b(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t).sort(),r=Object.keys(e).sort();return n.length===r.length&&n.every((function(n,o){var i=t[n],a=r[o];if(a!==n)return!1;var s=e[n];return null==i||null==s?i===s:"object"===typeof i&&"object"===typeof s?b(i,s):String(i)===String(s)}))}function w(t,e){return 0===t.path.replace(h,"/").indexOf(e.path.replace(h,"/"))&&(!e.hash||t.hash===e.hash)&&C(t.query,e.query)}function C(t,e){for(var n in e)if(!(n in t))return!1;return!0}function k(t){for(var e=0;e=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}function E(t){return t.replace(/\/\//g,"/")}var j=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},A=J,F=P,I=D,R=U,M=G,L=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function P(t,e){var n,r=[],o=0,i=0,a="",s=e&&e.delimiter||"/";while(null!=(n=L.exec(t))){var c=n[0],u=n[1],l=n.index;if(a+=t.slice(i,l),i=l+c.length,u)a+=u[1];else{var f=t[i],p=n[2],h=n[3],d=n[4],v=n[5],m=n[6],y=n[7];a&&(r.push(a),a="");var g=null!=p&&null!=f&&f!==p,_="+"===m||"*"===m,b="?"===m||"*"===m,w=n[2]||s,C=d||v;r.push({name:h||o++,prefix:p||"",delimiter:w,optional:b,repeat:_,partial:g,asterisk:!!y,pattern:C?W(C):y?".*":"[^"+B(w)+"]+?"})}}return i1||!$.length)return 0===$.length?t():t("span",{},$)}if("a"===this.tag)k.on=C,k.attrs={href:c,"aria-current":g};else{var x=at(this.$slots.default);if(x){x.isStatic=!1;var O=x.data=r({},x.data);for(var S in O.on=O.on||{},O.on){var T=O.on[S];S in C&&(O.on[S]=Array.isArray(T)?T:[T])}for(var E in C)E in O.on?O.on[E].push(C[E]):O.on[E]=b;var j=x.data.attrs=r({},x.data.attrs);j.href=c,j["aria-current"]=g}else k.on=C}return t(this.tag,k,this.$slots.default)}};function it(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(void 0===t.button||0===t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function at(t){if(t)for(var e,n=0;n-1&&(s.params[f]=n.params[f]);return s.path=Y(u.path,s.params,'named route "'+c+'"'),p(u,s,a)}if(s.path){s.params={};for(var h=0;h=t.length?n():t[o]?e(t[o],(function(){r(o+1)})):r(o+1)};r(0)}var Dt={redirected:2,aborted:4,cancelled:8,duplicated:16};function Nt(t,e){return Wt(t,e,Dt.redirected,'Redirected when going from "'+t.fullPath+'" to "'+zt(e)+'" via a navigation guard.')}function Vt(t,e){var n=Wt(t,e,Dt.duplicated,'Avoided redundant navigation to current location: "'+t.fullPath+'".');return n.name="NavigationDuplicated",n}function Ut(t,e){return Wt(t,e,Dt.cancelled,'Navigation cancelled from "'+t.fullPath+'" to "'+e.fullPath+'" with a new navigation.')}function Bt(t,e){return Wt(t,e,Dt.aborted,'Navigation aborted from "'+t.fullPath+'" to "'+e.fullPath+'" via a navigation guard.')}function Wt(t,e,n,r){var o=new Error(r);return o._isRouter=!0,o.from=t,o.to=e,o.type=n,o}var Ht=["params","query","hash"];function zt(t){if("string"===typeof t)return t;if("path"in t)return t.path;var e={};return Ht.forEach((function(n){n in t&&(e[n]=t[n])})),JSON.stringify(e,null,2)}function qt(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function Kt(t,e){return qt(t)&&t._isRouter&&(null==e||t.type===e)}function Zt(t){return function(e,n,r){var o=!1,i=0,a=null;Gt(t,(function(t,e,n,s){if("function"===typeof t&&void 0===t.cid){o=!0,i++;var c,u=Qt((function(e){Yt(e)&&(e=e.default),t.resolved="function"===typeof e?e:tt.extend(e),n.components[s]=e,i--,i<=0&&r()})),l=Qt((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=qt(t)?t:new Error(e),r(a))}));try{c=t(u,l)}catch(p){l(p)}if(c)if("function"===typeof c.then)c.then(u,l);else{var f=c.component;f&&"function"===typeof f.then&&f.then(u,l)}}})),o||r()}}function Gt(t,e){return Jt(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Jt(t){return Array.prototype.concat.apply([],t)}var Xt="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;function Yt(t){return t.__esModule||Xt&&"Module"===t[Symbol.toStringTag]}function Qt(t){var e=!1;return function(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var te=function(t,e){this.router=t,this.base=ee(e),this.current=m,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function ee(t){if(!t)if(ct){var e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^https?:\/\/[^\/]+/,"")}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function ne(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,r=Rt&&n;r&&this.listeners.push(Ct());var o=function(){var n=t.current,o=fe(t.base);t.current===m&&o===t._startLocation||t.transitionTo(o,(function(t){r&&kt(e,t,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,(function(t){Mt(E(r.base+t.fullPath)),kt(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,(function(t){Lt(E(r.base+t.fullPath)),kt(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(fe(this.base)!==this.current.fullPath){var e=E(this.base+this.current.fullPath);t?Mt(e):Lt(e)}},e.prototype.getCurrentLocation=function(){return fe(this.base)},e}(te);function fe(t){var e=window.location.pathname,n=e.toLowerCase(),r=t.toLowerCase();return!t||n!==r&&0!==n.indexOf(E(r+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var pe=function(t){function e(e,n,r){t.call(this,e,n),r&&he(this.base)||de()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router,n=e.options.scrollBehavior,r=Rt&&n;r&&this.listeners.push(Ct());var o=function(){var e=t.current;de()&&t.transitionTo(ve(),(function(n){r&&kt(t.router,n,e,!0),Rt||ge(n.fullPath)}))},i=Rt?"popstate":"hashchange";window.addEventListener(i,o),this.listeners.push((function(){window.removeEventListener(i,o)}))}},e.prototype.push=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,(function(t){ye(t.fullPath),kt(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,(function(t){ge(t.fullPath),kt(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;ve()!==e&&(t?ye(e):ge(e))},e.prototype.getCurrentLocation=function(){return ve()},e}(te);function he(t){var e=fe(t);if(!/^\/#/.test(e))return window.location.replace(E(t+"/#"+e)),!0}function de(){var t=ve();return"/"===t.charAt(0)||(ge("/"+t),!1)}function ve(){var t=window.location.href,e=t.indexOf("#");return e<0?"":(t=t.slice(e+1),t)}function me(t){var e=window.location.href,n=e.indexOf("#"),r=n>=0?e.slice(0,n):e;return r+"#"+t}function ye(t){Rt?Mt(me(t)):window.location.hash=t}function ge(t){Rt?Lt(me(t)):window.location.replace(me(t))}var _e=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){Kt(t,Dt.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(te),be=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=ht(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!Rt&&!1!==t.fallback,this.fallback&&(e="hash"),ct||(e="abstract"),this.mode=e,e){case"history":this.history=new le(this,t.base);break;case"hash":this.history=new pe(this,t.base,this.fallback);break;case"abstract":this.history=new _e(this,t.base);break;default:0}},we={currentRoute:{configurable:!0}};function Ce(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function ke(t,e,n){var r="hash"===n?"#"+e:e;return t?E(t+"/"+r):r}be.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},we.currentRoute.get=function(){return this.history&&this.history.current},be.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof le||n instanceof pe){var r=function(t){var r=n.current,o=e.options.scrollBehavior,i=Rt&&o;i&&"fullPath"in t&&kt(e,t,r,!1)},o=function(t){n.setupListeners(),r(t)};n.transitionTo(n.getCurrentLocation(),o,o)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},be.prototype.beforeEach=function(t){return Ce(this.beforeHooks,t)},be.prototype.beforeResolve=function(t){return Ce(this.resolveHooks,t)},be.prototype.afterEach=function(t){return Ce(this.afterHooks,t)},be.prototype.onReady=function(t,e){this.history.onReady(t,e)},be.prototype.onError=function(t){this.history.onError(t)},be.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!==typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},be.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!==typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},be.prototype.go=function(t){this.history.go(t)},be.prototype.back=function(){this.go(-1)},be.prototype.forward=function(){this.go(1)},be.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},be.prototype.resolve=function(t,e,n){e=e||this.history.current;var r=Q(t,e,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath,a=this.history.base,s=ke(a,i,this.mode);return{location:r,route:o,href:s,normalizedTo:r,resolved:o}},be.prototype.getRoutes=function(){return this.matcher.getRoutes()},be.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},be.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(be.prototype,we),be.install=st,be.version="3.5.2",be.isNavigationFailure=Kt,be.NavigationFailureType=Dt,be.START_LOCATION=m,ct&&window.Vue&&window.Vue.use(be),e["Z"]=be},144:function(t,e,n){"use strict";n.r(e),n.d(e,{EffectScope:function(){return Oe},computed:function(){return de},customRef:function(){return ie},default:function(){return ni},defineAsyncComponent:function(){return Qn},defineComponent:function(){return mr},del:function(){return Nt},effectScope:function(){return Se},getCurrentInstance:function(){return mt},getCurrentScope:function(){return Ee},h:function(){return Ln},inject:function(){return Ie},isProxy:function(){return Kt},isReactive:function(){return Ht},isReadonly:function(){return qt},isRef:function(){return Xt},isShallow:function(){return zt},markRaw:function(){return Gt},mergeDefaults:function(){return Cn},nextTick:function(){return Jn},onActivated:function(){return cr},onBeforeMount:function(){return nr},onBeforeUnmount:function(){return ar},onBeforeUpdate:function(){return or},onDeactivated:function(){return ur},onErrorCaptured:function(){return dr},onMounted:function(){return rr},onRenderTracked:function(){return fr},onRenderTriggered:function(){return pr},onScopeDispose:function(){return je},onServerPrefetch:function(){return lr},onUnmounted:function(){return sr},onUpdated:function(){return ir},provide:function(){return Ae},proxyRefs:function(){return re},reactive:function(){return Ut},readonly:function(){return le},ref:function(){return Yt},set:function(){return Dt},shallowReactive:function(){return Bt},shallowReadonly:function(){return he},shallowRef:function(){return Qt},toRaw:function(){return Zt},toRef:function(){return se},toRefs:function(){return ae},triggerRef:function(){return ee},unref:function(){return ne},useAttrs:function(){return _n},useCssModule:function(){return Xn},useCssVars:function(){return Yn},useListeners:function(){return bn},useSlots:function(){return gn},version:function(){return vr},watch:function(){return $e},watchEffect:function(){return _e},watchPostEffect:function(){return be},watchSyncEffect:function(){return we}}); +/*! + * Vue.js v2.7.10 + * (c) 2014-2022 Evan You + * Released under the MIT License. + */ +var r=Object.freeze({}),o=Array.isArray;function i(t){return void 0===t||null===t}function a(t){return void 0!==t&&null!==t}function s(t){return!0===t}function c(t){return!1===t}function u(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function l(t){return"function"===typeof t}function f(t){return null!==t&&"object"===typeof t}var p=Object.prototype.toString;function h(t){return"[object Object]"===p.call(t)}function d(t){return"[object RegExp]"===p.call(t)}function v(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function m(t){return a(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function y(t){return null==t?"":Array.isArray(t)||h(t)&&t.toString===p?JSON.stringify(t,null,2):String(t)}function g(t){var e=parseFloat(t);return isNaN(e)?t:e}function _(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var C=Object.prototype.hasOwnProperty;function k(t,e){return C.call(t,e)}function $(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var x=/-(\w)/g,O=$((function(t){return t.replace(x,(function(t,e){return e?e.toUpperCase():""}))})),S=$((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),T=/\B([A-Z])/g,E=$((function(t){return t.replace(T,"-$1").toLowerCase()}));function j(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function A(t,e){return t.bind(e)}var F=Function.prototype.bind?A:j;function I(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function R(t,e){for(var n in e)t[n]=e[n];return t}function M(t){for(var e={},n=0;n0,rt=tt&&tt.indexOf("edge/")>0;tt&&tt.indexOf("android");var ot=tt&&/iphone|ipad|ipod|ios/.test(tt);tt&&/chrome\/\d+/.test(tt),tt&&/phantomjs/.test(tt);var it,at=tt&&tt.match(/firefox\/(\d+)/),st={}.watch,ct=!1;if(Q)try{var ut={};Object.defineProperty(ut,"passive",{get:function(){ct=!0}}),window.addEventListener("test-passive",null,ut)}catch(nc){}var lt=function(){return void 0===it&&(it=!Q&&"undefined"!==typeof n.g&&(n.g["process"]&&"server"===n.g["process"].env.VUE_ENV)),it},ft=Q&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function pt(t){return"function"===typeof t&&/native code/.test(t.toString())}var ht,dt="undefined"!==typeof Symbol&&pt(Symbol)&&"undefined"!==typeof Reflect&&pt(Reflect.ownKeys);ht="undefined"!==typeof Set&&pt(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var vt=null;function mt(){return vt&&{proxy:vt}}function yt(t){void 0===t&&(t=null),t||vt&&vt._scope.off(),vt=t,t&&t._scope.on()}var gt=function(){function t(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),_t=function(t){void 0===t&&(t="");var e=new gt;return e.text=t,e.isComment=!0,e};function bt(t){return new gt(void 0,void 0,void 0,String(t))}function wt(t){var e=new gt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var Ct=0,kt=function(){function t(){this.id=Ct++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){w(this.subs,t)},t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){var e=this.subs.slice();for(var n=0,r=e.length;n1)return n&&l(e)?e.call(r):e}else 0}var Re=$((function(t){var e="&"===t.charAt(0);t=e?t.slice(1):t;var n="~"===t.charAt(0);t=n?t.slice(1):t;var r="!"===t.charAt(0);return t=r?t.slice(1):t,{name:t,once:n,capture:r,passive:e}}));function Me(t,e){function n(){var t=n.fns;if(!o(t))return Dn(t,null,arguments,e,"v-on handler");for(var r=t.slice(),i=0;i0&&(r=We(r,"".concat(e||"","_").concat(n)),Be(r[0])&&Be(l)&&(f[c]=bt(l.text+r[0].text),r.shift()),f.push.apply(f,r)):u(r)?Be(l)?f[c]=bt(l.text+r):""!==r&&f.push(bt(r)):Be(r)&&Be(l)?f[c]=bt(l.text+r.text):(s(t._isVList)&&a(r.tag)&&i(r.key)&&a(e)&&(r.key="__vlist".concat(e,"_").concat(n,"__")),f.push(r)));return f}function He(t,e){var n,r,i,s,c=null;if(o(t)||"string"===typeof t)for(c=new Array(t.length),n=0,r=t.length;n0,s=e?!!e.$stable:!a,c=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(s&&o&&o!==r&&c===o.$key&&!a&&!o.$hasNormal)return o;for(var u in i={},e)e[u]&&"$"!==u[0]&&(i[u]=ln(t,n,u,e[u]))}else i={};for(var l in n)l in i||(i[l]=fn(n,l));return e&&Object.isExtensible(e)&&(e._normalized=i),G(i,"$stable",s),G(i,"$key",c),G(i,"$hasNormal",a),i}function ln(t,e,n,r){var i=function(){var e=vt;yt(t);var n=arguments.length?r.apply(null,arguments):r({});n=n&&"object"===typeof n&&!o(n)?[n]:Ue(n);var i=n&&n[0];return yt(e),n&&(!i||1===n.length&&i.isComment&&!cn(i))?void 0:n};return r.proxy&&Object.defineProperty(e,n,{get:i,enumerable:!0,configurable:!0}),i}function fn(t,e){return function(){return t[e]}}function pn(t){var e=t.$options,n=e.setup;if(n){var r=t._setupContext=hn(t);yt(t),xt();var o=Dn(n,null,[t._props||Bt({}),r],t,"setup");if(Ot(),yt(),l(o))e.render=o;else if(f(o))if(t._setupState=o,o.__sfc){var i=t._setupProxy={};for(var a in o)"__sfc"!==a&&oe(i,o,a)}else for(var a in o)Z(a)||oe(t,o,a);else 0}}function hn(t){return{get attrs(){if(!t._attrsProxy){var e=t._attrsProxy={};G(e,"_v_attr_proxy",!0),dn(e,t.$attrs,r,t,"$attrs")}return t._attrsProxy},get listeners(){if(!t._listenersProxy){var e=t._listenersProxy={};dn(e,t.$listeners,r,t,"$listeners")}return t._listenersProxy},get slots(){return mn(t)},emit:F(t.$emit,t),expose:function(e){e&&Object.keys(e).forEach((function(n){return oe(t,e,n)}))}}}function dn(t,e,n,r,o){var i=!1;for(var a in e)a in t?e[a]!==n[a]&&(i=!0):(i=!0,vn(t,a,r,o));for(var a in t)a in e||(i=!0,delete t[a]);return i}function vn(t,e,n,r){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n[r][e]}})}function mn(t){return t._slotsProxy||yn(t._slotsProxy={},t.$scopedSlots),t._slotsProxy}function yn(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}function gn(){return wn().slots}function _n(){return wn().attrs}function bn(){return wn().listeners}function wn(){var t=vt;return t._setupContext||(t._setupContext=hn(t))}function Cn(t,e){var n=o(t)?t.reduce((function(t,e){return t[e]={},t}),{}):t;for(var r in e){var i=n[r];i?o(i)||l(i)?n[r]={type:i,default:e[r]}:i.default=e[r]:null===i&&(n[r]={default:e[r]})}return n}function kn(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,o=n&&n.context;t.$slots=an(e._renderChildren,o),t.$scopedSlots=n?un(t.$parent,n.data.scopedSlots,t.$slots):r,t._c=function(e,n,r,o){return Fn(t,e,n,r,o,!1)},t.$createElement=function(e,n,r,o){return Fn(t,e,n,r,o,!0)};var i=n&&n.data;Pt(t,"$attrs",i&&i.attrs||r,null,!0),Pt(t,"$listeners",e._parentListeners||r,null,!0)}var $n=null;function xn(t){on(t.prototype),t.prototype.$nextTick=function(t){return Jn(t,this)},t.prototype._render=function(){var t,e=this,n=e.$options,r=n.render,i=n._parentVnode;i&&e._isMounted&&(e.$scopedSlots=un(e.$parent,i.data.scopedSlots,e.$slots,e.$scopedSlots),e._slotsProxy&&yn(e._slotsProxy,e.$scopedSlots)),e.$vnode=i;try{yt(e),$n=e,t=r.call(e._renderProxy,e.$createElement)}catch(nc){Pn(nc,e,"render"),t=e._vnode}finally{$n=null,yt()}return o(t)&&1===t.length&&(t=t[0]),t instanceof gt||(t=_t()),t.parent=i,t}}function On(t,e){return(t.__esModule||dt&&"Module"===t[Symbol.toStringTag])&&(t=t.default),f(t)?e.extend(t):t}function Sn(t,e,n,r,o){var i=_t();return i.asyncFactory=t,i.asyncMeta={data:e,context:n,children:r,tag:o},i}function Tn(t,e){if(s(t.error)&&a(t.errorComp))return t.errorComp;if(a(t.resolved))return t.resolved;var n=$n;if(n&&a(t.owners)&&-1===t.owners.indexOf(n)&&t.owners.push(n),s(t.loading)&&a(t.loadingComp))return t.loadingComp;if(n&&!a(t.owners)){var r=t.owners=[n],o=!0,c=null,u=null;n.$on("hook:destroyed",(function(){return w(r,n)}));var l=function(t){for(var e=0,n=r.length;e1?I(n):n;for(var r=I(arguments,1),o='event handler for "'.concat(t,'"'),i=0,a=n.length;idocument.createEvent("Event").timeStamp&&(Kr=function(){return Zr.now()})}var Gr=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function Jr(){var t,e;for(qr=Kr(),Wr=!0,Nr.sort(Gr),Hr=0;HrHr&&Nr[n].id>t.id)n--;Nr.splice(n+1,0,t)}else Nr.push(t);Br||(Br=!0,Jn(Jr))}}function eo(t){var e=t.$options.provide;if(e){var n=l(e)?e.call(t):e;if(!f(n))return;for(var r=Fe(t),o=dt?Reflect.ownKeys(n):Object.keys(n),i=0;i-1)if(i&&!k(o,"default"))a=!1;else if(""===a||a===E(t)){var c=Mo(String,o.type);(c<0||s-1)return this;var n=I(arguments,1);return n.unshift(this),l(t.install)?t.install.apply(t,n):l(t)&&t.apply(null,n),e.push(t),this}}function oi(t){t.mixin=function(t){return this.options=To(this.options,t),this}}function ii(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=co(t)||co(n.options);var a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=To(n.options,t),a["super"]=n,a.options.props&&ai(a),a.options.computed&&si(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,H.forEach((function(t){a[t]=n[t]})),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=R({},a.options),o[r]=a,a}}function ai(t){var e=t.options.props;for(var n in e)Po(t.prototype,"_props",n)}function si(t){var e=t.options.computed;for(var n in e)Ho(t.prototype,n,e[n])}function ci(t){H.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&h(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&l(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}function ui(t){return t&&(co(t.Ctor.options)||t.tag)}function li(t,e){return o(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!d(t)&&t.test(e)}function fi(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=a.name;s&&!e(s)&&pi(n,i,r,o)}}}function pi(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,w(n,e)}Yo(ni),Jo(ni),Tr(ni),Fr(ni),xn(ni);var hi=[String,RegExp,Array],di={name:"keep-alive",abstract:!0,props:{include:hi,exclude:hi,max:[String,Number]},methods:{cacheVNode:function(){var t=this,e=t.cache,n=t.keys,r=t.vnodeToCache,o=t.keyToCache;if(r){var i=r.tag,a=r.componentInstance,s=r.componentOptions;e[o]={name:ui(s),tag:i,componentInstance:a},n.push(o),this.max&&n.length>parseInt(this.max)&&pi(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)pi(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){fi(t,(function(t){return li(e,t)}))})),this.$watch("exclude",(function(e){fi(t,(function(t){return!li(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=En(t),n=e&&e.componentOptions;if(n){var r=ui(n),o=this,i=o.include,a=o.exclude;if(i&&(!r||!li(i,r))||a&&r&&li(a,r))return e;var s=this,c=s.cache,u=s.keys,l=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;c[l]?(e.componentInstance=c[l].componentInstance,w(u,l),u.push(l)):(this.vnodeToCache=e,this.keyToCache=l),e.data.keepAlive=!0}return e||t&&t[0]}},vi={KeepAlive:di};function mi(t){var e={get:function(){return q}};Object.defineProperty(t,"config",e),t.util={warn:yo,extend:R,mergeOptions:To,defineReactive:Pt},t.set=Dt,t.delete=Nt,t.nextTick=Jn,t.observable=function(t){return Lt(t),t},t.options=Object.create(null),H.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,R(t.options.components,vi),ri(t),oi(t),ii(t),ci(t)}mi(ni),Object.defineProperty(ni.prototype,"$isServer",{get:lt}),Object.defineProperty(ni.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(ni,"FunctionalRenderContext",{value:oo}),ni.version=vr;var yi=_("style,class"),gi=_("input,textarea,option,select,progress"),_i=function(t,e,n){return"value"===n&&gi(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},bi=_("contenteditable,draggable,spellcheck"),wi=_("events,caret,typing,plaintext-only"),Ci=function(t,e){return Si(e)||"false"===e?"false":"contenteditable"===t&&wi(e)?e:"true"},ki=_("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),$i="http://www.w3.org/1999/xlink",xi=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Oi=function(t){return xi(t)?t.slice(6,t.length):""},Si=function(t){return null==t||!1===t};function Ti(t){var e=t.data,n=t,r=t;while(a(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(e=Ei(r.data,e));while(a(n=n.parent))n&&n.data&&(e=Ei(e,n.data));return ji(e.staticClass,e.class)}function Ei(t,e){return{staticClass:Ai(t.staticClass,e.staticClass),class:a(t.class)?[t.class,e.class]:e.class}}function ji(t,e){return a(t)||a(e)?Ai(t,Fi(e)):""}function Ai(t,e){return t?e?t+" "+e:t:e||""}function Fi(t){return Array.isArray(t)?Ii(t):f(t)?Ri(t):"string"===typeof t?t:""}function Ii(t){for(var e,n="",r=0,o=t.length;r-1?Vi[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Vi[t]=/HTMLUnknownElement/.test(e.toString())}var Bi=_("text,number,password,search,email,tel,url");function Wi(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function Hi(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n}function zi(t,e){return document.createElementNS(Mi[t],e)}function qi(t){return document.createTextNode(t)}function Ki(t){return document.createComment(t)}function Zi(t,e,n){t.insertBefore(e,n)}function Gi(t,e){t.removeChild(e)}function Ji(t,e){t.appendChild(e)}function Xi(t){return t.parentNode}function Yi(t){return t.nextSibling}function Qi(t){return t.tagName}function ta(t,e){t.textContent=e}function ea(t,e){t.setAttribute(e,"")}var na=Object.freeze({__proto__:null,createElement:Hi,createElementNS:zi,createTextNode:qi,createComment:Ki,insertBefore:Zi,removeChild:Gi,appendChild:Ji,parentNode:Xi,nextSibling:Yi,tagName:Qi,setTextContent:ta,setStyleScope:ea}),ra={create:function(t,e){oa(e)},update:function(t,e){t.data.ref!==e.data.ref&&(oa(t,!0),oa(e))},destroy:function(t){oa(t,!0)}};function oa(t,e){var n=t.data.ref;if(a(n)){var r=t.context,i=t.componentInstance||t.elm,s=e?null:i,c=e?void 0:i;if(l(n))Dn(n,r,[s],r,"template ref function");else{var u=t.data.refInFor,f="string"===typeof n||"number"===typeof n,p=Xt(n),h=r.$refs;if(f||p)if(u){var d=f?h[n]:n.value;e?o(d)&&w(d,i):o(d)?d.includes(i)||d.push(i):f?(h[n]=[i],ia(r,n,h[n])):n.value=[i]}else if(f){if(e&&h[n]!==i)return;h[n]=c,ia(r,n,s)}else if(p){if(e&&n.value!==i)return;n.value=s}else 0}}}function ia(t,e,n){var r=t._setupState;r&&k(r,e)&&(Xt(r[e])?r[e].value=n:r[e]=n)}var aa=new gt("",{},[]),sa=["create","activate","update","remove","destroy"];function ca(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&a(t.data)===a(e.data)&&ua(t,e)||s(t.isAsyncPlaceholder)&&i(e.asyncFactory.error))}function ua(t,e){if("input"!==t.tag)return!0;var n,r=a(n=t.data)&&a(n=n.attrs)&&n.type,o=a(n=e.data)&&a(n=n.attrs)&&n.type;return r===o||Bi(r)&&Bi(o)}function la(t,e,n){var r,o,i={};for(r=e;r<=n;++r)o=t[r].key,a(o)&&(i[o]=r);return i}function fa(t){var e,n,r={},c=t.modules,l=t.nodeOps;for(e=0;ev?(f=i(n[g+1])?null:n[g+1].elm,$(t,f,n,h,g,r)):h>g&&O(e,p,v)}function E(t,e,n,r){for(var o=n;o-1?Ca(t,e,n):ki(e)?Si(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):bi(e)?t.setAttribute(e,Ci(e,n)):xi(e)?Si(n)?t.removeAttributeNS($i,Oi(e)):t.setAttributeNS($i,e,n):Ca(t,e,n)}function Ca(t,e,n){if(Si(n))t.removeAttribute(e);else{if(et&&!nt&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var ka={create:ba,update:ba};function $a(t,e){var n=e.elm,r=e.data,o=t.data;if(!(i(r.staticClass)&&i(r.class)&&(i(o)||i(o.staticClass)&&i(o.class)))){var s=Ti(e),c=n._transitionClasses;a(c)&&(s=Ai(s,Fi(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var xa,Oa={create:$a,update:$a},Sa="__r",Ta="__c";function Ea(t){if(a(t[Sa])){var e=et?"change":"input";t[e]=[].concat(t[Sa],t[e]||[]),delete t[Sa]}a(t[Ta])&&(t.change=[].concat(t[Ta],t.change||[]),delete t[Ta])}function ja(t,e,n){var r=xa;return function o(){var i=e.apply(null,arguments);null!==i&&Ia(t,o,n,r)}}var Aa=Bn&&!(at&&Number(at[1])<=53);function Fa(t,e,n,r){if(Aa){var o=qr,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}xa.addEventListener(t,e,ct?{capture:n,passive:r}:n)}function Ia(t,e,n,r){(r||xa).removeEventListener(t,e._wrapper||e,n)}function Ra(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},r=t.data.on||{};xa=e.elm||t.elm,Ea(n),Le(n,r,Fa,Ia,ja,e.context),xa=void 0}}var Ma,La={create:Ra,update:Ra,destroy:function(t){return Ra(t,aa)}};function Pa(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,r,o=e.elm,c=t.data.domProps||{},u=e.data.domProps||{};for(n in(a(u.__ob__)||s(u._v_attr_proxy))&&(u=e.data.domProps=R({},u)),c)n in u||(o[n]="");for(n in u){if(r=u[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===c[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=r;var l=i(r)?"":String(r);Da(o,l)&&(o.value=l)}else if("innerHTML"===n&&Pi(o.tagName)&&i(o.innerHTML)){Ma=Ma||document.createElement("div"),Ma.innerHTML="".concat(r,"");var f=Ma.firstChild;while(o.firstChild)o.removeChild(o.firstChild);while(f.firstChild)o.appendChild(f.firstChild)}else if(r!==c[n])try{o[n]=r}catch(nc){}}}}function Da(t,e){return!t.composing&&("OPTION"===t.tagName||Na(t,e)||Va(t,e))}function Na(t,e){var n=!0;try{n=document.activeElement!==t}catch(nc){}return n&&t.value!==e}function Va(t,e){var n=t.value,r=t._vModifiers;if(a(r)){if(r.number)return g(n)!==g(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}var Ua={create:Pa,update:Pa},Ba=$((function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach((function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}));function Wa(t){var e=Ha(t.style);return t.staticStyle?R(t.staticStyle,e):e}function Ha(t){return Array.isArray(t)?M(t):"string"===typeof t?Ba(t):t}function za(t,e){var n,r={};if(e){var o=t;while(o.componentInstance)o=o.componentInstance._vnode,o&&o.data&&(n=Wa(o.data))&&R(r,n)}(n=Wa(t.data))&&R(r,n);var i=t;while(i=i.parent)i.data&&(n=Wa(i.data))&&R(r,n);return r}var qa,Ka=/^--/,Za=/\s*!important$/,Ga=function(t,e,n){if(Ka.test(e))t.style.setProperty(e,n);else if(Za.test(n))t.style.setProperty(E(e),n.replace(Za,""),"important");else{var r=Xa(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(ts).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function ns(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(ts).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function rs(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&R(e,os(t.name||"v")),R(e,t),e}return"string"===typeof t?os(t):void 0}}var os=$((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),is=Q&&!nt,as="transition",ss="animation",cs="transition",us="transitionend",ls="animation",fs="animationend";is&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(cs="WebkitTransition",us="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ls="WebkitAnimation",fs="webkitAnimationEnd"));var ps=Q?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function hs(t){ps((function(){ps(t)}))}function ds(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),es(t,e))}function vs(t,e){t._transitionClasses&&w(t._transitionClasses,e),ns(t,e)}function ms(t,e,n){var r=gs(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===as?us:fs,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n=as,l=a,f=i.length):e===ss?u>0&&(n=ss,l=u,f=c.length):(l=Math.max(a,u),n=l>0?a>u?as:ss:null,f=n?n===as?i.length:c.length:0);var p=n===as&&ys.test(r[cs+"Property"]);return{type:n,timeout:l,propCount:f,hasTransform:p}}function _s(t,e){while(t.length1}function xs(t,e){!0!==e.data.show&&ws(e)}var Os=Q?{create:xs,activate:xs,remove:function(t,e){!0!==t.data.show?Cs(t,e):e()}}:{},Ss=[ka,Oa,La,Ua,Qa,Os],Ts=Ss.concat(_a),Es=fa({nodeOps:na,modules:Ts});nt&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&Ps(t,"input")}));var js={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Pe(n,"postpatch",(function(){js.componentUpdated(t,e,n)})):As(t,e,n.context),t._vOptions=[].map.call(t.options,Rs)):("textarea"===n.tag||Bi(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",Ms),t.addEventListener("compositionend",Ls),t.addEventListener("change",Ls),nt&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){As(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,Rs);if(o.some((function(t,e){return!N(t,r[e])}))){var i=t.multiple?e.value.some((function(t){return Is(t,o)})):e.value!==e.oldValue&&Is(e.value,o);i&&Ps(t,"change")}}}};function As(t,e,n){Fs(t,e,n),(et||rt)&&setTimeout((function(){Fs(t,e,n)}),0)}function Fs(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s-1,a.selected!==i&&(a.selected=i);else if(N(Rs(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Is(t,e){return e.every((function(e){return!N(e,t)}))}function Rs(t){return"_value"in t?t._value:t.value}function Ms(t){t.target.composing=!0}function Ls(t){t.target.composing&&(t.target.composing=!1,Ps(t.target,"input"))}function Ps(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Ds(t){return!t.componentInstance||t.data&&t.data.transition?t:Ds(t.componentInstance._vnode)}var Ns={bind:function(t,e,n){var r=e.value;n=Ds(n);var o=n.data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,ws(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value,o=e.oldValue;if(!r!==!o){n=Ds(n);var i=n.data&&n.data.transition;i?(n.data.show=!0,r?ws(n,(function(){t.style.display=t.__vOriginalDisplay})):Cs(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none"}},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},Vs={model:js,show:Ns},Us={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Bs(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Bs(En(e.children)):t}function Ws(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var r in o)e[O(r)]=o[r];return e}function Hs(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function zs(t){while(t=t.parent)if(t.data.transition)return!0}function qs(t,e){return e.key===t.key&&e.tag===t.tag}var Ks=function(t){return t.tag||cn(t)},Zs=function(t){return"show"===t.name},Gs={name:"transition",props:Us,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(Ks),n.length)){0;var r=this.mode;0;var o=n[0];if(zs(this.$vnode))return o;var i=Bs(o);if(!i)return o;if(this._leaving)return Hs(t,o);var a="__transition-".concat(this._uid,"-");i.key=null==i.key?i.isComment?a+"comment":a+i.tag:u(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var s=(i.data||(i.data={})).transition=Ws(this),c=this._vnode,l=Bs(c);if(i.data.directives&&i.data.directives.some(Zs)&&(i.data.show=!0),l&&l.data&&!qs(i,l)&&!cn(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=R({},s);if("out-in"===r)return this._leaving=!0,Pe(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),Hs(t,o);if("in-out"===r){if(cn(i))return c;var p,h=function(){p()};Pe(s,"afterEnter",h),Pe(s,"enterCancelled",h),Pe(f,"delayLeave",(function(t){p=t}))}}return o}}},Js=R({tag:String,moveClass:String},Us);delete Js.mode;var Xs={props:Js,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=jr(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=Ws(this),s=0;s{e.style.height=n}))},leave(e){const{height:t}=getComputedStyle(e);e.style.height=t,getComputedStyle(e).height,requestAnimationFrame((()=>{e.style.height=0}))}}};return e("transition",n,t.children)}},r=s,o=n(1001),l=(0,o.Z)(r,i,a,!1,null,null,null),c=l.exports},4461:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return yh}});var i=function(){var e=this,t=e._self._c;return t("CodeTheme",[e.topicData?t("DocumentationLayout",e._b({scopedSlots:e._u([{key:"nav-title",fn:function({className:n}){return[t(e.rootLink?"router-link":"h2",{tag:"component",class:n,attrs:{to:e.rootLink}},[e._v(" "+e._s(e.$t("documentation.title"))+" ")])]}},{key:"content",fn:function(){return[t("Topic",e._b({key:e.topicKey,attrs:{disableHeroBackground:e.disableHeroBackground,objcPath:e.objcPath,swiftPath:e.swiftPath,isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta,languagePaths:e.languagePaths,enableOnThisPageNav:e.enableOnThisPageNav,enableMinimized:e.enableMinimized,hierarchyItems:e.hierarchyItems}},"Topic",e.topicProps,!1))]},proxy:!0}],null,!1,402783128)},"DocumentationLayout",e.documentationLayoutProps,!1)):e._e()],1)},a=[];const s="/";function r(e){return e.replace(/~[0,1]/g,(e=>({"~0":"~","~1":"/"}[e]||e)))}function*o(e){const t=1;if(e.lengtht)throw new Error(`invalid array index ${e}`);return n}function*p(e,t,n={strict:!1}){let i=e;for(const a of o(t)){if(n.strict&&!Object.prototype.hasOwnProperty.call(i,a))throw new u(t);i=i[a],yield{node:i,token:a}}}function g(e,t){let n=e;for(const{node:i}of p(e,t,{strict:!0}))n=i;return n}function f(e,t,n){let i=null,a=e,s=null;for(const{node:o,token:l}of p(e,t))i=a,a=o,s=l;if(!i)throw new u(t);if(Array.isArray(i))try{const e=h(s,i);i.splice(e,0,n)}catch(r){throw new u(t)}else Object.assign(i,{[s]:n});return e}function m(e,t){let n=null,i=e,a=null;for(const{node:r,token:o}of p(e,t))n=i,i=r,a=o;if(!n)throw new u(t);if(Array.isArray(n))try{const e=h(a,n);n.splice(e,1)}catch(s){throw new u(t)}else{if(!i)throw new u(t);delete n[a]}return e}function y(e,t,n){return m(e,t),f(e,t,n),e}function v(e,t,n){const i=g(e,t);return m(e,t),f(e,n,i),e}function b(e,t,n){return f(e,n,g(e,t)),e}function T(e,t,n){function i(e,t){const n=typeof e,a=typeof t;if(n!==a)return!1;switch(n){case d:{const n=Object.keys(e),a=Object.keys(t);return n.length===a.length&&n.every(((n,s)=>n===a[s]&&i(e[n],t[n])))}default:return e===t}}const a=g(e,t);if(!i(n,a))throw new Error("test failed");return e}const _={add:(e,{path:t,value:n})=>f(e,t,n),copy:(e,{from:t,path:n})=>b(e,t,n),move:(e,{from:t,path:n})=>v(e,t,n),remove:(e,{path:t})=>m(e,t),replace:(e,{path:t,value:n})=>y(e,t,n),test:(e,{path:t,value:n})=>T(e,t,n)};function S(e,{op:t,...n}){const i=_[t];if(!i)throw new Error("unknown operation");return i(e,n)}function k(e,t){return t.reduce(S,e)}var C=n(7192),w=n(9089),x=n(8841),I=function(){var e=this,t=e._self._c;return t("div",{staticClass:"doc-topic",class:{"with-on-this-page":e.enableOnThisPageNav&&e.isOnThisPageNavVisible}},[t(e.isTargetIDE?"div":"main",{tag:"component",staticClass:"main",attrs:{id:"app-main"}},[t("DocumentationHero",{attrs:{role:e.role,enhanceBackground:e.enhanceBackground,enableMinimized:e.enableMinimized,shortHero:e.shortHero,shouldShowLanguageSwitcher:e.shouldShowLanguageSwitcher,iconOverride:e.references[e.pageIcon],standardColorIdentifier:e.standardColorIdentifier},scopedSlots:e._u([{key:"above-content",fn:function(){return[e._t("above-hero-content")]},proxy:!0}],null,!0)},[e._t("above-title"),!e.parentTopics.length||e.enableMinimized||e.isTargetIDE?e._e():t("Hierarchy",{attrs:{currentTopicTitle:e.title,isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta,parentTopics:e.parentTopics,currentTopicTags:e.tags}}),e.shouldShowLanguageSwitcher?t("LanguageSwitcher",{attrs:{interfaceLanguage:e.interfaceLanguage,objcPath:e.objcPath,swiftPath:e.swiftPath}}):e._e(),t("Title",{class:{"minimized-title":e.enableMinimized},attrs:{eyebrow:e.enableMinimized?null:e.roleHeading},scopedSlots:e._u([e.isSymbolDeprecated||e.isSymbolBeta?{key:"after",fn:function(){return[t("small",{class:e.tagName,attrs:{"data-tag-name":e.tagName}})]},proxy:!0}:null],null,!0)},[t(e.titleBreakComponent,{tag:"component"},[e._v(e._s(e.title))])],1),e.abstract?t("Abstract",{class:{"minimized-abstract":e.enableMinimized},attrs:{content:e.abstract}}):e._e(),e.sampleCodeDownload?t("div",[t("DownloadButton",{staticClass:"sample-download",attrs:{action:e.sampleCodeDownload.action}})],1):e._e(),e.shouldShowAvailability?t("Availability",{attrs:{platforms:e.platforms,technologies:e.technologies}}):e._e(),e.declarations.length?t("div",{staticClass:"declarations-container",class:{"minimized-container":e.enableMinimized}},e._l(e.declarations,(function(n,i){return t("Declaration",{key:i,attrs:{conformance:e.conformance,declarations:n.declarations,source:e.remoteSource,declListExpanded:e.declListExpanded},on:{"update:declListExpanded":function(t){e.declListExpanded=t},"update:decl-list-expanded":function(t){e.declListExpanded=t}}})})),1):e._e()],2),t("div",{staticClass:"doc-content-wrapper"},[t("div",{staticClass:"doc-content",class:{"no-primary-content":!e.hasPrimaryContent&&e.enhanceBackground}},[e.hasPrimaryContent||e.showOtherDeclarations?t("div",{class:["container",{"minimized-container":e.enableMinimized}]},[e.declListExpanded?e._e():t("div",{staticClass:"description",class:{"after-enhanced-hero":e.enhanceBackground}},[e.isRequirement?t("RequirementMetadata",{attrs:{defaultImplementationsCount:e.defaultImplementationsCount}}):e._e(),e.deprecationSummary&&e.deprecationSummary.length?t("Aside",{attrs:{kind:"deprecated"}},[t("ContentNode",{attrs:{content:e.deprecationSummary}})],1):e._e(),e.downloadNotAvailableSummary&&e.downloadNotAvailableSummary.length?t("Aside",{attrs:{kind:"note"}},[t("ContentNode",{attrs:{content:e.downloadNotAvailableSummary}})],1):e._e()],1),e.showOtherDeclarations?t("div",{staticClass:"declaration-list-menu"},[t("button",{staticClass:"declaration-list-toggle",on:{click:e.toggleDeclList}},[e._v(" "+e._s(e.declListToggleText)+" "),t("div",{staticClass:"icon"},[t("InlinePlusCircleIcon",{class:{expand:e.declListExpanded}})],1)])]):e._e(),e.primaryContentSectionsSanitized&&e.primaryContentSectionsSanitized.length?t("PrimaryContent",{class:{"with-border":!e.enhanceBackground},attrs:{conformance:e.conformance,source:e.remoteSource,sections:e.primaryContentSectionsSanitized}}):e._e()],1):e._e(),e.shouldRenderTopicSection?t("Topics",{attrs:{sections:e.topicSections,isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta,topicStyle:e.topicSectionsStyle}}):e._e(),e.defaultImplementationsSections&&!e.enableMinimized?t("DefaultImplementations",{attrs:{sections:e.defaultImplementationsSections,isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta}}):e._e(),e.relationshipsSections?t("Relationships",{attrs:{sections:e.relationshipsSections,enableMinimized:e.enableMinimized}}):e._e(),e.seeAlsoSections&&!e.enableMinimized?t("SeeAlso",{attrs:{sections:e.seeAlsoSections}}):e._e(),e.shouldShowViewMoreLink?t("ViewMore",{staticClass:"minimized-container",attrs:{url:e.viewMoreLink}}):e._e()],1),e.enableOnThisPageNav?[t("OnThisPageStickyContainer",{directives:[{name:"show",rawName:"v-show",value:e.isOnThisPageNavVisible,expression:"isOnThisPageNavVisible"}]},[e.topicState.onThisPageSections.length>2?t("OnThisPageNav"):e._e()],1)]:e._e()],2),!e.isTargetIDE&&e.hasBetaContent?t("BetaLegalText"):e._e()],1),t("div",{staticClass:"visuallyhidden",attrs:{"aria-live":"polite"}},[e._v(" "+e._s(e.$t("documentation.current-page",{title:e.pageTitle}))+" ")])],1)},$=[],D=n(3078),L={class:"class",enum:"enum",protocol:"protocol",struct:"struct",uid:"uid",module:"module"},P=n(2974),O=n(2449),A=n(5947),N=n(5654),R=n(4030),B=n(6511),E=n(7587),M=function(){var e=this,t=e._self._c;return t("div",{staticClass:"betainfo"},[t("div",{staticClass:"betainfo-container"},[t("GridRow",[t("GridColumn",{attrs:{span:{large:12}}},[t("p",{staticClass:"betainfo-label"},[e._v(e._s(e.$t("metadata.beta.software")))]),t("div",{staticClass:"betainfo-content"},[e._t("content",(function(){return[t("p",[e._v(e._s(e.$t("metadata.beta.legal")))])]}))],2),e._t("after")],2)],1)],1)])},z=[],K=n(9649),Z=n(1576),j={name:"BetaLegalText",components:{GridColumn:Z.Z,GridRow:K.Z}},q=j,F=n(1001),H=(0,F.Z)(q,M,z,!1,null,"ba3b3cc0",null),V=H.exports,W=function(){var e=this,t=e._self._c;return t("Section",{staticClass:"language",attrs:{role:"complementary","aria-label":e.$t("language")}},[t("Title",[e._v(e._s(e.$t("formats.colon",{content:e.$t("language")})))]),t("div",{staticClass:"language-list"},[t("LanguageSwitcherLink",{staticClass:"language-option swift",class:{active:e.swift.active},attrs:{url:e.swift.active?null:e.swift.url},on:{click:function(t){return e.chooseLanguage(e.swift)}}},[e._v(" "+e._s(e.swift.name)+" ")]),t("LanguageSwitcherLink",{staticClass:"language-option objc",class:{active:e.objc.active},attrs:{url:e.objc.active?null:e.objc.url},on:{click:function(t){return e.chooseLanguage(e.objc)}}},[e._v(" "+e._s(e.objc.name)+" ")])],1)],1)},U=[],Q=function(){var e=this,t=e._self._c;return e.url?t("a",{attrs:{href:e.url},on:{click:function(t){return t.preventDefault(),e.$emit("click")}}},[e._t("default")],2):t("span",[e._t("default")],2)},G=[],X={name:"LanguageSwitcherLink",props:{url:[String,Object]}},Y=X,J=(0,F.Z)(Y,Q,G,!1,null,"2ca5e993",null),ee=J.exports,te=function(){var e=this,t=e._self._c;return t("div",{staticClass:"summary-section"},[e._t("default")],2)},ne=[],ie={name:"Section"},ae=ie,se=(0,F.Z)(ae,te,ne,!1,null,"3aa6f694",null),re=se.exports,oe=function(){var e=this,t=e._self._c;return t("p",{staticClass:"title"},[e._t("default")],2)},le=[],ce={name:"Title"},de=ce,ue=(0,F.Z)(de,oe,le,!1,null,"246c819c",null),he=ue.exports,pe={name:"LanguageSwitcher",components:{LanguageSwitcherLink:ee,Section:re,Title:he},inject:{isTargetIDE:{default:()=>!1},store:{default(){return{setPreferredLanguage(){}}}}},props:{interfaceLanguage:{type:String,required:!0},objcPath:{type:String,required:!0},swiftPath:{type:String,required:!0}},computed:{objc:({interfaceLanguage:e,objcPath:t,$route:{query:n}})=>({...D.Z.objectiveC,active:D.Z.objectiveC.key.api===e,url:(0,O.Q2)((0,A.Jf)(t),{...n,language:D.Z.objectiveC.key.url})}),swift:({interfaceLanguage:e,swiftPath:t,$route:{query:n}})=>({...D.Z.swift,active:D.Z.swift.key.api===e,url:(0,O.Q2)((0,A.Jf)(t),{...n,language:void 0})})},methods:{chooseLanguage(e){this.isTargetIDE||this.store.setPreferredLanguage(e.key.url),this.$router.push(e.url)}}},ge=pe,fe=(0,F.Z)(ge,W,U,!1,null,"0e39c0ba",null),me=fe.exports,ye=function(){var e=this,t=e._self._c;return t("div",{staticClass:"view-more-link"},[t("router-link",{staticClass:"base-link",attrs:{to:e.url}},[e._t("default",(function(){return[e._v(e._s(e.$t("documentation.view-more")))]}))],2)],1)},ve=[],be={name:"ViewMore",props:{url:{type:String,required:!0}}},Te=be,_e=(0,F.Z)(Te,ye,ve,!1,null,"3f54e653",null),Se=_e.exports,ke=function(){var e=this,t=e._self._c;return t("div",{class:["documentation-hero",{"documentation-hero--disabled":!e.enhanceBackground}],style:e.styles},[t("div",{staticClass:"icon"},[e.enhanceBackground?t("TopicTypeIcon",{key:"first",staticClass:"background-icon first-icon",attrs:{type:e.type,"image-override":e.iconOverride,"with-colors":""}}):e._e()],1),t("div",{staticClass:"documentation-hero__above-content"},[e._t("above-content")],2),t("div",{staticClass:"documentation-hero__content",class:{"short-hero":e.shortHero,"extra-bottom-padding":e.shouldShowLanguageSwitcher,"minimized-hero":e.enableMinimized}},[e._t("default")],2)])},Ce=[],we=n(5921),xe=n(5629),Ie=n(1869);const $e={red:"red",orange:"orange",yellow:"yellow",blue:"blue",green:"green",purple:"purple",gray:"gray"};var De={name:"DocumentationHero",components:{TopicTypeIcon:we.Z},props:{role:{type:String,required:!0},enhanceBackground:{type:Boolean,required:!0},enableMinimized:{type:Boolean,default:!1},shortHero:{type:Boolean,required:!0},shouldShowLanguageSwitcher:{type:Boolean,required:!0},iconOverride:{type:Object,required:!1},standardColorIdentifier:{type:String,required:!1,validator:e=>Object.prototype.hasOwnProperty.call($e,e)}},computed:{color:({type:e})=>Ie.g[xe.$[e]||e]||Ie.c.teal,styles:({color:e,standardColorIdentifier:t})=>({"--accent-color":`var(--color-documentation-intro-accent, var(--color-type-icon-${e}))`,"--standard-accent-color":t&&`var(--color-standard-${t}-documentation-intro-fill, var(--color-standard-${t}))`}),type:({role:e})=>{switch(e){case C.L.collection:return xe.t.module;case C.L.collectionGroup:return xe.t.collection;default:return e}}}},Le=De,Pe=(0,F.Z)(Le,ke,Ce,!1,null,"283b44ff",null),Oe=Pe.exports,Ae=n(352),Ne=n(3946),Re=function(){var e=this,t=e._self._c;return t("div",{staticClass:"OnThisPageNav"},[t("ul",{staticClass:"items"},e._l(e.onThisPageSections,(function(n){return t("li",{key:n.anchor,class:e.getItemClasses(n)},[t("router-link",{staticClass:"base-link",attrs:{to:n.url},nativeOn:{click:function(t){return e.handleFocusAndScroll(n.anchor)}}},[t(e.getWrapperComponent(n),{tag:"component"},[e._v(" "+e._s(e.getTextContent(n))+" ")])],1)],1)})),0)])},Be=[];function Ee(e,t){let n,i;return function(...a){const s=this;if(!i)return e.apply(s,a),void(i=Date.now());clearTimeout(n),n=setTimeout((()=>{Date.now()-i>=t&&(e.apply(s,a),i=Date.now())}),t-(Date.now()-i))}}var Me=n(5657),ze=n(3704),Ke={name:"OnThisPageNav",components:{WordBreak:Ae.Z},mixins:[ze.Z],inject:{store:{default(){return{state:{onThisPageSections:[],currentPageAnchor:null}}}}},computed:{onThisPageSections:({store:e,$route:t})=>e.state.onThisPageSections.map((e=>({...e,url:(0,O.Q2)(`#${e.anchor}`,t.query)}))),currentPageAnchor:({store:e})=>e.state.currentPageAnchor},async mounted(){window.addEventListener("scroll",this.onScroll,!1),this.$once("hook:beforeDestroy",(()=>{window.removeEventListener("scroll",this.onScroll)}))},watch:{onThisPageSections:{immediate:!0,async handler(){await(0,Me.J)(8),this.onScroll()}}},methods:{onScroll:Ee((function(){const e=this.onThisPageSections.length;if(!e)return;const{scrollY:t,innerHeight:n}=window,{scrollHeight:i}=document.body,a=t+n>=i,s=t<=0,r=.3*n+t;if(s||a){const t=s?0:e-1;return void this.store.setCurrentPageSection(this.onThisPageSections[t].anchor)}let o,l,c=null;for(o=0;ot.concat(n).concat(e),space:()=>({type:Qe.Z.InlineType.text,text:" "})}},Xe=Ge,Ye=(0,F.Z)(Xe,We,Ue,!1,null,"4c6f3ed1",null),Je=Ye.exports,et=function(){var e=this,t=e._self._c;return t("div",{staticClass:"declaration-list"},e._l(e.declarationTokens,(function(n){return t("transition-expand",{key:n.identifier},[!e.hasOtherDeclarations||n.identifier===e.selectedIdentifier||e.isExpanded?t("div",{staticClass:"declaration-pill",class:{"declaration-pill--expanded":e.hasOtherDeclarations&&e.isExpanded,[e.changeClasses]:e.changeType&&n.identifier===e.selectedIdentifier,"selected-declaration":e.isSelectedDeclaration(n.identifier)}},[t(e.getWrapperComponent(n),{tag:"component",staticClass:"declaration-group-wrapper",on:{click:function(t){return e.selectDeclaration(n.identifier)}}},[t("DeclarationGroup",e._b({},"DeclarationGroup",e.getDeclProp(n),!1))],1)],1):e._e()])})),1)},tt=[],nt=function(){var e=this,t=e._self._c;return t("div",{ref:"apiChangesDiff",staticClass:"declaration-group",class:e.classes},[e.shouldCaption?t("p",{staticClass:"platforms"},[t("strong",[e._v(e._s(e.caption))])]):e._e(),t("Source",{attrs:{tokens:e.declaration.tokens,language:e.interfaceLanguage}})],1)},it=[],at=function(){var e=this,t=e._self._c;return t("pre",{ref:"declarationGroup",staticClass:"source",class:{[e.multipleLinesClass]:e.displaysMultipleLines,"has-multiple-lines":e.hasMultipleLines}},[t("CodeBlock",{ref:"code"},e._l(e.formattedTokens,(function(n,i){return t("Token",e._b({key:i,class:e.extraClassesFor(n)},"Token",e.propsFor(n),!1))})),1)],1)},st=[];const rt={instance:"-",klass:"+"};function ot(e){const t=e.textContent??"";if(!t.startsWith(rt.instance)&&!t.startsWith(rt.klass))return;const n=e.getElementsByClassName("token-identifier");if(n.length<2)return;const i=e.textContent.indexOf(":")+1;for(let a=1;a(0,w.$8)(["theme","code","indentationWidth"],gt),formattedTokens:({language:e,formattedSwiftTokens:t,tokens:n})=>e===D.Z.swift.key.api?t:n,formattedSwiftTokens:({indentationWidth:e,tokens:t})=>{const n=" ".repeat(e);let i=!1;const a=[];let s=0,r=null,o=null,l=null,c=null,d=0,u=null;while(se===pt.attribute||e===pt.externalParam;e.text&&e.text.endsWith(", ")&&g&&f(g)&&(h.text=`${e.text.trimEnd()}\n${n}`,i=!0),a.push(h),s+=1}if(i&&null!==r){const e=a[r].text;a[r].text=`${e}\n${n}`}if(i&&null!==l){const e=a[l].text,t=e.slice(0,c),n=e.slice(c),i=`${t}\n${n}`;a[l].text=i}return a},hasMultipleLines({formattedTokens:e}){return e.reduce(((t,n,i)=>{let a=/\n/g;return i===e.length-1&&(a=/\n(?!$)/g),n.text?t+(n.text.match(a)||[]).length:t}),1)>=2}},methods:{propsFor(e){return{kind:e.kind,identifier:e.identifier,text:e.text,tokens:e.tokens}},handleWindowResize(){this.displaysMultipleLines=(0,ct.s)(this.$refs.declarationGroup)},extraClassesFor(e){return{highlighted:e.highlight===ft.changed}}},async mounted(){window.addEventListener("resize",this.handleWindowResize),this.language===D.Z.objectiveC.key.api&&(await this.$nextTick(),lt(this.$refs.code.$el,this.language)),this.handleWindowResize()},beforeDestroy(){window.removeEventListener("resize",this.handleWindowResize)}},yt=mt,vt=(0,F.Z)(yt,at,st,!1,null,"dc9cfb3a",null),bt=vt.exports,Tt=n(1842),_t={name:"DeclarationGroup",components:{Source:bt},mixins:[Tt.PH],inject:{languages:{default:()=>new Set},interfaceLanguage:{default:()=>D.Z.swift.key.api},symbolKind:{default:()=>{}}},props:{declaration:{type:Object,required:!0},shouldCaption:{type:Boolean,default:!1},changeType:{type:String,required:!1}},computed:{classes:({changeType:e,multipleLinesClass:t,displaysMultipleLinesAfterAPIChanges:n})=>({[`declaration-group--changed declaration-group--${e}`]:e,[t]:n}),caption(){return this.declaration.platforms.join(", ")}}},St=_t,kt=(0,F.Z)(St,nt,it,!1,null,"f961f3da",null),Ct=kt.exports,wt=n(9732),xt={name:"DeclarationList",components:{DeclarationGroup:Ct,TransitionExpand:wt.Z},data(){return{selectedIdentifier:this.identifier}},inject:{store:{default:()=>({state:{references:{}}})},identifier:{default:()=>{}}},props:{declaration:{type:Object,required:!0},shouldCaption:{type:Boolean,default:!1},changeType:{type:String,required:!1},declListExpanded:{type:Boolean,default:!1}},computed:{changeClasses:({changeType:e})=>`changed changed-${e}`,hasOtherDeclarations:({declaration:e})=>e.otherDeclarations||null,declarationTokens:({declaration:e,hasOtherDeclarations:t,identifier:n})=>{if(!t)return[{...e,identifier:n}];const{otherDeclarations:{declarations:i,displayIndex:a},tokens:s}=e;return[...i.slice(0,a),{tokens:s,identifier:n},...i.slice(a)]},references:({store:e})=>e.state.references,isExpanded:{get:({declListExpanded:e})=>e,set(e){this.$emit("update:declListExpanded",e)}}},methods:{async selectDeclaration(e){if(e===this.identifier||!this.isExpanded)return;this.selectedIdentifier=e,await this.$nextTick(),this.isExpanded=!1,await(0,Me.X)(500);const t=(0,O.Q2)(this.references[e].url,this.$route.query);this.$router.push(t)},getWrapperComponent(e){return this.isExpanded&&e.identifier!==this.identifier?"button":"div"},getDeclProp(e){return this.hasOtherDeclarations&&e.identifier!==this.identifier?{declaration:e}:{declaration:e,shouldCaption:this.shouldCaption,changeType:this.changeType}},isSelectedDeclaration(e){return e===this.selectedIdentifier}}},It=xt,$t=(0,F.Z)(It,et,tt,!1,null,"18e7c20c",null),Dt=$t.exports,Lt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"declaration-diff"},[t("div",{staticClass:"declaration-diff-current"},[t("div",{staticClass:"declaration-diff-version"},[e._v("Current")]),e._l(e.currentDeclarations,(function(n,i){return t("DeclarationList",{key:i,attrs:{declaration:n,"should-caption":e.currentDeclarations.length>1}})}))],2),t("div",{staticClass:"declaration-diff-previous"},[t("div",{staticClass:"declaration-diff-version"},[e._v("Previous")]),e._l(e.previousDeclarations,(function(n,i){return t("DeclarationList",{key:i,attrs:{declaration:n,"should-caption":e.previousDeclarations.length>1}})}))],2)])},Pt=[],Ot={name:"DeclarationDiff",components:{DeclarationList:Dt},props:{changes:{type:Object,required:!0}},computed:{previousDeclarations:({changes:e})=>e.declaration.previous||[],currentDeclarations:({changes:e})=>e.declaration.new||[]}},At=Ot,Nt=(0,F.Z)(At,Lt,Pt,!1,null,"0c2301a5",null),Rt=Nt.exports,Bt=function(){var e=this,t=e._self._c;return t("a",{staticClass:"declaration-source-link",attrs:{href:e.url,title:`Open source file for ${e.fileName}`,target:"_blank"}},[e.isSwiftFile?t("SwiftFileIcon",{staticClass:"declaration-icon"}):e._e(),t("WordBreak",[e._v(e._s(e.fileName))])],1)},Et=[],Mt=n(7834),zt={name:"DeclarationSourceLink",components:{WordBreak:Ae.Z,SwiftFileIcon:Mt.Z},props:{url:{type:String,required:!0},fileName:{type:String,required:!0}},computed:{isSwiftFile:({fileName:e})=>e.endsWith(".swift")}},Kt=zt,Zt=(0,F.Z)(Kt,Bt,Et,!1,null,"5863919c",null),jt=Zt.exports,qt=n(9426),Ft={name:"Declaration",components:{DeclarationDiff:Rt,DeclarationList:Dt,DeclarationSourceLink:jt,ConditionalConstraints:Je},constants:{ChangeTypes:qt.yf,multipleLinesClass:dt._},inject:["identifier","store"],data:({store:{state:e}})=>({state:e,multipleLinesClass:dt._}),props:{conformance:{type:Object,required:!1},source:{type:Object,required:!1},declarations:{type:Array,required:!0},declListExpanded:{type:Boolean,default:!1}},computed:{hasPlatformVariants:({declarations:e})=>!e.every((({platforms:t})=>(0,N.Xy)(t,e[0].platforms))),hasModifiedChanges({declarationChanges:e}){if(!e||!e.declaration)return!1;const t=e.declaration;return!(!(t.new||[]).length||!(t.previous||[]).length)},declarationChanges:({state:{apiChanges:e},identifier:t})=>e&&e[t],changeType:({declarationChanges:e,hasModifiedChanges:t})=>{if(!e)return;const n=e.declaration;return n?t?qt.yf.modified:e.change:e.change===qt.yf.added?qt.yf.added:void 0},changeClasses:({changeType:e})=>({[`changed changed-${e}`]:e}),isExpanded:{get:({declListExpanded:e})=>e,set(e){this.$emit("update:declListExpanded",e)}}}},Ht=Ft,Vt=(0,F.Z)(Ht,He,Ve,!1,null,"722d45cf",null),Wt=Vt.exports,Ut=n(6772),Qt=function(){var e=this,t=e._self._c;return t("ContentNode",e._b({staticClass:"abstract"},"ContentNode",e.$props,!1))},Gt=[],Xt={name:"Abstract",components:{ContentNode:Qe.Z},props:Qe.Z.props},Yt=Xt,Jt=(0,F.Z)(Yt,Qt,Gt,!1,null,"f3f57cbe",null),en=Jt.exports,tn=n(7605),nn=function(){var e=this,t=e._self._c;return t("TopicsTable",{attrs:{anchor:e.contentSectionData.anchor,title:e.$t(e.contentSectionData.title),isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta,sections:e.sections,wrapTitle:!0}})},an=[];const sn={topics:{title:"sections.topics",anchor:"topics",level:2},defaultImplementations:{title:"sections.default-implementations",anchor:"default-implementations",level:2},relationships:{title:"sections.relationships",anchor:"relationships",level:2},seeAlso:{title:"sections.see-also",anchor:"see-also",level:2}},rn={[Fe.attributes]:{title:"sections.attributes",anchor:"attributes",level:2},[Fe.details]:{title:"sections.details",anchor:"details",level:2},[Fe.parameters]:{title:"sections.parameters",anchor:"parameters",level:2},[Fe.possibleValues]:{title:"sections.possible-values",anchor:"possibleValues",level:2}};var on=function(){var e=this,t=e._self._c;return t("ContentTable",{attrs:{anchor:e.anchor,title:e.title}},e._l(e.sectionsWithTopics,(function(n,i){return t("ContentTableSection",{key:`${n.title}_${i}`,class:{"no-title":!n.title},attrs:{title:n.title,anchor:n.anchor},scopedSlots:e._u([n.title&&e.wrapTitle?{key:"title",fn:function({className:i}){return[t("LinkableHeading",{class:i,attrs:{level:3,anchor:n.anchor}},[t("WordBreak",[e._v(e._s(n.title))])],1)]}}:null,n.abstract?{key:"abstract",fn:function(){return[t("ContentNode",{attrs:{content:n.abstract}})]},proxy:!0}:null,n.discussion?{key:"discussion",fn:function(){return[t("ContentNode",{attrs:{content:n.discussion.content}})]},proxy:!0}:null],null,!0)},[e.shouldRenderList?e._l(n.topics,(function(n){return t("TopicsLinkBlock",{key:n.identifier,staticClass:"topic",attrs:{topic:n,isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta}})})):t("TopicsLinkCardGrid",{staticClass:"topic",attrs:{items:n.topics,topicStyle:e.topicStyle}})],2)})),1)},ln=[],cn=n(1105),dn=n(8039),un=n(5953),hn=function(){var e=this,t=e._self._c;return t("section",{staticClass:"contenttable alt-light"},[t("div",{class:["container",{"minimized-container":e.enableMinimized}]},[t("LinkableHeading",{staticClass:"title",attrs:{anchor:e.anchor}},[e._v(e._s(e.title))]),e._t("default")],2)])},pn=[],gn={name:"ContentTable",components:{LinkableHeading:dn.Z},props:{anchor:{type:String,required:!0},title:{type:String,required:!0},enableMinimized:{type:Boolean,default:!1}}},fn=gn,mn=(0,F.Z)(fn,hn,pn,!1,null,"0e6b292c",null),yn=mn.exports,vn=function(){var e=this,t=e._self._c;return t("div",{staticClass:"contenttable-section"},[t("div",{staticClass:"section-title"},[e._t("title",(function(){return[e.title?t("LinkableHeading",{class:e.className,attrs:{level:3,anchor:e.anchorComputed}},[e._v(e._s(e.title))]):e._e()]}),{className:e.className})],2),t("div",{staticClass:"section-content"},[e._t("abstract"),e._t("discussion"),e._t("default")],2)])},bn=[],Tn=n(3208);const _n="contenttable-title";var Sn={name:"ContentTableSection",components:{LinkableHeading:dn.Z},props:{title:{type:String,required:!1},anchor:{type:String,default:null}},computed:{anchorComputed:({title:e,anchor:t})=>t||(0,Tn.HA)(e||""),className:()=>_n}},kn=Sn,Cn=(0,F.Z)(kn,vn,bn,!1,null,"1b0546d9",null),wn=Cn.exports,xn=n(8104),In={name:"TopicsTable",mixins:[un.Z],components:{TopicsLinkCardGrid:cn.Z,WordBreak:Ae.Z,ContentTable:yn,TopicsLinkBlock:xn["default"],ContentNode:Qe.Z,ContentTableSection:wn,LinkableHeading:dn.Z},props:{isSymbolDeprecated:Boolean,isSymbolBeta:Boolean,sections:{type:Array,required:!0},title:{type:String,required:!1,default(){return"Topics"}},anchor:{type:String,required:!1,default(){return"topics"}},wrapTitle:{type:Boolean,default:!1},topicStyle:{type:String,default:Ne.o.list}},computed:{shouldRenderList:({topicStyle:e})=>e===Ne.o.list,sectionsWithTopics(){return this.sections.map((e=>({...e,topics:e.identifiers.reduce(((e,t)=>this.references[t]?e.concat(this.references[t]):e),[])})))}}},$n=In,Dn=(0,F.Z)($n,on,ln,!1,null,"1c2724f5",null),Ln=Dn.exports,Pn={name:"DefaultImplementations",components:{TopicsTable:Ln},computed:{contentSectionData:()=>sn.defaultImplementations},props:{isSymbolDeprecated:Boolean,isSymbolBeta:Boolean,sections:Ln.props.sections}},On=Pn,An=(0,F.Z)(On,nn,an,!1,null,null,null),Nn=An.exports,Rn=function(){var e=this,t=e._self._c;return t("div",{staticClass:"primary-content"},e._l(e.sections,(function(n,i){return t(e.componentFor(n),e._b({key:i,tag:"component"},"component",e.propsFor(n),!1))})),1)},Bn=[],En=function(){var e=this,t=e._self._c;return t("section",{staticClass:"attributes"},[t("LinkableHeading",{attrs:{anchor:e.section.anchor,level:e.section.level}},[e._v(" "+e._s(e.$t(e.section.title))+" ")]),t("ParameterAttributes",{attrs:{attributes:e.attributes}})],1)},Mn=[],zn=function(){var e=this,t=e._self._c;return t("div",{staticClass:"parameter-attributes"},[e.shouldRender(e.AttributeKind.default)?t("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function({attribute:n}){return[e._v(" "+e._s(e.$t("formats.colon",{content:n.title||e.$t("parameters.default")}))),t("code",[e._v(e._s(n.value))])]}}],null,!1,2998238055)},"ParameterMetaAttribute",{kind:e.AttributeKind.default,attributes:e.attributesObject,changes:e.changes},!1)):e._e(),e.shouldRender(e.AttributeKind.minimum)?t("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function({attribute:n}){return[e._v(" "+e._s(e.$t("formats.colon",{content:n.title||e.$t("parameters.minimum")}))),t("code",[e._v(e._s(n.value))])]}}],null,!1,859757818)},"ParameterMetaAttribute",{kind:e.AttributeKind.minimum,attributes:e.attributesObject,changes:e.changes},!1)):e._e(),e.shouldRender(e.AttributeKind.minimumExclusive)?t("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function({attribute:n}){return[e._v(" "+e._s(e.$t("formats.colon",{content:n.title||e.$t("parameters.minimum")}))),t("code",[e._v("> "+e._s(n.value))])]}}],null,!1,770347247)},"ParameterMetaAttribute",{kind:e.AttributeKind.minimumExclusive,attributes:e.attributesObject,changes:e.changes},!1)):e._e(),e.shouldRender(e.AttributeKind.minimumLength)?t("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function({attribute:n}){return[e._v(" "+e._s(e.$t("formats.colon",{content:n.title||e.$t("parameters.minimumLength")}))),t("code",[e._v(e._s(n.value))])]}}],null,!1,1723084358)},"ParameterMetaAttribute",{kind:e.AttributeKind.minimumLength,attributes:e.attributesObject,changes:e.changes},!1)):e._e(),e.shouldRender(e.AttributeKind.maximum)?t("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function({attribute:n}){return[e._v(" "+e._s(e.$t("formats.colon",{content:n.title||e.$t("parameters.maximum")}))),t("code",[e._v(e._s(n.value))])]}}],null,!1,1190666532)},"ParameterMetaAttribute",{kind:e.AttributeKind.maximum,attributes:e.attributesObject,changes:e.changes},!1)):e._e(),e.shouldRender(e.AttributeKind.maximumExclusive)?t("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function({attribute:n}){return[e._v(" "+e._s(e.$t("formats.colon",{content:n.title||e.$t("parameters.maximum")}))),t("code",[e._v("< "+e._s(n.value))])]}}],null,!1,1156490099)},"ParameterMetaAttribute",{kind:e.AttributeKind.maximumExclusive,attributes:e.attributesObject,changes:e.changes},!1)):e._e(),e.shouldRender(e.AttributeKind.maximumLength)?t("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function({attribute:n}){return[e._v(" "+e._s(e.$t("formats.colon",{content:n.title||e.$t("parameters.maximumLength")}))),t("code",[e._v(e._s(n.value))])]}}],null,!1,449455512)},"ParameterMetaAttribute",{kind:e.AttributeKind.maximumLength,attributes:e.attributesObject,changes:e.changes},!1)):e._e(),e.shouldRender(e.AttributeKind.allowedTypes)?t("ParameterMetaAttribute",e._b({scopedSlots:e._u([{key:"default",fn:function({attribute:n}){return[e._v(" "+e._s(e.$t("formats.colon",{content:e.$tc("parameters.possible-types",e.fallbackToValues(n).length)}))),t("code",[e._l(e.fallbackToValues(n),(function(i,a){return[e._l(i,(function(i,s){return[t("DeclarationToken",e._b({key:`${a}-${s}`},"DeclarationToken",i,!1)),a+1({new:null,previous:null})},value:{type:[Object,Array,String,Boolean],default:null},wrapChanges:{type:Boolean,default:!0},renderSingleChange:{type:Boolean,default:!1}},render(e){const{value:t,changes:n={},wrapChanges:i,renderSingleChange:a}=this,{new:s,previous:r}=n,o=(t,n)=>{const a=this.$scopedSlots.default({value:t});return n&&i?e("div",{class:n},[a]):a?a[0]:null};if(s||r){const t=o(s,qn.added),n=o(r,qn.removed);return a?s&&!r?t:n:e("div",{class:"property-changegroup"},[s?t:"",r?n:""])}return o(t)}},Wn=Vn,Un=(0,F.Z)(Wn,Fn,Hn,!1,null,null,null),Qn=Un.exports,Gn={name:"ParameterMetaAttribute",components:{RenderChanged:Qn},props:{kind:{type:String,required:!0},attributes:{type:Object,required:!0},changes:{type:Object,default:()=>({})}}},Xn=Gn,Yn=(0,F.Z)(Xn,Zn,jn,!1,null,"f911f232",null),Jn=Yn.exports;const ei={allowedTypes:"allowedTypes",allowedValues:"allowedValues",default:"default",maximum:"maximum",maximumExclusive:"maximumExclusive",maximumLength:"maximumLength",minimum:"minimum",minimumExclusive:"minimumExclusive",minimumLength:"minimumLength"};var ti={name:"ParameterAttributes",components:{ParameterMetaAttribute:Jn,DeclarationToken:ht["default"]},constants:{AttributeKind:ei},props:{attributes:{type:Array,default:()=>[]},changes:{type:Object,default:()=>({})}},computed:{AttributeKind:()=>ei,attributesObject:({attributes:e})=>e.reduce(((e,t)=>({...e,[t.kind]:t})),{})},methods:{shouldRender(e){return Object.prototype.hasOwnProperty.call(this.attributesObject,e)},fallbackToValues:e=>{const t=e||[];return Array.isArray(t)?t:t.values}}},ni=ti,ii=(0,F.Z)(ni,zn,Kn,!1,null,null,null),ai=ii.exports,si={name:"Attributes",components:{LinkableHeading:dn.Z,ParameterAttributes:ai},props:{attributes:{type:Array,required:!0}},computed:{section:({sectionKind:e})=>rn[e],sectionKind:()=>Fe.attributes}},ri=si,oi=(0,F.Z)(ri,En,Mn,!1,null,"c0edcb84",null),li=oi.exports,ci=function(){var e=this,t=e._self._c;return t("section",[t("LinkableHeading",{attrs:{anchor:e.contentSectionData.anchor}},[e._v(" "+e._s(e.$t(e.contentSectionData.title))+" ")]),t("dl",{staticClass:"datalist"},[e._l(e.values,(function(n){return[t("dt",{key:`${n.name}:name`,staticClass:"param-name"},[t("WordBreak",{attrs:{tag:"code"}},[e._v(e._s(n.name))])],1),n.content?t("dd",{key:`${n.name}:content`,staticClass:"value-content"},[t("ContentNode",{attrs:{content:n.content}})],1):e._e()]}))],2)],1)},di=[],ui=n(9519),hi={name:"PossibleValues",components:{ContentNode:ui["default"],LinkableHeading:dn.Z,WordBreak:Ae.Z},props:{values:{type:Array,required:!0}},computed:{contentSectionData:()=>rn[Fe.possibleValues]}},pi=hi,gi=(0,F.Z)(pi,ci,di,!1,null,null,null),fi=gi.exports,mi=function(){var e=this,t=e._self._c;return t("section",[t("LinkableHeading",{attrs:{anchor:e.anchor}},[e._v(e._s(e.title))]),t("DeclarationSource",{attrs:{tokens:e.tokens}})],1)},yi=[],vi={name:"RestEndpoint",components:{DeclarationSource:bt,LinkableHeading:dn.Z},props:{title:{type:String,required:!0},tokens:{type:Array,required:!0}},computed:{anchor:({title:e})=>(0,Tn.HA)(e)}},bi=vi,Ti=(0,F.Z)(bi,mi,yi,!1,null,null,null),_i=Ti.exports,Si=function(){var e=this,t=e._self._c;return t("section",{staticClass:"details"},[t("LinkableHeading",{attrs:{anchor:e.contentSectionData.anchor}},[e._v(" "+e._s(e.$t(e.contentSectionData.title))+" ")]),t("dl",[e.isSymbol?[t("dt",{key:`${e.details.name}:name`,staticClass:"detail-type"},[e._v(" "+e._s(e.$t("metadata.details.name"))+" ")]),t("dd",{key:`${e.details.ideTitle}:content`,staticClass:"detail-content"},[e._v(" "+e._s(e.details.ideTitle)+" ")])]:e._e(),e.isTitle?[t("dt",{key:`${e.details.name}:key`,staticClass:"detail-type"},[e._v(" "+e._s(e.$t("metadata.details.key"))+" ")]),t("dd",{key:`${e.details.ideTitle}:content`,staticClass:"detail-content"},[e._v(" "+e._s(e.details.name)+" ")])]:e._e(),t("dt",{key:`${e.details.name}:type`,staticClass:"detail-type"},[e._v(" "+e._s(e.$t("metadata.details.type"))+" ")]),t("dd",{staticClass:"detail-content"},[t("PropertyListKeyType",{attrs:{types:e.details.value}})],1)],2)],1)},ki=[],Ci=function(){var e=this,t=e._self._c;return t("div",{staticClass:"type"},[e._v(e._s(e.typeOutput))])},wi=[],xi={name:"PropertyListKeyType",props:{types:{type:Array,required:!0}},computed:{englishTypes(){return this.types.map((({arrayMode:e,baseType:t="*"})=>e?`array of ${this.pluralizeKeyType(t)}`:t))},typeOutput(){return this.englishTypes.length>2?[this.englishTypes.slice(0,this.englishTypes.length-1).join(", "),this.englishTypes[this.englishTypes.length-1]].join(", or "):this.englishTypes.join(" or ")}},methods:{pluralizeKeyType(e){switch(e){case"dictionary":return"dictionaries";case"array":case"number":case"string":return`${e}s`;default:return e}}}},Ii=xi,$i=(0,F.Z)(Ii,Ci,wi,!1,null,"791bac44",null),Di=$i.exports,Li={name:"PropertyListKeyDetails",components:{PropertyListKeyType:Di,LinkableHeading:dn.Z},props:{details:{type:Object,required:!0}},computed:{contentSectionData:()=>rn[Fe.details],isTitle(){return"title"===this.details.titleStyle&&this.details.ideTitle},isSymbol(){return"symbol"===this.details.titleStyle&&this.details.ideTitle}}},Pi=Li,Oi=(0,F.Z)(Pi,Si,ki,!1,null,"d66cd00c",null),Ai=Oi.exports,Ni=function(){var e=this,t=e._self._c;return t("section",{staticClass:"parameters"},[t("LinkableHeading",{attrs:{anchor:e.contentSectionData.anchor}},[e._v(" "+e._s(e.$t(e.contentSectionData.title))+" ")]),t("dl",[e._l(e.parameters,(function(n){return[t("dt",{key:`${n.name}:name`,staticClass:"param-name"},[t("code",[e._v(e._s(n.name))])]),t("dd",{key:`${n.name}:content`,staticClass:"param-content"},[t("ContentNode",{attrs:{content:n.content}})],1)]}))],2)],1)},Ri=[],Bi={name:"Parameters",components:{ContentNode:Qe.Z,LinkableHeading:dn.Z},props:{parameters:{type:Array,required:!0}},computed:{contentSectionData:()=>rn[Fe.parameters]}},Ei=Bi,Mi=(0,F.Z)(Ei,Ni,Ri,!1,null,"5ef1227e",null),zi=Mi.exports,Ki=function(){var e=this,t=e._self._c;return t("section",[t("LinkableHeading",{attrs:{anchor:e.anchor}},[e._v(e._s(e.title))]),t("ParametersTable",{staticClass:"property-table",attrs:{parameters:e.properties,changes:e.propertyChanges},scopedSlots:e._u([{key:"symbol",fn:function({name:n,type:i,content:a,changes:s,deprecated:r}){return[t("div",{staticClass:"property-name",class:{deprecated:r}},[t("WordBreak",{attrs:{tag:"code"}},[e._v(e._s(n))])],1),e.shouldShiftType({name:n,content:a})?e._e():t("PossiblyChangedType",{attrs:{type:i,changes:s.type}})]}},{key:"description",fn:function({name:n,type:i,attributes:a,content:s,required:r,changes:o,deprecated:l,readOnly:c}){return[e.shouldShiftType({name:n,content:s})?t("PossiblyChangedType",{attrs:{type:i,changes:o.type}}):e._e(),l?[t("Badge",{staticClass:"property-deprecated",attrs:{variant:"deprecated"}}),e._v("  ")]:e._e(),t("PossiblyChangedTextAttribute",{attrs:{changes:o.required,value:r}},[e._v(" "+e._s(e.$t("formats.parenthesis",{content:e.$t("required")}))+" ")]),t("PossiblyChangedTextAttribute",{attrs:{changes:o.readOnly,value:c}},[e._v(" "+e._s(e.$t("formats.parenthesis",{content:e.$t("read-only")}))+" ")]),s?t("ContentNode",{attrs:{content:s}}):e._e(),t("ParameterAttributes",{attrs:{attributes:a,changes:o.attributes}})]}}])})],1)},Zi=[],ji={inject:["identifier","store"],data:({store:{state:e}})=>({state:e}),computed:{apiChanges:({state:{apiChanges:e},identifier:t})=>e&&e[t]}},qi=n(6137),Fi=function(){var e=this,t=e._self._c;return t("div",{staticClass:"parameters-table"},e._l(e.parameters,(function(n){return t("Row",{key:n[e.keyBy],staticClass:"param",class:e.changedClasses(n[e.keyBy])},[t("Column",{staticClass:"param-symbol",attrs:{span:{large:3,small:12}}},[e._t("symbol",null,null,e.getProps(n,e.changes[n[e.keyBy]]))],2),t("Column",{staticClass:"param-content",attrs:{span:{large:9,small:12}}},[e._t("description",null,null,e.getProps(n,e.changes[n[e.keyBy]]))],2)],1)})),1)},Hi=[],Vi={name:"ParametersTable",components:{Row:K.Z,Column:Z.Z},props:{parameters:{type:Array,required:!0},changes:{type:Object,default:()=>({})},keyBy:{type:String,default:"name"}},methods:{getProps(e,t={}){return{...e,changes:t}},changedClasses(e){const{changes:t}=this,{change:n}=t[e]||{};return{[`changed changed-${n}`]:n}}}},Wi=Vi,Ui=(0,F.Z)(Wi,Fi,Hi,!1,null,"eee7e94e",null),Qi=Ui.exports,Gi=function(){var e=this,t=e._self._c;return t("RenderChanged",{attrs:{renderSingleChange:"",value:e.value,changes:e.changes},scopedSlots:e._u([{key:"default",fn:function({value:n}){return[n?t("span",{staticClass:"property-text"},[e._t("default")],2):e._e()]}}],null,!0)})},Xi=[],Yi={name:"PossiblyChangedTextAttribute",components:{RenderChanged:Qn},props:{changes:{type:Object,required:!1},value:{type:Boolean,default:!1}}},Ji=Yi,ea=(0,F.Z)(Ji,Gi,Xi,!1,null,null,null),ta=ea.exports,na=function(){var e=this,t=e._self._c;return t("RenderChanged",{attrs:{value:e.type,wrapChanges:!1,changes:e.changes},scopedSlots:e._u([{key:"default",fn:function({value:n}){return[t("DeclarationTokenGroup",{staticClass:"property-metadata property-type",attrs:{type:e.getValues(n)}})]}}])})},ia=[],aa=function(){var e=this,t=e._self._c;return e.type&&e.type.length?t("div",[t("code",e._l(e.type,(function(n,i){return t("DeclarationToken",e._b({key:i},"DeclarationToken",n,!1))})),1)]):e._e()},sa=[],ra={name:"DeclarationTokenGroup",components:{DeclarationToken:ht["default"]},props:{type:{type:Array,default:()=>[],required:!1}}},oa=ra,la=(0,F.Z)(oa,aa,sa,!1,null,null,null),ca=la.exports,da={name:"PossiblyChangedType",components:{DeclarationTokenGroup:ca,RenderChanged:Qn},props:{type:{type:Array,required:!0},changes:{type:Object,required:!1}},methods:{getValues(e){return Array.isArray(e)?e:e.values}}},ua=da,ha=(0,F.Z)(ua,na,ia,!1,null,"549ed0a8",null),pa=ha.exports,ga={name:"PropertyTable",mixins:[ji],components:{Badge:qi.Z,WordBreak:Ae.Z,PossiblyChangedTextAttribute:ta,PossiblyChangedType:pa,ParameterAttributes:ai,ContentNode:Qe.Z,ParametersTable:Qi,LinkableHeading:dn.Z},props:{title:{type:String,required:!0},properties:{type:Array,required:!0}},computed:{anchor:({title:e})=>(0,Tn.HA)(e),propertyChanges:({apiChanges:e})=>(e||{}).properties},methods:{shouldShiftType:({content:e=[],name:t})=>!e.length&&t}},fa=ga,ma=(0,F.Z)(fa,Ki,Zi,!1,null,"39899ccf",null),ya=ma.exports,va=function(){var e=this,t=e._self._c;return t("section",[t("LinkableHeading",{attrs:{anchor:e.anchor}},[e._v(e._s(e.title))]),t("ParametersTable",{attrs:{parameters:[e.bodyParam],changes:e.bodyChanges,keyBy:"key"},scopedSlots:e._u([{key:"symbol",fn:function({type:n,content:i,changes:a,name:s}){return[e.shouldShiftType({name:s,content:i})?e._e():t("PossiblyChangedType",{attrs:{type:n,changes:a.type}})]}},{key:"description",fn:function({name:n,content:i,mimeType:a,type:s,changes:r}){return[e.shouldShiftType({name:n,content:i})?t("PossiblyChangedType",{attrs:{type:s,changes:r.type}}):e._e(),i?t("ContentNode",{attrs:{content:i}}):e._e(),a?t("PossiblyChangedMimetype",{attrs:{mimetype:a,changes:r.mimetype,change:r.change}}):e._e()]}}])}),e.parts.length?[t("h3",[e._v(e._s(e.$t("sections.parts")))]),t("ParametersTable",{staticClass:"parts",attrs:{parameters:e.parts,changes:e.partsChanges},scopedSlots:e._u([{key:"symbol",fn:function({name:n,type:i,content:a,changes:s}){return[t("div",{staticClass:"part-name"},[t("WordBreak",{attrs:{tag:"code"}},[e._v(e._s(n))])],1),a?t("PossiblyChangedType",{attrs:{type:i,changes:s.type}}):e._e()]}},{key:"description",fn:function({content:n,mimeType:i,required:a,type:s,attributes:r,changes:o,readOnly:l}){return[t("div",[n?e._e():t("PossiblyChangedType",{attrs:{type:s,changes:o.type}}),t("PossiblyChangedTextAttribute",{attrs:{changes:o.required,value:a}},[e._v("(Required) ")]),t("PossiblyChangedTextAttribute",{attrs:{changes:o.readOnly,value:l}},[e._v("(Read only) ")]),n?t("ContentNode",{attrs:{content:n}}):e._e(),i?t("PossiblyChangedMimetype",{attrs:{mimetype:i,changes:o.mimetype,change:o.change}}):e._e(),t("ParameterAttributes",{attrs:{attributes:r,changes:o.attributes}})],1)]}}],null,!1,1779956822)})]:e._e()],2)},ba=[],Ta=function(){var e=this,t=e._self._c;return t("RenderChanged",{attrs:{changes:e.changeValues,value:e.mimetype},scopedSlots:e._u([{key:"default",fn:function({value:n}){return[t("div",{staticClass:"response-mimetype"},[e._v(" "+e._s(e.$t("content-type",{value:n}))+" ")])]}}])})},_a=[],Sa={name:"PossiblyChangedMimetype",components:{RenderChanged:Qn},props:{mimetype:{type:String,required:!0},changes:{type:[Object,String],required:!1},change:{type:String,required:!1}},computed:{changeValues({change:e,changes:t}){return e===qt.yf.modified&&"string"!==typeof t?t:void 0}}},ka=Sa,Ca=(0,F.Z)(ka,Ta,_a,!1,null,"18890a0f",null),wa=Ca.exports;const xa="restRequestBody";var Ia={name:"RestBody",mixins:[ji],components:{PossiblyChangedMimetype:wa,PossiblyChangedTextAttribute:ta,PossiblyChangedType:pa,WordBreak:Ae.Z,ParameterAttributes:ai,ContentNode:Qe.Z,ParametersTable:Qi,LinkableHeading:dn.Z},constants:{ChangesKey:xa},props:{bodyContentType:{type:Array,required:!0},content:{type:Array},mimeType:{type:String,required:!0},parts:{type:Array,default:()=>[]},title:{type:String,required:!0}},computed:{anchor:({title:e})=>(0,Tn.HA)(e),bodyParam:({bodyContentType:e,content:t,mimeType:n})=>({key:xa,content:t,mimeType:n,type:e}),bodyChanges:({apiChanges:e})=>e||{},partsChanges:({bodyChanges:e})=>(e[xa]||{}).parts},methods:{shouldShiftType:({content:e=[],name:t})=>!e.length&&t}},$a=Ia,Da=(0,F.Z)($a,va,ba,!1,null,"68facc94",null),La=Da.exports,Pa=function(){var e=this,t=e._self._c;return t("section",[t("LinkableHeading",{attrs:{anchor:e.anchor}},[e._v(e._s(e.title))]),t("ParametersTable",{attrs:{parameters:e.parameters,changes:e.parameterChanges},scopedSlots:e._u([{key:"symbol",fn:function({name:n,type:i,content:a,changes:s,deprecated:r}){return[t("div",{staticClass:"param-name",class:{deprecated:r}},[t("WordBreak",{attrs:{tag:"code"}},[e._v(e._s(n))])],1),e.shouldShiftType({content:a,name:n})?e._e():t("PossiblyChangedType",{attrs:{type:i,changes:s.type}})]}},{key:"description",fn:function({name:n,type:i,content:a,required:s,attributes:r,changes:o,deprecated:l,readOnly:c}){return[t("div",[e.shouldShiftType({content:a,name:n})?t("PossiblyChangedType",{attrs:{type:i,changes:o.type}}):e._e(),l?[t("Badge",{staticClass:"param-deprecated",attrs:{variant:"deprecated"}}),e._v("  ")]:e._e(),t("PossiblyChangedTextAttribute",{attrs:{changes:o.required,value:s}},[e._v(" "+e._s(e.$t("formats.parenthesis",{content:e.$t("required")}))+" ")]),t("PossiblyChangedTextAttribute",{attrs:{changes:o.readOnly,value:c}},[e._v(" "+e._s(e.$t("formats.parenthesis",{content:e.$t("read-only")}))+" ")]),a?t("ContentNode",{attrs:{content:a}}):e._e(),t("ParameterAttributes",{attrs:{attributes:r,changes:o}})],2)]}}])})],1)},Oa=[],Aa={name:"RestParameters",mixins:[ji],components:{Badge:qi.Z,PossiblyChangedType:pa,PossiblyChangedTextAttribute:ta,ParameterAttributes:ai,WordBreak:Ae.Z,ContentNode:Qe.Z,ParametersTable:Qi,LinkableHeading:dn.Z},props:{title:{type:String,required:!0},parameters:{type:Array,required:!0}},computed:{anchor:({title:e})=>(0,Tn.HA)(e),parameterChanges:({apiChanges:e})=>(e||{}).restParameters},methods:{shouldShiftType:({content:e=[],name:t})=>!e.length&&t}},Na=Aa,Ra=(0,F.Z)(Na,Pa,Oa,!1,null,"0d9b752e",null),Ba=Ra.exports,Ea=function(){var e=this,t=e._self._c;return t("section",[t("LinkableHeading",{attrs:{anchor:e.anchor}},[e._v(e._s(e.title))]),t("ParametersTable",{attrs:{parameters:e.sanitizedResponses,changes:e.propertyChanges,"key-by":"status"},scopedSlots:e._u([{key:"symbol",fn:function({status:n,type:i,reason:a,content:s,changes:r}){return[t("div",{staticClass:"response-name"},[t("code",[e._v(" "+e._s(n)+" "),t("span",{staticClass:"reason"},[e._v(e._s(a))])])]),e.shouldShiftType({content:s,reason:a,status:n})?e._e():t("PossiblyChangedType",{attrs:{type:i,changes:r.type}})]}},{key:"description",fn:function({content:n,mimeType:i,reason:a,type:s,status:r,changes:o}){return[e.shouldShiftType({content:n,reason:a,status:r})?t("PossiblyChangedType",{attrs:{type:s,changes:o.type}}):e._e(),t("div",{staticClass:"response-reason"},[t("code",[e._v(e._s(a))])]),n?t("ContentNode",{attrs:{content:n}}):e._e(),i?t("PossiblyChangedMimetype",{attrs:{mimetype:i,changes:o.mimetype,change:o.change}}):e._e()]}}])})],1)},Ma=[],za={name:"RestResponses",mixins:[ji],components:{PossiblyChangedMimetype:wa,PossiblyChangedType:pa,ContentNode:Qe.Z,ParametersTable:Qi,LinkableHeading:dn.Z},props:{title:{type:String,required:!0},responses:{type:Array,required:!0}},computed:{anchor:({title:e})=>(0,Tn.HA)(e),propertyChanges:({apiChanges:e})=>(e||{}).restResponses,sanitizedResponses:({responses:e,sanitizeResponse:t})=>e.map(t)},methods:{sanitizeResponse:({mimetype:e,...t})=>e?{...t,mimeType:e}:t,shouldShiftType:({content:e=[],reason:t,status:n})=>!(e.length||t)&&n}},Ka=za,Za=(0,F.Z)(Ka,Ea,Ma,!1,null,"362f5b54",null),ja=Za.exports,qa=function(){var e=this,t=e._self._c;return e.topics.length?t("section",{staticClass:"mentions"},[t("LinkableHeading",{attrs:{anchor:"mentions"}},[e._v(" "+e._s(e.$t("mentioned-in"))+" ")]),e._l(e.topics,(function(e){return t("Mention",{key:e.identifier,attrs:{url:e.url,title:e.title,role:e.role,kind:e.kind}})}))],2):e._e()},Fa=[],Ha=function(){var e=this,t=e._self._c;return t("div",{staticClass:"link-block"},[t("Reference",{staticClass:"link",attrs:{url:e.url,role:e.role,kind:e.kind}},[t("TopicLinkBlockIcon",{staticClass:"mention-icon",attrs:{role:e.role}}),e._v(" "+e._s(e.title)+" ")],1)],1)},Va=[],Wa=n(4260),Ua=n(2970),Qa={components:{Reference:Wa.Z,TopicLinkBlockIcon:Ua.Z},mixins:[un.Z],props:{url:{type:String,required:!0},title:{type:String,required:!0},role:{type:String,required:!1,default:"article"},kind:{type:String,required:!1,default:"article"}}},Ga=Qa,Xa=(0,F.Z)(Ga,Ha,Va,!1,null,"241f4141",null),Ya=Xa.exports,Ja={name:"MentionedIn",components:{LinkableHeading:dn.Z,Mention:Ya},mixins:[un.Z],props:{mentions:{type:Array,required:!0}},computed:{topics(){return this.mentions&&this.mentions.length?this.mentions.slice(0,5).flatMap((e=>this.references[e])):[]}}},es=Ja,ts=(0,F.Z)(es,qa,Fa,!1,null,null,null),ns=ts.exports,is={name:"PrimaryContent",components:{Attributes:li,ContentNode:Qe.Z,Parameters:zi,PropertyListKeyDetails:Ai,PropertyTable:ya,RestBody:La,RestEndpoint:_i,RestParameters:Ba,RestResponses:ja,PossibleValues:fi,Mentions:ns},constants:{SectionKind:Fe},props:{sections:{type:Array,required:!0,validator:e=>e.every((({kind:e})=>Object.prototype.hasOwnProperty.call(Fe,e)))}},computed:{span(){return{large:9,medium:9,small:12}}},methods:{componentFor(e){return{[Fe.attributes]:li,[Fe.content]:Qe.Z,[Fe.details]:Ai,[Fe.parameters]:zi,[Fe.properties]:ya,[Fe.restBody]:La,[Fe.restParameters]:Ba,[Fe.restHeaders]:Ba,[Fe.restCookies]:Ba,[Fe.restEndpoint]:_i,[Fe.restResponses]:ja,[Fe.possibleValues]:fi,[Fe.mentions]:ns}[e.kind]},propsFor(e){const{attributes:t,bodyContentType:n,content:i,details:a,items:s,kind:r,mimeType:o,parameters:l,title:c,tokens:d,values:u,mentions:h}=e;return{[Fe.attributes]:{attributes:t},[Fe.content]:{content:i},[Fe.details]:{details:a},[Fe.parameters]:{parameters:l},[Fe.possibleValues]:{values:u},[Fe.properties]:{properties:s,title:c},[Fe.restBody]:{bodyContentType:n,content:i,mimeType:o,parts:l,title:c},[Fe.restCookies]:{parameters:s,title:c},[Fe.restEndpoint]:{tokens:d,title:c},[Fe.restHeaders]:{parameters:s,title:c},[Fe.restParameters]:{parameters:s,title:c},[Fe.restResponses]:{responses:s,title:c},[Fe.mentions]:{mentions:h}}[r]}}},as=is,ss=(0,F.Z)(as,Rn,Bn,!1,null,"65c116be",null),rs=ss.exports,os=function(){var e=this,t=e._self._c;return t("ContentTable",{attrs:{anchor:e.contentSectionData.anchor,title:e.$t(e.contentSectionData.title),enableMinimized:e.enableMinimized}},e._l(e.sectionsWithSymbols,(function(e){return t("Section",{key:e.type,attrs:{title:e.title,anchor:e.anchor}},[t("List",{attrs:{symbols:e.symbols,type:e.type}})],1)})),1)},ls=[],cs=function(){var e=this,t=e._self._c;return t("ul",{ref:"apiChangesDiff",staticClass:"relationships-list",class:e.classes},e._l(e.symbols,(function(n){return t("li",{key:n.identifier,staticClass:"relationships-item"},[n.url?t("Reference",{staticClass:"link",attrs:{role:n.role,kind:n.kind,url:n.url}},[e._v(e._s(n.title))]):t("WordBreak",{attrs:{tag:"code"}},[e._v(e._s(n.title))]),n.conformance?t("ConditionalConstraints",{attrs:{constraints:n.conformance.constraints,prefix:n.conformance.conformancePrefix}}):e._e()],1)})),0)},ds=[];const us=3,hs={conformsTo:"conformance",inheritsFrom:"inheritance",inheritedBy:"inheritedBy"};var ps={name:"RelationshipsList",components:{ConditionalConstraints:Je,Reference:Wa.Z,WordBreak:Ae.Z},inject:["store","identifier"],mixins:[Tt.JY,Tt.PH],props:{symbols:{type:Array,required:!0},type:{type:String,required:!0}},data(){return{state:this.store.state}},computed:{classes({changeType:e,multipleLinesClass:t,displaysMultipleLinesAfterAPIChanges:n}){return[{inline:this.shouldDisplayInline,column:!this.shouldDisplayInline,[`changed changed-${e}`]:!!e,[t]:n}]},hasAvailabilityConstraints(){return this.symbols.some((e=>!!(e.conformance||{}).constraints))},changes({identifier:e,state:{apiChanges:t}}){return(t||{})[e]||{}},changeType({changes:e,type:t}){const n=hs[t];if(e.change!==qt.yf.modified)return e.change;const i=e[n];if(!i)return;const a=(e,t)=>e.map(((e,n)=>[e,t[n]])),s=a(i.previous,i.new).some((([e,t])=>e.content?0===e.content.length&&t.content.length>0:!!t.content));return s?qt.yf.added:qt.yf.modified},shouldDisplayInline(){const{hasAvailabilityConstraints:e,symbols:t}=this;return t.length<=us&&!e}}},gs=ps,fs=(0,F.Z)(gs,cs,ds,!1,null,"ba5cad92",null),ms=fs.exports,ys={name:"Relationships",mixins:[un.Z],components:{ContentTable:yn,List:ms,Section:wn},props:{sections:{type:Array,required:!0},enableMinimized:{type:Boolean,default:!1}},computed:{contentSectionData:()=>sn.relationships,sectionsWithSymbols(){return this.sections.map((e=>({...e,symbols:e.identifiers.reduce(((e,t)=>this.references[t]?e.concat(this.references[t]):e),[])})))}}},vs=ys,bs=(0,F.Z)(vs,os,ls,!1,null,null,null),Ts=bs.exports,_s=n(7120),Ss=function(){var e=this,t=e._self._c;return t("Section",{staticClass:"availability",attrs:{role:"complementary","aria-label":e.$t("sections.availability")}},[e._l(e.technologies,(function(n){return t("span",{key:n,staticClass:"technology"},[t("TechnologyIcon",{staticClass:"tech-icon"}),t("span",[e._v(e._s(n))])],1)})),e._l(e.platforms,(function(n){return t("span",{key:n.name,staticClass:"platform",class:e.changesClassesFor(n.name)},[t("AvailabilityRange",{attrs:{deprecatedAt:n.deprecatedAt,introducedAt:n.introducedAt,platformName:n.name}}),n.deprecatedAt?t("Badge",{attrs:{variant:"deprecated"}}):n.beta?t("Badge",{attrs:{variant:"beta"}}):e._e()],1)}))],2)},ks=[],Cs=n(9001),ws=function(){var e=this,t=e._self._c;return t("span",{attrs:{role:"text","aria-label":e.ariaLabel,title:e.description}},[e._v(e._s(e.text))])},xs=[],Is={name:"AvailabilityRange",props:{deprecatedAt:{type:String,required:!1},introducedAt:{type:String,required:!1},platformName:{type:String,required:!0}},computed:{ariaLabel(){const{deprecatedAt:e,description:t,text:n}=this;return[n].concat(e?this.$t("change-type.deprecated"):[]).concat(t).join(", ")},description(){const{deprecatedAt:e,introducedAt:t,platformName:n}=this;return t&&e?this.$t("availability.introduced-and-deprecated",{name:n,introducedAt:t,deprecatedAt:e}):t?this.$t("availability.available-on-platform-version",{name:n,introducedAt:t}):this.$t("availability.available-on-platform",{name:n})},text(){const{deprecatedAt:e,introducedAt:t,platformName:n}=this;return t&&e?`${n} ${t}–${e}`:t?`${n} ${t}+`:n}}},$s=Is,Ds=(0,F.Z)($s,ws,xs,!1,null,null,null),Ls=Ds.exports,Ps={name:"Availability",mixins:[Tt.JY],inject:["identifier","store"],components:{Badge:qi.Z,AvailabilityRange:Ls,Section:re,TechnologyIcon:Cs.Z},props:{platforms:{type:Array,required:!0},technologies:{type:Array,required:!1}},data(){return{state:this.store.state}},methods:{changeFor(e){const{identifier:t,state:{apiChanges:n}}=this,{availability:i={}}=(n||{})[t]||{},a=i[e];if(a)return a.deprecated?qt.yf.deprecated:a.introduced&&!a.introduced.previous?qt.yf.added:qt.yf.modified}}},Os=Ps,As=(0,F.Z)(Os,Ss,ks,!1,null,"3da26baa",null),Ns=As.exports,Rs=function(){var e=this,t=e._self._c;return t("TopicsTable",{attrs:{anchor:e.contentSectionData.anchor,title:e.$t(e.contentSectionData.title),isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta,sections:e.sections}})},Bs=[],Es={name:"SeeAlso",components:{TopicsTable:Ln},props:{isSymbolDeprecated:Boolean,isSymbolBeta:Boolean,sections:Ln.props.sections},computed:{contentSectionData:()=>sn.seeAlso}},Ms=Es,zs=(0,F.Z)(Ms,Rs,Bs,!1,null,null,null),Ks=zs.exports,Zs=function(){var e=this,t=e._self._c;return t("div",{staticClass:"topictitle"},[e.eyebrow?t("span",{staticClass:"eyebrow"},[e._v(e._s(e.eyebrow))]):e._e(),t("h1",{staticClass:"title"},[e._t("default"),e._t("after")],2)])},js=[],qs={name:"Title",props:{eyebrow:{type:String,required:!1}}},Fs=qs,Hs=(0,F.Z)(Fs,Zs,js,!1,null,"6630a012",null),Vs=Hs.exports,Ws=function(){var e=this,t=e._self._c;return t("TopicsTable",{attrs:{anchor:e.contentSectionData.anchor,title:e.$t(e.contentSectionData.title),isSymbolDeprecated:e.isSymbolDeprecated,isSymbolBeta:e.isSymbolBeta,sections:e.sections,topicStyle:e.topicStyle}})},Us=[],Qs={name:"Topics",components:{TopicsTable:Ln},computed:{contentSectionData:()=>sn.topics},props:{isSymbolDeprecated:Boolean,isSymbolBeta:Boolean,sections:Ln.props.sections,topicStyle:{type:String,required:!0,validator:e=>Object.hasOwnProperty.call(Ne.o,e)}}},Gs=Qs,Xs=(0,F.Z)(Gs,Ws,Us,!1,null,null,null),Ys=Xs.exports,Js=function(){var e=this,t=e._self._c;return t("div",{staticClass:"OnThisPageStickyContainer"},[e._t("default")],2)},er=[],tr={name:"OnThisPageStickyContainer"},nr=tr,ir=(0,F.Z)(nr,Js,er,!1,null,"39ac6ed0",null),ar=ir.exports,sr=function(){var e=this,t=e._self._c;return t("NavMenuItems",{staticClass:"hierarchy",class:{"has-badge":e.hasBadge},attrs:{"aria-label":e.$t("documentation.nav.breadcrumbs")}},[e.root?t("HierarchyItem",{key:e.root.title,staticClass:"root-hierarchy",attrs:{url:e.addQueryParamsToUrl(e.root.url)}},[e._v(" "+e._s(e.root.title)+" ")]):e._e(),e._l(e.collapsibleItems,(function(n){return t("HierarchyItem",{key:n.title,attrs:{isCollapsed:"",url:e.addQueryParamsToUrl(n.url)}},[e._v(" "+e._s(n.title)+" ")])})),e.collapsibleItems.length?t("HierarchyCollapsedItems",{attrs:{topics:e.collapsibleItems}}):e._e(),e._l(e.nonCollapsibleItems,(function(n){return t("HierarchyItem",{key:n.title,attrs:{url:e.addQueryParamsToUrl(n.url)}},[e._v(" "+e._s(n.title)+" ")])})),e.smallViewport?e._e():t("HierarchyItem",{scopedSlots:e._u([{key:"tags",fn:function(){return[e.isSymbolDeprecated?t("Badge",{attrs:{variant:"deprecated"}}):e.isSymbolBeta?t("Badge",{attrs:{variant:"beta"}}):e._e(),e._l(e.currentTopicTags,(function(n){return t("Badge",{key:`${n.type}-${n.text}`,attrs:{variant:n.type}},[e._v(" "+e._s(n.text)+" ")])}))]},proxy:!0}],null,!1,1132636639)},[e._v(" "+e._s(e.currentTopicTitle)+" ")])],2)},rr=[],or=n(2853),lr=n(5381),cr=function(){var e=this,t=e._self._c;return t("li",{staticClass:"hierarchy-collapsed-items"},[t("button",{ref:"btn",staticClass:"toggle",class:{focused:!e.collapsed},on:{click:e.toggleCollapsed}},[t("span",{staticClass:"indicator"},[t("EllipsisIcon",{staticClass:"icon-inline toggle-icon"})],1)]),t("ul",{ref:"dropdown",staticClass:"dropdown",class:{collapsed:e.collapsed}},e._l(e.formattedTopics,(function(n){return t("li",{key:n.title,staticClass:"dropdown-item"},[t("NavMenuLink",{attrs:{url:n.url}},[e._v(" "+e._s(n.title)+" ")])],1)})),0)])},dr=[],ur=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"ellipsis-icon",attrs:{viewBox:"0 0 14 14",themeId:"ellipsis"}},[t("path",{attrs:{d:"m12.439 7.777v-1.554h-1.554v1.554zm-4.662 0v-1.554h-1.554v1.554zm-4.662 0v-1.554h-1.554v1.554z"}})])},hr=[],pr=n(9742),gr={name:"EllipsisIcon",components:{SVGIcon:pr.Z}},fr=gr,mr=(0,F.Z)(fr,ur,hr,!1,null,null,null),yr=mr.exports,vr=function(){var e=this,t=e._self._c;return e.isCurrent?t("span",{staticClass:"nav-menu-link current",attrs:{"aria-current":"page","aria-disabled":"true",role:"link"}},[e._t("default")],2):t("Reference",{staticClass:"nav-menu-link",attrs:{url:e.url,tabindex:"0"}},[e._t("default")],2)},br=[],Tr={name:"NavMenuLink",components:{Reference:Wa.Z},computed:{isCurrent:({$route:e,url:t})=>"string"===typeof t?t===(0,O.Q2)(e.path,e.query).replace(/\/$/,""):t.name===e.name},props:{url:{type:[Object,String],required:!0}}},_r=Tr,Sr=(0,F.Z)(_r,vr,br,!1,null,"2ad31daf",null),kr=Sr.exports,Cr={name:"HierarchyCollapsedItems",components:{EllipsisIcon:yr,NavMenuLink:kr},data:()=>({collapsed:!0}),props:{topics:{type:Array,required:!0}},watch:{collapsed(e,t){t&&!e?document.addEventListener("click",this.handleDocumentClick,!1):!t&&e&&document.removeEventListener("click",this.handleDocumentClick,!1)}},beforeDestroy(){document.removeEventListener("click",this.handleDocumentClick,!1)},computed:{formattedTopics:({$route:e,topics:t})=>t.map((t=>({...t,url:(0,O.Q2)(t.url,e.query)})))},methods:{handleDocumentClick(e){const{target:t}=e,{collapsed:n,$refs:{btn:i,dropdown:a}}=this,s=!i.contains(t)&&!a.contains(t);!n&&s&&(this.collapsed=!0)},toggleCollapsed(){this.collapsed=!this.collapsed}}},wr=Cr,xr=(0,F.Z)(wr,cr,dr,!1,null,"7b701104",null),Ir=xr.exports,$r=function(e,t){return e(t.$options.components.NavMenuItemBase,{tag:"component",staticClass:"hierarchy-item",class:[{collapsed:t.props.isCollapsed},t.data.staticClass]},[t.props.url?e("router-link",{staticClass:"parent item nav-menu-link",attrs:{to:t.props.url}},[t._t("default")],2):[e("span",{staticClass:"current item"},[t._t("default")],2),t._t("tags")]],2)},Dr=[],Lr=n(535),Pr=n(8785),Or={name:"HierarchyItem",components:{NavMenuItemBase:Lr.Z,InlineChevronRightIcon:Pr.Z},props:{isCollapsed:Boolean,url:{type:String,required:!1}}},Ar=Or,Nr=(0,F.Z)(Ar,$r,Dr,!0,null,"13293168",null),Rr=Nr.exports;const Br=3,Er=1;var Mr={name:"Hierarchy",components:{Badge:qi.Z,NavMenuItems:or.Z,HierarchyCollapsedItems:Ir,HierarchyItem:Rr},constants:{MaxVisibleLinks:Br},inject:["store"],mixins:[un.Z],props:{isSymbolDeprecated:Boolean,isSymbolBeta:Boolean,currentTopicTitle:{type:String,required:!0},parentTopics:{type:Array,default:()=>[]},currentTopicTags:{type:Array,default:()=>[]}},computed:{windowWidth:({store:e})=>e.state.contentWidth,root:({parentTopics:e})=>e[0],smallViewport:({windowWidth:e})=>e{const i=n?1:0;return e>1200?Br-i:e>1e3?Br-1-i:t?0:Br-2-i},collapsibleItems:({smallViewport:e,parentTopics:t,linksAfterCollapse:n,currentTopicTitle:i,$route:a})=>{const s=n?t.slice(Er,-n):t.slice(Er);return e&&s.push({title:i,url:a.path}),s},nonCollapsibleItems:({parentTopics:e,linksAfterCollapse:t})=>t?e.slice(Er).slice(-t):[],hasBadge:({isSymbolDeprecated:e,isSymbolBeta:t,currentTopicTags:n})=>e||t||n.length},methods:{addQueryParamsToUrl(e){return(0,O.Q2)(e,this.$route.query)}}},zr=Mr,Kr=(0,F.Z)(zr,sr,rr,!1,null,"d54f3438",null),Zr=Kr.exports;const jr=1050;var qr={name:"DocumentationTopic",mixins:[P.Z],constants:{ON_THIS_PAGE_CONTAINER_BREAKPOINT:jr},inject:{isTargetIDE:{default(){return!1}},store:{default(){return{reset(){},state:{},setReferences(){},updateReferences(){}}}}},components:{Declaration:Wt,OnThisPageStickyContainer:ar,OnThisPageNav:qe,DocumentationHero:Oe,Abstract:en,Aside:E.Z,BetaLegalText:V,ContentNode:Qe.Z,DefaultImplementations:Nn,DownloadButton:tn.Z,LanguageSwitcher:me,PrimaryContent:rs,Relationships:Ts,RequirementMetadata:_s.Z,Availability:Ns,SeeAlso:Ks,Title:Vs,Topics:Ys,ViewMore:Se,WordBreak:Ae.Z,Hierarchy:Zr,InlinePlusCircleIcon:Ut.Z},props:{abstract:{type:Array,required:!1},conformance:{type:Object,required:!1},defaultImplementationsSections:{type:Array,required:!1},downloadNotAvailableSummary:{type:Array,required:!1},deprecationSummary:{type:Array,required:!1},diffAvailability:{type:Object,required:!1},modules:{type:Array,required:!1},hasNoExpandedDocumentation:{type:Boolean,required:!1},hierarchy:{type:Object,default:()=>({})},interfaceLanguage:{type:String,required:!0},identifier:{type:String,required:!0},isRequirement:{type:Boolean,default:()=>!1},platforms:{type:Array,required:!1},primaryContentSections:{type:Array,required:!1},references:{type:Object,required:!0},relationshipsSections:{type:Array,required:!1},roleHeading:{type:String,required:!1},title:{type:String,required:!0},topicSections:{type:Array,required:!1},topicSectionsStyle:{type:String,default:Ne.o.list},sampleCodeDownload:{type:Object,required:!1},seeAlsoSections:{type:Array,required:!1},languagePaths:{type:Object,default:()=>({})},tags:{type:Array,required:!0},objcPath:{type:String,required:!1},swiftPath:{type:String,required:!1},isSymbolDeprecated:{type:Boolean,required:!1},isSymbolBeta:{type:Boolean,required:!1},symbolKind:{type:String,default:""},role:{type:String,default:""},remoteSource:{type:Object,required:!1},pageImages:{type:Array,required:!1},enableMinimized:{type:Boolean,default:!1},enableOnThisPageNav:{type:Boolean,default:!1},disableHeroBackground:{type:Boolean,default:!1},standardColorIdentifier:{type:String,required:!1,validator:e=>Object.prototype.hasOwnProperty.call($e,e)},availableLocales:{type:Array,required:!1},hierarchyItems:{type:Array,default:()=>[]}},provide(){return{identifier:this.identifier,languages:new Set(Object.keys(this.languagePaths)),interfaceLanguage:this.interfaceLanguage,symbolKind:this.symbolKind,enableMinimized:this.enableMinimized}},data(){return{indexState:B["default"].state,topicState:this.store.state,declListExpanded:!1}},computed:{normalizedSwiftPath:({swiftPath:e})=>(0,A.Jf)(e),normalizedObjcPath:({objcPath:e,swiftPath:t})=>(0,A.Jf)(e&&t?(0,O.Q2)(e,{language:D.Z.objectiveC.key.url}):e),defaultImplementationsCount(){return(this.defaultImplementationsSections||[]).reduce(((e,t)=>e+t.identifiers.length),0)},shouldShowAvailability:({platforms:e,technologies:t,enableMinimized:n})=>((e||[]).length||(t||[]).length)&&!n,hasBetaContent:({platforms:e})=>e&&e.length&&e.some((e=>e.beta)),pageTitle:({title:e})=>e,pageDescription:({abstract:e,extractFirstParagraphText:t})=>e?t(e):null,parentTopics:({hierarchyItems:e,references:t,hasOtherDeclarations:n,pageTitle:i})=>{const a=e.reduce(((e,n)=>{const i=t[n];if(i){const{title:t,url:n}=i;return e.concat({title:t,url:n})}return console.error(`Reference for "${n}" is missing`),e}),[]),s=(0,N.Z$)(a);return n&&s?.title===i&&a.pop(),a},shouldShowLanguageSwitcher:({objcPath:e,swiftPath:t,isTargetIDE:n,enableMinimized:i})=>!!(e&&t&&n)&&!i,enhanceBackground:({symbolKind:e,disableHeroBackground:t,enableMinimized:n})=>!t&&!n&&(!e||e===L.module),shortHero:({roleHeading:e,abstract:t,sampleCodeDownload:n,hasAvailability:i,shouldShowLanguageSwitcher:a,declarations:s})=>!!e+!!t+!!n+!!s.length+!!i+a<=1,technologies({modules:e=[]}){const t=e.reduce(((e,t)=>(e.push(t.name),e.concat(t.relatedModules||[]))),[]);return t.length>1?t:[]},titleBreakComponent:({enhanceBackground:e})=>e?"span":Ae.Z,hasPrimaryContent:({isRequirement:e,deprecationSummary:t,downloadNotAvailableSummary:n,primaryContentSectionsSanitized:i,shouldShowViewMoreLink:a})=>e||t&&t.length||n&&n.length||i.length||a,viewMoreLink:({interfaceLanguage:e,normalizedObjcPath:t,normalizedSwiftPath:n})=>e===D.Z.objectiveC.key.api?t:n,shouldShowViewMoreLink:({enableMinimized:e,hasNoExpandedDocumentation:t,viewMoreLink:n})=>e&&!t&&n,tagName(){return this.isSymbolDeprecated?this.$t("aside-kind.deprecated"):this.$t("aside-kind.beta")},pageIcon:({pageImages:e=[]})=>{const t=e.find((({type:e})=>"icon"===e));return t?t.identifier:null},shouldRenderTopicSection:({topicSectionsStyle:e,topicSections:t,enableMinimized:n})=>t&&e!==Ne.o.hidden&&!n,isOnThisPageNavVisible:({topicState:e})=>e.contentWidth>jr,disableMetadata:({enableMinimized:e})=>e,primaryContentSectionsSanitized({primaryContentSections:e=[],symbolKind:t}){return e.filter((({kind:e})=>e===Fe.mentions?t!==L.module:e!==Fe.declarations))},declarations({primaryContentSections:e=[]}){return e.filter((({kind:e})=>e===Fe.declarations))},showOtherDeclarations({enableMinimized:e,hasOtherDeclarations:t}){return!e&&t},hasOtherDeclarations({declarations:e=[]}){return!!e.length&&e[0].declarations.some((e=>Object.prototype.hasOwnProperty.call(e,"otherDeclarations")))},declListToggleText({declListExpanded:e}){return e?this.$t("declarations.hide-other-declarations"):this.$t("declarations.show-all-declarations")}},methods:{extractProps(e){const{abstract:t,defaultImplementationsSections:n,deprecationSummary:i,downloadNotAvailableSummary:a,diffAvailability:s,hierarchy:r,identifier:{interfaceLanguage:o,url:l},metadata:{conformance:c,hasNoExpandedDocumentation:d,modules:u,availableLocales:h,platforms:p,required:g=!1,roleHeading:f,title:m="",tags:y=[],role:v,symbolKind:b="",remoteSource:T,images:_=[],color:{standardColorIdentifier:S}={}}={},primaryContentSections:k,relationshipsSections:C,references:w={},sampleCodeDownload:x,topicSectionsStyle:I,topicSections:$,seeAlsoSections:L,variantOverrides:P,variants:O=[]}=e,A=O.reduce(((e,t)=>t.traits.reduce(((e,n)=>n.interfaceLanguage?{...e,[n.interfaceLanguage]:(e[n.interfaceLanguage]||[]).concat(t.paths)}:e),e)),{}),{[D.Z.objectiveC.key.api]:[N]=[],[D.Z.swift.key.api]:[R]=[]}=A;return{abstract:t,conformance:c,defaultImplementationsSections:n,deprecationSummary:i,downloadNotAvailableSummary:a,diffAvailability:s,hasNoExpandedDocumentation:d,availableLocales:h,hierarchy:r,role:v,identifier:l,interfaceLanguage:o,isRequirement:g,modules:u,platforms:p,primaryContentSections:k,relationshipsSections:C,references:w,roleHeading:f,sampleCodeDownload:x,title:m,topicSections:$,topicSectionsStyle:I,seeAlsoSections:L,variantOverrides:P,symbolKind:b,tags:y.slice(0,1),remoteSource:T,pageImages:_,objcPath:N,swiftPath:R,standardColorIdentifier:S}},toggleDeclList(){this.declListExpanded=!this.declListExpanded}},created(){if(this.topicState.preferredLanguage===D.Z.objectiveC.key.url&&this.interfaceLanguage!==D.Z.objectiveC.key.api&&this.objcPath&&this.$route.query.language!==D.Z.objectiveC.key.url){const{query:e}=this.$route;this.$nextTick().then((()=>{this.$router.replace({path:(0,A.Jf)(this.objcPath),query:{...e,language:D.Z.objectiveC.key.url}})}))}R["default"].setAvailableLocales(this.availableLocales||[]),this.store.reset(),this.store.setReferences(this.references)},watch:{"indexState.includedArchiveIdentifiers":function(){this.store.updateReferences()},references(e){this.store.setReferences(e)},availableLocales(e){R["default"].setAvailableLocales(e)}}},Fr=qr,Hr=(0,F.Z)(Fr,I,$,!1,null,"7c6f2f58",null),Vr=Hr.exports,Wr=function(){var e=this,t=e._self._c;return t("div",{staticClass:"documentation-layout"},[e.isTargetIDE?e._e():t("Nav",{attrs:{diffAvailability:e.diffAvailability,interfaceLanguage:e.interfaceLanguage,objcPath:e.objcPath,swiftPath:e.swiftPath,displaySidenav:e.enableNavigator},on:{"toggle-sidenav":e.handleToggleSidenav},scopedSlots:e._u([{key:"title",fn:function({className:t}){return[e._t("nav-title",null,{className:t})]}}],null,!0)}),t("AdjustableSidebarWidth",e._g(e._b({staticClass:"full-width-container topic-wrapper",scopedSlots:e._u([{key:"aside",fn:function({scrollLockID:n,breakpoint:i}){return[t("div",{staticClass:"documentation-layout-aside"},[e.enableQuickNavigation?t("QuickNavigationModal",{attrs:{children:e.indexNodes,showQuickNavigationModal:e.showQuickNavigationModal,technology:e.technology?e.technology.title:""},on:{"update:showQuickNavigationModal":function(t){e.showQuickNavigationModal=t},"update:show-quick-navigation-modal":function(t){e.showQuickNavigationModal=t}}}):e._e(),t("transition",{attrs:{name:"delay-hiding"}},[e._t("navigator",(function(){return[t("Navigator",e._b({directives:[{name:"show",rawName:"v-show",value:e.sidenavVisibleOnMobile||i===e.BreakpointName.large,expression:"sidenavVisibleOnMobile || breakpoint === BreakpointName.large"}],key:"base-navigator",attrs:{"parent-topic-identifiers":e.parentTopicIdentifiers,references:e.references,scrollLockID:n,"render-filter-on-top":i!==e.BreakpointName.large},on:{close:function(t){return e.handleToggleSidenav(i)}},scopedSlots:e._u([e.enableQuickNavigation?{key:"filter",fn:function(){return[t("QuickNavigationButton",{nativeOn:{click:function(t){return e.openQuickNavigationModal.apply(null,arguments)}}})]},proxy:!0}:null,{key:"above-navigator-head",fn:function(){return[e._t("above-navigator-head")]},proxy:!0},{key:"navigator-head",fn:function({className:t}){return[e._t("nav-title",null,{className:t})]}}],null,!0)},"Navigator",{...e.navigatorProps,technologyProps:e.technologyProps},!1))]}),null,{scrollLockID:n,breakpoint:i,sidenavVisibleOnMobile:e.sidenavVisibleOnMobile,handleToggleSidenav:e.handleToggleSidenav,enableQuickNavigation:e.enableQuickNavigation,openQuickNavigationModal:e.openQuickNavigationModal})],2)],1)]}}],null,!0)},"AdjustableSidebarWidth",e.sidebarProps,!1),e.sidebarListeners),[t("PortalTarget",{attrs:{name:"modal-destination",multiple:""}}),e._t("content")],2)],1)},Ur=[],Qr=n(2433),Gr=function(){var e=this,t=e._self._c;return t("button",{staticClass:"quick-navigation-open",attrs:{"aria-label":e.$t("quicknav.button.label"),title:e.$t("quicknav.button.title")}},[e._v(" / ")])},Xr=[],Yr={name:"QuickNavigationButton"},Jr=Yr,eo=(0,F.Z)(Jr,Gr,Xr,!1,null,"96c35eb8",null),to=eo.exports,no=function(){var e=this,t=e._self._c;return t("GenericModal",{attrs:{isFullscreen:"",showClose:!1,visible:e.isVisible,backdropBackgroundColorOverride:"rgba(0, 0, 0, 0.7)"},on:{"update:visible":function(t){e.isVisible=t}}},[t("div",{staticClass:"quick-navigation"},[t("div",{staticClass:"quick-navigation__container",class:{focus:e.focusedInput}},[t("FilterInput",{staticClass:"quick-navigation__filter",attrs:{placeholder:e.placeholderText,focusInputWhenCreated:"",focusInputWhenEmpty:"",preventBorderStyle:"",selectInputOnFocus:""},on:{focus:function(t){e.focusedInput=!0},blur:function(t){e.focusedInput=!1}},nativeOn:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.handleDownKeyInput.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:e.handleKeyEnter.apply(null,arguments)}]},scopedSlots:e._u([{key:"icon",fn:function(){return[t("div",{staticClass:"quick-navigation__magnifier-icon-container",class:{blue:e.userInput.length}},[t("MagnifierIcon")],1)]},proxy:!0}]),model:{value:e.userInput,callback:function(t){e.userInput=t},expression:"userInput"}}),t("div",{staticClass:"quick-navigation__match-list",class:{active:e.processedUserInput.length}},[e.noResultsWereFound?t("div",{staticClass:"no-results"},[t("p",[e._v(" "+e._s(e.$t("navigator.no-results"))+" ")])]):[t("div",e._b({staticClass:"quick-navigation__refs",on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.focusNext.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.focusPrev.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:e.handleKeyEnter.apply(null,arguments)}]}},"div",{[e.SCROLL_LOCK_DISABLE_ATTR]:!0},!1),e._l(e.filteredSymbols,(function(n,i){return t("Reference",{key:n.uid,ref:"match",refInFor:!0,staticClass:"quick-navigation__reference",attrs:{url:n.path,tabindex:e.focusedIndex===i?"0":"-1","data-index":i},nativeOn:{click:function(t){return e.closeQuickNavigationModal.apply(null,arguments)}}},[t("div",{staticClass:"quick-navigation__symbol-match",attrs:{role:"list"}},[t("div",{staticClass:"symbol-info"},[t("div",{staticClass:"symbol-name"},[t("TopicTypeIcon",{staticClass:"navigator-icon",attrs:{type:n.type}}),t("div",{staticClass:"symbol-title"},[t("span",{domProps:{textContent:e._s(e.formatSymbolTitle(n.title,0,n.start))}}),t("QuickNavigationHighlighter",{attrs:{text:n.substring,matcherText:e.processedUserInput}}),t("span",{domProps:{textContent:e._s(e.formatSymbolTitle(n.title,n.start+n.matchLength))}})],1)],1),t("div",{staticClass:"symbol-path"},e._l(n.parents,(function(i,a){return t("div",{key:i.title},[t("span",{staticClass:"parent-path",domProps:{textContent:e._s(i.title)}}),a!==n.parents.length-1?t("span",{staticClass:"parent-path",domProps:{textContent:e._s("/")}}):e._e()])})),0)])])])})),1),e.previewState?t("Preview",e._b({staticClass:"quick-navigation__preview",attrs:{json:e.previewJSON,state:e.previewState}},"Preview",{[e.SCROLL_LOCK_DISABLE_ATTR]:!0},!1)):e._e()]],2)],1)])])},io=[],ao=function(){var e=this,t=e._self._c;return t("div",{staticClass:"filter",class:{focus:e.showSuggestedTags&&!e.preventBorderStyle},attrs:{role:"search",tabindex:"0","aria-labelledby":e.searchAriaLabelledBy},on:{"!blur":function(t){return e.handleBlur.apply(null,arguments)},"!focus":function(t){return e.handleFocus.apply(null,arguments)}}},[t("div",{class:["filter__wrapper",{"filter__wrapper--reversed":e.positionReversed,"filter__wrapper--no-border-style":e.preventBorderStyle}]},[t("div",{staticClass:"filter__top-wrapper"},[t("button",{staticClass:"filter__filter-button",class:{blue:e.inputIsNotEmpty},attrs:{"aria-hidden":"true",tabindex:"-1"},on:{click:e.focusInput,mousedown:function(e){e.preventDefault()}}},[e._t("icon",(function(){return[t("FilterIcon")]}))],2),t("div",{class:["filter__input-box-wrapper",{scrolling:e.isScrolling}],on:{scroll:e.handleScroll}},[e.hasSelectedTags?t("TagList",e._g(e._b({ref:"selectedTags",staticClass:"filter__selected-tags",attrs:{id:e.SelectedTagsId,input:e.input,tags:e.selectedTags,ariaLabel:e.$tc("filter.selected-tags",e.suggestedTags.length),activeTags:e.activeTags,translatableTags:e.translatableTags,areTagsRemovable:""},on:{"focus-prev":e.handleFocusPrevOnSelectedTags,"focus-next":e.focusInputFromTags,"reset-filters":e.resetFilters,"prevent-blur":function(t){return e.$emit("update:preventedBlur",!0)}}},"TagList",e.virtualKeyboardBind,!1),e.selectedTagsMultipleSelectionListeners)):e._e(),t("label",{staticClass:"filter__input-label",attrs:{id:"filter-label",for:e.FilterInputId,"data-value":e.modelValue,"aria-label":e.placeholder}},[t("input",e._g(e._b({directives:[{name:"model",rawName:"v-model",value:e.modelValue,expression:"modelValue"}],ref:"input",staticClass:"filter__input",attrs:{id:e.FilterInputId,placeholder:e.hasSelectedTags?"":e.placeholder,"aria-expanded":e.displaySuggestedTags?"true":"false",disabled:e.disabled,type:"text"},domProps:{value:e.modelValue},on:{focus:function(t){e.selectInputOnFocus&&e.selectInputAndTags()},keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),e.downHandler.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),e.upHandler.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])||"button"in t&&0!==t.button?null:e.leftKeyInputHandler.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])||"button"in t&&2!==t.button?null:e.rightKeyInputHandler.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"delete",[8,46],t.key,["Backspace","Delete","Del"])?null:e.deleteHandler.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"a",void 0,t.key,void 0)?null:t.metaKey?(t.preventDefault(),t.stopPropagation(),e.selectInputAndTags.apply(null,arguments)):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"a",void 0,t.key,void 0)?null:t.ctrlKey?(t.preventDefault(),e.selectInputAndTags.apply(null,arguments)):null},function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:e.inputKeydownHandler.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:e.enterHandler.apply(null,arguments)},function(t){return t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:e.inputKeydownHandler.apply(null,arguments):null},function(t){return t.shiftKey&&t.metaKey?t.ctrlKey||t.altKey?null:e.inputKeydownHandler.apply(null,arguments):null},function(t){return t.metaKey?t.ctrlKey||t.shiftKey||t.altKey?null:e.assignEventValues.apply(null,arguments):null},function(t){return t.ctrlKey?t.shiftKey||t.altKey||t.metaKey?null:e.assignEventValues.apply(null,arguments):null}],input:function(t){t.target.composing||(e.modelValue=t.target.value)}}},"input",e.AXinputProperties,!1),e.inputMultipleSelectionListeners))])],1),t("div",{staticClass:"filter__delete-button-wrapper"},[e.input.length||e.displaySuggestedTags||e.hasSelectedTags?t("button",{staticClass:"filter__delete-button",attrs:{"aria-label":e.$t("filter.reset-filter")},on:{click:function(t){return e.resetFilters(!0)},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.stopPropagation(),e.resetFilters(!0))},mousedown:function(e){e.preventDefault()}}},[t("ClearRoundedIcon")],1):e._e()])]),e.displaySuggestedTags?t("TagList",e._b({ref:"suggestedTags",staticClass:"filter__suggested-tags",attrs:{id:e.SuggestedTagsId,ariaLabel:e.$tc("filter.suggested-tags",e.suggestedTags.length),input:e.input,tags:e.suggestedTags,translatableTags:e.translatableTags},on:{"click-tags":function(t){return e.selectTag(t.tagName)},"prevent-blur":function(t){return e.$emit("update:preventedBlur",!0)},"focus-next":function(t){e.positionReversed?e.focusInput():e.$emit("focus-next")},"focus-prev":function(t){e.positionReversed?e.$emit("focus-prev"):e.focusInput()}}},"TagList",e.virtualKeyboardBind,!1)):e._e()],1)])},so=[],ro=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"clear-rounded-icon",attrs:{viewBox:"0 0 16 16",themeId:"clear-rounded"}},[t("title",[e._v(e._s(e.$t("icons.clear")))]),t("path",{attrs:{d:"M14.55,0l1.45,1.45-6.56,6.55,6.54,6.54-1.45,1.45-6.53-6.53L1.47,15.99,.01,14.53l6.52-6.53L0,1.47,1.45,.02l6.55,6.54L14.55,0Z","fill-rule":"evenodd"}})])},oo=[],lo={name:"ClearRoundedIcon",components:{SVGIcon:pr.Z}},co=lo,uo=(0,F.Z)(co,ro,oo,!1,null,null,null),ho=uo.exports;function po(){if(window.getSelection)try{const{activeElement:e}=document;return e&&e.value?e.value.substring(e.selectionStart,e.selectionEnd):window.getSelection().toString()}catch(e){return""}else if(document.selection&&"Control"!==document.selection.type)return document.selection.createRange().text;return""}function go(e){if("number"===typeof e.selectionStart)e.selectionStart=e.selectionEnd=e.value.length;else if("undefined"!==typeof e.createTextRange){e.focus();const t=e.createTextRange();t.collapse(!1),t.select()}}function fo(e){e.selectionStart=e.selectionEnd=0}function mo(e){return/^[\w\W\s]$/.test(e)}function yo(e){const t=e.match(/(.*)<\/data>/);try{return t?JSON.parse(t[1]):null}catch(n){return null}}function vo(e){return"string"!==typeof e&&(e=JSON.stringify(e)),`${e}`}function bo(e,t,n,i){let a,s;return function(...r){function o(){clearTimeout(a),a=null}function l(){o(),e.apply(s,r)}if(s=this,!a||!n&&!i){if(!n)return o(),void(a=setTimeout(l,t));a=setTimeout(o,t),e.apply(s,r)}}}const To=280,_o=100;var So={data(){return{keyboardIsVirtual:!1,activeTags:[],initTagIndex:null,focusedTagIndex:null,metaKey:!1,shiftKey:!1,tabbing:!1,debouncedHandleDeleteTag:null}},constants:{DebounceDelay:To,VirtualKeyboardThreshold:_o},computed:{virtualKeyboardBind:({keyboardIsVirtual:e})=>({keyboardIsVirtual:e}),allSelectedTagsAreActive:({selectedTags:e,activeTags:t})=>e.every((e=>t.includes(e)))},methods:{selectRangeActiveTags(e=this.focusedTagIndex,t=this.selectedTags.length){this.activeTags=this.selectedTags.slice(e,t)},selectTag(e){this.updateSelectedTags([e]),this.setFilterInput("")},unselectActiveTags(){this.activeTags.length&&(this.deleteTags(this.activeTags),this.resetActiveTags())},async deleteHandler(e){this.activeTags.length>0&&this.setSelectedTags(this.selectedTags.filter((e=>!this.activeTags.includes(e)))),this.inputIsSelected()&&this.allSelectedTagsAreActive?(e.preventDefault(),await this.resetFilters()):0===this.$refs.input.selectionEnd&&this.hasSelectedTags&&(e.preventDefault(),this.keyboardIsVirtual?this.setSelectedTags(this.selectedTags.slice(0,-1)):this.$refs.selectedTags.focusLast()),this.unselectActiveTags()},leftKeyInputHandler(e){if(this.assignEventValues(e),this.hasSelectedTags){if(this.activeTags.length&&!this.shiftKey)return e.preventDefault(),void this.$refs.selectedTags.focusTag(this.activeTags[0]);if(this.shiftKey&&0===this.$refs.input.selectionStart&&"forward"!==this.$refs.input.selectionDirection)return null===this.focusedTagIndex&&(this.focusedTagIndex=this.selectedTags.length),this.focusedTagIndex>0&&(this.focusedTagIndex-=1),this.initTagIndex=this.selectedTags.length,void this.selectTagsPressingShift();(0===this.$refs.input.selectionEnd||this.inputIsSelected())&&this.$refs.selectedTags.focusLast()}},rightKeyInputHandler(e){if(this.assignEventValues(e),this.activeTags.length&&this.shiftKey&&this.focusedTagIndex=_o&&(this.keyboardIsVirtual=!0)}),To),setFilterInput(e){this.$emit("update:input",e)},setSelectedTags(e){this.$emit("update:selectedTags",e)},updateSelectedTags(e){this.setSelectedTags([...new Set([...this.selectedTags,...e])])},handleCopy(e){e.preventDefault();const t=[],n={tags:[],input:po()};if(this.activeTags.length){const e=this.activeTags;n.tags=e,t.push(e.join(" "))}return t.push(n.input),n.tags.length||n.input.length?(e.clipboardData.setData("text/html",vo(n)),e.clipboardData.setData("text/plain",t.join(" ")),n):n},handleCut(e){e.preventDefault();const{input:t,tags:n}=this.handleCopy(e);if(!t&&!n.length)return;const i=this.selectedTags.filter((e=>!n.includes(e))),a=this.input.replace(t,"");this.setSelectedTags(i),this.setFilterInput(a)},handlePaste(e){e.preventDefault();const{types:t}=e.clipboardData;let n=[],i=e.clipboardData.getData("text/plain");if(t.includes("text/html")){const t=e.clipboardData.getData("text/html"),a=yo(t);a&&({tags:n=[],input:i=""}=a)}const a=po();i=a.length?this.input.replace(a,i):(0,Tn.ZQ)(this.input,i,document.activeElement.selectionStart),this.setFilterInput(i.trim()),n.length&&(this.allSelectedTagsAreActive?this.setSelectedTags(n):this.updateSelectedTags(n)),this.resetActiveTags()},async handleDeleteTag({tagName:e,event:t={}}){const{key:n}=t;this.activeTags.length||this.deleteTags([e]),this.unselectActiveTags(),await this.$nextTick(),go(this.$refs.input),this.hasSelectedTags&&(await this.focusInput(),"Backspace"===n&&fo(this.$refs.input))}},mounted(){window.visualViewport&&(window.visualViewport.addEventListener("resize",this.updateKeyboardType),this.$once("hook:beforeDestroy",(()=>{window.visualViewport.removeEventListener("resize",this.updateKeyboardType)})))}};const ko=1e3;var Co={constants:{ScrollingDebounceDelay:ko},data(){return{isScrolling:!1,scrollRemovedAt:0}},created(){this.deleteScroll=bo(this.deleteScroll,ko)},methods:{deleteScroll(){this.isScrolling=!1,this.scrollRemovedAt=Date.now()},handleScroll(e){const{target:t}=e;if(0!==t.scrollTop)return t.scrollTop=0,void e.preventDefault();const n=150,i=t.offsetWidth,a=i+n;if(t.scrollWidth0?this.focusIndex(this.focusedIndex-1):this.startingPointHook())},focusNext({metaKey:e,ctrlKey:t,shiftKey:n}){(e||t)&&n||(this.externalFocusChange=!1,this.focusedIndex0}},No=function(){var e=this,t=e._self._c;return t("li",{staticClass:"tag",attrs:{role:"presentation"}},[t("button",{ref:"button",class:{focus:e.isActiveTag},attrs:{role:"option","aria-selected":e.ariaSelected,"aria-roledescription":"tag"},on:{focus:function(t){return e.$emit("focus",{event:t,tagName:e.name})},click:function(t){return t.preventDefault(),e.$emit("click",{event:t,tagName:e.name})},dblclick:function(t){t.preventDefault(),!e.keyboardIsVirtual&&e.deleteTag()},keydown:[function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:e.$emit("keydown",{event:t,tagName:e.name})},function(t){return t.shiftKey?t.ctrlKey||t.altKey||t.metaKey?null:e.$emit("keydown",{event:t,tagName:e.name}):null},function(t){return t.shiftKey&&t.metaKey?t.ctrlKey||t.altKey?null:e.$emit("keydown",{event:t,tagName:e.name}):null},function(t){return t.metaKey?t.ctrlKey||t.shiftKey||t.altKey?null:e.$emit("keydown",{event:t,tagName:e.name}):null},function(t){return t.ctrlKey?t.shiftKey||t.altKey||t.metaKey?null:e.$emit("keydown",{event:t,tagName:e.name}):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"delete",[8,46],t.key,["Backspace","Delete","Del"])?null:(t.preventDefault(),e.deleteTag.apply(null,arguments))}],mousedown:function(t){return t.preventDefault(),e.focusButton.apply(null,arguments)},copy:e.handleCopy}},[e.isRemovableTag?e._e():t("span",{staticClass:"visuallyhidden"},[e._v(" "+e._s(e.$t("filter.add-tag"))+" - ")]),e.isTranslatableTag?[e._v(" "+e._s(e.$t(e.name))+" ")]:[e._v(" "+e._s(e.name)+" ")],e.isRemovableTag?t("span",{staticClass:"visuallyhidden"},[e._v(" – "+e._s(e.$t("filter.tag-select-remove"))+" ")]):e._e()],2)])},Ro=[],Bo={name:"Tag",props:{name:{type:String,required:!0},isFocused:{type:Boolean,default:()=>!1},isRemovableTag:{type:Boolean,default:!1},isTranslatableTag:{type:Boolean,default:!1},isActiveTag:{type:Boolean,default:!1},activeTags:{type:Array,required:!1},keyboardIsVirtual:{type:Boolean,default:!1}},watch:{isFocused(e){e&&this.focusButton()}},mounted(){document.addEventListener("copy",this.handleCopy),document.addEventListener("cut",this.handleCut),document.addEventListener("paste",this.handlePaste),this.$once("hook:beforeDestroy",(()=>{document.removeEventListener("copy",this.handleCopy),document.removeEventListener("cut",this.handleCut),document.removeEventListener("paste",this.handlePaste)}))},methods:{isCurrentlyActiveElement(){return document.activeElement===this.$refs.button},handleCopy(e){if(!this.isCurrentlyActiveElement())return;e.preventDefault();let t=[];t=this.activeTags.length>0?this.activeTags:[this.name],e.clipboardData.setData("text/html",vo({tags:t})),e.clipboardData.setData("text/plain",t.join(" "))},handleCut(e){this.isCurrentlyActiveElement()&&this.isRemovableTag&&(this.handleCopy(e),this.deleteTag(e))},handlePaste(e){this.isCurrentlyActiveElement()&&this.isRemovableTag&&(e.preventDefault(),this.deleteTag(e),this.$emit("paste-content",e))},deleteTag(e){this.$emit("delete-tag",{tagName:this.name,event:e}),this.$emit("prevent-blur")},focusButton(e={}){this.keyboardIsVirtual||this.$refs.button.focus(),0===e.buttons&&this.isFocused&&this.deleteTag(e)}},computed:{ariaSelected:({isActiveTag:e,isRemovableTag:t})=>t?e?"true":"false":null}},Eo=Bo,Mo=(0,F.Z)(Eo,No,Ro,!1,null,"7e76f326",null),zo=Mo.exports,Ko={name:"Tags",mixins:[Co,Ao],props:{tags:{type:Array,default:()=>[]},activeTags:{type:Array,default:()=>[]},translatableTags:{type:Array,default:()=>[]},ariaLabel:{type:String,required:!1},id:{type:String,required:!1},input:{type:String,default:null},areTagsRemovable:{type:Boolean,default:!1},keyboardIsVirtual:{type:Boolean,default:!1}},components:{Tag:zo},methods:{focusTag(e){this.focusIndex(this.tags.indexOf(e))},startingPointHook(){this.$emit("focus-prev")},handleFocus(e,t){this.focusIndex(t),this.isScrolling=!1,this.$emit("focus",e)},endingPointHook(){this.$emit("focus-next")},resetScroll(){this.$refs["scroll-wrapper"].scrollLeft=0},handleKeydown(e){const{key:t}=e,n=this.tags[this.focusedIndex];mo(t)&&n&&this.$emit("delete-tag",{tagName:n.label||n,event:e})}},computed:{totalItemsToNavigate:({tags:e})=>e.length}},Zo=Ko,jo=(0,F.Z)(Zo,Po,Oo,!1,null,"1f2bd813",null),qo=jo.exports;const Fo=5,Ho="filter-input",Vo="selected-tags",Wo="suggested-tags",Uo={autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"combobox","aria-haspopup":"true","aria-autocomplete":"none","aria-owns":"suggestedTags","aria-controls":"suggestedTags"};var Qo,Go,Xo={name:"FilterInput",mixins:[Co,So],constants:{FilterInputId:Ho,SelectedTagsId:Vo,SuggestedTagsId:Wo,AXinputProperties:Uo,TagLimit:Fo},components:{TagList:qo,ClearRoundedIcon:ho,FilterIcon:Lo},props:{positionReversed:{type:Boolean,default:()=>!1},tags:{type:Array,default:()=>[]},selectedTags:{type:Array,default:()=>[]},preventedBlur:{type:Boolean,default:()=>!1},placeholder:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1},value:{type:String,default:()=>""},shouldTruncateTags:{type:Boolean,default:!1},focusInputWhenCreated:{type:Boolean,default:!1},focusInputWhenEmpty:{type:Boolean,default:!1},selectInputOnFocus:{type:Boolean,default:!1},preventBorderStyle:{type:Boolean,default:!1},translatableTags:{type:Array,default:()=>[]}},data(){return{resetedTagsViaDeleteButton:!1,FilterInputId:Ho,SelectedTagsId:Vo,SuggestedTagsId:Wo,AXinputProperties:Uo,showSuggestedTags:!1}},computed:{hasSuggestedTags:({suggestedTags:e})=>e.length,hasSelectedTags:({selectedTags:e})=>e.length,inputIsNotEmpty:({input:e,hasSelectedTags:t})=>e.length||t,searchAriaLabelledBy:({hasSelectedTags:e})=>e?Ho.concat(" ",Vo):Ho,modelValue:{get:({value:e})=>e,set(e){this.$emit("input",e)}},input:({value:e})=>e,suggestedTags:({tags:e,selectedTags:t,shouldTruncateTags:n})=>{const i=e.filter((e=>!t.includes(e)));return n?i.slice(0,Fo):i},displaySuggestedTags:({showSuggestedTags:e,suggestedTags:t})=>e&&t.length>0,inputMultipleSelectionListeners:({resetActiveTags:e,handleCopy:t,handleCut:n,handlePaste:i})=>({click:e,copy:t,cut:n,paste:i}),selectedTagsMultipleSelectionListeners:({handleSingleTagClick:e,selectInputAndTags:t,handleDeleteTag:n,selectedTagsKeydownHandler:i,focusTagHandler:a,handlePaste:s})=>({"click-tags":e,"select-all":t,"delete-tag":n,keydown:i,focus:a,"paste-tags":s})},watch:{async selectedTags(){this.resetedTagsViaDeleteButton?this.resetedTagsViaDeleteButton=!1:this.$el.contains(document.activeElement)&&await this.focusInput(),this.displaySuggestedTags&&this.hasSuggestedTags&&this.$refs.suggestedTags.resetScroll()},suggestedTags:{immediate:!0,handler(e){this.$emit("suggested-tags",e)}},showSuggestedTags(e){this.$emit("show-suggested-tags",e)}},methods:{async focusInput(){await this.$nextTick(),this.$refs.input.focus(),!this.input&&this.resetActiveTags&&this.resetActiveTags()},async resetFilters(e=!1){if(this.setFilterInput(""),this.setSelectedTags([]),!e)return this.$emit("update:preventedBlur",!0),this.resetActiveTags&&this.resetActiveTags(),void await this.focusInput();this.resetedTagsViaDeleteButton=!0,this.showSuggestedTags=!1,this.$refs.input.blur()},focusFirstTag(e=(()=>{})){this.showSuggestedTags||(this.showSuggestedTags=!0),this.hasSuggestedTags&&this.$refs.suggestedTags?this.$refs.suggestedTags.focusFirst():e()},setFilterInput(e){this.$emit("input",e)},setSelectedTags(e){this.$emit("update:selectedTags",e)},deleteTags(e){this.setSelectedTags(this.selectedTags.filter((t=>!e.includes(t))))},async handleBlur(e){const t=e.relatedTarget;t&&t.matches&&t.matches("button, input, ul")&&this.$el.contains(t)||(await this.$nextTick(),this.resetActiveTags(),this.preventedBlur?this.$emit("update:preventedBlur",!1):(this.showSuggestedTags=!1,this.$emit("blur")))},downHandler(e){const t=()=>this.$emit("focus-next",e);this.positionReversed?t():this.focusFirstTag(t)},upHandler(e){const t=()=>this.$emit("focus-prev",e);this.positionReversed?this.focusFirstTag(t):t()},handleFocusPrevOnSelectedTags(){this.positionReversed?this.focusFirstTag((()=>this.$emit("focus-prev"))):this.$emit("focus-prev")},handleFocus(){this.showSuggestedTags=!0,this.$emit("focus")}},created(){this.focusInputWhenCreated&&document.activeElement!==this.$refs.input&&(this.inputIsNotEmpty||this.focusInputWhenEmpty)&&this.focusInput()}},Yo=Xo,Jo=(0,F.Z)(Yo,ao,so,!1,null,"9ad1ed4c",null),el=Jo.exports,tl=n(5590),nl={name:"QuickNavigationHighlighter",props:{text:{type:String,required:!0},matcherText:{type:String,default:""}},render(e){const{matcherText:t,text:n}=this,i=[];let a=0;return t?([...t].forEach((t=>{const s=n.toLowerCase().indexOf(t.toLowerCase(),a);a&&i.push(e("span",n.slice(a,s)));const r=s+1;i.push(e("span",{class:"match"},n.slice(s,r))),a=r})),e("p",{class:"highlight"},i)):e("span",{class:"highlight"},n)}},il=nl,al=(0,F.Z)(il,Qo,Go,!1,null,"4a2ce75d",null),sl=al.exports,rl=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"magnifier-icon",attrs:{viewBox:"0 0 14 14",themeId:"magnifier"}},[t("path",{attrs:{d:"M15.0013 14.0319L10.9437 9.97424C11.8165 8.88933 12.2925 7.53885 12.2929 6.14645C12.2929 2.75841 9.53449 0 6.14645 0C2.75841 0 0 2.75841 0 6.14645C0 9.53449 2.75841 12.2929 6.14645 12.2929C7.57562 12.2929 8.89486 11.7932 9.94425 10.9637L14.0019 15.0213L15.0013 14.0319ZM6.13645 11.0736C4.83315 11.071 3.58399 10.5521 2.66241 9.63048C1.74084 8.70891 1.22194 7.45974 1.2193 6.15644C1.2193 3.44801 3.41802 1.23928 6.13645 1.23928C8.85488 1.23928 11.0536 3.44801 11.0536 6.15644C11.0636 8.86488 8.85488 11.0736 6.13645 11.0736Z"}})])},ol=[],ll={name:"MagnifierIcon",components:{SVGIcon:pr.Z}},cl=ll,dl=(0,F.Z)(cl,rl,ol,!1,null,null,null),ul=dl.exports,hl=function(){var e=this,t=e._self._c;return t("div",{staticClass:"preview"},[e.state===e.STATE.success?t("DocumentationTopic",e._b({attrs:{enableMinimized:""}},"DocumentationTopic",e.topicProps,!1)):e.state===e.STATE.loadingSlowly?t("div",{staticClass:"loading"},e._l(e.LOADER_ROW_STYLES,(function(e){return t("div",{key:e["--index"],staticClass:"loading-row",style:e})})),0):e.state===e.STATE.error?t("div",{staticClass:"unavailable"},[t("p",[e._v(e._s(e.$t("quicknav.preview-unavailable")))])]):e._e()],1)},pl=[],gl=n(4630);const{extractProps:fl}=Vr.methods,ml="hero",yl={error:"error",loading:"loading",loadingSlowly:"loadingSlowly",success:"success"},vl={...gl.Z,state:(0,x.d9)(gl.Z.state)};var bl={name:"QuickNavigationPreview",components:{DocumentationTopic:Vr},constants:{PreviewState:yl,PreviewStore:vl},data(){return{store:vl}},provide(){return{store:this.store}},props:{json:{type:Object,required:!1},state:{type:String,required:!0,validator:e=>Object.hasOwnProperty.call(yl,e)}},computed:{LOADER_ROW_STYLES:()=>[{"--index":0,width:"30%"},{"--index":1,width:"80%"},{"--index":2,width:"50%"}],STATE:()=>yl,topicProps:({json:e})=>{const t=fl(e),{sections:n=[]}=e;let{abstract:i}=t;const a=n.find((({kind:e})=>e===ml));return!i&&a&&(i=a.content),{...t,abstract:i}}}},Tl=bl,_l=(0,F.Z)(Tl,hl,pl,!1,null,"779b8b01",null),Sl=_l.exports;class kl{constructor(e){this.map=new Map,this.maxSize=e}get size(){return this.map.size}get(e){if(!this.map.has(e))return;const t=this.map.get(e);return this.map.delete(e),this.map.set(e,t),t}has(e){return this.map.has(e)}set(e,t){if(this.map.has(e)&&this.map.delete(e),this.map.set(e,t),this.map.size>this.maxSize){const e=this.map.keys().next().value;this.map.delete(e)}}*[Symbol.iterator](){yield*this.map}}const Cl="",wl=32,xl="navigator-hide-button";function Il(e){return e.split("").reduce(((e,t)=>(e<<5)-e+t.charCodeAt(0)|0),0)}function $l(e){const t={},n=e.length;for(let i=0;ie.parent===Cl));const i=t[e];return i?(i.childUIDs||[]).map((e=>t[e])):[]}function Ol(e,t){const n=[],i=[e];let a=null;while(i.length){a=i.pop();const e=t[a];if(!e)return[];n.unshift(e),e.parent&&e.parent!==Cl&&i.push(e.parent)}return n}function Al(e,t,n){const i=t[e];return i?Pl(i.parent,t,n):[]}function Nl(e){return Object.entries(e).reduce(((e,[t,n])=>(e[t]=Dl(n[0].children||[],null,0,n[0].beta),e)),{})}function Rl(e){return Object.entries(e).reduce(((e,[t,n])=>(e[t]={technology:n[0].title,technologyPath:n[0].path||n[0].url,isTechnologyBeta:n[0].beta},e)),{})}var Bl=n(9652);const{PreviewState:El}=Sl.constants,Ml="AbortError",zl=20,Kl=1e3;var Zl={name:"QuickNavigationModal",components:{FilterInput:el,GenericModal:tl.Z,MagnifierIcon:ul,TopicTypeIcon:we.Z,QuickNavigationHighlighter:sl,Reference:Wa.Z,Preview:Sl},mixins:[Ao],created(){this.abortController=null,this.$cachedSymbolResults=new kl(zl),this.loadingTimeout=null},data(){return{debouncedInput:"",userInput:"",focusedInput:!1,cachedSymbolResults:{},previewIsLoadingSlowly:!1,SCROLL_LOCK_DISABLE_ATTR:Bl.n}},props:{children:{type:Array,required:!0},showQuickNavigationModal:{type:Boolean,required:!0},technology:{type:String,required:!1}},computed:{childrenMap({children:e}){return $l(e)},filteredSymbols:({constructFuzzyRegex:e,children:t,fuzzyMatch:n,processedUserInput:i,childrenMap:a,orderSymbolsByPriority:s})=>{const r=t.filter((e=>"groupMarker"!==e.type&&null!=e.title));if(!i)return[];const o=n({inputLength:i.length,symbols:r,processedInputRegex:new RegExp(e(i),"i"),childrenMap:a}),l=[...new Map(o.map((e=>[e.path,e]))).values()];return s(l).slice(0,zl)},placeholderText(){return this.technology?this.$t("filter.search-symbols",{technology:this.technology}):this.$t("filter.search")},isVisible:{get:({showQuickNavigationModal:e})=>e,set(e){this.$emit("update:showQuickNavigationModal",e)}},noResultsWereFound:({processedUserInput:e,totalItemsToNavigate:t})=>e.length&&!t,processedUserInput:({debouncedInput:e})=>e.replace(/\s/g,""),totalItemsToNavigate:({filteredSymbols:e})=>e.length,selectedSymbol:({filteredSymbols:e,focusedIndex:t})=>null!==t?e[t]:null,nextSymbol:({filteredSymbols:e,focusedIndex:t})=>{if(null===t)return null;let n=t+1;return n>=e.length&&(n=0),e[n]},focusedMatchElement:({$refs:e,focusedIndex:t})=>e.match.find((({$el:e})=>parseInt(e.dataset.index,10)===t)).$el,previewJSON:({cachedSymbolResults:e,selectedSymbol:t})=>t?(e[t.uid]||{}).json:null,previewState:({cachedSymbolResults:e,previewIsLoadingSlowly:t,selectedSymbol:n})=>n&&Object.hasOwnProperty.call(e,n.uid)?e[n.uid].success?El.success:El.error:t?El.loadingSlowly:El.loading},watch:{userInput:"debounceInput",focusedIndex(){this.focusedInput||(this.scrollIntoView(),this.focusReference())},selectedSymbol:"fetchSelectedSymbolData",$route:"closeQuickNavigationModal"},methods:{closeQuickNavigationModal(){this.$emit("update:showQuickNavigationModal",!1)},constructFuzzyRegex(e){return[...e].reduce(((t,n,i)=>t.concat(`[${n}]`).concat(i{const a=n.exec(t.title);if(!a)return!1;const s=a[0].length;return!(s>3*e)&&{uid:t.uid,title:t.title,path:t.path,parents:Ol(t.parent,i),type:t.type,inputLengthDifference:t.title.length-e,matchLength:s,matchLengthDifference:s-e,start:a.index,substring:a[0]}})).filter(Boolean)},handleKeyEnter(){!this.noResultsWereFound&&this.userInput.length&&(this.$router.push(this.filteredSymbols[this.focusedIndex].path),this.closeQuickNavigationModal())},orderSymbolsByPriority(e){return e.sort(((e,t)=>e.matchLengthDifference>t.matchLengthDifference?1:e.matchLengthDifferencet.start?1:e.startt.inputLengthDifference?1:e.inputLengthDifference{this.previewState===El.loading&&(this.previewIsLoadingSlowly=!0)}),Kl),!this.selectedSymbol||this.$cachedSymbolResults.has(this.selectedSymbol.uid))return clearTimeout(this.loadingTimeout),void(this.previewIsLoadingSlowly=!1);const e=async e=>{if(e&&!this.$cachedSymbolResults.has(e.uid))try{const t=await(0,x.k_)(e.path,{signal:this.abortController.signal});this.$cachedSymbolResults.set(e.uid,{success:!0,json:t})}catch(t){t.name!==Ml&&this.$cachedSymbolResults.set(e.uid,{success:!1})}finally{this.cachedSymbolResults=Object.freeze(Object.fromEntries(this.$cachedSymbolResults))}};this.abortController&&this.abortController.abort(),this.abortController=new AbortController,await Promise.all([e(this.selectedSymbol).finally((()=>{clearTimeout(this.loadingTimeout),this.previewIsLoadingSlowly=!1})),e(this.nextSymbol)])}}},jl=Zl,ql=(0,F.Z)(jl,no,io,!1,null,"2f89fac2",null),Fl=ql.exports,Hl=function(){var e=this,t=e._self._c;return t("div",{staticClass:"adjustable-sidebar-width",class:{dragging:e.isDragging,"sidebar-hidden":!e.enableNavigator||e.hiddenOnLarge}},[e.enableNavigator?t("div",{ref:"sidebar",staticClass:"sidebar"},[t("div",{ref:"aside",staticClass:"aside",class:e.asideClasses,style:e.asideStyles,attrs:{"aria-hidden":e.hiddenOnLarge?"true":null},on:{transitionstart:function(t){return t.target!==t.currentTarget?null:e.trackTransitionStart.apply(null,arguments)},transitionend:function(t){return t.target!==t.currentTarget?null:e.trackTransitionEnd.apply(null,arguments)}}},[e._t("aside",null,{animationClass:"aside-animated-child",scrollLockID:e.scrollLockID,breakpoint:e.breakpoint})],2),e.fixedWidth?e._e():t("div",{staticClass:"resize-handle",on:{mousedown:function(t){return t.preventDefault(),e.startDrag.apply(null,arguments)},touchstart:function(t){return t.preventDefault(),e.startDrag.apply(null,arguments)}}})]):e._e(),t("div",{ref:"content",staticClass:"content"},[e._t("default")],2),e.enableNavigator?t("BreakpointEmitter",{attrs:{scope:e.BreakpointScopes.nav},on:{change:function(t){e.breakpoint=t}}}):e._e()],1)},Vl=[],Wl=n(7247),Ul=n(7188),Ql=n(114),Gl=n(1147),Xl=n(1716);const Yl="sidebar",Jl=1521,ec=543,tc=400,nc={touch:{move:"touchmove",end:"touchend"},mouse:{move:"mousemove",end:"mouseup"}},ic=(e,t=window.innerWidth)=>{const n=Math.min(t,Jl);return Math.floor(Math.min(n*(e/100),n))},ac={medium:30,large:30},sc={medium:50,large:40},rc="sidebar-scroll-lock";var oc={name:"AdjustableSidebarWidth",constants:{SCROLL_LOCK_ID:rc},components:{BreakpointEmitter:Ul["default"]},inject:["store"],props:{shownOnMobile:{type:Boolean,default:!1},enableNavigator:{type:Boolean,default:!0},hiddenOnLarge:{type:Boolean,default:!1},fixedWidth:{type:Number,default:null}},data(){const e=window.innerWidth,t=window.innerHeight,n=lr.L3.large,i=ic(ac[n]),a=ic(sc[n]),s=e>=Jl?ec:tc,r=Wl.tO.get(Yl,s);return{isDragging:!1,width:this.fixedWidth||Math.min(Math.max(r,i),a),isTouch:!1,windowWidth:e,windowHeight:t,breakpoint:n,noTransition:!1,isTransitioning:!1,isOpeningOnLarge:!1,focusTrapInstance:null,mobileTopOffset:0,topOffset:0,scrollLockContainer:null}},computed:{minWidthPercent:({breakpoint:e})=>ac[e]||0,maxWidthPercent:({breakpoint:e})=>sc[e]||100,maxWidth:({maxWidthPercent:e,windowWidth:t,fixedWidth:n})=>Math.max(n,ic(e,t)),minWidth:({minWidthPercent:e,windowWidth:t,fixedWidth:n})=>Math.min(n||t,ic(e,t)),widthInPx:({width:e})=>`${e}px`,hiddenOnLargeThreshold:({minWidth:e})=>e/2,events:({isTouch:e})=>e?nc.touch:nc.mouse,asideStyles:({widthInPx:e,mobileTopOffset:t,topOffset:n,windowHeight:i})=>({width:e,"--top-offset":n?`${n}px`:null,"--top-offset-mobile":`${t}px`,"--app-height":`${i}px`}),asideClasses:({isDragging:e,shownOnMobile:t,noTransition:n,isTransitioning:i,hiddenOnLarge:a,mobileTopOffset:s,isOpeningOnLarge:r})=>({dragging:e,"show-on-mobile":t,"hide-on-large":a,"is-opening-on-large":r,"no-transition":n,"sidebar-transitioning":i,"has-mobile-top-offset":s}),scrollLockID:()=>rc,BreakpointScopes:()=>lr.lU},async mounted(){window.addEventListener("keydown",this.onEscapeKeydown),window.addEventListener("resize",this.storeWindowSize,{passive:!0}),window.addEventListener("orientationchange",this.storeWindowSize,{passive:!0}),this.storeTopOffset(),0===this.topOffset&&0===window.scrollY||window.addEventListener("scroll",this.storeTopOffset,{passive:!0}),this.$once("hook:beforeDestroy",(()=>{window.removeEventListener("keydown",this.onEscapeKeydown),window.removeEventListener("resize",this.storeWindowSize),window.removeEventListener("orientationchange",this.storeWindowSize),window.removeEventListener("scroll",this.storeTopOffset),this.shownOnMobile&&this.toggleScrollLock(!1),this.focusTrapInstance&&this.focusTrapInstance.destroy()})),await this.$nextTick(),this.focusTrapInstance=new Ql.Z(this.$refs.aside)},watch:{$route:"closeMobileSidebar",width:{immediate:!0,handler:Ee((function(e){this.emitEventChange(e)}),150)},windowWidth:"getWidthInCheck",async breakpoint(e){this.getWidthInCheck(),e===lr.L3.large&&this.closeMobileSidebar(),this.noTransition=!0,await(0,Me.J)(5),this.noTransition=!1},shownOnMobile:"handleExternalOpen",async isTransitioning(e){e?(await(0,Me.X)(1e3),this.isTransitioning=!1):this.updateContentWidthInStore()},hiddenOnLarge(){this.isTransitioning=!0}},methods:{getWidthInCheck:bo((function(){this.width>this.maxWidth?this.width=this.maxWidth:this.widththis.maxWidth&&(i=this.maxWidth),this.hiddenOnLarge&&i>=this.hiddenOnLargeThreshold&&(this.$emit("update:hiddenOnLarge",!1),this.isOpeningOnLarge=!0),this.width=Math.max(i,this.minWidth),i<=this.hiddenOnLargeThreshold&&this.$emit("update:hiddenOnLarge",!0)},stopDrag(e){e.preventDefault(),this.isDragging&&(this.isDragging=!1,Wl.tO.set(Yl,this.width),document.removeEventListener(this.events.move,this.handleDrag),document.removeEventListener(this.events.end,this.stopDrag),this.emitEventChange(this.width))},emitEventChange(e){this.$emit("width-change",e),this.updateContentWidthInStore()},getTopOffset(){const e=document.getElementById(Xl.EA);if(!e)return 0;const{y:t}=e.getBoundingClientRect();return Math.max(t,0)},handleExternalOpen(e){e&&(this.mobileTopOffset=this.getTopOffset()),this.toggleScrollLock(e)},async updateContentWidthInStore(){await this.$nextTick(),this.store.setContentWidth(this.$refs.content.offsetWidth)},async toggleScrollLock(e){this.scrollLockContainer&&(Bl.Z.unlockScroll(this.scrollLockContainer),this.focusTrapInstance.stop(),Gl.Z.show(this.$refs.aside),this.scrollLockContainer=null),e&&(await this.$nextTick(),this.scrollLockContainer=document.getElementById(this.scrollLockID),this.scrollLockContainer&&(Bl.Z.lockScroll(this.scrollLockContainer),this.focusTrapInstance.start(),Gl.Z.hide(this.$refs.aside)))},storeTopOffset:Ee((function(){this.topOffset=this.getTopOffset()}),60),async trackTransitionStart({propertyName:e}){"width"!==e&&"transform"!==e||(this.isTransitioning=!0)},trackTransitionEnd({propertyName:e}){"width"!==e&&"transform"!==e||(this.isTransitioning=!1,this.isOpeningOnLarge=!1)}}},lc=oc,cc=(0,F.Z)(lc,Hl,Vl,!1,null,"cd7929ee",null),dc=cc.exports,uc=function(){var e=this,t=e._self._c;return t("nav",{staticClass:"navigator",attrs:{"aria-labelledby":e.INDEX_ROOT_KEY}},[e.isFetching?t("LoadingNavigatorCard",{on:{close:function(t){return e.$emit("close")}}}):t("NavigatorCard",e._b({attrs:{type:e.type,children:e.flatChildren,"active-path":e.activePath,scrollLockID:e.scrollLockID,"error-fetching":e.errorFetching,"render-filter-on-top":e.renderFilterOnTop,"api-changes":e.apiChanges,"navigator-references":e.navigatorReferences},on:{close:function(t){return e.$emit("close")}},scopedSlots:e._u([{key:"filter",fn:function(){return[e._t("filter")]},proxy:!0},{key:"above-navigator-head",fn:function(){return[e._t("above-navigator-head")]},proxy:!0},{key:"navigator-head",fn:function(){return[e._t("navigator-head",null,{className:"nav-title"})]},proxy:!0}],null,!0)},"NavigatorCard",e.technologyProps,!1)),t("div",{staticClass:"visuallyhidden",attrs:{"aria-live":"polite"}},[e._v(" "+e._s(e.$t("navigator.navigator-is",{state:e.isFetching?e.$t("navigator.state.loading"):e.$t("navigator.state.ready")}))+" ")])],1)},hc=[],pc=function(){var e=this,t=e._self._c;return t("BaseNavigatorCard",e._b({class:{"filter-on-top":e.renderFilterOnTop},on:{close:function(t){return e.$emit("close")}},scopedSlots:e._u([{key:"above-navigator-head",fn:function(){return[e._t("above-navigator-head")]},proxy:!0},{key:"navigator-head",fn:function(){return[e._t("navigator-head")]},proxy:!0},{key:"body",fn:function({className:n}){return[e._t("post-head"),t("div",{class:n,on:{"!keydown":[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:t.altKey?(t.preventDefault(),e.focusFirst.apply(null,arguments)):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:t.altKey?(t.preventDefault(),e.focusLast.apply(null,arguments)):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.focusPrev.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.focusNext.apply(null,arguments))}]}},[e.technology?t("Reference",{class:["technology-title",{"router-link-exact-active":e.isTechnologyRoute}],attrs:{id:e.INDEX_ROOT_KEY,url:e.technologyPath},nativeOn:{click:function(t){return t.altKey?(t.preventDefault(),e.toggleAllNodes.apply(null,arguments)):null}}},[t("h2",{staticClass:"card-link"},[e._v(" "+e._s(e.technology)+" ")]),e.isTechnologyBeta?t("Badge",{attrs:{variant:"beta"}}):e._e()],1):e._e(),t("DynamicScroller",{directives:[{name:"show",rawName:"v-show",value:e.hasNodes,expression:"hasNodes"}],ref:"scroller",staticClass:"scroller",attrs:{id:e.scrollLockID,"aria-label":e.$t("navigator.title"),items:e.navigatorItems,"min-item-size":e.itemSize,"emit-update":"","key-field":"uid"},on:{update:e.handleScrollerUpdate,"!keydown":[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:t.altKey?(t.preventDefault(),e.focusFirst.apply(null,arguments)):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:t.altKey?(t.preventDefault(),e.focusLast.apply(null,arguments)):null},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.focusPrev.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.focusNext.apply(null,arguments))}]},nativeOn:{focusin:function(t){return e.handleFocusIn.apply(null,arguments)},focusout:function(t){return e.handleFocusOut.apply(null,arguments)}},scopedSlots:e._u([{key:"default",fn:function({item:n,active:i,index:a}){return[t("DynamicScrollerItem",e._b({ref:`dynamicScroller_${n.uid}`},"DynamicScrollerItem",{active:i,item:n,dataIndex:a},!1),[t("NavigatorCardItem",{attrs:{item:n,isRendered:i,"filter-pattern":e.filterPattern,"filter-text":e.debouncedFilter,"is-active":n.uid===e.activeUID,"is-bold":e.activePathMap[n.uid],expanded:e.openNodes[n.uid],"api-change":e.apiChangesObject[n.path],isFocused:e.focusedIndex===a,enableFocus:!e.externalFocusChange,"navigator-references":e.navigatorReferences},on:{toggle:e.toggle,"toggle-full":e.toggleFullTree,"toggle-siblings":e.toggleSiblings,navigate:e.handleNavigationChange,"focus-parent":e.focusNodeParent}})],1)]}}],null,!0)}),t("div",{staticClass:"visuallyhidden",attrs:{"aria-live":"polite"}},[e._v(" "+e._s(e.politeAriaLive)+" ")]),t("div",{staticClass:"no-items-wrapper",attrs:{"aria-live":"assertive"}},[t("p",{staticClass:"no-items"},[e._v(e._s(e.$t(e.assertiveAriaLive)))])])],1),e.errorFetching?e._e():t("div",{staticClass:"filter-wrapper"},[t("div",{staticClass:"navigator-filter"},[t("div",{staticClass:"input-wrapper"},[t("FilterInput",{staticClass:"filter-component",attrs:{tags:e.suggestedTags,translatableTags:e.translatableTags,"selected-tags":e.selectedTags,placeholder:e.$t("filter.title"),"should-keep-open-on-blur":!1,shouldTruncateTags:e.shouldTruncateTags,"position-reversed":!e.renderFilterOnTop},on:{"update:selectedTags":function(t){e.selectedTags=t},"update:selected-tags":function(t){e.selectedTags=t},clear:e.clearFilters},model:{value:e.filter,callback:function(t){e.filter=t},expression:"filter"}})],1),e._t("filter")],2)])]}}],null,!0)},"BaseNavigatorCard",{isTechnologyBeta:e.isTechnologyBeta,technologyPath:e.technologyPath},!1))},gc=[];function fc(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var a=e.indexOf("Edge/");return a>0?parseInt(e.substring(a+5,e.indexOf(".",a)),10):-1}var mc=void 0;function yc(){yc.init||(yc.init=!0,mc=-1!==fc())}var vc={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"resize-observer",attrs:{tabindex:"-1"}})},staticRenderFns:[],_scopeId:"data-v-b329ee4c",name:"resize-observer",methods:{compareAndNotify:function(){this._w===this.$el.offsetWidth&&this._h===this.$el.offsetHeight||(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.$emit("notify"))},addResizeHandlers:function(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers:function(){this._resizeObject&&this._resizeObject.onload&&(!mc&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),delete this._resizeObject.onload)}},mounted:function(){var e=this;yc(),this.$nextTick((function(){e._w=e.$el.offsetWidth,e._h=e.$el.offsetHeight}));var t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",mc&&this.$el.appendChild(t),t.data="about:blank",mc||this.$el.appendChild(t)},beforeDestroy:function(){this.removeResizeHandlers()}};function bc(e){e.component("resize-observer",vc),e.component("ResizeObserver",vc)}var Tc={version:"0.4.5",install:bc},_c=null;"undefined"!==typeof window?_c=window.Vue:"undefined"!==typeof n.g&&(_c=n.g.Vue),_c&&_c.use(Tc);function Sc(e){return Sc="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sc(e)}function kc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cc(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},r=function(r){for(var o=arguments.length,l=new Array(o>1?o-1:0),c=1;c1){var i=e.find((function(e){return e.isIntersecting}));i&&(t=i)}if(n.callback){var a=t.isIntersecting&&t.intersectionRatio>=n.threshold;if(a===n.oldResult)return;n.oldResult=a,n.callback(a,t)}}),this.options.intersection),t.context.$nextTick((function(){n.observer&&n.observer.observe(n.el)}))}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&this.options.intersection.threshold||0}}]),e}();function Nc(e,t,n){var i=t.value;if(i)if("undefined"===typeof IntersectionObserver)console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var a=new Ac(e,i,n);e._vue_visibilityState=a}}function Rc(e,t,n){var i=t.value,a=t.oldValue;if(!Oc(i,a)){var s=e._vue_visibilityState;i?s?s.createObserver(i,n):Nc(e,{value:i},n):Bc(e)}}function Bc(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var Ec={bind:Nc,update:Rc,unbind:Bc};function Mc(e){e.directive("observe-visibility",Ec)}var zc={version:"0.4.6",install:Mc},Kc=null;"undefined"!==typeof window?Kc=window.Vue:"undefined"!==typeof n.g&&(Kc=n.g.Vue),Kc&&Kc.use(zc);var Zc=n(7274),jc=n.n(Zc),qc=n(144),Fc={itemsLimit:1e3};const Hc={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:e=>["vertical","horizontal"].includes(e)},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Vc(){return this.items.length&&"object"!==typeof this.items[0]}let Wc=!1;if("undefined"!==typeof window){Wc=!1;try{var Uc=Object.defineProperty({},"passive",{get(){Wc=!0}});window.addEventListener("test",null,Uc)}catch(vh){}}let Qc=0;var Gc={name:"RecycleScroller",components:{ResizeObserver:vc},directives:{ObserveVisibility:Ec},props:{...Hc,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(null===this.itemSize){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,i=this.minItemSize;let a,s=1e4,r=0;for(let o=0,l=t.length;o{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0}))},activated(){const e=this.$_lastUpdateScrollPosition;"number"===typeof e&&this.$nextTick((()=>{this.scrollToPosition(e)}))},beforeDestroy(){this.removeListeners()},methods:{addView(e,t,n,i,a){const s={item:n,position:0},r={id:Qc++,index:t,used:!0,key:i,type:a};return Object.defineProperty(s,"nr",{configurable:!1,value:r}),e.push(s),s},unuseView(e,t=!1){const n=this.$_unusedViews,i=e.nr.type;let a=n.get(i);a||(a=[],n.set(i,a)),a.push(e),t||(e.nr.used=!1,e.position=-9999,this.$_views.delete(e.nr.key))},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){this.$_scrollDirty||(this.$_scrollDirty=!0,requestAnimationFrame((()=>{this.$_scrollDirty=!1;const{continuous:e}=this.updateVisibleItems(!1,!0);e||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,100))})))},handleVisibilityChange(e,t){this.ready&&(e||0!==t.boundingClientRect.width||0!==t.boundingClientRect.height?(this.$emit("visible"),requestAnimationFrame((()=>{this.updateVisibleItems(!1)}))):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,i=this.gridItems||1,a=this.itemSecondarySize||n,s=this.$_computedMinItemSize,r=this.typeField,o=this.simpleArray?null:this.keyField,l=this.items,c=l.length,d=this.sizes,u=this.$_views,h=this.$_unusedViews,p=this.pool;let g,f,m,y,v,b;if(c)if(this.$_prerender)g=y=0,f=v=Math.min(this.prerender,l.length),m=null;else{const e=this.getScroll();if(t){let t=e.start-this.$_lastUpdateScrollPosition;if(t<0&&(t=-t),null===n&&te.start&&(a=s),s=~~((i+a)/2)}while(s!==n);for(s<0&&(s=0),g=s,m=d[c-1].accumulator,f=s;fc&&(f=c)),y=g;yc&&(f=c),y<0&&(y=0),v>c&&(v=c),m=Math.ceil(c/i)*n}}else g=f=y=v=m=0;f-g>Fc.itemsLimit&&this.itemsLimitError(),this.totalSize=m;const T=g<=this.$_endIndex&&f>=this.$_startIndex;if(this.$_continuous!==T){if(T){u.clear(),h.clear();for(let e=0,t=p.length;e=f)&&this.unuseView(b));const _=T?null:new Map;let S,k,C,w;for(let x=g;x=C.length)&&(b=this.addView(p,x,S,e,k),this.unuseView(b,!0),C=h.get(k)),b=C[w],b.item=S,b.nr.used=!0,b.nr.index=x,b.nr.key=e,b.nr.type=k,_.set(k,w+1),w++),u.set(e,b)),null===n?(b.position=d[x-1].accumulator,b.offset=0):(b.position=Math.floor(x/i)*n,b.offset=x%i*a)):b&&this.unuseView(b)}return this.$_startIndex=g,this.$_endIndex=f,this.emitUpdate&&this.$emit("update",g,f,y,v),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,300),{continuous:T}},getListenerTarget(){let e=jc()(this.$el);return!window.document||e!==window.document.documentElement&&e!==window.document.body||(e=window),e},getScroll(){const{$el:e,direction:t}=this,n="vertical"===t;let i;if(this.pageMode){const t=e.getBoundingClientRect(),a=n?t.height:t.width;let s=-(n?t.top:t.left),r=n?window.innerHeight:window.innerWidth;s<0&&(r+=s,s=0),s+r>a&&(r=a-s),i={start:s,end:s+r}}else i=n?{start:e.scrollTop,end:e.scrollTop+e.clientHeight}:{start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return i},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,!!Wc&&{passive:!0}),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;t=null===this.itemSize?e>0?this.sizes[e-1].accumulator:0:Math.floor(e/this.gridItems)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t="vertical"===this.direction?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,i,a;if(this.pageMode){const s=jc()(this.$el),r="HTML"===s.tagName?0:s[t.scroll],o=s.getBoundingClientRect(),l=this.$el.getBoundingClientRect(),c=l[t.start]-o[t.start];n=s,i=t.scroll,a=e+r+c}else n=this.$el,i=t.scroll,a=e;n[i]=a},itemsLimitError(){throw setTimeout((()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")})),new Error("Rendered items limit reached")},sortViews(){this.pool.sort(((e,t)=>e.nr.index-t.nr.index))}}};function Xc(e,t,n,i,a,s,r,o,l,c){"boolean"!==typeof r&&(l=o,o=r,r=!1);const d="function"===typeof n?n.options:n;let u;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,a&&(d.functional=!0)),i&&(d._scopeId=i),s?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(s)},d._ssrRegister=u):t&&(u=r?function(e){t.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,o(e))}),u)if(d.functional){const e=d.render;d.render=function(t,n){return u.call(n),e(t,n)}}else{const e=d.beforeCreate;d.beforeCreate=e?[].concat(e,u):[u]}return n}const Yc=Gc;var Jc=function(){var e,t,n=this,i=n.$createElement,a=n._self._c||i;return a("div",{directives:[{name:"observe-visibility",rawName:"v-observe-visibility",value:n.handleVisibilityChange,expression:"handleVisibilityChange"}],staticClass:"vue-recycle-scroller",class:(e={ready:n.ready,"page-mode":n.pageMode},e["direction-"+n.direction]=!0,e),on:{"&scroll":function(e){return n.handleScroll.apply(null,arguments)}}},[n.$slots.before?a("div",{ref:"before",staticClass:"vue-recycle-scroller__slot"},[n._t("before")],2):n._e(),n._v(" "),a(n.listTag,{ref:"wrapper",tag:"component",staticClass:"vue-recycle-scroller__item-wrapper",class:n.listClass,style:(t={},t["vertical"===n.direction?"minHeight":"minWidth"]=n.totalSize+"px",t)},[n._l(n.pool,(function(e){return a(n.itemTag,n._g({key:e.nr.id,tag:"component",staticClass:"vue-recycle-scroller__item-view",class:[n.itemClass,{hover:!n.skipHover&&n.hoverKey===e.nr.key}],style:n.ready?{transform:"translate"+("vertical"===n.direction?"Y":"X")+"("+e.position+"px) translate"+("vertical"===n.direction?"X":"Y")+"("+e.offset+"px)",width:n.gridItems?("vertical"===n.direction&&n.itemSecondarySize||n.itemSize)+"px":void 0,height:n.gridItems?("horizontal"===n.direction&&n.itemSecondarySize||n.itemSize)+"px":void 0}:null},n.skipHover?{}:{mouseenter:function(){n.hoverKey=e.nr.key},mouseleave:function(){n.hoverKey=null}}),[n._t("default",null,{item:e.item,index:e.nr.index,active:e.nr.used})],2)})),n._v(" "),n._t("empty")],2),n._v(" "),n.$slots.after?a("div",{ref:"after",staticClass:"vue-recycle-scroller__slot"},[n._t("after")],2):n._e(),n._v(" "),a("ResizeObserver",{on:{notify:n.handleResize}})],1)},ed=[];Jc._withStripped=!0;const td=void 0,nd=void 0,id=void 0,ad=!1,sd=Xc({render:Jc,staticRenderFns:ed},td,Yc,nd,ad,id,!1,void 0,void 0,void 0);var rd={name:"DynamicScroller",components:{RecycleScroller:sd},provide(){return"undefined"!==typeof ResizeObserver&&(this.$_resizeObserver=new ResizeObserver((e=>{requestAnimationFrame((()=>{if(Array.isArray(e))for(const t of e)if(t.target){const e=new CustomEvent("resize",{detail:{contentRect:t.contentRect}});t.target.dispatchEvent(e)}}))}))),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...Hc,minItemSize:{type:[Number,String],required:!0}},data(){return{vscrollData:{active:!0,sizes:{},validSizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:Vc,itemsWithSize(){const e=[],{items:t,keyField:n,simpleArray:i}=this,a=this.vscrollData.sizes,s=t.length;for(let r=0;r=n)break;i+=t[o].size||this.minItemSize,a+=e[o].size||this.minItemSize}const r=a-i;0!==r&&(this.$el.scrollTop+=r)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={}},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},methods:{onScrollerResize(){const e=this.$refs.scroller;e&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(e=!0){(e||this.simpleArray)&&(this.vscrollData.validSizes={}),this.$emit("vscroll:update",{force:!0})},scrollToItem(e){const t=this.$refs.scroller;t&&t.scrollToItem(e)},getItemSize(e,t=undefined){const n=this.simpleArray?null!=t?t:this.items.indexOf(e):e[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const e=this.$el;this.$nextTick((()=>{e.scrollTop=e.scrollHeight+5e3;const t=()=>{e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame((()=>{e.scrollTop=e.scrollHeight+5e3,0===this.$_undefinedSizes?this.$_scrollingToBottom=!1:requestAnimationFrame(t)}))};requestAnimationFrame(t)}))}}};const od=rd;var ld=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("RecycleScroller",e._g(e._b({ref:"scroller",attrs:{items:e.itemsWithSize,"min-item-size":e.minItemSize,direction:e.direction,"key-field":"id","list-tag":e.listTag,"item-tag":e.itemTag},on:{resize:e.onScrollerResize,visible:e.onScrollerVisible},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.item,i=t.index,a=t.active;return[e._t("default",null,null,{item:n.item,index:i,active:a,itemWithSize:n})]}}],null,!0)},"RecycleScroller",e.$attrs,!1),e.listeners),[e._v(" "),n("template",{slot:"before"},[e._t("before")],2),e._v(" "),n("template",{slot:"after"},[e._t("after")],2),e._v(" "),n("template",{slot:"empty"},[e._t("empty")],2)],2)},cd=[];ld._withStripped=!0;const dd=void 0,ud=void 0,hd=void 0,pd=!1,gd=Xc({render:ld,staticRenderFns:cd},dd,od,ud,pd,hd,!1,void 0,void 0,void 0);var fd={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.item.hasOwnProperty(this.vscrollData.keyField))return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.validSizes[this.id]&&this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(){this.size||this.onDataUpdate()},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const e in this.sizeDependencies)this.$watch((()=>this.sizeDependencies[e]),this.onDataUpdate);this.vscrollParent.$on("vscroll:update",this.onVscrollUpdate),this.vscrollParent.$on("vscroll:update-size",this.onVscrollUpdateSize)}},mounted(){this.vscrollData.active&&(this.updateSize(),this.observeSize())},beforeDestroy(){this.vscrollParent.$off("vscroll:update",this.onVscrollUpdate),this.vscrollParent.$off("vscroll:update-size",this.onVscrollUpdateSize),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",(()=>{this.onDataUpdate()}),{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),this.$_forceNextVScrollUpdate!==this.id&&!e&&this.size||this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(e){this.$nextTick((()=>{if(this.id===e){const e=this.$el.offsetWidth,t=this.$el.offsetHeight;this.applySize(e,t)}this.$_pendingSizeUpdate=null}))},applySize(e,t){const n=~~("vertical"===this.vscrollParent.direction?t:e);n&&this.size!==n&&(this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.$set(this.vscrollData.sizes,this.id,n),this.$set(this.vscrollData.validSizes,this.id,!0),this.emitResize&&this.$emit("resize",this.id))},observeSize(){this.vscrollResizeObserver&&this.$el.parentNode&&(this.vscrollResizeObserver.observe(this.$el.parentNode),this.$el.parentNode.addEventListener("resize",this.onResize))},unobserveSize(){this.vscrollResizeObserver&&(this.vscrollResizeObserver.unobserve(this.$el.parentNode),this.$el.parentNode.removeEventListener("resize",this.onResize))},onResize(e){const{width:t,height:n}=e.detail.contentRect;this.applySize(t,n)}},render(e){return e(this.tag,this.$slots.default)}};const md=fd,yd=void 0,vd=void 0,bd=void 0,Td=void 0,_d=Xc({},yd,md,vd,Td,bd,!1,void 0,void 0,void 0);function Sd({idProp:e=(e=>e.item.id)}={}){const t={},n=new qc["default"]({data(){return{store:t}}});return{data(){return{idState:null}},created(){this.$_id=null,this.$_getId="function"===typeof e?()=>e.call(this,this):()=>this[e],this.$watch(this.$_getId,{handler(e){this.$nextTick((()=>{this.$_id=e}))},immediate:!0}),this.$_updateIdState()},beforeUpdate(){this.$_updateIdState()},methods:{$_idStateInit(e){const i=this.$options.idState;if("function"===typeof i){const a=i.call(this,this);return n.$set(t,e,a),this.$_id=e,a}throw new Error("[mixin IdState] Missing `idState` function on component definition.")},$_updateIdState(){const n=this.$_getId();null==n&&console.warn(`No id found for IdState with idProp: '${e}'.`),n!==this.$_id&&(t[n]||this.$_idStateInit(n),this.idState=t[n])}}}}function kd(e,t){e.component(`${t}recycle-scroller`,sd),e.component(`${t}RecycleScroller`,sd),e.component(`${t}dynamic-scroller`,gd),e.component(`${t}DynamicScroller`,gd),e.component(`${t}dynamic-scroller-item`,_d),e.component(`${t}DynamicScrollerItem`,_d)}const Cd={version:"1.1.2",install(e,t){const n=Object.assign({},{installComponents:!0,componentsPrefix:""},t);for(const i in n)"undefined"!==typeof n[i]&&(Fc[i]=n[i]);n.installComponents&&kd(e,n.componentsPrefix)}};let wd=null;function xd(e){const t=(0,Tn.RL)((0,Tn.hr)(e));return new RegExp(t,"ig")}"undefined"!==typeof window?wd=window.Vue:"undefined"!==typeof n.g&&(wd=n.g.Vue),wd&&wd.use(Cd);var Id,$d,Dd=function(){var e=this,t=e._self._c;return t("BaseNavigatorCardItem",{class:{expanded:e.expanded,active:e.isActive,"is-group":e.isGroupMarker},style:{"--nesting-index":e.item.depth},attrs:{"data-nesting-index":e.item.depth,id:`container-${e.item.uid}`,"aria-hidden":e.isRendered?null:"true",hideNavigatorIcon:e.isGroupMarker},nativeOn:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])||"button"in t&&0!==t.button?null:(t.preventDefault(),e.handleLeftKeydown.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])||"button"in t&&2!==t.button||t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.handleRightKeydown.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.clickReference.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])?null:t.altKey?"button"in t&&2!==t.button?null:(t.preventDefault(),e.toggleEntireTree.apply(null,arguments)):null}]},scopedSlots:e._u([{key:"depth-spacer",fn:function(){return[t("span",{attrs:{hidden:"",id:e.usageLabel}},[e._v(" "+e._s(e.$t("filter.navigate"))+" ")]),e.isParent?t("button",{staticClass:"tree-toggle",attrs:{tabindex:"-1","aria-labelledby":e.item.uid,"aria-expanded":e.expanded?"true":"false","aria-describedby":e.ariaDescribedBy},on:{click:[function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:(t.preventDefault(),e.toggleTree.apply(null,arguments))},function(t){return t.altKey?(t.preventDefault(),e.toggleEntireTree.apply(null,arguments)):null},function(t){return t.metaKey?(t.preventDefault(),e.toggleSiblings.apply(null,arguments)):null}]}},[t("InlineChevronRightIcon",{staticClass:"icon-inline chevron",class:{rotate:e.expanded,animating:e.idState.isOpening}})],1):e._e()]},proxy:!0},{key:"navigator-icon",fn:function({className:n}){return[e.apiChange?t("span",{class:[{[`changed changed-${e.apiChange}`]:e.apiChange},n]}):t("TopicTypeIcon",{key:e.item.uid,class:n,attrs:{type:e.item.type,"image-override":e.item.icon?e.navigatorReferences[e.item.icon]:null,shouldCalculateOptimalWidth:!1}})]}},{key:"title-container",fn:function(){return[e.isParent?t("span",{attrs:{hidden:"",id:e.parentLabel}},[e._v(e._s(e.$tc("filter.parent-label",e.item.childUIDs.length,{"number-siblings":e.item.index+1,"total-siblings":e.item.siblingsCount,"parent-siblings":e.item.parent,"number-parent":e.item.childUIDs.length})))]):e._e(),e.isParent?e._e():t("span",{attrs:{id:e.siblingsLabel,hidden:""}},[e._v(" "+e._s(e.$t("filter.siblings-label",{"number-siblings":e.item.index+1,"total-siblings":e.item.siblingsCount,"parent-siblings":e.item.parent}))+" ")]),t(e.refComponent,{ref:"reference",tag:"component",staticClass:"leaf-link",class:{bolded:e.isBold},attrs:{id:e.item.uid,url:e.isGroupMarker?null:e.item.path||"",tabindex:e.isFocused?"0":"-1","aria-describedby":`${e.ariaDescribedBy} ${e.usageLabel}`},nativeOn:{click:[function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?null:e.handleClick.apply(null,arguments)},function(t){return t.altKey?(t.preventDefault(),e.toggleEntireTree.apply(null,arguments)):null}]}},[t("HighlightMatches",{attrs:{text:e.item.title,matcher:e.filterPattern}})],1),e.isDeprecated?t("Badge",{attrs:{variant:"deprecated"}}):e.isBeta?t("Badge",{attrs:{variant:"beta"}}):e._e()]},proxy:!0},{key:"content-container",fn:function(){return[e._t("card-item-content")]},proxy:!0}],null,!0)})},Ld=[],Pd=function(){var e=this,t=e._self._c;return t("div",{staticClass:"navigator-card-item"},[t("div",{staticClass:"head-wrapper"},[t("div",{staticClass:"depth-spacer"},[e._t("depth-spacer")],2),e.hideNavigatorIcon?e._e():t("div",{staticClass:"navigator-icon-wrapper"},[e._t("navigator-icon",null,{className:"navigator-icon"})],2),t("div",{staticClass:"title-container"},[e._t("title-container")],2),t("div",{staticClass:"content-container"},[e._t("content-container")],2)])])},Od=[],Ad={name:"BaseNavigatorCardItem",props:{hideNavigatorIcon:{type:Boolean,default:()=>!1}}},Nd=Ad,Rd=(0,F.Z)(Nd,Pd,Od,!1,null,"5e71f320",null),Bd=Rd.exports,Ed={name:"HighlightMatch",props:{text:{type:String,required:!0},matcher:{type:RegExp,default:void 0}},render(e){const{matcher:t,text:n}=this;if(!t)return e("p",{class:"highlight"},n);const i=[];let a=0,s=null;const r=new RegExp(t,"gi");while(null!==(s=r.exec(n))){const t=s[0].length,r=s.index+t,o=n.slice(a,s.index);o&&i.push(e("span",o));const l=n.slice(s.index,r);l&&i.push(e("span",{class:"match"},l)),a=r}const o=n.slice(a,n.length);return o&&i.push(e("span",o)),e("p",{class:"highlight"},i)}},Md=Ed,zd=(0,F.Z)(Md,Id,$d,!1,null,"7b81ca08",null),Kd=zd.exports,Zd={name:"NavigatorCardItem",mixins:[Sd({idProp:e=>e.item.uid})],components:{BaseNavigatorCardItem:Bd,HighlightMatches:Kd,TopicTypeIcon:we.Z,InlineChevronRightIcon:Pr.Z,Reference:Wa.Z,Badge:qi.Z},props:{isRendered:{type:Boolean,default:!1},item:{type:Object,required:!0},expanded:{type:Boolean,default:!1},filterPattern:{type:RegExp,default:void 0},filterText:{type:String,default:null},isActive:{type:Boolean,default:!1},isBold:{type:Boolean,default:!1},apiChange:{type:String,default:null,validator:e=>qt.UG.includes(e)},isFocused:{type:Boolean,default:()=>!1},enableFocus:{type:Boolean,default:!0},navigatorReferences:{type:Object,default:()=>({})}},idState(){return{isOpening:!1}},computed:{isGroupMarker:({item:{type:e}})=>e===xe.t.groupMarker,isParent:({item:e,isGroupMarker:t})=>!!e.childUIDs.length&&!t,parentLabel:({item:e})=>`label-parent-${e.uid}`,siblingsLabel:({item:e})=>`label-${e.uid}`,usageLabel:({item:e})=>`usage-${e.uid}`,ariaDescribedBy:({isParent:e,parentLabel:t,siblingsLabel:n})=>e?`${t}`:`${n}`,isBeta:({item:{beta:e}})=>!!e,isDeprecated:({item:{deprecated:e}})=>!!e,refComponent:({isGroupMarker:e})=>e?"h3":Wa.Z},methods:{toggleTree(){this.idState.isOpening=!0,this.$emit("toggle",this.item)},toggleEntireTree(){this.idState.isOpening=!0,this.$emit("toggle-full",this.item)},toggleSiblings(){this.idState.isOpening=!0,this.$emit("toggle-siblings",this.item)},handleLeftKeydown(){this.expanded?this.toggleTree():this.$emit("focus-parent",this.item)},handleRightKeydown(){!this.expanded&&this.isParent&&this.toggleTree()},clickReference(){(this.$refs.reference.$el||this.$refs.reference).click()},focusReference(){(this.$refs.reference.$el||this.$refs.reference).focus()},handleClick(){this.isGroupMarker||this.$emit("navigate",this.item.uid)}},watch:{async isFocused(e){await(0,Me.J)(8),e&&this.isRendered&&this.enableFocus&&this.focusReference()},async expanded(){await(0,Me.J)(9),this.idState.isOpening=!1}}},jd=Zd,qd=(0,F.Z)(jd,Dd,Ld,!1,null,"5148de22",null),Fd=qd.exports,Hd=function(){var e=this,t=e._self._c;return t("div",{staticClass:"navigator-card"},[t("div",{staticClass:"navigator-card-full-height"},[t("div",{staticClass:"navigator-card-inner"},[t("div",{staticClass:"head-wrapper"},[e._t("above-navigator-head"),t("div",{staticClass:"head-inner"},[e._t("navigator-head"),t("button",{staticClass:"close-card",attrs:{id:e.SIDEBAR_HIDE_BUTTON_ID,"aria-label":e.$t("navigator.close-navigator")},on:{click:e.handleHideClick}},[t("InlineCloseIcon",{staticClass:"icon-inline close-icon"})],1)],2)],2),e._t("body",null,{className:"card-body"})],2)])])},Vd=[],Wd=n(7181),Ud={name:"BaseNavigatorCard",components:{InlineCloseIcon:Wd.Z},data(){return{SIDEBAR_HIDE_BUTTON_ID:xl}},methods:{async handleHideClick(){this.$emit("close"),await this.$nextTick();const e=document.getElementById(Xl.Yj);e&&e.focus()}}},Qd=Ud,Gd=(0,F.Z)(Qd,Hd,Vd,!1,null,"584a744a",null),Xd=Gd.exports;const Yd={sampleCode:"filter.tags.sample-code",tutorials:"filter.tags.tutorials",articles:"filter.tags.articles",webServiceEndpoints:"filter.tags.web-service-endpoints"},Jd=qt.Ag,eu={...Yd,...Jd,hideDeprecated:"filter.tags.hide-deprecated"},tu={[xe.t.article]:eu.articles,[xe.t.learn]:eu.tutorials,[xe.t.overview]:eu.tutorials,[xe.t.resources]:eu.tutorials,[xe.t.sampleCode]:eu.sampleCode,[xe.t.section]:eu.tutorials,[xe.t.tutorial]:eu.tutorials,[xe.t.project]:eu.tutorials,[xe.t.httpRequest]:eu.webServiceEndpoints};var nu={computed:{filteredChildren:({children:e,selectedTags:t,apiChanges:n,filterPattern:i,filterChildren:a})=>a(e,t,n,i),navigatorItems:({nodesToRender:e})=>e},methods:{filterChildren(e,t,n,i){const a=new Set(t);return e.filter((({title:e,path:t,type:s,deprecated:r,deprecatedChildrenCount:o,childUIDs:l})=>{const c=!i||i.test(e),d=r||o===l.length;let u=!0;if(a.size){if(u=a.has(tu[s]),n&&!u){const e=n[t];u=a.has(eu[e])}a.has(eu.hideDeprecated)&&(u=!d)}const h=!n||!!n[t];return c&&u&&h}))}}},iu={name:"TagsDataProvider",constants:{TOPIC_TYPE_TO_TAG:tu},props:{shouldTruncateTags:{type:Boolean,default:!1}},computed:{availableTags:({renderableChildNodesMap:e,apiChangesObject:t,extractTags:n})=>n(e,t),suggestedTags({availableTags:e,selectedTags:t,hideAvailableTags:n}){return n||t.length?[]:e},translatableTags:({availableTags:e})=>[eu.hideDeprecated,...e]},methods:{extractTags(e,t){const n=new Set(Object.values(Yd)),i={type:[],changes:[],other:[]},a=new Set(Object.values(t));a.size?a.forEach((e=>{n.add(eu[e])})):n.add(eu.hideDeprecated);for(const s in e){if(!Object.hasOwnProperty.call(e,s))continue;if(!n.size)break;const{type:a,path:r,deprecated:o}=e[s],l=tu[a];l&&n.has(l)&&(i.type.push(l),n.delete(l));const c=t[r];c&&n.has(eu[c])&&(i.changes.push(eu[c]),n.delete(eu[c])),o&&n.has(eu.hideDeprecated)&&(i.other.push(eu.hideDeprecated),n.delete(eu.hideDeprecated))}return Object.values(i).flat()}}};const au="navigator.state",su="navigator.no-results",ru="navigator.no-children",ou="navigator.error-fetching",lu="navigator.items-found";var cu={name:"NavigatorCard",constants:{STORAGE_KEY:au,ERROR_FETCHING:ou,ITEMS_FOUND:lu},components:{FilterInput:el,NavigatorCardItem:Fd,DynamicScroller:gd,DynamicScrollerItem:_d,BaseNavigatorCard:Xd,Reference:Wa.Z,Badge:qi.Z},props:{technologyPath:{type:String,default:""},children:{type:Array,required:!0},technology:{type:String,required:!1},activePath:{type:Array,required:!0},type:{type:String,required:!0},scrollLockID:{type:String,default:""},errorFetching:{type:Boolean,default:!1},apiChanges:{type:Object,default:null},isTechnologyBeta:{type:Boolean,default:!1},navigatorReferences:{type:Object,default:()=>{}},renderFilterOnTop:{type:Boolean,default:!1},hideAvailableTags:{type:Boolean,default:!1}},mixins:[Ao,nu,iu],data(){return{filter:"",debouncedFilter:"",selectedTags:[],openNodes:Object.freeze({}),nodesToRender:Object.freeze([]),activeUID:null,lastFocusTarget:null,allNodesToggled:!1,INDEX_ROOT_KEY:Cl}},computed:{isTechnologyRoute:({technologyPath:e,$route:t})=>e.toLowerCase()===t.path.toLowerCase(),politeAriaLive(){const{hasNodes:e,navigatorItems:t}=this;return e?this.$tc(lu,t.length,{number:t.length}):""},assertiveAriaLive:({hasNodes:e,hasFilter:t,errorFetching:n})=>e?"":t?su:n?ou:ru,filterPattern:({debouncedFilter:e})=>e?new RegExp(xd(e),"i"):null,itemSize:()=>wl,childrenMap({children:e}){return $l(e)},activePathChildren({activeUID:e,childrenMap:t}){return e&&t[e]?Ol(e,t):[]},activePathMap:({activePathChildren:e})=>Object.fromEntries(e.map((({uid:e})=>[e,!0]))),activeIndex:({activeUID:e,navigatorItems:t})=>t.findIndex((t=>t.uid===e)),renderableChildNodesMap({hasFilter:e,childrenMap:t,deprecatedHidden:n,filteredChildren:i,removeDeprecated:a}){if(!e)return t;const s=i.length-1,r=new Set([]);for(let o=s;o>=0;o-=1){const e=i[o],s=t[e.groupMarkerUID];if(s&&r.add(s),r.has(e))continue;if(r.has(t[e.parent])&&e.type!==xe.t.groupMarker){r.add(e);continue}let l=[];e.childUIDs.length&&(l=a(Ll(e.uid,t),n)),l.concat(Ol(e.uid,t)).forEach((e=>r.add(e)))}return $l([...r])},nodeChangeDeps:({filteredChildren:e,activePathChildren:t,debouncedFilter:n,selectedTags:i})=>[e,t,n,i],hasFilter({debouncedFilter:e,selectedTags:t,apiChanges:n}){return Boolean(e.length||t.length||n)},deprecatedHidden:({selectedTags:e})=>e[0]===eu.hideDeprecated,apiChangesObject(){return this.apiChanges||{}},hasNodes:({navigatorItems:e})=>!!e.length,totalItemsToNavigate:({navigatorItems:e})=>e.length,lastActivePathItem:({activePath:e})=>(0,N.Z$)(e)},created(){this.restorePersistedState()},watch:{filter:"debounceInput",nodeChangeDeps:"trackOpenNodes",activePath:"handleActivePathChange",apiChanges(e){e||(this.selectedTags=this.selectedTags.filter((e=>!Object.values(Jd).includes(e))))},async activeUID(e,t){await this.$nextTick();const n=this.$refs[`dynamicScroller_${t}`];n&&n.updateSize&&n.updateSize()},technology(){this.clearFilters()}},methods:{setUnlessEqual(e,t){(0,N.Xy)(t,this[e])||(this[e]=Object.freeze(t))},toggleAllNodes(){const e=this.children.filter((e=>e.parent===Cl&&e.type!==xe.t.groupMarker&&e.childUIDs.length));this.allNodesToggled=!this.allNodesToggled,this.allNodesToggled&&(this.openNodes={},this.generateNodesToRender()),e.forEach((e=>{this.toggleFullTree(e)}))},clearFilters(){this.filter="",this.debouncedFilter="",this.selectedTags=[]},scrollToFocus(){this.$refs.scroller.scrollToItem(this.focusedIndex)},debounceInput:bo((function(e){this.debouncedFilter=e,this.lastFocusTarget=null}),200),trackOpenNodes([e,t,n,i],[,a=[],s="",r=[]]=[]){if(n!==s&&!s&&this.getFromStorage("filter")||!(0,N.Xy)(i,r)&&!r.length&&this.getFromStorage("selectedTags",[]).length)return;const o=!(0,N.Xy)(a,t),{childrenMap:l}=this;let c=t;if(!(this.deprecatedHidden&&!this.debouncedFilter.length||o&&this.hasFilter)&&this.hasFilter){const t=new Set,n=e.length-1;for(let i=n;i>=0;i-=1){const n=e[i];t.has(l[n.parent])||t.has(n)||Ol(n.uid,l).slice(0,-1).forEach((e=>t.add(e)))}c=[...t]}const d=o?{...this.openNodes}:{},u=c.reduce(((e,t)=>(e[t.uid]=!0,e)),d);this.setUnlessEqual("openNodes",u),this.generateNodesToRender(),this.updateFocusIndexExternally()},toggle(e){const t=this.openNodes[e.uid];let n=[],i=[];if(t){const t=(0,x.d9)(this.openNodes),n=Ll(e.uid,this.childrenMap);n.forEach((({uid:e})=>{delete t[e]})),this.setUnlessEqual("openNodes",t),i=n.slice(1)}else this.setUnlessEqual("openNodes",{...this.openNodes,[e.uid]:!0}),n=Pl(e.uid,this.childrenMap,this.children).filter((e=>this.renderableChildNodesMap[e.uid]));this.augmentRenderNodes({uid:e.uid,include:n,exclude:i})},toggleFullTree(e){const t=this.openNodes[e.uid],n=(0,x.d9)(this.openNodes),i=Ll(e.uid,this.childrenMap);let a=[],s=[];i.forEach((({uid:e})=>{t?delete n[e]:n[e]=!0})),t?a=i.slice(1):s=i.slice(1).filter((e=>this.renderableChildNodesMap[e.uid])),this.setUnlessEqual("openNodes",n),this.augmentRenderNodes({uid:e.uid,exclude:a,include:s})},toggleSiblings(e){const t=this.openNodes[e.uid],n=(0,x.d9)(this.openNodes),i=Al(e.uid,this.childrenMap,this.children);i.forEach((({uid:e,childUIDs:i,type:a})=>{if(i.length&&a!==xe.t.groupMarker)if(t){const t=Ll(e,this.childrenMap);t.forEach((e=>{delete n[e.uid]})),delete n[e],this.augmentRenderNodes({uid:e,exclude:t.slice(1),include:[]})}else{n[e]=!0;const t=Pl(e,this.childrenMap,this.children).filter((e=>this.renderableChildNodesMap[e.uid]));this.augmentRenderNodes({uid:e,exclude:[],include:t})}})),this.setUnlessEqual("openNodes",n),this.persistState()},removeDeprecated(e,t){return t?e.filter((({deprecated:e})=>!e)):e},generateNodesToRender(){const{children:e,openNodes:t,renderableChildNodesMap:n}=this;this.setUnlessEqual("nodesToRender",e.filter((e=>n[e.uid]&&(e.parent===Cl||t[e.parent])))),this.persistState(),this.scrollToElement()},augmentRenderNodes({uid:e,include:t=[],exclude:n=[]}){const i=this.nodesToRender.findIndex((t=>t.uid===e));if(t.length){const e=t.filter((e=>!this.nodesToRender.includes(e))),n=this.nodesToRender.slice(0);n.splice(i+1,0,...e),this.setUnlessEqual("nodesToRender",n)}else if(n.length){const e=new Set(n);this.setUnlessEqual("nodesToRender",this.nodesToRender.filter((t=>!e.has(t))))}this.persistState()},getFromStorage(e,t=null){const n=Wl.y7.get(au,{}),i=n[this.technologyPath];return i?e?i[e]||t:i:t},persistState(){const e={path:this.lastActivePathItem},{path:t}=this.activeUID&&this.childrenMap[this.activeUID]||e,n={technology:this.technology,path:t,hasApiChanges:!!this.apiChanges,openNodes:Object.keys(this.openNodes).map(Number),nodesToRender:this.nodesToRender.map((({uid:e})=>e)),activeUID:this.activeUID,filter:this.filter,selectedTags:this.selectedTags},i={...Wl.y7.get(au,{}),[this.technologyPath]:n};Wl.y7.set(au,i)},clearPersistedState(){const e={...Wl.y7.get(au,{}),[this.technologyPath]:{}};Wl.y7.set(au,e)},restorePersistedState(){const e=this.getFromStorage();if(!e||e.path!==this.lastActivePathItem)return this.clearPersistedState(),void this.handleActivePathChange(this.activePath);const{technology:t,nodesToRender:n=[],filter:i="",hasAPIChanges:a=!1,activeUID:s=null,selectedTags:r=[],openNodes:o}=e;if(!n.length&&!i&&!r.length)return this.clearPersistedState(),void this.handleActivePathChange(this.activePath);const{childrenMap:l}=this,c=n.every((e=>l[e])),d=s?(this.childrenMap[s]||{}).path===this.lastActivePathItem:1===this.activePath.length;if(t!==this.technology||!c||a!==Boolean(this.apiChanges)||!d||s&&!i&&!r.length&&!n.includes(s))return this.clearPersistedState(),void this.handleActivePathChange(this.activePath);this.setUnlessEqual("openNodes",Object.fromEntries(o.map((e=>[e,!0])))),this.setUnlessEqual("nodesToRender",n.map((e=>l[e]))),this.selectedTags=r,this.filter=i,this.debouncedFilter=this.filter,this.activeUID=s,this.scrollToElement()},async scrollToElement(){if(await(0,Me.J)(1),!this.$refs.scroller)return;const e=document.getElementById(this.activeUID);if(e&&0===this.getChildPositionInScroller(e))return;const t=this.nodesToRender.findIndex((e=>e.uid===this.activeUID));-1!==t?this.$refs.scroller.scrollToItem(t):this.hasFilter&&!this.deprecatedHidden&&this.$refs.scroller.scrollToItem(0)},getChildPositionInScroller(e){if(!e)return 0;const{paddingTop:t,paddingBottom:n}=getComputedStyle(this.$refs.scroller.$el),i={top:parseInt(t,10)||0,bottom:parseInt(n,10)||0},{y:a,height:s}=this.$refs.scroller.$el.getBoundingClientRect(),{y:r}=e.getBoundingClientRect();let o=0;e.offsetParent&&(o=e.offsetParent.offsetHeight);const l=r-a-i.top;return l<0?-1:l+o>=s-i.bottom?1:0},isInsideScroller(e){return!!this.$refs.scroller&&this.$refs.scroller.$el.contains(e)},handleFocusIn({target:e,relatedTarget:t}){if(this.lastFocusTarget=e,!t)return;const n=this.getChildPositionInScroller(e);if(0===n)return;const{offsetHeight:i}=e.offsetParent;this.$refs.scroller.$el.scrollBy({top:i*n,left:0})},handleFocusOut(e){e.relatedTarget&&(this.isInsideScroller(e.relatedTarget)||(this.lastFocusTarget=null))},handleScrollerUpdate:bo((async function(){await(0,Me.X)(300),this.lastFocusTarget&&this.isInsideScroller(this.lastFocusTarget)&&document.activeElement!==this.lastFocusTarget&&this.lastFocusTarget.focus({preventScroll:!0})}),50),setActiveUID(e){this.activeUID=e},handleNavigationChange(e){const t=this.childrenMap[e].path;t.startsWith(this.technologyPath)&&(this.setActiveUID(e),this.$emit("navigate",t))},pathsToFlatChildren(e){const t=e.slice(0).reverse(),{childrenMap:n}=this;let i=this.children;const a=[];while(t.length){const e=t.pop(),s=i.find((t=>t.path===e));if(!s)break;a.push(s),t.length&&(i=s.childUIDs.map((e=>n[e])))}return a},handleActivePathChange(e){const t=this.childrenMap[this.activeUID],n=(0,N.Z$)(e);if(t){if(n===t.path)return;const e=Al(this.activeUID,this.childrenMap,this.children),i=Pl(this.activeUID,this.childrenMap,this.children),a=Ol(this.activeUID,this.childrenMap),s=[...i,...e,...a].find((e=>e.path===n));if(s)return void this.setActiveUID(s.uid)}const i=this.pathsToFlatChildren(e);i.length?this.setActiveUID(i[i.length-1].uid):this.activeUID?this.setActiveUID(null):this.trackOpenNodes(this.nodeChangeDeps)},updateFocusIndexExternally(){this.externalFocusChange=!0,this.activeIndex>0?this.focusIndex(this.activeIndex):this.focusIndex(0)},focusNodeParent(e){const t=this.childrenMap[e.parent];if(!t)return;const n=this.nodesToRender.findIndex((e=>e.uid===t.uid));-1!==n&&this.focusIndex(n)}}},du=cu,uu=(0,F.Z)(du,pc,gc,!1,null,"d6581240",null),hu=uu.exports,pu=function(){var e=this,t=e._self._c;return t("BaseNavigatorCard",e._b({on:{close:function(t){return e.$emit("close")}},scopedSlots:e._u([{key:"body",fn:function({className:n}){return[t("transition",{attrs:{name:"delay-visibility"}},[t("div",{staticClass:"loading-navigator",class:n,attrs:{"aria-hidden":"true"}},e._l(e.LOADER_ROWS,(function(e,n){return t("LoadingNavigatorItem",{key:n,attrs:{index:n,width:e.width,hideNavigatorIcon:e.hideNavigatorIcon}})})),1)])]}}])},"BaseNavigatorCard",e.$props,!1))},gu=[],fu=function(){var e=this,t=e._self._c;return t("BaseNavigatorCardItem",{staticClass:"loading-navigator-item",style:`--index: ${e.index};`,attrs:{hideNavigatorIcon:e.hideNavigatorIcon},scopedSlots:e._u([{key:"navigator-icon",fn:function({className:e}){return[t("div",{class:e})]}},{key:"title-container",fn:function(){return[t("div",{staticClass:"loader",style:{width:e.width}})]},proxy:!0}])})},mu=[],yu={name:"LoadingNavigatorItem",components:{BaseNavigatorCardItem:Bd},props:{...Bd.props,index:{type:Number,default:0},width:{type:String,default:"50%"}}},vu=yu,bu=(0,F.Z)(vu,fu,mu,!1,null,"0de29914",null),Tu=bu.exports;const _u=[{width:"30%",hideNavigatorIcon:!0},{width:"80%"},{width:"50%"}];var Su={name:"LoadingNavigatorCard",components:{BaseNavigatorCard:Xd,LoadingNavigatorItem:Tu},data(){return{LOADER_ROWS:_u}}},ku=Su,Cu=(0,F.Z)(ku,pu,gu,!1,null,"3b7cf3a4",null),wu=Cu.exports,xu={name:"Navigator",components:{NavigatorCard:hu,LoadingNavigatorCard:wu},data(){return{INDEX_ROOT_KEY:Cl}},props:{flatChildren:{type:Array,required:!0},parentTopicIdentifiers:{type:Array,required:!0},technologyProps:{type:Object,required:!1},isFetching:{type:Boolean,default:!1},references:{type:Object,default:()=>{}},navigatorReferences:{type:Object,default:()=>{}},scrollLockID:{type:String,default:""},errorFetching:{type:Boolean,default:!1},renderFilterOnTop:{type:Boolean,default:!1},apiChanges:{type:Object,default:null}},computed:{parentTopicReferences({references:e,parentTopicIdentifiers:t}){return t.reduce(((t,n)=>{const i=e[n];return i?t.concat(i):(console.error(`Reference for "${n}" is missing`),t)}),[])},activePath({parentTopicReferences:e,$route:{path:t}}){if(t=t.replace(/\/$/,"").toLowerCase(),!e.length)return[t];let n=1;return"technologies"===e[0].kind&&(n=2),e.slice(n).map((e=>e.url)).concat(t)},type:()=>xe.t.module}},Iu=xu,$u=(0,F.Z)(Iu,uc,hc,!1,null,"5611024b",null),Du=$u.exports,Lu=n(5184),Pu={computed:{indexNodes({indexState:{flatChildren:e},interfaceLanguage:t}){return e?e[t]??(e[D.Z.swift.key.url]||[]):[]},apiChanges({indexState:{apiChanges:e,apiChangesVersion:t,errorFetchingDiffs:n},interfaceLanguage:i,selectedAPIChangesVersion:a}){if(e&&!n)return t===a?e[i]||e[D.Z.swift.key.url]:void 0},technologyProps({indexState:{technologyProps:e},interfaceLanguage:t,technology:n}){return e[t]??e[D.Z.swift.key.url]??(n?{technology:n.title,technologyPath:n.path||n.url,isTechnologyBeta:n.beta}:null)},navigatorProps:({indexNodes:e,indexState:{flatChildren:t,references:n,errorFetching:i},apiChanges:a})=>({flatChildren:e,navigatorReferences:n,apiChanges:a,isFetching:!t&&!i,errorFetching:i})},data(){return{indexState:B["default"].state}}},Ou=function(){var e=this,t=e._self._c;return t("NavBase",{staticClass:"documentation-nav",attrs:{breakpoint:e.BreakpointName.medium,hasOverlay:!1,hasNoBorder:e.hasNoBorder,isDark:e.isDark,isWideFormat:"",hasFullWidthBorder:"","aria-label":e.$t("api-reference"),showActions:e.hasMenuItems},scopedSlots:e._u([e.displaySidenav?{key:"pre-title",fn:function({closeNav:n,isOpen:i,currentBreakpoint:a,className:s}){return[t("div",{class:s},[t("div",{staticClass:"sidenav-toggle-wrapper"},[t("button",{staticClass:"sidenav-toggle",attrs:{"aria-label":e.$t("navigator.open-navigator"),id:e.baseNavOpenSidenavButtonId,tabindex:i?-1:null},on:{click:function(t){return t.preventDefault(),e.handleSidenavToggle(n,a)}}},[t("span",{staticClass:"sidenav-icon-wrapper"},[t("SidenavIcon",{staticClass:"icon-inline sidenav-icon"})],1)])])])]}}:null,{key:"default",fn:function(){return[e._t("title",null,{className:"nav-title"})]},proxy:!0},{key:"tray",fn:function({closeNav:n}){return[e.hasMenuItems?t("NavMenuItems",{staticClass:"nav-menu-settings"},[e.hasLanguageToggle?t("LanguageToggle",{attrs:{interfaceLanguage:e.interfaceLanguage,objcPath:e.objcPath,swiftPath:e.swiftPath,closeNav:n}}):e._e(),e._t("menu-items")],2):e._e(),e._t("tray-after")]}},{key:"after-content",fn:function(){return[e._t("after-content")]},proxy:!0}],null,!0)})},Au=[],Nu=n(2586),Ru=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"sidenav-icon",attrs:{viewBox:"0 0 14 14",height:"14",themeId:"sidenav"}},[t("path",{attrs:{d:"M6.533 1.867h-6.533v10.267h14v-10.267zM0.933 11.2v-8.4h4.667v8.4zM13.067 11.2h-6.533v-8.4h6.533z"}}),t("path",{attrs:{d:"M1.867 5.133h2.8v0.933h-2.8z"}}),t("path",{attrs:{d:"M1.867 7.933h2.8v0.933h-2.8z"}})])},Bu=[],Eu={name:"SidenavIcon",components:{SVGIcon:pr.Z}},Mu=Eu,zu=(0,F.Z)(Mu,Ru,Bu,!1,null,null,null),Ku=zu.exports,Zu=function(){var e=this,t=e._self._c;return t("NavMenuItemBase",{staticClass:"nav-menu-setting language-container"},[t("div",{class:{"language-toggle-container":e.hasLanguages}},[t("select",{ref:"language-sizer",staticClass:"language-dropdown language-sizer",attrs:{"aria-hidden":"true",tabindex:"-1"}},[t("option",{key:e.currentLanguage.name,attrs:{selected:""}},[e._v(e._s(e.currentLanguage.name))])]),t("label",{staticClass:"nav-menu-setting-label",attrs:{for:e.hasLanguages?"language-toggle":null}},[e._v(e._s(e.$t("formats.colon",{content:e.$t("language")})))]),e.hasLanguages?t("select",{directives:[{name:"model",rawName:"v-model",value:e.languageModel,expression:"languageModel"}],staticClass:"language-dropdown nav-menu-link",style:`width: ${e.adjustedWidth}px`,attrs:{id:"language-toggle"},on:{change:[function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.languageModel=t.target.multiple?n:n[0]},function(t){return e.pushRoute(e.currentLanguage.route)}]}},e._l(e.languages,(function(n){return t("option",{key:n.api,domProps:{value:n.api}},[e._v(" "+e._s(n.name)+" ")])})),0):t("span",{staticClass:"nav-menu-toggle-none current-language",attrs:{"aria-current":"page"}},[e._v(e._s(e.currentLanguage.name))]),e.hasLanguages?t("InlineChevronDownIcon",{staticClass:"toggle-icon icon-inline"}):e._e()],1),e.hasLanguages?t("div",{staticClass:"language-list-container"},[t("span",{staticClass:"nav-menu-setting-label"},[e._v(e._s(e.$t("formats.colon",{content:e.$t("language")})))]),t("ul",{staticClass:"language-list"},e._l(e.languages,(function(n){return t("li",{key:n.api,staticClass:"language-list-item"},[n.api===e.languageModel?t("span",{staticClass:"current-language",attrs:{"data-language":n.api,"aria-current":"page"}},[e._v(" "+e._s(n.name)+" ")]):t("a",{staticClass:"nav-menu-link",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.pushRoute(n.route)}}},[e._v(" "+e._s(n.name)+" ")])])})),0)]):e._e()])},ju=[],qu=n(5151),Fu={name:"LanguageToggle",components:{InlineChevronDownIcon:qu.Z,NavMenuItemBase:Lr.Z},inject:{store:{default(){return{setPreferredLanguage(){}}}}},props:{interfaceLanguage:{type:String,required:!0},objcPath:{type:String,required:!1},swiftPath:{type:String,required:!1},closeNav:{type:Function,default:()=>{}}},data(){return{languageModel:null,adjustedWidth:0}},mounted(){const e=Ee((async()=>{await(0,Me.J)(3),this.calculateSelectWidth()}),150);window.addEventListener("resize",e),window.addEventListener("orientationchange",e),this.$once("hook:beforeDestroy",(()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}))},watch:{interfaceLanguage:{immediate:!0,handler(e){this.languageModel=e}},currentLanguage:{immediate:!0,handler:"calculateSelectWidth"}},methods:{getRoute(e){const t=e.query===D.Z.swift.key.url?void 0:e.query;return{query:{...this.$route.query,language:t},path:this.isCurrentPath(e.path)?null:(0,A.Jf)(e.path)}},async pushRoute(e){await this.closeNav(),this.store.setPreferredLanguage(e.query),this.$router.push(this.getRoute(e))},isCurrentPath(e){return this.$route.path.replace(/^\//,"")===e},async calculateSelectWidth(){await this.$nextTick(),this.adjustedWidth=this.$refs["language-sizer"].clientWidth+8}},computed:{languages(){return[{name:D.Z.swift.name,api:D.Z.swift.key.api,route:{path:this.swiftPath,query:D.Z.swift.key.url}},{name:D.Z.objectiveC.name,api:D.Z.objectiveC.key.api,route:{path:this.objcPath,query:D.Z.objectiveC.key.url}}]},currentLanguage:({languages:e,languageModel:t})=>e.find((e=>e.api===t)),hasLanguages:({objcPath:e,swiftPath:t})=>t&&e}},Hu=Fu,Vu=(0,F.Z)(Hu,Zu,ju,!1,null,"4323807e",null),Wu=Vu.exports,Uu={name:"DocumentationNav",components:{SidenavIcon:Ku,NavBase:Nu.Z,NavMenuItems:or.Z,LanguageToggle:Wu},props:{isDark:{type:Boolean,default:!1},hasNoBorder:{type:Boolean,default:!1},interfaceLanguage:{type:String,required:!1},objcPath:{type:String,required:!1},swiftPath:{type:String,required:!1},displaySidenav:{type:Boolean,default:!1}},computed:{baseNavOpenSidenavButtonId:()=>Xl.Yj,BreakpointName:()=>lr.L3,hasLanguageToggle:({interfaceLanguage:e,swiftPath:t,objcPath:n})=>!(!e||!t&&!n),hasMenuItems:({hasLanguageToggle:e,$slots:t})=>!(!e&&!t["menu-items"])},methods:{async handleSidenavToggle(e,t){await e(),this.$emit("toggle-sidenav",t),await this.$nextTick();const n=document.getElementById(xl);n&&n.focus()}}},Qu=Uu,Gu=(0,F.Z)(Qu,Ou,Au,!1,null,"6fe78e04",null),Xu=Gu.exports;const Yu="navigator-hidden-large";var Ju={name:"DocumentationLayout",constants:{NAVIGATOR_HIDDEN_ON_LARGE_KEY:Yu},components:{Navigator:Du,AdjustableSidebarWidth:dc,Nav:Xu,QuickNavigationButton:to,QuickNavigationModal:Fl,PortalTarget:Qr.YC},mixins:[Lu.Z,Pu],props:{enableNavigator:Boolean,diffAvailability:{type:Object,required:!1},interfaceLanguage:{type:String,required:!1},references:{type:Object,default:()=>{}},objcPath:{type:String,required:!1},swiftPath:{type:String,required:!1},selectedAPIChangesVersion:{type:String,required:!1},technology:{type:Object,require:!1},parentTopicIdentifiers:{type:Array,default:()=>[]},navigatorFixedWidth:{type:Number,default:null}},data(){return{sidenavVisibleOnMobile:!1,sidenavHiddenOnLarge:Wl.tO.get(Yu,!1),showQuickNavigationModal:!1,BreakpointName:lr.L3}},computed:{enableQuickNavigation:({isTargetIDE:e})=>!e&&(0,w.$8)(["features","docs","quickNavigation","enable"],!0),sidebarProps:({sidenavVisibleOnMobile:e,enableNavigator:t,sidenavHiddenOnLarge:n,navigatorFixedWidth:i})=>t?{shownOnMobile:e,hiddenOnLarge:n,fixedWidth:i}:{enableNavigator:t},sidebarListeners(){return this.enableNavigator?{"update:shownOnMobile":this.toggleMobileSidenav,"update:hiddenOnLarge":this.toggleLargeSidenav}:{}}},methods:{handleToggleSidenav(e){e===lr.L3.large?this.toggleLargeSidenav():this.toggleMobileSidenav()},openQuickNavigationModal(){this.sidenavVisibleOnMobile||(this.showQuickNavigationModal=!0)},toggleLargeSidenav(e=!this.sidenavHiddenOnLarge){this.sidenavHiddenOnLarge=e,Wl.tO.set(Yu,e)},toggleMobileSidenav(e=!this.sidenavVisibleOnMobile){this.sidenavVisibleOnMobile=e},onQuickNavigationKeydown(e){("/"===e.key||"o"===e.key&&e.shiftKey&&e.metaKey)&&this.enableNavigator&&"input"!==e.target.tagName.toLowerCase()&&(this.openQuickNavigationModal(),e.preventDefault())}},mounted(){this.enableQuickNavigation&&window.addEventListener("keydown",this.onQuickNavigationKeydown)},beforeDestroy(){this.enableQuickNavigation&&window.removeEventListener("keydown",this.onQuickNavigationKeydown)},inject:{isTargetIDE:{default(){return!1}}}},eh=Ju,th=(0,F.Z)(eh,Wr,Ur,!1,null,"33435637",null),nh=th.exports,ih={computed:{indexDataPath(){const e=this.$route?.params?.locale||"";return(0,A.Dy)(["/index/",e,"index.json"])}},methods:{async fetchIndexData(){try{B["default"].reset();const{includedArchiveIdentifiers:e=[],interfaceLanguages:t,references:n={}}=await(0,x.rQ)(this.indexDataPath);B["default"].setFlatChildren(Nl(t)),B["default"].setTechnologyProps(Rl(t)),B["default"].setReferences(n),B["default"].setIncludedArchiveIdentifiers(e)}catch(vh){B["default"].setErrorFetching(!0)}}},watch:{indexDataPath:{handler:"fetchIndexData",immediate:!0}}},ah=n(2717);const sh="symbol";var rh={watch:{topicData:{immediate:!0,handler:"extractOnThisPageSections"}},methods:{shouldRegisterContentSection(e){return e.type===ui.BlockType.heading&&e.level<4},extractOnThisPageSections(e){if(!e)return;this.store.resetPageSections();const{metadata:{title:t},primaryContentSections:n,topicSections:i,defaultImplementationsSections:a,relationshipsSections:s,seeAlsoSections:r,kind:o}=e;this.store.addOnThisPageSection({title:t,anchor:ah.$,level:1,isSymbol:o===sh},{i18n:!1}),n&&n.forEach((e=>{switch(e.kind){case Fe.mentions:this.store.addOnThisPageSection({title:this.$t("mentioned-in"),anchor:(0,Tn.HA)("mentions"),level:2});break;case Fe.content:Qe.Z.methods.forEach.call(e,(e=>{this.shouldRegisterContentSection(e)&&this.store.addOnThisPageSection({title:e.text,anchor:e.anchor||(0,Tn.HA)(e.text),level:e.level},{i18n:!1})}));break;case Fe.properties:case Fe.restBody:case Fe.restCookies:case Fe.restEndpoint:case Fe.restHeaders:case Fe.restParameters:case Fe.restResponses:this.store.addOnThisPageSection({title:e.title,anchor:(0,Tn.HA)(e.title),level:2});break;default:rn[e.kind]&&this.store.addOnThisPageSection(rn[e.kind])}})),i&&this.store.addOnThisPageSection(sn.topics),a&&this.store.addOnThisPageSection(sn.defaultImplementations),s&&this.store.addOnThisPageSection(sn.relationships),r&&this.store.addOnThisPageSection(sn.seeAlso)}}},oh=n(9030),lh=n(1944),ch=n(1789),dh=n(8093),uh=n(8571);const{extractProps:hh}=Vr.methods,ph="0.3.0";var gh={name:"DocumentationTopicView",constants:{MIN_RENDER_JSON_VERSION_WITH_INDEX:ph},components:{CodeTheme:dh.Z,Topic:Vr,DocumentationLayout:nh},mixins:[rh,ch.Z,ih],props:{enableMinimized:{type:Boolean,default:!1}},data(){return{topicDataDefault:null,topicDataObjc:null,store:gl.Z}},provide(){return{store:this.store}},computed:{disableHeroBackground:()=>!1,documentationLayoutProps:({topicProps:{diffAvailability:e,interfaceLanguage:t,references:n},enableNavigator:i,technology:a,parentTopicIdentifiers:s,objcPath:r,swiftPath:o,store:{state:{selectedAPIChangesVersion:l}}})=>({diffAvailability:e,interfaceLanguage:t,references:n,enableNavigator:i,technology:a,parentTopicIdentifiers:s,objcPath:r,swiftPath:o,selectedAPIChangesVersion:l}),objcOverrides:({topicData:e})=>{const{variantOverrides:t=[]}=e||{},n=({interfaceLanguage:e})=>e===D.Z.objectiveC.key.api,i=({traits:e})=>e.some(n),a=t.find(i);return a?a.patch:null},topicData:{get(){return this.topicDataObjc?this.topicDataObjc:this.topicDataDefault},set(e){this.topicDataDefault=e}},topicKey:({$route:e,topicProps:t})=>[e.path,t.interfaceLanguage].join(),topicProps(){return hh(this.topicData)},parentTopicIdentifiers:({topicProps:{hierarchy:e,references:t},$route:n})=>{if(!e)return[];const{paths:i=[]}=e;return i.length?i.find((e=>{const i=e.find((e=>t[e]&&"technologies"!==t[e].kind)),a=i&&t[i];return a&&n.path.toLowerCase().startsWith(a.url.toLowerCase())}))||i[0]:[]},technology:({$route:e,topicProps:{identifier:t,references:n,role:i,title:a},parentTopicIdentifiers:s})=>{const r={title:a,url:e.path},o=n[t];if(!s.length)return o||r;const l=n[s[0]];return l&&"technologies"!==l.kind?l:(i!==C.L.collection||o)&&(l&&n[s[1]]||o)||r},languagePaths:({topicData:{variants:e=[]}})=>e.reduce(((e,t)=>t.traits.reduce(((e,n)=>n.interfaceLanguage?{...e,[n.interfaceLanguage]:(e[n.interfaceLanguage]||[]).concat(t.paths)}:e),e)),{}),objcPath:({languagePaths:{[D.Z.objectiveC.key.api]:[e]=[]}={}})=>e,swiftPath:({languagePaths:{[D.Z.swift.key.api]:[e]=[]}={}})=>e,isSymbolBeta:({topicProps:{platforms:e}})=>!!(e&&e.length&&e.every((e=>e.beta))),isSymbolDeprecated:({topicProps:{platforms:e,deprecationSummary:t}})=>!!(t&&t.length>0||e&&e.length&&e.every((e=>e.deprecatedAt))),enableOnThisPageNav:({isTargetIDE:e})=>!(0,w.$8)(["features","docs","onThisPageNavigator","disable"],!1)&&!e,enableNavigator:({isTargetIDE:e,topicDataDefault:t})=>!e&&(0,lh.n4)((0,lh.W1)(t.schemaVersion),ph)>=0,rootHierarchyReference:({parentTopicIdentifiers:e,topicProps:{references:t}})=>t[e[0]]||{},isRootTechnologyLink:({rootHierarchyReference:{kind:e}})=>"technologies"===e,hierarchyItems:({parentTopicIdentifiers:e,isRootTechnologyLink:t})=>t?e.slice(1):e,rootLink:({isRootTechnologyLink:e,rootHierarchyReference:t,$route:n})=>e?{path:t.url,query:n.query}:null},methods:{handleCodeColorsChange(e){uh.Z.updateCodeColors(e)},applyObjcOverrides(){this.topicDataObjc=k((0,x.d9)(this.topicData),this.objcOverrides)}},mounted(){this.$bridge.on("contentUpdate",this.handleContentUpdateFromBridge),this.$bridge.on("codeColors",this.handleCodeColorsChange),this.$bridge.send({type:"requestCodeColors"})},beforeDestroy(){this.$bridge.off("contentUpdate",this.handleContentUpdateFromBridge),this.$bridge.off("codeColors",this.handleCodeColorsChange)},inject:{isTargetIDE:{default(){return!1}}},beforeRouteEnter(e,t,n){e.meta.skipFetchingData?n((e=>e.newContentMounted())):(0,x.Ek)(e,t,n).then((t=>n((n=>{(0,oh.jk)(e.params.locale,n),n.topicData=t,e.query.language===D.Z.objectiveC.key.url&&n.objcOverrides&&n.applyObjcOverrides()})))).catch(n)},beforeRouteUpdate(e,t,n){e.path===t.path&&e.query.language===D.Z.objectiveC.key.url&&this.objcOverrides?(this.applyObjcOverrides(),n()):(0,x.Us)(e,t)?(0,x.Ek)(e,t,n).then((t=>{this.topicDataObjc=null,this.topicData=t,e.query.language===D.Z.objectiveC.key.url&&this.objcOverrides&&this.applyObjcOverrides(),(0,oh.jk)(e.params.locale,this),n()})).catch(n):n()},created(){this.store.reset()},watch:{topicData(){this.$nextTick((()=>{this.newContentMounted()}))}}},fh=gh,mh=(0,F.Z)(fh,i,a,!1,null,null,null),yh=mh.exports},7274:function(e,t){var n,i,a;(function(s,r){i=[],n=r,a="function"===typeof n?n.apply(t,i):n,void 0===a||(e.exports=a)})(0,(function(){var e=/(auto|scroll)/,t=function(e,n){return null===e.parentNode?n:t(e.parentNode,n.concat([e]))},n=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},i=function(e){return n(e,"overflow")+n(e,"overflow-y")+n(e,"overflow-x")},a=function(t){return e.test(i(t))},s=function(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var n=t(e.parentNode,[]),i=0;i]+>",i="("+t+"|"+n.optional(a)+"[a-zA-Z_]\\w*"+n.optional(r)+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",o={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+c+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:"string"}),{className:"string",begin:/<.*?>/},s,e.C_BLOCK_COMMENT_MODE]},_={className:"title",begin:n.optional(a)+e.IDENT_RE,relevance:0},g=n.optional(a)+e.IDENT_RE+"\\s*\\(",p=["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],m=["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],f={keyword:p,type:m,literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},b=[u,l,s,e.C_BLOCK_COMMENT_MODE,d,o],w={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:f,contains:b.concat([{begin:/\(/,end:/\)/,keywords:f,contains:b.concat(["self"]),relevance:0}]),relevance:0},y={begin:"("+i+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:f,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:t,keywords:f,relevance:0},{begin:g,returnBegin:!0,contains:[e.inherit(_,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[s,e.C_BLOCK_COMMENT_MODE,o,d,l,{begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:["self",s,e.C_BLOCK_COMMENT_MODE,o,d,l]}]},l,s,e.C_BLOCK_COMMENT_MODE,u]};return{name:"C",aliases:["h"],keywords:f,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:u,strings:o,keywords:f}}}e.exports=n}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-cpp-js.458a9ae4.js b/docs/js/highlight-js-cpp-js.458a9ae4.js new file mode 100644 index 00000000..29961026 --- /dev/null +++ b/docs/js/highlight-js-cpp-js.458a9ae4.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[621],{6248:function(e){function t(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",i="<[^<>]+>",s="(?!struct)("+a+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional(i)+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},o="\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)",l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+o+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},_={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},p=t.optional(r)+e.IDENT_RE+"\\s*\\(",m=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],f=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],g=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],b=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],h=["NULL","false","nullopt","nullptr","true"],w=["_Pragma"],y={type:f,keyword:m,literal:h,built_in:w,_type_hints:g},v={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},k=[v,u,c,n,e.C_BLOCK_COMMENT_MODE,d,l],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:y,contains:k.concat([{begin:/\(/,end:/\)/,keywords:y,contains:k.concat(["self"]),relevance:0}]),relevance:0},E={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:y,relevance:0},{begin:p,returnBegin:!0,contains:[_],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,l,d,c,{begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,l,d,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,u]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:y,illegal:"",keywords:y,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:y},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}e.exports=t}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-css-js.bfc4251f.js b/docs/js/highlight-js-css-js.bfc4251f.js new file mode 100644 index 00000000..60ab9a75 --- /dev/null +++ b/docs/js/highlight-js-css-js.bfc4251f.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[864],{5064:function(e){const t=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),o=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],i=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],r=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],a=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],n=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-height","max-width","min-height","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function l(e){const l=e.regex,s=t(e),d={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},c="and or not only",g=/@-?\w[\w]*(-\w+)*/,m="[a-zA-Z-][a-zA-Z0-9_-]*",p=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[s.BLOCK_COMMENT,d,s.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+m,relevance:0},s.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+r.join("|")+")"},{begin:":(:)?("+a.join("|")+")"}]},s.CSS_VARIABLE,{className:"attribute",begin:"\\b("+n.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[s.BLOCK_COMMENT,s.HEXCOLOR,s.IMPORTANT,s.CSS_NUMBER_MODE,...p,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},s.FUNCTION_DISPATCH]},{begin:l.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:g},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:c,attribute:i.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...p,s.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+o.join("|")+")\\b"}]}}e.exports=l}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-custom-markdown.78c9f6ed.js b/docs/js/highlight-js-custom-markdown.78c9f6ed.js new file mode 100644 index 00000000..9a52dcdd --- /dev/null +++ b/docs/js/highlight-js-custom-markdown.78c9f6ed.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +"use strict";(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[642],{2003:function(e,n,a){function i(e){const n=e.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},c={className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},t={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},d=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,d,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},g={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},r={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};g.contains.push(r),r.contains.push(g);let o=[a,l];g.contains=g.contains.concat(o),r.contains=r.contains.concat(o),o=o.concat(g,r);const b={className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:o},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:o}]}]},u={className:"quote",begin:"^>\\s+",contains:o,end:"$"};return{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[b,a,c,g,r,u,s,i,l,t]}}a.r(n),a.d(n,{default:function(){return l}});const s={begin:"",returnBegin:!0,contains:[{className:"link",begin:"doc:",end:">",excludeEnd:!0}]},c={className:"link",begin:/`{2}(?!`)/,end:/`{2}(?!`)/,excludeBegin:!0,excludeEnd:!0},t={begin:"^>\\s+[Note:|Tip:|Important:|Experiment:|Warning:]",end:"$",returnBegin:!0,contains:[{className:"quote",begin:"^>",end:"\\s+"},{className:"type",begin:"Note|Tip|Important|Experiment|Warning",end:":"},{className:"quote",begin:".*",end:"$",endsParent:!0}]},d={begin:"@",end:"[{\\)\\s]",returnBegin:!0,contains:[{className:"title",begin:"@",end:"[\\s+(]",excludeEnd:!0},{begin:":",end:"[,\\)\n\t]",excludeBegin:!0,keywords:{literal:"true false null undefined"},contains:[{className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",endsWithParent:!0,excludeEnd:!0},{className:"string",variants:[{begin:/"""/,end:/"""/},{begin:/"/,end:/"/}],endsParent:!0},{className:"link",begin:"http|https",endsWithParent:!0,excludeEnd:!0}]}]};function l(e){const n=i(e),a=n.contains.find((({className:e})=>"code"===e));a.variants=a.variants.filter((({begin:e})=>!e.includes("( {4}|\\t)")));const l=[...n.contains.filter((({className:e})=>"code"!==e)),a];return{...n,contains:[c,s,t,d,...l]}}}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-custom-swift.738731d1.js b/docs/js/highlight-js-custom-swift.738731d1.js new file mode 100644 index 00000000..a6f83da7 --- /dev/null +++ b/docs/js/highlight-js-custom-swift.738731d1.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +"use strict";(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[217],{7467:function(e,n,t){function a(e){return e?"string"===typeof e?e:e.source:null}function s(e){return i("(?=",e,")")}function i(...e){const n=e.map((e=>a(e))).join("");return n}function c(e){const n=e[e.length-1];return"object"===typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}function u(...e){const n=c(e),t="("+(n.capture?"":"?:")+e.map((e=>a(e))).join("|")+")";return t}t.r(n),t.d(n,{default:function(){return D}});const o=e=>i(/\b/,e,/\w$/.test(e)?/\b/:/\B/),r=["Protocol","Type"].map(o),l=["init","self"].map(o),d=["Any","Self"],m=["actor","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],p=["false","nil","true"],b=["assignment","associativity","higherThan","left","lowerThan","none","right"],F=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],f=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],h=u(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),w=u(h,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),y=i(h,w,"*"),g=u(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),E=u(g,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),v=i(g,E,"*"),N=i(/[A-Z]/,E,"*"),k=["autoclosure",i(/convention\(/,u("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",i(/objc\(/,v,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],A=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function C(e){const n={match:/\s+/,relevance:0},t=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,t],c={match:[/\./,u(...r,...l)],className:{2:"keyword"}},h={match:i(/\./,u(...m)),relevance:0},g=m.filter((e=>"string"===typeof e)).concat(["_|0"]),C=m.filter((e=>"string"!==typeof e)).concat(d).map(o),D={variants:[{className:"keyword",match:u(...C,...l)}]},B={$pattern:u(/\b\w+/,/#\w+/),keyword:g.concat(F),literal:p},_=[c,h,D],S={match:i(/\./,u(...f)),relevance:0},x={className:"built_in",match:i(/\b/,u(...f),/(?=\()/)},M=[S,x],I={match:/->/,relevance:0},$={className:"operator",relevance:0,variants:[{match:y},{match:`\\.(\\.|${w})+`}]},O=[I,$],L="([0-9]_*)+",T="([0-9a-fA-F]_*)+",K={className:"number",relevance:0,variants:[{match:`\\b(${L})(\\.(${L}))?([eE][+-]?(${L}))?\\b`},{match:`\\b0x(${T})(\\.(${T}))?([pP][+-]?(${L}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},P=(e="")=>({className:"subst",variants:[{match:i(/\\/,e,/[0\\tnr"']/)},{match:i(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),j=(e="")=>({className:"subst",match:i(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),z=(e="")=>({className:"subst",label:"interpol",begin:i(/\\/,e,/\(/),end:/\)/}),q=(e="")=>({begin:i(e,/"""/),end:i(/"""/,e),contains:[P(e),j(e),z(e)]}),U=(e="")=>({begin:i(e,/"/),end:i(/"/,e),contains:[P(e),z(e)]}),W={className:"string",variants:[q(),q("#"),q("##"),q("###"),U(),U("#"),U("##"),U("###")]},Z={match:i(/`/,v,/`/)},V={className:"variable",match:/\$\d+/},G={className:"variable",match:`\\$${E}+`},R=[Z,V,G],X={match:/(@|#)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:A,contains:[...O,K,W]}]}},H={className:"keyword",match:i(/@/,u(...k))},J={className:"meta",match:i(/@/,v)},Q=[X,H,J],Y={match:s(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:i(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,E,"+")},{className:"type",match:N,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:i(/\s+&\s+/,s(N)),relevance:0}]},ee={begin://,keywords:B,contains:[...a,..._,...Q,I,Y]};Y.contains.push(ee);const ne={match:i(v,/\s*:/),keywords:"_|0",relevance:0},te={begin:/\(/,end:/\)/,relevance:0,keywords:B,contains:["self",ne,...a,..._,...M,...O,K,W,...R,...Q,Y]},ae={begin://,contains:[...a,Y]},se={begin:u(s(i(v,/\s*:/)),s(i(v,/\s+/,v,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:v}]},ie={begin:/\(/,end:/\)/,keywords:B,contains:[se,...a,..._,...O,K,W,...Q,Y,te],endsParent:!0,illegal:/["']/},ce={match:[/func/,/\s+/,u(Z.match,v,y)],className:{1:"keyword",3:"title.function"},contains:[ae,ie,n],illegal:[/\[/,/%/]},ue={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ae,ie,n],illegal:/\[|%/},oe={match:[/operator/,/\s+/,y],className:{1:"keyword",3:"title"}},re={begin:[/precedencegroup/,/\s+/,N],className:{1:"keyword",3:"title"},contains:[Y],keywords:[...b,...p],end:/}/};for(const s of W.variants){const e=s.contains.find((e=>"interpol"===e.label));e.keywords=B;const n=[..._,...M,...O,K,W,...R];e.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:B,contains:[...a,ce,ue,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:B,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),..._]},oe,re,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},..._,...M,...O,K,W,...R,...Q,Y,te]}}function D(e){const n=C(e);n.keywords.keyword=[...n.keywords.keyword,"distributed"];const t=({beginKeywords:e=""})=>e.split(" ").includes("class"),a=n.contains.findIndex(t);if(a>=0){const{beginKeywords:e,...t}=n.contains[a];n.contains[a]={...t,begin:/\b(struct|protocol|extension|enum|actor|class\b(?!.*\bfunc))\b/}}const s=e=>{const{className:n,match:t}=e;if("subst"!==n||!t)return!1;const a=t.toString();return a.startsWith("\\")&&a.endsWith("[\\t ]*(?:[\\r\\n]|\\r\\n)")},i=n.contains.findIndex((({className:e})=>"string"===e));return n.contains[i]={...n.contains[i],variants:n.contains[i].variants.map((e=>({...e,contains:e.contains.map((e=>s(e)?{className:"subst",begin:/\\#{0,3}/,end:/[\t ]*(?:[\r\n]|\r\n)/,excludeEnd:!0}:e))})))},n}}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-diff-js.4db9a783.js b/docs/js/highlight-js-diff-js.4db9a783.js new file mode 100644 index 00000000..d0f5a781 --- /dev/null +++ b/docs/js/highlight-js-diff-js.4db9a783.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[213],{7731:function(e){function n(e){const n=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}e.exports=n}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-http-js.f78e83c2.js b/docs/js/highlight-js-http-js.f78e83c2.js new file mode 100644 index 00000000..a400cae9 --- /dev/null +++ b/docs/js/highlight-js-http-js.f78e83c2.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[878],{8937:function(e){function n(e){const n=e.regex,a="HTTP/(2|1\\.[01])",s=/[A-Za-z][A-Za-z0-9-]*/,t={className:"attribute",begin:n.concat("^",s,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},i=[t,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+a+" \\d{3})",end:/$/,contains:[{className:"meta",begin:a},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:i}},{begin:"(?=^[A-Z]+ (.*?) "+a+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:a},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:i}},e.inherit(t,{relevance:0})]}}e.exports=n}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-java-js.4fe21e94.js b/docs/js/highlight-js-java-js.4fe21e94.js new file mode 100644 index 00000000..5062f619 --- /dev/null +++ b/docs/js/highlight-js-java-js.4fe21e94.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[788],{8257:function(e){var n="[0-9](_*[0-9])*",a=`\\.(${n})`,s="[0-9a-fA-F](_*[0-9a-fA-F])*",t={className:"number",variants:[{begin:`(\\b(${n})((${a})|\\.)?|(${a}))[eE][+-]?(${n})[fFdD]?\\b`},{begin:`\\b(${n})((${a})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${a})[fFdD]?\\b`},{begin:`\\b(${n})[fFdD]\\b`},{begin:`\\b0[xX]((${s})\\.?|(${s})?\\.(${s}))[pP][+-]?(${n})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${s})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function i(e,n,a){return-1===a?"":e.replace(n,(s=>i(e,n,a-1)))}function r(e){e.regex;const n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=n+i("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),s=["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do"],r=["super","this"],c=["false","true","null"],l=["char","boolean","long","float","int","byte","short","double"],b={keyword:s,literal:c,type:l,built_in:r},o={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},_={className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:b,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{begin:[n,/\s+/,n,/\s+/,/=/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:b,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,t,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},t,o]}}e.exports=r}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-javascript-js.dfc9d16d.js b/docs/js/highlight-js-javascript-js.dfc9d16d.js new file mode 100644 index 00000000..d38ee05d --- /dev/null +++ b/docs/js/highlight-js-javascript-js.dfc9d16d.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[814],{978:function(e){const n="[A-Za-z$_][0-9A-Za-z$_]*",a=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],t=["true","false","null","undefined","NaN","Infinity"],s=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],c=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],r=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],i=["arguments","this","super","console","window","document","localStorage","module","global"],o=[].concat(r,s,c);function l(e){const l=e.regex,b=(e,{after:n})=>{const a="",end:""},u=/<[A-Za-z0-9\\._:-]+\s*\/>/,m={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{const a=e[0].length+e.index,t=e.input[a];if("<"===t||","===t)return void n.ignoreMatch();let s;">"===t&&(b(e,{after:a})||n.ignoreMatch());const c=e.input.substr(a);(s=c.match(/^\s+extends\s+/))&&0===s.index&&n.ignoreMatch()}},E={$pattern:n,keyword:a,literal:t,built_in:o,"variable.language":i},A="[0-9](_?[0-9])*",f=`\\.(${A})`,_="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",y={className:"number",variants:[{begin:`(\\b(${_})((${f})|\\.)?|(${f}))[eE][+-]?(${A})\\b`},{begin:`\\b(${_})\\b((${f})\\b|\\.)?|(${f})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},N={className:"subst",begin:"\\$\\{",end:"\\}",keywords:E,contains:[]},h={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,N],subLanguage:"xml"}},p={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,N],subLanguage:"css"}},v={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,N]},w=e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:d+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),S={className:"comment",variants:[w,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,p,v,y];N.contains=R.concat({begin:/\{/,end:/\}/,keywords:E,contains:["self"].concat(R)});const k=[].concat(S,N.contains),O=k.concat([{begin:/\(/,end:/\)/,keywords:E,contains:["self"].concat(k)}]),I={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:E,contains:O},x={variants:[{match:[/class/,/\s+/,d,/\s+/,/extends/,/\s+/,l.concat(d,"(",l.concat(/\./,d),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,d],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:l.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]+|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+/),className:"title.class",keywords:{_:[...s,...c]}},C={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},M={variants:[{match:[/function/,/\s+/,d,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[I],illegal:/%/},B={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function $(e){return l.concat("(?!",e.join("|"),")")}const D={match:l.concat(/\b/,$([...r,"super"]),d,l.lookahead(/\(/)),className:"title.function",relevance:0},U={begin:l.concat(/\./,l.lookahead(l.concat(d,/(?![0-9A-Za-z$_(])/))),end:d,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,d,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},I]},z="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",F={match:[/const|var|let/,/\s+/,d,/\s*/,/=\s*/,l.lookahead(z)],className:{1:"keyword",3:"title.function"},contains:[I]};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:E,exports:{PARAMS_CONTAINS:O,CLASS_REFERENCE:T},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),C,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,p,v,S,y,T,{className:"attr",begin:d+l.lookahead(":"),relevance:0},F,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[S,e.REGEXP_MODE,{className:"function",begin:z,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:E,contains:O}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:g.begin,end:g.end},{match:u},{begin:m.begin,"on:begin":m.isTrulyOpeningTag,end:m.end}],subLanguage:"xml",contains:[{begin:m.begin,end:m.end,skip:!0,contains:["self"]}]}]},M,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[I,e.inherit(e.TITLE_MODE,{begin:d,className:"title.function"})]},{match:/\.\.\./,relevance:0},U,{match:"\\$"+d,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[I]},D,B,x,Z,{match:/\$[(.]/}]}}e.exports=l}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-json-js.2a1856ba.js b/docs/js/highlight-js-json-js.2a1856ba.js new file mode 100644 index 00000000..aa882dbd --- /dev/null +++ b/docs/js/highlight-js-json-js.2a1856ba.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[82],{14:function(e){function n(e){const n={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},c={match:/[{}[\],:]/,className:"punctuation",relevance:0},a={beginKeywords:["true","false","null"].join(" ")};return{name:"JSON",contains:[n,c,e.QUOTE_STRING_MODE,a,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}e.exports=n}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-llvm-js.26121771.js b/docs/js/highlight-js-llvm-js.26121771.js new file mode 100644 index 00000000..74730ea0 --- /dev/null +++ b/docs/js/highlight-js-llvm-js.26121771.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[133],{4972:function(e){function n(e){const n=e.regex,a=/([-a-zA-Z$._][\w$.-]*)/,t={className:"type",begin:/\bi\d+(?=\s|\b)/},i={className:"operator",relevance:0,begin:/=/},c={className:"punctuation",relevance:0,begin:/,/},l={className:"number",variants:[{begin:/0[xX][a-fA-F0-9]+/},{begin:/-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/}],relevance:0},r={className:"symbol",variants:[{begin:/^\s*[a-z]+:/}],relevance:0},s={className:"variable",variants:[{begin:n.concat(/%/,a)},{begin:/%\d+/},{begin:/#\d+/}]},o={className:"title",variants:[{begin:n.concat(/@/,a)},{begin:/@\d+/},{begin:n.concat(/!/,a)},{begin:n.concat(/!\d+/,a)},{begin:/!\d+/}]};return{name:"LLVM IR",keywords:"begin end true false declare define global constant private linker_private internal available_externally linkonce linkonce_odr weak weak_odr appending dllimport dllexport common default hidden protected extern_weak external thread_local zeroinitializer undef null to tail target triple datalayout volatile nuw nsw nnan ninf nsz arcp fast exact inbounds align addrspace section alias module asm sideeffect gc dbg linker_private_weak attributes blockaddress initialexec localdynamic localexec prefix unnamed_addr ccc fastcc coldcc x86_stdcallcc x86_fastcallcc arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ptx_kernel intel_ocl_bicc msp430_intrcc spir_func spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc cc c signext zeroext inreg sret nounwind noreturn noalias nocapture byval nest readnone readonly inlinehint noinline alwaysinline optsize ssp sspreq noredzone noimplicitfloat naked builtin cold nobuiltin noduplicate nonlazybind optnone returns_twice sanitize_address sanitize_memory sanitize_thread sspstrong uwtable returned type opaque eq ne slt sgt sle sge ult ugt ule uge oeq one olt ogt ole oge ord uno ueq une x acq_rel acquire alignstack atomic catch cleanup filter inteldialect max min monotonic nand personality release seq_cst singlethread umax umin unordered xchg add fadd sub fsub mul fmul udiv sdiv fdiv urem srem frem shl lshr ashr and or xor icmp fcmp phi call trunc zext sext fptrunc fpext uitofp sitofp fptoui fptosi inttoptr ptrtoint bitcast addrspacecast select va_arg ret br switch invoke unwind unreachable indirectbr landingpad resume malloc alloca free load store getelementptr extractelement insertelement shufflevector getresult extractvalue insertvalue atomicrmw cmpxchg fence argmemonly double",contains:[t,e.COMMENT(/;\s*$/,null,{relevance:0}),e.COMMENT(/;/,/$/),e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:/"/,end:/[^\\]"/}]},o,c,i,s,r,l]}}e.exports=n}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-markdown-js.a2f456af.js b/docs/js/highlight-js-markdown-js.a2f456af.js new file mode 100644 index 00000000..c9c3762b --- /dev/null +++ b/docs/js/highlight-js-markdown-js.a2f456af.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[113],{1312:function(e){function n(e){const n=e.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},c={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},t={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},d=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,d,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},g={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},b={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};g.contains.push(b),b.contains.push(g);let o=[a,l];g.contains=g.contains.concat(o),b.contains=b.contains.concat(o),o=o.concat(g,b);const r={className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:o},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:o}]}]},u={className:"quote",begin:"^>\\s+",contains:o,end:"$"};return{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[r,a,s,g,b,u,c,i,l,t]}}e.exports=n}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-objectivec-js.74dea052.js b/docs/js/highlight-js-objectivec-js.74dea052.js new file mode 100644 index 00000000..d26ddf65 --- /dev/null +++ b/docs/js/highlight-js-objectivec-js.74dea052.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[637],{2446:function(e){function n(e){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},_=/[a-zA-Z@][a-zA-Z0-9_]*/,i=["int","float","while","char","export","sizeof","typedef","const","struct","for","union","unsigned","long","volatile","static","bool","mutable","if","do","return","goto","void","enum","else","break","extern","asm","case","short","default","double","register","explicit","signed","typename","this","switch","continue","wchar_t","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","super","unichar","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],t=["false","true","FALSE","TRUE","nil","YES","NO","NULL"],a=["BOOL","dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],r={$pattern:_,keyword:i,literal:t,built_in:a},s={$pattern:_,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:r,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+s.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:s,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}e.exports=n}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-perl-js.da6eda82.js b/docs/js/highlight-js-perl-js.da6eda82.js new file mode 100644 index 00000000..5a05386c --- /dev/null +++ b/docs/js/highlight-js-perl-js.da6eda82.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[645],{2482:function(e){function n(e){const n=e.regex,t=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:t.join(" ")},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},a={begin:/->\{/,end:/\}/},c={variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@][^\s\w{]/,relevance:0}]},o=[e.BACKSLASH_ESCAPE,i,c],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],l=(e,t,s="\\1")=>{const i="\\1"===s?s:n.concat(s,t);return n.concat(n.concat("(?:",e,")"),t,/(?:\\.|[^\\\/])*?/,i,/(?:\\.|[^\\\/])*?/,s,r)},d=(e,t,s)=>n.concat(n.concat("(?:",e,")"),t,/(?:\\.|[^\\\/])*?/,s,r),p=[c,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:o,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:l("s|tr|y",n.either(...g,{capture:!0}))},{begin:l("s|tr|y","\\(","\\)")},{begin:l("s|tr|y","\\[","\\]")},{begin:l("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",n.either(...g,{capture:!0}),/\1/)},{begin:d("m|qr",/\(/,/\)/)},{begin:d("m|qr",/\[/,/\]/)},{begin:d("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return i.contains=p,a.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:p}}e.exports=n}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-php-js.c458ffa4.js b/docs/js/highlight-js-php-js.c458ffa4.js new file mode 100644 index 00000000..344966a4 --- /dev/null +++ b/docs/js/highlight-js-php-js.c458ffa4.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[596],{2656:function(e){function r(e){const r={className:"variable",begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*(?![A-Za-z0-9])(?![$])"},t={className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{begin:/\?>/}]},a={className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},n=e.inherit(e.APOS_STRING_MODE,{illegal:null}),i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),o=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),l={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[e.inherit(n,{begin:"b'",end:"'"}),e.inherit(i,{begin:'b"',end:'"'}),i,n,o]},c={className:"number",variants:[{begin:"\\b0b[01]+(?:_[01]+)*\\b"},{begin:"\\b0o[0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0x[\\da-f]+(?:_[\\da-f]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:e[+-]?\\d+)?"}],relevance:0},s={keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile enum eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list match|0 mixed new object or private protected public real return string switch throw trait try unset use var void while xor yield",literal:"false null true",built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException UnhandledMatchError ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Stringable Throwable Traversable WeakReference WeakMap Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass"};return{case_insensitive:!0,keywords:s,contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[t]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler"}),t,{className:"keyword",begin:/\$this\b/},r,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:s,contains:["self",r,e.C_BLOCK_COMMENT_MODE,l,c]}]},{className:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",relevance:0,end:";",contains:[e.UNDERSCORE_TITLE_MODE]},l,c]}}e.exports=r}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-python-js.60354774.js b/docs/js/highlight-js-python-js.60354774.js new file mode 100644 index 00000000..651bc258 --- /dev/null +++ b/docs/js/highlight-js-python-js.60354774.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[435],{8245:function(e){function n(e){const n=e.regex,a=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s=["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],t=["__debug__","Ellipsis","False","None","NotImplemented","True"],r=["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:s,literal:t,type:r},b={className:"meta",begin:/^(>>>|\.\.\.) /},o={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,b],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,b],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,b,c,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,b,c,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p="[0-9](_?[0-9])*",_=`(\\b(${p}))?\\.(${p})|\\b(${p})\\.`,g={className:"number",relevance:0,variants:[{begin:`(\\b(${p})|(${_}))[eE][+-]?(${p})[jJ]?\\b`},{begin:`(${_})[jJ]?`},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${p})[jJ]\\b`}]},m={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},f={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",b,g,d,e.HASH_COMMENT_MODE]}]};return o.contains=[d,g,b],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|->|\?)|=>/,contains:[b,g,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},d,m,e.HASH_COMMENT_MODE,{match:[/def/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[f]},{variants:[{match:[/class/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/class/,/\s+/,a]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,f,d]}]}}e.exports=n}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-ruby-js.7272231f.js b/docs/js/highlight-js-ruby-js.7272231f.js new file mode 100644 index 00000000..d63f527b --- /dev/null +++ b/docs/js/highlight-js-ruby-js.7272231f.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[623],{7905:function(e){function n(e){const n=e.regex,a="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor __FILE__",built_in:"proc lambda",literal:"true false nil"},s={className:"doctag",begin:"@[A-Za-z]+"},c={begin:"#<",end:">"},b=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__","\\n$")],r={className:"subst",begin:/#\{/,end:/\}/,keywords:i},d={className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,r]})]}]},t="[1-9](_?[0-9])*|0",l="[0-9](_?[0-9])*",o={className:"number",relevance:0,variants:[{begin:`\\b(${t})(\\.(${l}))?([eE][+-]?(${l})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},g={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:i},_=[d,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE,relevance:0}]}].concat(b)},{className:"function",begin:n.concat(/def\s+/,n.lookahead(a+"\\s*(\\(|;|$)")),relevance:0,keywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:a}),g].concat(b)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:a}],relevance:0},o,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,relevance:0,keywords:i},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,r],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,b),relevance:0}].concat(c,b);r.contains=_,g.contains=_;const E="[>?]>",w="[\\w#]+\\(\\w+\\):\\d+:\\d+>",u="(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>",N=[{begin:/^\s*=>/,starts:{end:"$",contains:_}},{className:"meta",begin:"^("+E+"|"+w+"|"+u+")(?=[ ])",starts:{end:"$",contains:_}}];return b.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:i,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(N).concat(b).concat(_)}}e.exports=n}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-scss-js.adcd11a2.js b/docs/js/highlight-js-scss-js.adcd11a2.js new file mode 100644 index 00000000..a8b5b9f5 --- /dev/null +++ b/docs/js/highlight-js-scss-js.adcd11a2.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[392],{1062:function(e){const t=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),i=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],r=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],o=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],a=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],n=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-height","max-width","min-height","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function l(e){const l=t(e),s=a,d=o,c="@[a-z-]+",p="and or not only",g="[a-zA-Z-][a-zA-Z0-9_-]*",m={className:"variable",begin:"(\\$"+g+")\\b"};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},l.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+i.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+d.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+s.join("|")+")"},m,{begin:/\(/,end:/\)/,contains:[l.CSS_NUMBER_MODE]},l.CSS_VARIABLE,{className:"attribute",begin:"\\b("+n.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,contains:[l.BLOCK_COMMENT,m,l.HEXCOLOR,l.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,l.IMPORTANT]},{begin:"@(page|font-face)",keywords:{$pattern:c,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:p,attribute:r.join(" ")},contains:[{begin:c,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},m,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,l.HEXCOLOR,l.CSS_NUMBER_MODE]},l.FUNCTION_DISPATCH]}}e.exports=l}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-shell-js.0ad5b20f.js b/docs/js/highlight-js-shell-js.0ad5b20f.js new file mode 100644 index 00000000..e9e90cfc --- /dev/null +++ b/docs/js/highlight-js-shell-js.0ad5b20f.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[176],{7874:function(s){function e(s){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}s.exports=e}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-swift-js.bdd5bff5.js b/docs/js/highlight-js-swift-js.bdd5bff5.js new file mode 100644 index 00000000..2107fba1 --- /dev/null +++ b/docs/js/highlight-js-swift-js.bdd5bff5.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[527],{7690:function(e){function n(e){return e?"string"===typeof e?e:e.source:null}function t(e){return a("(?=",e,")")}function a(...e){const t=e.map((e=>n(e))).join("");return t}function i(e){const n=e[e.length-1];return"object"===typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}function s(...e){const t=i(e),a="("+(t.capture?"":"?:")+e.map((e=>n(e))).join("|")+")";return a}const c=e=>a(/\b/,e,/\w$/.test(e)?/\b/:/\B/),u=["Protocol","Type"].map(c),o=["init","self"].map(c),r=["Any","Self"],l=["actor","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],m=["false","nil","true"],p=["assignment","associativity","higherThan","left","lowerThan","none","right"],d=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],F=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],b=s(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),f=s(b,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),h=a(b,f,"*"),w=s(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),y=s(w,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),g=a(w,y,"*"),E=a(/[A-Z]/,y,"*"),v=["autoclosure",a(/convention\(/,s("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",a(/objc\(/,g,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],A=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function N(e){const n={match:/\s+/,relevance:0},i=e.COMMENT("/\\*","\\*/",{contains:["self"]}),b=[e.C_LINE_COMMENT_MODE,i],w={match:[/\./,s(...u,...o)],className:{2:"keyword"}},N={match:a(/\./,s(...l)),relevance:0},C=l.filter((e=>"string"===typeof e)).concat(["_|0"]),k=l.filter((e=>"string"!==typeof e)).concat(r).map(c),D={variants:[{className:"keyword",match:s(...k,...o)}]},B={$pattern:s(/\b\w+/,/#\w+/),keyword:C.concat(d),literal:m},_=[w,N,D],S={match:a(/\./,s(...F)),relevance:0},M={className:"built_in",match:a(/\b/,s(...F),/(?=\()/)},x=[S,M],$={match:/->/,relevance:0},I={className:"operator",relevance:0,variants:[{match:h},{match:`\\.(\\.|${f})+`}]},O=[$,I],L="([0-9]_*)+",T="([0-9a-fA-F]_*)+",P={className:"number",relevance:0,variants:[{match:`\\b(${L})(\\.(${L}))?([eE][+-]?(${L}))?\\b`},{match:`\\b0x(${T})(\\.(${T}))?([pP][+-]?(${L}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},j=(e="")=>({className:"subst",variants:[{match:a(/\\/,e,/[0\\tnr"']/)},{match:a(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),K=(e="")=>({className:"subst",match:a(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),z=(e="")=>({className:"subst",label:"interpol",begin:a(/\\/,e,/\(/),end:/\)/}),q=(e="")=>({begin:a(e,/"""/),end:a(/"""/,e),contains:[j(e),K(e),z(e)]}),U=(e="")=>({begin:a(e,/"/),end:a(/"/,e),contains:[j(e),z(e)]}),Z={className:"string",variants:[q(),q("#"),q("##"),q("###"),U(),U("#"),U("##"),U("###")]},V={match:a(/`/,g,/`/)},W={className:"variable",match:/\$\d+/},G={className:"variable",match:`\\$${y}+`},R=[V,W,G],X={match:/(@|#)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:A,contains:[...O,P,Z]}]}},H={className:"keyword",match:a(/@/,s(...v))},J={className:"meta",match:a(/@/,g)},Q=[X,H,J],Y={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:a(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,y,"+")},{className:"type",match:E,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:a(/\s+&\s+/,t(E)),relevance:0}]},ee={begin://,keywords:B,contains:[...b,..._,...Q,$,Y]};Y.contains.push(ee);const ne={match:a(g,/\s*:/),keywords:"_|0",relevance:0},te={begin:/\(/,end:/\)/,relevance:0,keywords:B,contains:["self",ne,...b,..._,...x,...O,P,Z,...R,...Q,Y]},ae={begin://,contains:[...b,Y]},ie={begin:s(t(a(g,/\s*:/)),t(a(g,/\s+/,g,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:g}]},se={begin:/\(/,end:/\)/,keywords:B,contains:[ie,...b,..._,...O,P,Z,...Q,Y,te],endsParent:!0,illegal:/["']/},ce={match:[/func/,/\s+/,s(V.match,g,h)],className:{1:"keyword",3:"title.function"},contains:[ae,se,n],illegal:[/\[/,/%/]},ue={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ae,se,n],illegal:/\[|%/},oe={match:[/operator/,/\s+/,h],className:{1:"keyword",3:"title"}},re={begin:[/precedencegroup/,/\s+/,E],className:{1:"keyword",3:"title"},contains:[Y],keywords:[...p,...m],end:/}/};for(const t of Z.variants){const e=t.contains.find((e=>"interpol"===e.label));e.keywords=B;const n=[..._,...x,...O,P,Z,...R];e.contains=[...n,{begin:/\(/,end:/\)/,contains:["self",...n]}]}return{name:"Swift",keywords:B,contains:[...b,ce,ue,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:B,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),..._]},oe,re,{beginKeywords:"import",end:/$/,contains:[...b],relevance:0},..._,...x,...O,P,Z,...R,...Q,Y,te]}}e.exports=N}}]); \ No newline at end of file diff --git a/docs/js/highlight-js-xml-js.0d78f903.js b/docs/js/highlight-js-xml-js.0d78f903.js new file mode 100644 index 00000000..7eb3dddb --- /dev/null +++ b/docs/js/highlight-js-xml-js.0d78f903.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[490],{4610:function(e){function n(e){const n=e.regex,a=n.concat(/[A-Z_]/,n.optional(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),s=/[A-Za-z0-9._:-]+/,t={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},c={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=e.inherit(c,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),r=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),g={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin://,relevance:10,contains:[c,r,l,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[c,i,r,l]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},t,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[g],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[g],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:a,relevance:0,starts:g}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(a,/>/))),contains:[{className:"name",begin:a,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}e.exports=n}}]); \ No newline at end of file diff --git a/docs/js/index.1dca9b8e.js b/docs/js/index.1dca9b8e.js new file mode 100644 index 00000000..fede761e --- /dev/null +++ b/docs/js/index.1dca9b8e.js @@ -0,0 +1,9 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */(function(){var e={1970:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"close-icon",attrs:{viewBox:"0 0 14 14",themeId:"close"}},[t("path",{attrs:{d:"M12.73,0l1.27,1.27-5.74,5.73,5.72,5.72-1.27,1.27-5.72-5.72L1.28,13.99,.01,12.72,5.72,7.01,0,1.28,1.27,.01,6.99,5.73,12.73,0Z"}})])},o=[],i=n(9742),a={name:"CloseIcon",components:{SVGIcon:i.Z}},s=a,l=n(1001),c=(0,l.Z)(s,r,o,!1,null,null,null),u=c.exports},8785:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"inline-chevron-right-icon",attrs:{viewBox:"0 0 14 14",themeId:"inline-chevron-right"}},[t("path",{attrs:{d:"M2.964 1.366l0.649-0.76 7.426 6.343-7.423 6.445-0.655-0.755 6.545-5.683-6.542-5.59z"}})])},o=[],i=n(9742),a={name:"InlineChevronRightIcon",components:{SVGIcon:i.Z}},s=a,l=n(1001),c=(0,l.Z)(s,r,o,!1,null,null,null),u=c.exports},9742:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=function(){var e=this,t=e._self._c;return t("svg",{staticClass:"svg-icon",attrs:{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}},[e.themeOverrideURL?t("use",{attrs:{href:`${e.themeOverrideURL}#${e.themeId}`,width:"100%",height:"100%"}}):e._t("default")],2)},o=[],i=n(9089),a={name:"SVGIcon",props:{themeId:{type:String,required:!1},iconUrl:{type:String,default:null}},computed:{themeOverrideURL:({iconUrl:e,themeId:t})=>e||(0,i.$8)(["theme","icons",t],void 0)}},s=a,l=n(1001),c=(0,l.Z)(s,r,o,!1,null,"3434f4d2",null),u=c.exports},686:function(e,t,n){"use strict";n(647);var r=n(144),o=n(7152),i=n(8345),a=function(){var e=this,t=e._self._c;return t("div",{class:{fromkeyboard:e.fromKeyboard,hascustomheader:e.hasCustomHeader},attrs:{id:"app"}},[t("div",{attrs:{id:e.AppTopID}}),e.isTargetIDE?e._e():t("a",{attrs:{href:"#app-main",id:"skip-nav"}},[e._v(" "+e._s(e.$t("accessibility.skip-navigation"))+" ")]),e._t("header",(function(){return[e.enablei18n?t("SuggestLang"):e._e(),e.hasCustomHeader?t("custom-header",{attrs:{"data-color-scheme":e.preferredColorScheme}}):e._e()]}),{isTargetIDE:e.isTargetIDE}),t("div",{attrs:{id:e.baseNavStickyAnchorId}}),t("InitialLoadingPlaceholder"),e._t("default",(function(){return[t("router-view",{staticClass:"router-content"}),e.hasCustomFooter?t("custom-footer",{attrs:{"data-color-scheme":e.preferredColorScheme}}):e.isTargetIDE?e._e():t("Footer",{scopedSlots:e._u([{key:"default",fn:function({className:n}){return[e.enablei18n?t("div",{class:n},[t("LocaleSelector")],1):e._e()]}}])})]}),{isTargetIDE:e.isTargetIDE}),e._t("footer",null,{isTargetIDE:e.isTargetIDE})],2)},s=[],l=n(4030),c=n(9804),u=function(){var e=this,t=e._self._c;return t("footer",{staticClass:"footer"},[t("div",{staticClass:"row"},[t("ColorSchemeToggle")],1),e._t("default",null,{className:"row"})],2)},d=[],m=function(){var e=this,t=e._self._c;return t("fieldset",{staticClass:"color-scheme-toggle",attrs:{role:"radiogroup"}},[t("legend",{staticClass:"visuallyhidden"},[e._v(e._s(e.$t("color-scheme.select")))]),e._l(e.options,(function(n){return t("label",{key:n},[t("input",{attrs:{type:"radio"},domProps:{checked:n==e.preferredColorScheme,value:n},on:{input:e.setPreferredColorScheme}}),t("div",{staticClass:"text"},[e._v(e._s(e.$t(`color-scheme.${n}`)))])])}))],2)},p=[],f={name:"ColorSchemeToggle",data:()=>({appState:l["default"].state}),computed:{options:({supportsAutoColorScheme:e})=>[c.Z.light,c.Z.dark,...e?[c.Z.auto]:[]],preferredColorScheme:({appState:e})=>e.preferredColorScheme,supportsAutoColorScheme:({appState:e})=>e.supportsAutoColorScheme},methods:{setPreferredColorScheme:e=>{l["default"].setPreferredColorScheme(e.target.value)}},watch:{preferredColorScheme:{immediate:!0,handler(e){document.body.dataset.colorScheme=e}}}},h=f,g=n(1001),v=(0,g.Z)(h,m,p,!1,null,"0c0360ce",null),b=v.exports,w={name:"Footer",components:{ColorSchemeToggle:b}},y=w,S=(0,g.Z)(y,u,d,!1,null,"f1d65b2a",null),C=S.exports,_=function(){var e=this,t=e._self._c;return e.loaded?e._e():t("div",{staticClass:"InitialLoadingPlaceholder",attrs:{id:"loading-placeholder"}})},E=[],k={name:"InitialLoadingPlaceholder",data(){return{loaded:!1}},created(){const e=()=>{this.loaded=!0};this.$router.onReady(e,e)}},A=k,L=(0,g.Z)(A,_,E,!1,null,"35c356b6",null),P=L.exports,T=n(1716),j=n(9089);function x(e,t){return e&&"object"===typeof e&&Object.prototype.hasOwnProperty.call(e,t)&&"string"===typeof e[t]}function I(e,t,n,r){if(!t||"object"!==typeof t||r&&(x(t,"light")||x(t,"dark"))){let o=t;if(x(t,r)&&(o=t[r]),"object"===typeof o)return;n[e]=o}else Object.entries(t).forEach((([t,o])=>{const i=[e,t].join("-");I(i,o,n,r)}))}function N(e,t="light"){const n={},r=e||{};return I("-",r,n,t),n}var $=n(2717),O=function(){var e=this,t=e._self._c;return e.displaySuggestLang?t("div",{staticClass:"suggest-lang"},[t("div",{staticClass:"suggest-lang__wrapper"},[t("router-link",{staticClass:"suggest-lang__link",attrs:{to:e.getLocaleParam(e.preferredLocale),lang:e.getCodeForSlug(e.preferredLocale)},nativeOn:{click:function(t){return e.setPreferredLocale(e.preferredLocale)}}},[e._v(e._s(e.$i18n.messages[e.preferredLocale]["view-in"])),t("InlineChevronRightIcon",{staticClass:"icon-inline"})],1),t("div",{staticClass:"suggest-lang__close-icon-wrapper"},[t("button",{staticClass:"suggest-lang__close-icon-button",attrs:{"aria-label":e.$t("continue-viewing")},on:{click:function(t){return e.setPreferredLocale(e.$i18n.locale)}}},[t("CloseIcon",{staticClass:"icon-inline"})],1)])],1)]):e._e()},D=[],R=n(8785),Z=n(1970),q=n(2412),U=n(9030),V={name:"SuggestLang",components:{InlineChevronRightIcon:R.Z,CloseIcon:Z.Z},computed:{preferredLocale:()=>{const e=l["default"].state.preferredLocale;if(e)return e;const t=q.find((e=>{const t=e.code.split("-")[0],n=window.navigator.language.split("-")[0];return n===t}));return t?t.slug:null},displaySuggestLang:({preferredLocale:e,$i18n:t})=>e&&t.locale!==e},methods:{setPreferredLocale:e=>{l["default"].setPreferredLocale(e)},getCodeForSlug:U.dZ,getLocaleParam:U.KP}},B=V,M=(0,g.Z)(B,O,D,!1,null,"c2dca0ae",null),H=M.exports,W=function(){var e=this,t=e._self._c;return t("div",{staticClass:"locale-selector"},[t("select",{attrs:{"aria-label":e.$t("select-language")},domProps:{value:e.$i18n.locale},on:{change:e.updateRouter}},e._l(e.locales,(function({slug:n,name:r,code:o}){return t("option",{key:n,attrs:{lang:o},domProps:{value:n}},[e._v(" "+e._s(r)+" ")])})),0),t("ChevronThickIcon",{staticClass:"icon-inline"})],1)},F=[],J=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"chevron-thick-icon",attrs:{viewBox:"0 0 14 10.5",themeId:"chevron-thick"}},[t("path",{attrs:{d:"M12.43,0l1.57,1.22L7,10.5,0,1.23,1.58,0,7,7,12.43,0Z"}})])},K=[],G=n(9742),z={name:"ChevronThickIcon",components:{SVGIcon:G.Z}},X=z,Y=(0,g.Z)(X,J,K,!1,null,null,null),Q=Y.exports,ee={name:"LocaleSelector",components:{ChevronThickIcon:Q},methods:{updateRouter({target:{value:e}}){this.$router.push((0,U.KP)(e)),l["default"].setPreferredLocale(e),(0,U.jk)(e,this)}},computed:{availableLocales:()=>l["default"].state.availableLocales,locales:({availableLocales:e})=>q.filter((({code:t})=>e.includes(t)))}},te=ee,ne=(0,g.Z)(te,W,F,!1,null,"d21858a2",null),re=ne.exports,oe={name:"CoreApp",components:{Footer:C,InitialLoadingPlaceholder:P,SuggestLang:H,LocaleSelector:re},provide(){return{isTargetIDE:this.isTargetIDE,performanceMetricsEnabled:"true"==={NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}.VUE_APP_PERFORMANCE_ENABLED}},data(){return{AppTopID:$.$,appState:l["default"].state,fromKeyboard:!1,isTargetIDE:"ide"==={NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}.VUE_APP_TARGET,themeSettings:j.S3,baseNavStickyAnchorId:T.EA}},computed:{currentColorScheme:({appState:e})=>e.systemColorScheme,preferredColorScheme:({appState:e})=>e.preferredColorScheme,availableLocales:({appState:e})=>e.availableLocales,CSSCustomProperties:({currentColorScheme:e,preferredColorScheme:t,themeSettings:n})=>N(n.theme,t===c.Z.auto?e:t),hasCustomHeader:()=>!!window.customElements.get("custom-header"),hasCustomFooter:()=>!!window.customElements.get("custom-footer"),enablei18n:({availableLocales:e})=>(0,j.$8)(["features","docs","i18n","enable"],!1)&&e.length>1},props:{enableThemeSettings:{type:Boolean,default:!0}},watch:{CSSCustomProperties:{immediate:!0,handler(e){this.detachStylesFromRoot(e),this.attachStylesToRoot(e)}}},async created(){window.addEventListener("keydown",this.onKeyDown),this.$bridge.on("navigation",this.handleNavigationRequest),this.enableThemeSettings&&Object.assign(this.themeSettings,await(0,j.Kx)()),window.addEventListener("pageshow",this.syncPreferredColorScheme),this.$once("hook:beforeDestroy",(()=>{window.removeEventListener("pageshow",this.syncPreferredColorScheme)}))},mounted(){(document.querySelector(".footer-current-year")||{}).innerText=(new Date).getFullYear(),this.attachColorSchemeListeners()},beforeDestroy(){this.fromKeyboard?window.removeEventListener("mousedown",this.onMouseDown):window.removeEventListener("keydown",this.onKeyDown),this.$bridge.off("navigation",this.handleNavigationRequest),this.detachStylesFromRoot(this.CSSCustomProperties)},methods:{onKeyDown(){this.fromKeyboard=!0,window.addEventListener("mousedown",this.onMouseDown),window.removeEventListener("keydown",this.onKeyDown)},onMouseDown(){this.fromKeyboard=!1,window.addEventListener("keydown",this.onKeyDown),window.removeEventListener("mousedown",this.onMouseDown)},handleNavigationRequest(e){this.$router.push(e)},attachColorSchemeListeners(){if(!window.matchMedia)return;const e=window.matchMedia("(prefers-color-scheme: dark)");e.addListener(this.onColorSchemePreferenceChange),this.$once("hook:beforeDestroy",(()=>{e.removeListener(this.onColorSchemePreferenceChange)})),this.onColorSchemePreferenceChange(e)},onColorSchemePreferenceChange({matches:e}){const t=e?c.Z.dark:c.Z.light;l["default"].setSystemColorScheme(t)},attachStylesToRoot(e){const t=document.body;Object.entries(e).filter((([,e])=>Boolean(e))).forEach((([e,n])=>{t.style.setProperty(e,n)}))},detachStylesFromRoot(e){const t=document.body;Object.entries(e).forEach((([e])=>{t.style.removeProperty(e)}))},syncPreferredColorScheme(){l["default"].syncPreferredColorScheme()}}},ie=oe,ae=(0,g.Z)(ie,a,s,!1,null,"1fc6db09",null),se=ae.exports;class le{constructor(){this.$send=()=>{}}send(e){this.$send(e)}}class ce{constructor(){const{webkit:{messageHandlers:{bridge:e={}}={}}={}}=window;this.bridge=e;const{postMessage:t=(()=>{})}=e;this.$send=t.bind(e)}send(e){this.$send(e)}}class ue{constructor(e=new le){this.backend=e,this.listeners={}}send(e){this.backend.send(e)}receive(e){this.emit(e.type,e.data)}emit(e,t){this.listeners[e]&&this.listeners[e].forEach((e=>e(t)))}on(e,t){this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t)}off(e,t){this.listeners[e]&&this.listeners[e].delete(t)}}var de={install(e,t){let n;n=t.performanceMetricsEnabled||"ide"===t.appTarget?new ce:new le,e.prototype.$bridge=new ue(n)}};function me(e){return`custom-${e}`}function pe(e){return class extends HTMLElement{constructor(){super();const t=this.attachShadow({mode:"open"}),n=e.content.cloneNode(!0);t.appendChild(n)}}}function fe(e){const t=me(e),n=document.getElementById(t);n&&window.customElements.define(t,pe(n))}function he(e,t={names:["header","footer"]}){const{names:n}=t;e.config.ignoredElements=/^custom-/,n.forEach(fe)}function ge(e,t){const{value:n=!1}=t;e.style.display=n?"none":""}var ve={hide:ge};function be(e,{performanceMetrics:t=!1}={}){e.config.productionTip=!1,e.use(he),e.directive("hide",ve.hide),e.use(de,{appTarget:{NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}.VUE_APP_TARGET,performanceMetricsEnabled:t}),window.bridge=e.prototype.$bridge,e.config.performance=t}var we=n(4589),ye=n(5381),Se=n(5657),Ce=n(3208),_e=n(2449);const Ee=10;function ke(e){const{name:t}=e,n=t.includes(we.J_);return n?Ee:0}function Ae(){const{location:e}=window;return e.pathname+e.search+e.hash}function Le(){const e=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0);return ePromise.all([n.e(866),n.e(843)]).then(n.bind(n,8147))},{path:"/tutorials/:id/*",name:"topic",component:()=>Promise.all([n.e(866),n.e(842),n.e(162)]).then(n.bind(n,2726))},{path:"/documentation*",name:we.J_,component:()=>Promise.all([n.e(866),n.e(104),n.e(842),n.e(982)]).then(n.bind(n,4461))},{path:"*",name:we.vL,component:Ke},{path:"*",name:we.Rp,component:Be}];const ze=[{pathPrefix:"/:locale?",nameSuffix:"-locale"}];function Xe(e,t=[],n=ze){return n.reduce(((n,r)=>n.concat(e.filter((e=>!t.includes(e.name))).map((e=>({...e,path:r.pathPrefix+e.path,name:e.name+r.nameSuffix}))))),[])}const Ye=[...Ge,...Xe(Ge,[we.vL,we.Rp])];function Qe(e={}){const t=new i.Z({mode:"history",base:j.FH,scrollBehavior:Pe,...e,routes:e.routes||Ye});return t.onReady((()=>{"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual"),Te()})),"ide"!=={NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}.VUE_APP_TARGET&&t.onError((e=>{const{route:n={path:"/"}}=e;t.replace({name:"server-error",params:[n.path]})})),window.addEventListener("unload",je),t}var et=n(7788);function tt(e=et){const{defaultLocale:t,messages:n,dateTimeFormats:r={}}=e,i=new o.Z({dateTimeFormats:r,locale:t,fallbackLocale:t,messages:n});return i}r["default"].use(be),r["default"].use(i.Z),r["default"].use(o.Z),document.documentElement.classList.remove("no-js"),new r["default"]({router:Qe(),render:e=>e(se),i18n:tt()}).$mount("#app")},2717:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});const r="app-top"},9804:function(e,t){"use strict";t["Z"]={auto:"auto",dark:"dark",light:"light"}},1265:function(e,t){"use strict";t["Z"]={eager:"eager",lazy:"lazy"}},1716:function(e,t,n){"use strict";n.d(t,{EA:function(){return i},L$:function(){return o},MenuLinkModifierClasses:function(){return s},RS:function(){return r},Yj:function(){return a}});const r=52,o=48,i="nav-sticky-anchor",a="nav-open-navigator",s={noClose:"noclose"}},4589:function(e,t,n){"use strict";n.d(t,{J_:function(){return i},Rp:function(){return o},vL:function(){return r}});const r="not-found",o="server-error",i="documentation-topic"},7788:function(e,t,n){"use strict";n.r(t),n.d(t,{defaultLocale:function(){return s},messages:function(){return l}});var r=JSON.parse('{"view-in":"View in English","continue-viewing":"Continue viewing in English","language":"Language","video":{"title":"Video","replay":"Replay","play":"Play","pause":"Pause","watch":"Watch intro video","description":"Content description: {alt}","custom-controls":"Video with custom controls."},"tutorials":{"title":"Tutorial | Tutorials","step":"Step {number}","submit":"Submit","next":"Next","preview":{"title":"No Preview | Preview | Previews","no-preview-available-step":"No preview available for this step."},"nav":{"chapters":"Chapters","current":"Current {thing}"},"assessment":{"check-your-understanding":"Check Your Understanding","success-message":"Great job, you\'ve answered all the questions for this tutorial.","answer-result":"Answer {answer} is {result}","correct":"correct","incorrect":"incorrect","next-question":"Next question","legend":"Possible answers"},"project-files":"Project files","estimated-time":"Estimated Time","sections":{"chapter":"Chapter {number}"},"question-of":"Question {index} of {total}","section-of":"{number} of {total}","overriding-title":"{newTitle} with {title}","time":{"format":"{number} {minutes}","minutes":{"full":"minute | minutes | {count} minutes","short":"min | mins"},"hours":{"full":"hour | hours"}}},"documentation":{"title":"Documentation","nav":{"breadcrumbs":"Breadcrumbs","menu":"Menu","open-menu":"Open Menu","close-menu":"Close Menu"},"current-page":"Current page is {title}","card":{"learn-more":"Learn More","read-article":"Read article","start-tutorial":"Start tutorial","view-api":"View API collection","view-symbol":"View symbol","view-sample-code":"View sample code"},"view-more":"View more"},"declarations":{"hide-other-declarations":"Hide other declarations","show-all-declarations":"Show all declarations"},"aside-kind":{"beta":"Beta","experiment":"Experiment","important":"Important","note":"Note","tip":"Tip","warning":"Warning","deprecated":"Deprecated"},"change-type":{"added":"Added","modified":"Modified","deprecated":"Deprecated"},"verbs":{"hide":"Hide","show":"Show","close":"Close"},"sections":{"attributes":"Attributes","title":"Section {number}","on-this-page":"On this page","topics":"Topics","default-implementations":"Default Implementations","relationships":"Relationships","see-also":"See Also","declaration":"Declaration","details":"Details","parameters":"Parameters","possible-values":"Possible Values","parts":"Parts","availability":"Availability","resources":"Resources"},"metadata":{"details":{"name":"Name","key":"Key","type":"Type"},"beta":{"legal":"This documentation refers to beta software and may be changed.","software":"Beta Software"},"default-implementation":"Default implementation provided. | Default implementations provided."},"availability":{"introduced-and-deprecated":"Introduced in {name} {introducedAt} and deprecated in {name} {deprecatedAt}","available-on-platform":"Available on {name}","available-on-platform-version":"Available on {name} {introducedAt} and later"},"more":"More","less":"Less","api-reference":"API Reference","filter":{"title":"Filter","search":"Search","search-symbols":"Search symbols in {technology}","suggested-tags":"Suggested tag | Suggested tags","selected-tags":"Selected tag | Selected tags","add-tag":"Add tag","tag-select-remove":"Tag. Select to remove from list.","navigate":"To navigate the symbols, press Up Arrow, Down Arrow, Left Arrow or Right Arrow","siblings-label":"{number-siblings} of {total-siblings} symbols inside {parent-siblings}","parent-label":"{number-siblings} of {total-siblings} symbols inside {parent-siblings} containing one symbol | {number-siblings} of {total-siblings} symbols inside {parent-siblings} containing {number-parent} symbols","reset-filter":"Reset Filter","tags":{"sample-code":"Sample Code","tutorials":"Tutorials","articles":"Articles","web-service-endpoints":"Web Service Endpoints","hide-deprecated":"Hide Deprecated"}},"navigator":{"title":"Documentation Navigator","open-navigator":"Open Documentation Navigator","close-navigator":"Close Documentation Navigator","no-results":"No results found.","no-children":"No data available.","error-fetching":"There was an error fetching the data.","items-found":"No items were found | 1 item was found | {number} items were found. Tab back to navigate through them.","navigator-is":"Navigator is {state}","state":{"loading":"loading","ready":"ready"}},"tab":{"request":"Request","response":"Response"},"required":"Required","parameters":{"default":"Default","minimum":"Minimum","minimumLength":"Minimum length","maximum":"Maximum","maximumLength":"Maximum length","possible-types":"Type | Possible types","possible-values":"Value | Possible Values"},"content-type":"Content-Type: {value}","read-only":"Read-only","error":{"unknown":"An unknown error occurred.","image":"Image failed to load","not-found":"The page you\'re looking for can\'t be found."},"color-scheme":{"select":"Select a color scheme preference","auto":"Auto","dark":"Dark","light":"Light"},"accessibility":{"strike":{"start":"start of stricken text","end":"end of stricken text"},"code":{"start":"start of code block","end":"end of code block"},"skip-navigation":"Skip Navigation","in-page-link":"in page link"},"select-language":"Select the language for this page","icons":{"clear":"Clear","web-service-endpoint":"Web Service Endpoint","search":"Search"},"formats":{"parenthesis":"({content})","colon":"{content}: "},"quicknav":{"button":{"label":"Open Quick Navigation","title":"Click or type / for quick navigation"},"preview-unavailable":"Preview unavailable"},"mentioned-in":"Mentioned in","pager":{"roledescription":"content slider","page":{"label":"content page {index} of {count}"},"control":{"navigate-previous":"navigate to previous page of content","navigate-next":"navigate to next page of content"}},"links-grid":{"label":"grid of links"}}'),o=JSON.parse('{"view-in":"以中文查看","continue-viewing":"继续以中文查看","language":"语言","video":{"title":"视频","replay":"重新播放","play":"播放","pause":"暂停","watch":"观看介绍视频","description":"此视频的内容描述:{alt}","custom-controls":"可用自定义控件如下"},"tutorials":{"title":"教程","step":"第 {number} 步","submit":"提交","next":"下一步","preview":{"title":"无预览 | 预览","no-preview-available-step":"这一步没有预览。"},"nav":{"chapters":"章节","current":"当前{thing}"},"assessment":{"check-your-understanding":"检查你的理解程度","success-message":"很棒,你回答了此教程的所有问题。","answer-result":"答案 {answer} 是 {result}","correct":"正确","incorrect":"错误","next-question":"下一个问题","legend":"可能的答案"},"project-files":"项目文件","estimated-time":"预计时间","sections":{"chapter":"第 {number} 章"},"question-of":"第 {index} 个问题(共 {total} 个)","section-of":"{number}/{total}","overriding-title":"{newTitle}{title}","time":{"format":"{number} {minutes}","minutes":{"full":"分钟 | {count} 分钟","short":"分钟"},"hours":{"full":"小时"}}},"documentation":{"title":"文档","nav":{"breadcrumbs":"面包屑导航","menu":"菜单","open-menu":"打开菜单","close-menu":"关闭菜单"},"current-page":"当前页面为:{title}","card":{"learn-more":"进一步了解","read-article":"阅读文章","start-tutorial":"开始教程","view-api":"查看 API 集合","view-symbol":"查看符号","view-sample-code":"查看示例代码"},"view-more":"查看更多"},"declarations":{"hide-other-declarations":"隐藏其他声明","show-all-declarations":"显示所有声明"},"aside-kind":{"beta":"Beta 版","experiment":"试验","important":"重要事项","note":"注","tip":"提示","warning":"警告","deprecated":"已弃用"},"change-type":{"added":"已添加","modified":"已修改","deprecated":"已弃用"},"verbs":{"hide":"隐藏","show":"显示","close":"关闭"},"sections":{"title":"第 {number} 部分","on-this-page":"在此页面上","topics":"主题","default-implementations":"默认实现","relationships":"关系","see-also":"另请参阅","declaration":"声明","details":"详细信息","parameters":"参数","possible-values":"可能值","parts":"部件","availability":"可用性","resources":"资源"},"metadata":{"details":{"name":"名称","key":"密钥","type":"类型"},"beta":{"legal":"此文档涉及 Beta 版软件且可能会改动。","software":"Beta 版软件"},"default-implementation":"提供默认实现。| 提供默认实现方法。"},"availability":{"introduced-and-deprecated":"{name} {introducedAt} 中引入,{name} {deprecatedAt} 中弃用","available-on-platform-version":"{name} {introducedAt} 及更高版本中可用"},"more":"更多","less":"更少","api-reference":"API 参考","filter":{"title":"过滤","search":"搜索","search-symbols":"在 {technology} 搜索符号","suggested-tags":"建议标签","selected-tags":"所选标签","add-tag":"添加标签","tag-select-remove":"标签。选择以从列表中移除。","navigate":"若要导航符号,请按下上箭头、下箭头、左箭头或右箭头。","siblings-label":"{parent-siblings} 内含 {number-siblings} 个符号(共 {total-siblings} 个)","parent-label":"{parent-siblings} 内含 {number-siblings} 个符号(共 {total-siblings} 个)包含一个符号 | {parent-siblings} 内含 {number-siblings} 个符号(共 {total-siblings} 个)包含 {number-parent} 个符号","reset-filter":"还原过滤条件","tags":{"sample-code":"示例代码","tutorials":"教程","articles":"文章","web-service-endpoints":"网络服务端点","hide-deprecated":"隐藏已弃用"}},"navigator":{"title":"文档导航器","open-navigator":"打开文档导航器","close-navigator":"关闭文档导航器","no-results":"未找到结果。","no-children":"无可用数据。","error-fetching":"获取数据时出错。","items-found":"未找到任何项目 | 找到 1 个项目 | 找到 {number} 个项目。按下 Tab 键导航。","navigator-is":"导航器{state}","state":{"loading":"正在载入","ready":"准备就绪"}},"tab":{"request":"请求","response":"回复"},"required":"必需","parameters":{"default":"默认","minimum":"最小值","maximum":"最大值","possible-types":"类型 | 可能类型","possible-values":"值 | 可能值"},"content-type":"内容类型:{value}","read-only":"只读","error":{"unknown":"出现未知错误。","image":"图像无法载入","not-found":"找不到你所查找的页面。"},"color-scheme":{"select":"选择首选颜色方案","auto":"自动","dark":"深色","light":"浅色"},"accessibility":{"strike":{"start":"删除线文本开始","end":"删除线文本结束"},"code":{"start":"代码块开头","end":"代码块结尾"},"skip-navigation":"跳过导航","in-page-link":"在页面链接中"},"select-language":"选择此页面的语言","icons":{"clear":"清除","web-service-endpoint":"网络服务端点","search":"搜索"},"formats":{"parenthesis":"({content})","colon":"{content}: "},"quicknav":{"button":{"label":"打开快速导航","title":"点按或键入 / 进行快速导航"},"preview-unavailable":"预览不可用"},"mentioned-in":"提及于","pager":{"roledescription":"内容滑块","page":{"label":"第 {index}/{count} 个内容页面"},"control":{"navigate-previous":"导览至上个内容页面","navigate-next":"导览至下个内容页面"}},"links-grid":{"label":"链接网格"}}'),i=JSON.parse('{"view-in":"日本語で表示","continue-viewing":"日本語で表示を続ける","language":"言語","video":{"title":"ビデオ","replay":"リプレイ","play":"再生","pause":"一時停止","watch":"概要のビデオを観る","description":"このビデオコンテンツの説明: {alt}","custom-controls":"以下のカスタムコントロールを使用できます"},"tutorials":{"title":"チュートリアル | チュートリアル","step":"手順{number}","submit":"送信","next":"次へ","preview":{"title":"プレビューなし | プレビュー | プレビュー","no-preview-available-step":"この手順では利用可能なプレビューがありません。"},"nav":{"chapters":"章","current":"現在の{thing}"},"assessment":{"check-your-understanding":"理解度を確認する","success-message":"よくできました。このチュートリアルの問題にすべて解答しました。","answer-result":"解答{answer}は{result}です","correct":"正解","incorrect":"不正解","next-question":"次の問題","legend":"解答例"},"project-files":"プロジェクトファイル","estimated-time":"予測時間","sections":{"chapter":"{number}章"},"question-of":"{total}問中の{index}問","section-of":"{total}件中の{number}件","overriding-title":"{title}の{newTitle}","time":{"format":"{number} {minutes}","minutes":{"full":"分 | 分 | {count}分","short":"分 | 分"},"hours":{"full":"時間 | 時間"}}},"documentation":{"title":"ドキュメント","nav":{"breadcrumbs":"パンくずリスト","menu":"メニュー","open-menu":"メニューを開く","close-menu":"メニューを閉じる"},"current-page":"現在のページは{title}です","card":{"learn-more":"詳しい情報","read-article":"記事を読む","start-tutorial":"チュートリアルを開始","view-api":"APIのコレクションを表示","view-symbol":"記号を表示","view-sample-code":"サンプルコードを表示"},"view-more":"さらに表示"},"declarations":{"hide-other-declarations":"ほかの宣言を非表示","show-all-declarations":"すべての宣言を表示"},"aside-kind":{"beta":"ベータ版","experiment":"試験運用版","important":"重要","note":"注意","tip":"ヒント","warning":"警告","deprecated":"非推奨"},"change-type":{"added":"追加","modified":"変更","deprecated":"非推奨"},"verbs":{"hide":"非表示","show":"表示","close":"閉じる"},"sections":{"title":"セクション{number}","on-this-page":"このページの内容","topics":"トピック","default-implementations":"デフォルト実装","relationships":"関連項目","see-also":"参照","declaration":"宣言","details":"詳細","parameters":"パラメータ","possible-values":"使用できる値","parts":"パーツ","availability":"利用可能","resources":"リソース"},"metadata":{"details":{"name":"名前","key":"キー","type":"タイプ"},"beta":{"legal":"このドキュメントはベータ版のソフトウェアのもので、変更される可能性があります。","software":"ベータ版ソフトウェア"},"default-implementation":"デフォルト実装あり。| デフォルト実装あり。"},"availability":{"introduced-and-deprecated":"{name} {introducedAt}で導入され、{name} {deprecatedAt}で非推奨になりました","available-on-platform-version":"{name} {introducedAt}以降で使用できます"},"more":"さらに表示","less":"表示を減らす","api-reference":"APIリファレンス","filter":{"title":"フィルタ","search":"検索","search-symbols":"{technology}でシンボルを検索","suggested-tags":"提案されたタグ | 提案されたタグ","selected-tags":"選択したタグ | 選択したタグ","add-tag":"タグを追加","tag-select-remove":"タグ。選択してリストから削除します。","navigate":"シンボルを移動するには、上下左右の矢印キーを押します。","siblings-label":"{total-siblings}個中{number-siblings}個のシンボルが{parent-siblings}の中にあります","parent-label":"{total-siblings}個中{number-siblings}個のシンボルが1個のシンボルを含む{parent-siblings}の中にあります | {total-siblings}個中{number-siblings}個のシンボルが{number-parent}個のシンボルを含む{parent-siblings}の中にあります","reset-filter":"フィルタをリセット","tags":{"sample-code":"サンプルコード","tutorials":"チュートリアル","articles":"記事","web-service-endpoints":"Webサービスのエンドポイント","hide-deprecated":"非推奨の項目を非表示"}},"navigator":{"title":"ドキュメントナビゲータ","open-navigator":"ドキュメントナビゲータを開く","close-navigator":"ドキュメントナビゲータを閉じる","no-results":"結果が見つかりません。","no-children":"使用できるデータがありません。","error-fetching":"データを取得する際にエラーが起きました。","items-found":"項目が見つかりません | 1個の項目が見つかりました | {number}個の項目が見つかりましたTabキーを押すと項目をナビゲートできます。","navigator-is":"ナビゲータは{state}です","state":{"loading":"読み込み中","ready":"準備完了"}},"tab":{"request":"リクエスト","response":"レスポンス"},"required":"必須","parameters":{"default":"デフォルト","minimum":"最小","maximum":"最大","possible-types":"タイプ | 使用できるタイプ","possible-values":"値 | 使用できる値"},"content-type":"Content-Type: {value}","read-only":"読み出し専用","error":{"unknown":"原因不明のエラーが起きました。","image":"イメージを読み込めませんでした","not-found":"探しているページが見つかりません。"},"color-scheme":{"select":"カラースキーム環境設定を選択","auto":"自動","dark":"ダーク","light":"ライト"},"accessibility":{"strike":{"start":"取り消し線テキストの開始","end":"取り消し線テキストの終了"},"code":{"start":"コードブロックの開始","end":"コードブロックの終了"},"skip-navigation":"ナビゲーションをスキップ","in-page-link":"ページ内リンク"},"select-language":"このページの言語を選択","icons":{"clear":"消去","web-service-endpoint":"Webサービスのエンドポイント","search":"検索"},"formats":{"parenthesis":"({content})","colon":"{content}: "},"quicknav":{"button":{"label":"クイックナビゲーションを開く","title":"クリックするか「/」を入力すると素早く移動します"},"preview-unavailable":"プレビューできません"},"mentioned-in":"言及: ","pager":{"roledescription":"コンテンツスライダー","page":{"label":"コンテンツページ{index}/{count}"},"control":{"navigate-previous":"前のコンテンツページに移動","navigate-next":"次のコンテンツページに移動"}},"links-grid":{"label":"リンクのグリッド"}}'),a=JSON.parse('{"view-in":"한국어로 보기","continue-viewing":"한국어로 계속 보기","language":"언어","video":{"title":"비디오","replay":"다시 재생","play":"재생","pause":"일시 정지","watch":"소개 비디오 시청하기","description":"이 비디오의 콘텐츠 설명: {alt}","custom-controls":"사용자 설정 제어기는 아래에서 사용 가능"},"tutorials":{"title":"튜토리얼 | 튜토리얼","step":"{number}단계","submit":"제출","next":"다음","preview":{"title":"미리보기 없음 | 미리보기 | 미리보기","no-preview-available-step":"이 단계에서는 사용 가능한 미리보기가 없습니다."},"nav":{"chapters":"챕터","current":"현재 {thing}"},"assessment":{"check-your-understanding":"얼마나 이해했는지 확인하기","success-message":"잘 하셨습니다. 이 튜토리얼에 대한 모든 질문에 답하셨습니다.","answer-result":"답 {answer}은(는) {result}입니다.","correct":"정답","incorrect":"오답","next-question":"다음 질문","legend":"가능한 답"},"project-files":"프로젝트 파일","estimated-time":"예상 시간","sections":{"chapter":"{number}챕터"},"question-of":"총 {total}개 중 {index}번째 질문","section-of":"{total} 중 {number}","overriding-title":"{title}의 {newTitle}","time":{"format":"{number}{minutes}","minutes":{"full":"분 | 분 | {count}분","short":"분 | 분"},"hours":{"full":"시간 | 시간"}}},"documentation":{"title":"문서","nav":{"breadcrumbs":"브레드크럼","menu":"메뉴","open-menu":"메뉴 열기","close-menu":"메뉴 닫기"},"current-page":"현재 {title} 페이지","card":{"learn-more":"더 알아보기","read-article":"문서 읽기","start-tutorial":"튜토리얼 시작","view-api":"API 모음 보기","view-symbol":"기호 보기","view-sample-code":"샘플 코드 보기"},"view-more":"더 보기"},"declarations":{"hide-other-declarations":"다른 선언 가리기","show-all-declarations":"모든 선언 표시하기"},"aside-kind":{"beta":"베타","experiment":"실험","important":"중요","note":"참고","tip":"팁","warning":"경고","deprecated":"제거됨"},"change-type":{"added":"추가됨","modified":"수정됨","deprecated":"제거됨"},"verbs":{"hide":"가리기","show":"보기","close":"닫기"},"sections":{"title":"{number}섹션","on-this-page":"이 페이지에서","topics":"주제","default-implementations":"기본 구현","relationships":"관계","see-also":"추가 정보","declaration":"선언","details":"세부사항","parameters":"매개변수","possible-values":"가능한 값","parts":"파트","availability":"사용 가능 여부","resources":"리소스"},"metadata":{"details":{"name":"이름","key":"키","type":"유형"},"beta":{"legal":"이 문서는 베타 소프트웨어에 대해서 다루고 있으며, 변경될 수 있습니다.","software":"베타 소프트웨어"},"default-implementation":"기본 구현 제공됨. | 기본 구현 제공됨."},"availability":{"introduced-and-deprecated":"{name} {introducedAt}에서 소개되었고 {name} {deprecatedAt}에서 제거됨","available-on-platform-version":"{name} {introducedAt} 이상에서 사용할 수 있음"},"more":"더 보기","less":"간략히","api-reference":"API 참조","filter":{"title":"필터","search":"검색","search-symbols":"{technology}에서 기호 찾기","suggested-tags":"권장 태그 | 권장 태그","selected-tags":"선택한 태그 | 선택한 태그","add-tag":"태그 추가","tag-select-remove":"태그. 목록에서 제거하려면 선택하십시오.","navigate":"기호를 탐색하려면 위쪽 화살표, 아래쪽 화살표, 왼쪽 화살표 또는 오른쪽 화살표를 누르십시오.","siblings-label":"{parent-siblings} 내의 총 {total-siblings}개의 기호 중 {number-siblings}개","parent-label":"한 개의 기호를 포함하는 {parent-siblings} 내의 총 {total-siblings}개의 기호 중 {number-siblings}개 | {number-parent}개의 기호를 포함하는 {parent-siblings} 내의 총 {total-siblings}개의 기호 중 {number-siblings}개","reset-filter":"필터 재설정","tags":{"sample-code":"샘플 코드","tutorials":"튜토리얼","articles":"문서","web-service-endpoints":"웹 서비스 엔드포인트","hide-deprecated":"제거된 항목 가리기"}},"navigator":{"title":"문서 탐색기","open-navigator":"문서 탐색기 열기","close-navigator":"문서 탐색기 닫기","no-results":"결과 찾을 수 없습니다.","no-children":"사용 가능한 데이터가 없습니다.","error-fetching":"데이터를 가져오는 동안 오류가 발생했습니다.","items-found":"항목을 찾을 수 없음 | 1개의 항목 발견됨 | {number}개의 항목이 발견됨. 다시 탭하여 탐색하십시오.","navigator-is":"내비게이터가 {state}입니다.","state":{"loading":"로드 중","ready":"준비 완료 상태"}},"tab":{"request":"요청","response":"응답"},"required":"필수 사항","parameters":{"default":"기본","minimum":"최소","maximum":"최대","possible-types":"유형 | 가능한 유형","possible-values":"값 | 가능한 값"},"content-type":"콘텐츠 유형: {value}","read-only":"읽기 전용","error":{"unknown":"알 수 없는 오류가 발생했습니다.","image":"이미지를 로드하는 데 실패함","not-found":"해당 페이지를 찾을 수 없습니다."},"color-scheme":{"select":"색상 모드 환경설정 선택","auto":"자동","dark":"다크","light":"라이트"},"accessibility":{"strike":{"start":"취소선이 그어진 텍스트 시작","end":"취소선이 그어진 텍스트 종료"},"code":{"start":"코드 블록 시작","end":"코드 블록 종료"},"skip-navigation":"탐색 건너뛰기","in-page-link":"페이지 링크에서"},"select-language":"이 페이지의 언어 선택","icons":{"clear":"지우기","web-service-endpoint":"웹 서비스 엔드포인트","search":"검색"},"formats":{"parenthesis":"({content})","colon":"{content}: "},"quicknav":{"button":{"label":"빠른 이동 열기","title":"클릭하거나 /를 입력하여 빠르게 이동"},"preview-unavailable":"미리보기 사용할 수 없음"},"mentioned-in":"다음에서 언급됨","pager":{"roledescription":"콘텐츠 슬라이더","page":{"label":"{count} 중 {index}번째 콘텐츠 페이지"},"control":{"navigate-previous":"콘텐츠의 이전 페이지로 이동","navigate-next":"콘텐츠의 다음 페이지로 이동"}},"links-grid":{"label":"링크의 격자"}}');const s="en-US",l={"en-US":r,"zh-CN":o,"ja-JP":i,"ko-KR":a}},4030:function(e,t,n){"use strict";var r=n(9804),o=n(1265),i=n(5394),a=n(2412);const s="undefined"!==typeof window.matchMedia&&[r.Z.light,r.Z.dark,"no-preference"].some((e=>window.matchMedia(`(prefers-color-scheme: ${e})`).matches)),l=s?r.Z.auto:r.Z.light;t["default"]={state:{imageLoadingStrategy:"ide"==={NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}.VUE_APP_TARGET?o.Z.eager:o.Z.lazy,preferredColorScheme:i.Z.preferredColorScheme||l,preferredLocale:i.Z.preferredLocale,supportsAutoColorScheme:s,systemColorScheme:r.Z.light,availableLocales:[]},reset(){this.state.imageLoadingStrategy="ide"==={NODE_ENV:"production",VUE_APP_TITLE:"Documentation",BASE_URL:"{{BASE_PATH}}/"}.VUE_APP_TARGET?o.Z.eager:o.Z.lazy,this.state.preferredColorScheme=i.Z.preferredColorScheme||l,this.state.supportsAutoColorScheme=s,this.state.systemColorScheme=r.Z.light},setImageLoadingStrategy(e){this.state.imageLoadingStrategy=e},setPreferredColorScheme(e){this.state.preferredColorScheme=e,i.Z.preferredColorScheme=e},setAllLocalesAreAvailable(){const e=a.map((e=>e.code));this.state.availableLocales=e},setAvailableLocales(e=[]){this.state.availableLocales=e},setPreferredLocale(e){this.state.preferredLocale=e,i.Z.preferredLocale=this.state.preferredLocale},setSystemColorScheme(e){this.state.systemColorScheme=e},syncPreferredColorScheme(){i.Z.preferredColorScheme&&i.Z.preferredColorScheme!==this.state.preferredColorScheme&&(this.state.preferredColorScheme=i.Z.preferredColorScheme)}}},5947:function(e,t,n){"use strict";function r(e){return e.reduce(((e,t)=>(t.traits.includes("dark")?e.dark.push(t):e.light.push(t),e)),{light:[],dark:[]})}function o(e){const t=["1x","2x","3x"];return t.reduce(((t,n)=>{const r=e.find((e=>e.traits.includes(n)));return r?t.concat({density:n,src:r.url,size:r.size}):t}),[])}function i(e){const t="/",n=new RegExp(`${t}+`,"g");return e.join(t).replace(n,t)}function a(e){const{baseUrl:t}=window,n=Array.isArray(e)?i(e):e;return n&&"string"===typeof n&&!n.startsWith(t)&&n.startsWith("/")?i([t,n]):n}function s(e){return e?e.startsWith("/")?e:`/${e}`:e}function l(e){return e?`url('${a(e)}')`:void 0}function c(e){return new Promise(((t,n)=>{const r=new Image;r.src=e,r.onerror=n,r.onload=()=>t({width:r.width,height:r.height})}))}n.d(t,{AH:function(){return a},Dy:function(){return i},Jf:function(){return s},RY:function(){return c},T8:function(){return d},XV:function(){return r},eZ:function(){return l},u:function(){return o}});const u={landscape:"landscape",portrait:"portrait",square:"square"};function d(e,t){return e&&t?et?u.landscape:u.square:null}},5381:function(e,t,n){"use strict";n.d(t,{L3:function(){return r},fr:function(){return s},kB:function(){return i},lU:function(){return o}});const r={xlarge:"xlarge",large:"large",medium:"medium",small:"small"},o={default:"default",nav:"nav"},i={[o.default]:{[r.xlarge]:{minWidth:1920,contentWidth:1536},[r.large]:{minWidth:1251,contentWidth:980},[r.medium]:{minWidth:736,maxWidth:1068,contentWidth:692},[r.small]:{minWidth:320,maxWidth:735,contentWidth:280}},[o.nav]:{[r.large]:{minWidth:1024},[r.medium]:{minWidth:768,maxWidth:1023},[r.small]:{minWidth:320,maxWidth:767}}},a={[r.small]:0,[r.medium]:1,[r.large]:2};function s(e,t){return a[e]>a[t]}},9030:function(e,t,n){"use strict";n.d(t,{KP:function(){return c},dZ:function(){return s},jk:function(){return u}});var r=n(2412),o=n(7788),i=n(3465);const a=r.reduce(((e,t)=>({...e,[t.slug]:t.code})),{});function s(e){return a[e]}function l(e){return!!a[e]}function c(e){return{params:{locale:e===o.defaultLocale?void 0:e}}}function u(e=o.defaultLocale,t={}){if(!l(e))return;t.$i18n.locale=e;const n=s(e);(0,i.e)(n)}},5657:function(e,t,n){"use strict";function r(e){let t=null,n=e-1;const r=new Promise((e=>{t=e}));return requestAnimationFrame((function e(){n-=1,n<=0?t():requestAnimationFrame(e)})),r}function o(e){return new Promise((t=>{setTimeout(t,e)}))}n.d(t,{J:function(){return r},X:function(){return o}})},3465:function(e,t,n){"use strict";n.d(t,{X:function(){return u},e:function(){return d}});var r=n(9089),o=n(2449);const i=(0,r.$8)(["meta","title"],"Documentation"),a=({title:e,description:t,url:n,currentLocale:r})=>[{name:"description",content:t},{property:"og:locale",content:r},{property:"og:site_name",content:i},{property:"og:type",content:"website"},{property:"og:title",content:e},{property:"og:description",content:t},{property:"og:url",content:n},{property:"og:image",content:(0,o.HH)("/developer-og.jpg")},{name:"twitter:image",content:(0,o.HH)("/developer-og-twitter.jpg")},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:description",content:t},{name:"twitter:title",content:e},{name:"twitter:url",content:n}],s=e=>[e,i].filter(Boolean).join(" | "),l=e=>{const{content:t}=e,n=e.property?"property":"name",r=e[n],o=document.querySelector(`meta[${n}="${r}"]`);if(o&&t)o.setAttribute("content",t);else if(o&&!t)o.remove();else if(t){const t=document.createElement("meta");t.setAttribute(n,e[n]),t.setAttribute("content",e.content),document.getElementsByTagName("head")[0].appendChild(t)}},c=e=>{document.title=e};function u({title:e,description:t,url:n,currentLocale:r}){const o=s(e);c(o),a({title:o,description:t,url:n,currentLocale:r}).forEach((e=>l(e)))}function d(e){document.querySelector("html").setAttribute("lang",e)}},5394:function(e,t,n){"use strict";var r=n(7247);const o={preferredColorScheme:"developer.setting.preferredColorScheme",preferredLocale:"developer.setting.preferredLocale",preferredLanguage:"docs.setting.preferredLanguage"},i={preferredColorScheme:"docs.setting.preferredColorScheme"};t["Z"]=Object.defineProperties({},Object.keys(o).reduce(((e,t)=>({...e,[t]:{get:()=>{const e=i[t],n=r.mr.getItem(o[t]);return e?n||r.mr.getItem(e):n},set:e=>r.mr.setItem(o[t],e)}})),{}))},7247:function(e,t,n){"use strict";n.d(t,{mr:function(){return a},tO:function(){return l},y7:function(){return c}});const r="developer.setting.";function o(e=localStorage){return{getItem:t=>{try{return e.getItem(t)}catch(n){return null}},setItem:(t,n)=>{try{e.setItem(t,n)}catch(r){}},removeItem:t=>{try{e.removeItem(t)}catch(n){}}}}function i(e){return{get:(t,n)=>{const o=JSON.parse(e.getItem(r+t));return null!==o?o:n},set:(t,n)=>e.setItem(r+t,JSON.stringify(n)),remove:t=>e.removeItem(r+t)}}const a=o(window.localStorage),s=o(window.sessionStorage),l=i(a),c=i(s)},3208:function(e,t,n){"use strict";n.d(t,{HA:function(){return a},RL:function(){return u},Xv:function(){return s},ZQ:function(){return d},hr:function(){return c},id:function(){return m},sj:function(){return l}});n(8269);const r=/(?:\s+|[`"<>])/g,o=/^-+/,i=/["'&<>]/g;function a(e){return e.trim().replace(r,"-").replace(o,"").toLowerCase()}function s(e){const t=e=>({'"':""","'":"'","&":"&","<":"<",">":">"}[e]||e);return e.replace(i,t)}function l(e){return e.replace(/#(.*)/,((e,t)=>`#${CSS.escape(t)}`))}function c(e){return e.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")}function u(e){let t,n;const r="\\s*",o=" ",i=e.trim(),a=i.length;if(!a)return o;const s=[];for(t=0;te.json())).catch((()=>({})))}const l=(e,t)=>r(i,e,t)},2449:function(e,t,n){"use strict";n.d(t,{Lp:function(){return s},Q2:function(){return a},WN:function(){return l},Ex:function(){return i},HH:function(){return c}});var r=n(5947),o={input:"input",tags:"tags"};function i(e={}){return Object.entries(e).reduce(((e,[t,n])=>n?e.concat(`${encodeURIComponent(t)}=${encodeURIComponent(n)}`):e),[]).join("&")}function a(e,{changes:t,language:n,context:r}={}){const[o,a]=e.split("#"),s=o.match(/\?.*/),l=i({changes:t,language:n,context:r}),c=s?"&":"?",u=a?o:e,d=l?`${c}${l}`:"",m=a?`#${a}`:"";return`${u}${d}${m}`}function s(e,t){const{query:{changes:n,[o.input]:r,[o.tags]:i,...a}={}}=e,{query:{changes:s,[o.input]:l,[o.tags]:c,...u}={}}=t;return e.name===t.name&&JSON.stringify({path:e.path,query:a})===JSON.stringify({path:t.path,query:u})}function l(e,t=window.location.href){return new URL((0,r.AH)(e),t)}function c(e,t){return l(e,t).href}},647:function(e,t,n){n.p=window.baseUrl},2412:function(e){"use strict";e.exports=JSON.parse('[{"code":"en-US","name":"English","slug":"en-US"},{"code":"zh-CN","name":"简体中文","slug":"zh-CN"},{"code":"ja-JP","name":"日本語","slug":"ja-JP"},{"code":"ko-KR","name":"한국어","slug":"ko-KR"}]')}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.m=e,function(){var e=[];n.O=function(t,r,o,i){if(!r){var a=1/0;for(u=0;u=i)&&Object.keys(n.O).every((function(e){return n.O[e](r[l])}))?r.splice(l--,1):(s=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[r,o,i]}}(),function(){n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,{a:t}),t}}(),function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){a[e]=function(){return r[e]}}));return a["default"]=function(){return r},n.d(i,a),i}}(),function(){n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}}(),function(){n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))}}(),function(){n.u=function(e){return"js/"+({82:"highlight-js-json-js",113:"highlight-js-markdown-js",133:"highlight-js-llvm-js",162:"topic",176:"highlight-js-shell-js",213:"highlight-js-diff-js",217:"highlight-js-custom-swift",392:"highlight-js-scss-js",393:"highlight-js-bash-js",435:"highlight-js-python-js",490:"highlight-js-xml-js",527:"highlight-js-swift-js",546:"highlight-js-c-js",596:"highlight-js-php-js",621:"highlight-js-cpp-js",623:"highlight-js-ruby-js",637:"highlight-js-objectivec-js",642:"highlight-js-custom-markdown",645:"highlight-js-perl-js",788:"highlight-js-java-js",814:"highlight-js-javascript-js",843:"tutorials-overview",864:"highlight-js-css-js",878:"highlight-js-http-js",982:"documentation-topic"}[e]||e)+"."+{82:"2a1856ba",104:"fe5974d0",113:"a2f456af",133:"26121771",162:"24dedb87",176:"0ad5b20f",213:"4db9a783",217:"738731d1",337:"274a8ccc",392:"adcd11a2",393:"702f0c5c",435:"60354774",490:"0d78f903",527:"bdd5bff5",546:"063069d3",596:"c458ffa4",621:"458a9ae4",623:"7272231f",637:"74dea052",642:"78c9f6ed",645:"da6eda82",788:"4fe21e94",814:"dfc9d16d",842:"9b3ff1dd",843:"2d184ec0",864:"bfc4251f",866:"5699f408",878:"f78e83c2",982:"2d14a5a9",989:"c46c769c"}[e]+".js"}}(),function(){n.miniCssF=function(e){return"css/"+({162:"topic",843:"tutorials-overview",982:"documentation-topic"}[e]||e)+"."+{162:"4be8f56d",843:"adb17623",866:"60f074fd",982:"6413c07b",989:"4f123103"}[e]+".css"}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="swift-docc-render:";n.l=function(r,o,i,a){if(e[r])e[r].push(o);else{var s,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;ue.anchor===t.anchor?{...t,visibility:e.visibility}:t))},updateBreakpoint(e){this.state.breakpoint=e},setReferences(e){this.state.references=e}},d=function(){var e=this,t=e._self._c;return t("div",{staticClass:"article"},[e.isTargetIDE?e._e():t("NavigationBar",{attrs:{chapters:e.hierarchy.modules,technology:e.metadata.category,topic:e.heroTitle||"",rootReference:e.hierarchy.reference,identifierUrl:e.identifierUrl}}),t("main",{attrs:{id:"app-main",tabindex:"0"}},[e._t("above-hero"),e._l(e.sections,(function(n,s){return t(e.componentFor(n),e._b({key:s,tag:"component"},"component",e.propsFor(n),!1))}))],2),t("PortalTarget",{attrs:{name:"modal-destination",multiple:""}})],1)},p=[],h=n(2433),m=n(4030),v=function(){var e=this,t=e._self._c;return t("NavBase",{attrs:{id:"nav","aria-label":e.technology,hasSolidBackground:""},scopedSlots:e._u([{key:"default",fn:function(){return[t("ReferenceUrlProvider",{attrs:{reference:e.rootReference},scopedSlots:e._u([{key:"default",fn:function({urlWithParams:n}){return[t("NavTitleContainer",{attrs:{to:n},scopedSlots:e._u([{key:"default",fn:function(){return[e._v(e._s(e.technology))]},proxy:!0},{key:"subhead",fn:function(){return[e._v(e._s(e.$tc("tutorials.title",2)))]},proxy:!0}],null,!0)})]}}])})]},proxy:!0},{key:"after-title",fn:function(){return[t("div",{staticClass:"separator"})]},proxy:!0},{key:"tray",fn:function(){return[t("div",{staticClass:"mobile-dropdown-container"},[t("MobileDropdown",{attrs:{options:e.chapters,sections:e.optionsForSections,currentOption:e.currentSection?e.currentSection.title:""},on:{"select-section":e.onSelectSection}})],1),t("div",{staticClass:"dropdown-container"},[t("PrimaryDropdown",{staticClass:"primary-dropdown",attrs:{options:e.chapters,currentOption:e.topic}}),t("ChevronIcon",{staticClass:"icon-inline"}),e.currentSection?t("SecondaryDropdown",{staticClass:"secondary-dropdown",attrs:{options:e.optionsForSections,currentOption:e.currentSection.title,sectionTracker:e.sectionIndicatorText},on:{"select-section":e.onSelectSection}}):e._e()],1),e._t("tray",null,{siblings:e.chapters.length+e.optionsForSections.length})]},proxy:!0}],null,!0)})},f=[],g=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"chevron-icon",attrs:{viewBox:"0 0 14 14",themeId:"chevron"}},[t("path",{attrs:{d:"M3.22 1.184l0.325-0.38 7.235 6.201-7.235 6.19-0.325-0.38 6.792-5.811-6.792-5.82z"}})])},y=[],C=n(9742),b={name:"ChevronIcon",components:{SVGIcon:C.Z}},_=b,w=n(1001),k=(0,w.Z)(_,g,y,!1,null,null,null),S=k.exports,x=n(2449),A=n(5953),T={name:"ReferenceUrlProvider",mixins:[A.Z],props:{reference:{type:String,required:!0}},computed:{resolvedReference:({references:e,reference:t})=>e[t]||{},url:({resolvedReference:e})=>e.url,title:({resolvedReference:e})=>e.title},render(){return this.$scopedSlots.default({url:this.url,urlWithParams:(0,x.Q2)(this.url,this.$route.query),title:this.title,reference:this.resolvedReference})}},I=T,$=(0,w.Z)(I,l,c,!1,null,null,null),N=$.exports,q=n(3704),P=n(2586),D=n(2573),Z=function(){var e=this,t=e._self._c;return t("NavMenuItems",{staticClass:"mobile-dropdown"},e._l(e.options,(function(n){return t("ReferenceUrlProvider",{key:n.reference,attrs:{reference:n.reference},scopedSlots:e._u([{key:"default",fn:function({title:s}){return[t("NavMenuItemBase",{staticClass:"chapter-list",attrs:{role:"group"}},[t("p",{staticClass:"chapter-name"},[e._v(e._s(s))]),t("ul",{staticClass:"tutorial-list"},e._l(n.projects,(function(n){return t("ReferenceUrlProvider",{key:n.reference,attrs:{reference:n.reference},scopedSlots:e._u([{key:"default",fn:function({url:n,urlWithParams:s,title:i}){return[t("li",{staticClass:"tutorial-list-item"},[t("router-link",{staticClass:"option tutorial",attrs:{to:s,value:i}},[e._v(" "+e._s(i)+" ")]),n===e.$route.path?t("ul",{staticClass:"section-list",attrs:{role:"listbox"}},e._l(e.sections,(function(n){return t("li",{key:n.title},[t("router-link",{class:e.classesFor(n),attrs:{to:{path:n.path,query:e.$route.query},value:n.title},nativeOn:{click:function(t){return e.onClick(n)}}},[e._v(" "+e._s(n.title)+" ")])],1)})),0):e._e()],1)]}}],null,!0)})})),1)])]}}],null,!0)})})),1)},R=[],O=n(535),L=n(2853),B={name:"MobileDropdown",components:{NavMenuItems:L.Z,NavMenuItemBase:O.Z,ReferenceUrlProvider:N},props:{options:{type:Array,required:!0},currentOption:{type:String,required:!0},sections:{type:Array,required:!1,default:()=>[]}},methods:{classesFor(e){return["option","section",{active:this.currentOption===e.title},this.depthClass(e)]},depthClass(e){const{depth:t=0}=e;return`depth${t}`},onClick(e){this.$emit("select-section",e.path)}}},M=B,F=(0,w.Z)(M,Z,R,!1,null,"2c27d339",null),V=F.exports,j=function(){var e=this,t=e._self._c;return t("DropdownCustom",{staticClass:"tutorial-dropdown",attrs:{value:e.currentOption,"aria-label":e.$t("tutorials.nav.current",{thing:e.$t("sections.title")}),isSmall:""},scopedSlots:e._u([{key:"toggle-post-content",fn:function(){return[t("span",{staticClass:"section-tracker"},[e._v(e._s(e.sectionTracker))])]},proxy:!0},{key:"default",fn:function({closeAndFocusToggler:n,contentClasses:s,navigateOverOptions:i,OptionClass:r,ActiveOptionClass:o}){return[t("ul",{staticClass:"options",class:s,attrs:{role:"listbox",tabindex:"0"}},e._l(e.options,(function(s){return t("router-link",{key:s.title,attrs:{to:{path:s.path,query:e.$route.query},custom:""},scopedSlots:e._u([{key:"default",fn:function({navigate:a}){return[t("li",{class:[r,{[o]:e.currentOption===s.title}],attrs:{value:s.title,"aria-selected":e.currentOption===s.title,"aria-current":e.ariaCurrent(s.title),tabindex:-1},on:{click:function(t){return e.setActive(s,a,n,t)},keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.setActive(s,a,n,t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:n.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:n.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),i(t,1))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),i(t,-1))}]}},[e._v(" "+e._s(s.title)+" ")])]}}],null,!0)})})),1)]}}])})},E=[],H=function(){var e=this,t=e._self._c;return t("BaseDropdown",{staticClass:"dropdown-custom",class:{[e.OpenedClass]:e.isOpen,"dropdown-small":e.isSmall},attrs:{value:e.value},scopedSlots:e._u([{key:"dropdown",fn:function({dropdownClasses:n}){return[t("span",{staticClass:"visuallyhidden",attrs:{id:`DropdownLabel_${e._uid}`}},[e._v(e._s(e.ariaLabel))]),t("button",{ref:"dropdownToggle",staticClass:"form-dropdown-toggle",class:n,attrs:{id:`DropdownToggle_${e._uid}`,"aria-labelledby":`DropdownLabel_${e._uid} DropdownToggle_${e._uid}`,"aria-expanded":e.isOpen?"true":"false","aria-haspopup":"true"},on:{click:e.toggleDropdown,keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.openDropdown.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:e.closeAndFocusToggler.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),e.openDropdown.apply(null,arguments))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),e.openDropdown.apply(null,arguments))}]}},[t("span",{staticClass:"form-dropdown-title"},[e._v(e._s(e.value))]),e._t("toggle-post-content")],2)]}},{key:"eyebrow",fn:function(){return[e._t("eyebrow")]},proxy:!0},{key:"after",fn:function(){return[e._t("default",null,null,{value:e.value,isOpen:e.isOpen,contentClasses:["form-dropdown-content",{"is-open":e.isOpen}],closeDropdown:e.closeDropdown,onChangeAction:e.onChangeAction,closeAndFocusToggler:e.closeAndFocusToggler,navigateOverOptions:e.navigateOverOptions,OptionClass:e.OptionClass,ActiveOptionClass:e.ActiveOptionClass})]},proxy:!0}],null,!0)})},U=[],z=function(){var e=this,t=e._self._c;return t("div",{staticClass:"form-element"},[e._t("dropdown",(function(){return[t("select",e._b({directives:[{name:"model",rawName:"v-model",value:e.modelValue,expression:"modelValue"}],class:e.dropdownClasses,on:{change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.modelValue=t.target.multiple?n:n[0]}}},"select",e.$attrs,!1),[e._t("default")],2)]}),{dropdownClasses:e.dropdownClasses,value:e.value}),t("InlineChevronDownIcon",{staticClass:"form-icon",attrs:{"aria-hidden":"true"}}),e.$slots.eyebrow?t("span",{staticClass:"form-label",attrs:{"aria-hidden":"true"}},[e._t("eyebrow")],2):e._e(),e._t("after")],2)},G=[],W=n(5151),Q={name:"BaseDropdown",inheritAttrs:!1,props:{value:{type:String,default:""}},components:{InlineChevronDownIcon:W.Z},computed:{modelValue:{get:({value:e})=>e,set(e){this.$emit("input",e)}},dropdownClasses({value:e}){return["form-dropdown",{"form-dropdown-selectnone":""===e,"no-eyebrow":!this.$slots.eyebrow}]}}},K=Q,X=(0,w.Z)(K,z,G,!1,null,"f934959a",null),Y=X.exports;const J="is-open",ee="option",te="option-active";var ne={name:"DropdownCustom",components:{BaseDropdown:Y},constants:{OpenedClass:J,OptionClass:ee,ActiveOptionClass:te},props:{value:{type:String,default:""},ariaLabel:{type:String,default:""},isSmall:{type:Boolean,default:!1}},data(){return{isOpen:!1,OpenedClass:J,OptionClass:ee,ActiveOptionClass:te}},mounted(){document.addEventListener("click",this.closeOnLoseFocus)},beforeDestroy(){document.removeEventListener("click",this.closeOnLoseFocus)},methods:{onChangeAction(e){this.$emit("input",e)},toggleDropdown(){this.isOpen?this.closeDropdown():this.openDropdown()},async closeAndFocusToggler(){this.closeDropdown(),await this.$nextTick(),this.$refs.dropdownToggle.focus({preventScroll:!0})},closeDropdown(){this.isOpen=!1,this.$emit("close")},openDropdown(){this.isOpen=!0,this.$emit("open"),this.focusActiveLink()},closeOnLoseFocus(e){!this.$el.contains(e.target)&&this.isOpen&&this.closeDropdown()},navigateOverOptions({target:e},t){const n=this.$el.querySelectorAll(`.${ee}`),s=Array.from(n),i=s.indexOf(e),r=s[i+t];r&&r.focus({preventScroll:!0})},async focusActiveLink(){const e=this.$el.querySelector(`.${te}`);e&&(await this.$nextTick(),e.focus({preventScroll:!0}))}}},se=ne,ie=(0,w.Z)(se,H,U,!1,null,"6adda760",null),re=ie.exports,oe={name:"SecondaryDropdown",components:{DropdownCustom:re},props:{options:{type:Array,required:!0},currentOption:{type:String,required:!0},sectionTracker:{type:String,required:!1}},methods:{ariaCurrent(e){return this.currentOption===e&&"section"},setActive(e,t,n,s){t(s),this.$emit("select-section",e.path),n()}}},ae=oe,le=(0,w.Z)(ae,j,E,!1,null,"618ff780",null),ce=le.exports,ue=function(){var e=this,t=e._self._c;return t("DropdownCustom",{staticClass:"tutorial-dropdown",attrs:{value:e.currentOption,"aria-label":e.$t("tutorials.nav.current",{thing:e.$tc("tutorials.title",1)}),isSmall:""},scopedSlots:e._u([{key:"default",fn:function({closeAndFocusToggler:n,contentClasses:s,closeDropdown:i,navigateOverOptions:r,OptionClass:o,ActiveOptionClass:a}){return[t("ul",{staticClass:"options",class:s,attrs:{tabindex:"0"}},e._l(e.options,(function(s){return t("ReferenceUrlProvider",{key:s.reference,attrs:{reference:s.reference},scopedSlots:e._u([{key:"default",fn:function({title:l}){return[t("li",{staticClass:"chapter-list",attrs:{role:"group"}},[t("p",{staticClass:"chapter-name"},[e._v(e._s(l))]),t("ul",{attrs:{role:"listbox"}},e._l(s.projects,(function(s){return t("ReferenceUrlProvider",{key:s.reference,attrs:{reference:s.reference},scopedSlots:e._u([{key:"default",fn:function({urlWithParams:s,title:l}){return[t("router-link",{attrs:{to:s,custom:""},scopedSlots:e._u([{key:"default",fn:function({navigate:s,isActive:c}){return[t("li",{class:{[o]:!0,[a]:c},attrs:{value:l,"aria-selected":c,"aria-current":!!c&&"tutorial",tabindex:-1},on:{click:function(t){return e.setActive(s,i,t)},keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.setActive(s,i,t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:n.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:n.apply(null,arguments)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),r(t,1))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),r(t,-1))}]}},[e._v(" "+e._s(l)+" ")])]}}],null,!0)})]}}],null,!0)})})),1)])]}}],null,!0)})})),1)]}}])})},de=[],pe={name:"PrimaryDropdown",components:{DropdownCustom:re,ReferenceUrlProvider:N},props:{options:{type:Array,required:!0},currentOption:{type:String,required:!0}},methods:{setActive(e,t,n){e(n),t()}}},he=pe,me=(0,w.Z)(he,ue,de,!1,null,"03cbd7f7",null),ve=me.exports;const fe={title:"Introduction",url:"#introduction",reference:"introduction",sectionNumber:0,depth:0};var ge={name:"NavigationBar",components:{NavTitleContainer:D.Z,NavBase:P.Z,ReferenceUrlProvider:N,PrimaryDropdown:ve,SecondaryDropdown:ce,MobileDropdown:V,ChevronIcon:S},mixins:[q.Z,A.Z],props:{chapters:{type:Array,required:!0},technology:{type:String,required:!0},topic:{type:String,required:!0},rootReference:{type:String,required:!0},identifierUrl:{type:String,required:!0}},data(){return{currentSection:fe,tutorialState:this.store.state}},watch:{pageSectionWithHighestVisibility(e){e&&(this.currentSection=e)}},computed:{currentProject(){return this.chapters.reduce(((e,{projects:t})=>e.concat(t)),[]).find((e=>e.reference===this.identifierUrl))},pageSections(){if(!this.currentProject)return[];const e=[fe].concat(this.currentProject.sections);return this.tutorialState.linkableSections.map(((t,n)=>{const s=e[n],i=this.references[s.reference],{url:r,title:o}=i||s;return{...t,title:o,path:r}}))},optionsForSections(){return this.pageSections.map((({depth:e,path:t,title:n})=>({depth:e,path:t,title:n})))},pageSectionWithHighestVisibility(){return[...this.pageSections].sort(((e,t)=>t.visibility-e.visibility)).find((e=>e.visibility>0))},sectionIndicatorText(){const e=this.tutorialState.linkableSections.length-1,{sectionNumber:t}=this.currentSection||{};if(0!==t)return this.$t("tutorials.section-of",{number:t,total:e})}},methods:{onSelectSection(e){const t=e.split("#")[1];this.handleFocusAndScroll(t)}}},ye=ge,Ce=(0,w.Z)(ye,v,f,!1,null,"1d3fe8ed",null),be=Ce.exports,_e=n(2974),we=function(){var e=this,t=e._self._c;return t("div",{staticClass:"body"},[t("BodyContent",{attrs:{content:e.content}})],1)},ke=[],Se=function(){var e=this,t=e._self._c;return t("article",{staticClass:"body-content"},e._l(e.content,(function(n,s){return t(e.componentFor(n),e._b({key:s,tag:"component",staticClass:"layout"},"component",e.propsFor(n),!1))})),1)},xe=[],Ae=function(){var e=this,t=e._self._c;return t("div",{staticClass:"columns",class:e.classes},[e._l(e.columns,(function(n,s){return[t("Asset",{key:n.media,attrs:{identifier:n.media,videoAutoplays:!1}}),n.content?t("ContentNode",{key:s,attrs:{content:n.content}}):e._e()]}))],2)},Te=[],Ie=n(4655),$e=function(){var e=this,t=e._self._c;return t("BaseContentNode",{attrs:{content:e.articleContent}})},Ne=[],qe=n(9519),Pe={name:"ContentNode",components:{BaseContentNode:qe["default"]},props:qe["default"].props,computed:{articleContent(){return this.map((e=>{switch(e.type){case qe["default"].BlockType.codeListing:return{...e,showLineNumbers:!0};case qe["default"].BlockType.heading:{const{anchor:t,...n}=e;return n}default:return e}}))}},methods:qe["default"].methods,BlockType:qe["default"].BlockType,InlineType:qe["default"].InlineType},De=Pe,Ze=(0,w.Z)(De,$e,Ne,!1,null,"0861b5be",null),Re=Ze.exports,Oe={name:"Columns",components:{Asset:Ie.Z,ContentNode:Re},props:{columns:{type:Array,required:!0}},computed:{classes(){return{"cols-2":2===this.columns.length,"cols-3":3===this.columns.length}}}},Le=Oe,Be=(0,w.Z)(Le,Ae,Te,!1,null,"30edf911",null),Me=Be.exports,Fe=function(){var e=this,t=e._self._c;return t("div",{staticClass:"content-and-media",class:e.classes},[t("ContentNode",{attrs:{content:e.content}}),t("Asset",{attrs:{identifier:e.media}})],1)},Ve=[];const je={leading:"leading",trailing:"trailing"};var Ee={name:"ContentAndMedia",components:{Asset:Ie.Z,ContentNode:Re},props:{content:Re.props.content,media:Ie.Z.props.identifier,mediaPosition:{type:String,default:()=>je.trailing,validator:e=>Object.prototype.hasOwnProperty.call(je,e)}},computed:{classes(){return{"media-leading":this.mediaPosition===je.leading,"media-trailing":this.mediaPosition===je.trailing}}},MediaPosition:je},He=Ee,Ue=(0,w.Z)(He,Fe,Ve,!1,null,"3fa44f9e",null),ze=Ue.exports,Ge=function(){var e=this,t=e._self._c;return t("div",{staticClass:"full-width"},e._l(e.groups,(function(n,s){return t(e.componentFor(n),e._b({key:s,tag:"component",staticClass:"group"},"component",e.propsFor(n),!1),[t("ContentNode",{attrs:{content:n.content}})],1)})),1)},We=[],Qe=function(){var e=this,t=e._self._c;return t(e.tag,{tag:"component",attrs:{id:e.anchor}},[e._t("default")],2)},Ke=[],Xe=n(9146),Ye={name:"LinkableElement",mixins:[Xe["default"]],inject:{navigationBarHeight:{default(){}},store:{default(){return{addLinkableSection(){},updateLinkableSection(){}}}}},props:{anchor:{type:String,required:!0},depth:{type:Number,default:()=>0},tag:{type:String,default:()=>"div"},title:{type:String,required:!0}},computed:{intersectionRootMargin(){const e=this.navigationBarHeight?`-${this.navigationBarHeight}px`:"0%";return`${e} 0% -50% 0%`}},created(){this.store.addLinkableSection({anchor:this.anchor,depth:this.depth,title:this.title,visibility:0})},methods:{onIntersect(e){const t=Math.min(1,e.intersectionRatio);this.store.updateLinkableSection({anchor:this.anchor,depth:this.depth,title:this.title,visibility:t})}}},Je=Ye,et=(0,w.Z)(Je,Qe,Ke,!1,null,null,null),tt=et.exports;const{BlockType:nt}=Re;var st={name:"FullWidth",components:{ContentNode:Re,LinkableElement:tt},props:Re.props,computed:{groups:({content:e})=>e.reduce(((e,t)=>0===e.length||t.type===nt.heading?[...e,{heading:t.type===nt.heading?t:null,content:[t]}]:[...e.slice(0,e.length-1),{heading:e[e.length-1].heading,content:e[e.length-1].content.concat(t)}]),[])},methods:{componentFor(e){return e.heading?tt:"div"},depthFor(e){switch(e.level){case 1:case 2:return 0;default:return 1}},propsFor(e){return e.heading?{anchor:e.heading.anchor,depth:this.depthFor(e.heading),title:e.heading.text}:{}}}},it=st,rt=(0,w.Z)(it,Ge,We,!1,null,"5b4a8b3c",null),ot=rt.exports;const at={columns:"columns",contentAndMedia:"contentAndMedia",fullWidth:"fullWidth"};var lt={name:"BodyContent",props:{content:{type:Array,required:!0,validator:e=>e.every((({kind:e})=>Object.prototype.hasOwnProperty.call(at,e)))}},methods:{componentFor(e){return{[at.columns]:Me,[at.contentAndMedia]:ze,[at.fullWidth]:ot}[e.kind]},propsFor(e){const{content:t,kind:n,media:s,mediaPosition:i}=e;return{[at.columns]:{columns:t},[at.contentAndMedia]:{content:t,media:s,mediaPosition:i},[at.fullWidth]:{content:t}}[n]}},LayoutKind:at},ct=lt,ut=(0,w.Z)(ct,Se,xe,!1,null,"4d5a806e",null),dt=ut.exports,pt={name:"Body",components:{BodyContent:dt},props:dt.props},ht=pt,mt=(0,w.Z)(ht,we,ke,!1,null,"20dca692",null),vt=mt.exports,ft=function(){var e=this,t=e._self._c;return t("TutorialCTA",e._b({},"TutorialCTA",e.$props,!1))},gt=[],yt=function(){var e=this,t=e._self._c;return t("BaseCTA",e._b({attrs:{label:e.$t("tutorials.next")}},"BaseCTA",e.baseProps,!1))},Ct=[],bt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"call-to-action"},[t("Row",[t("LeftColumn",[t("span",{staticClass:"label"},[e._v(e._s(e.label))]),t("h2",[e._v(" "+e._s(e.title)+" ")]),e.abstract?t("ContentNode",{staticClass:"description",attrs:{content:[e.abstractParagraph]}}):e._e(),e.action?t("Button",{attrs:{action:e.action}}):e._e()],1),t("RightColumn",{staticClass:"right-column"},[e.media?t("Asset",{staticClass:"media",attrs:{identifier:e.media}}):e._e()],1)],1)],1)},_t=[],wt=n(9649),kt=n(1576),St=n(7605),xt={name:"CallToAction",components:{Asset:Ie.Z,Button:St.Z,ContentNode:qe["default"],LeftColumn:{render(e){return e(kt.Z,{props:{span:{large:5,small:12}}},this.$slots.default)}},RightColumn:{render(e){return e(kt.Z,{props:{span:{large:6,small:12}}},this.$slots.default)}},Row:wt.Z},props:{title:{type:String,required:!0},label:{type:String,required:!0},abstract:{type:Array,required:!1},action:{type:Object,required:!1},media:{type:String,required:!1}},computed:{abstractParagraph(){return{type:"paragraph",inlineContent:this.abstract}}}},At=xt,Tt=(0,w.Z)(At,bt,_t,!1,null,"2bfdf182",null),It=Tt.exports,$t={name:"CallToAction",components:{BaseCTA:It},computed:{baseProps(){return{title:this.title,abstract:this.abstract,action:this.action,media:this.media}}},props:{title:{type:String,required:!0},abstract:{type:Array,required:!1},action:{type:Object,required:!1},media:{type:String,required:!1}}},Nt=$t,qt=(0,w.Z)(Nt,yt,Ct,!1,null,null,null),Pt=qt.exports,Dt={name:"CallToAction",components:{TutorialCTA:Pt},props:Pt.props},Zt=Dt,Rt=(0,w.Z)(Zt,ft,gt,!1,null,"426a965c",null),Ot=Rt.exports,Lt=function(){var e=this,t=e._self._c;return t("TutorialHero",e._b({},"TutorialHero",e.$props,!1))},Bt=[],Mt=function(){var e=this,t=e._self._c;return t("LinkableSection",{staticClass:"tutorial-hero",attrs:{anchor:"introduction",title:e.sectionTitle}},[t("div",{staticClass:"hero dark"},[e.backgroundImageUrl?t("div",{staticClass:"bg",style:e.bgStyle}):e._e(),e._t("above-title"),t("Row",[t("Column",[t("Headline",{attrs:{level:1},scopedSlots:e._u([e.chapter?{key:"eyebrow",fn:function(){return[e._v(e._s(e.chapter))]},proxy:!0}:null],null,!0)},[e._v(" "+e._s(e.title)+" ")]),e.content||e.video?t("div",{staticClass:"intro"},[e.content?t("ContentNode",{attrs:{content:e.content}}):e._e(),e.video?[t("p",[t("a",{staticClass:"call-to-action",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.toggleCallToActionModal.apply(null,arguments)}}},[e._v(" Watch intro video "),t("PlayIcon",{staticClass:"cta-icon icon-inline"})],1)]),t("GenericModal",{attrs:{visible:e.callToActionModalVisible,isFullscreen:"",theme:"dark"},on:{"update:visible":function(t){e.callToActionModalVisible=t}}},[t("Asset",{directives:[{name:"show",rawName:"v-show",value:e.callToActionModalVisible,expression:"callToActionModalVisible"}],ref:"asset",staticClass:"video-asset",attrs:{identifier:e.video},on:{videoEnded:e.handleVideoEnd}})],1)]:e._e()],2):e._e(),t("Metadata",{staticClass:"metadata",attrs:{projectFilesUrl:e.projectFilesUrl,estimatedTimeInMinutes:e.estimatedTimeInMinutes,xcodeRequirement:e.xcodeRequirementData}})],1)],1)],2)])},Ft=[],Vt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"headline"},[e.$slots.eyebrow?t("span",{staticClass:"eyebrow"},[e._t("eyebrow")],2):e._e(),t("Heading",{staticClass:"heading",attrs:{level:e.level}},[e._t("default")],2)],1)},jt=[];const Et=1,Ht=6,Ut={type:Number,required:!0,validator:e=>e>=Et&&e<=Ht},zt={name:"Heading",render:function(e){return e(`h${this.level}`,this.$slots.default)},props:{level:Ut}};var Gt={name:"Headline",components:{Heading:zt},props:{level:Ut}},Wt=Gt,Qt=(0,w.Z)(Wt,Vt,jt,!1,null,"d46a1474",null),Kt=Qt.exports,Xt=n(5590),Yt=n(6698),Jt=n(5947),en=function(){var e=this,t=e._self._c;return t("div",{staticClass:"metadata"},[e.estimatedTimeInMinutes?t("div",{staticClass:"item",attrs:{"aria-label":`\n ${e.$tc("tutorials.time.minutes.full",e.estimatedTimeInMinutes,{count:e.estimatedTimeInMinutes})}\n ${e.$t("tutorials.estimated-time")}\n `}},[t("div",{staticClass:"content",attrs:{"aria-hidden":"true"}},[t("i18n",{staticClass:"duration",attrs:{path:"tutorials.time.format",tag:"div"},scopedSlots:e._u([{key:"number",fn:function(){return[e._v(" "+e._s(e.estimatedTimeInMinutes)+" ")]},proxy:!0},{key:"minutes",fn:function(){return[t("div",{staticClass:"minutes"},[e._v(e._s(e.$tc("tutorials.time.minutes.short",e.estimatedTimeInMinutes))+" ")])]},proxy:!0}],null,!1,3313752798)})],1),t("div",{staticClass:"bottom",attrs:{"aria-hidden":"true"}},[e._v(e._s(e.$t("tutorials.estimated-time")))])]):e._e(),e.projectFilesUrl?t("div",{staticClass:"item"},[t("DownloadIcon",{staticClass:"item-large-icon icon-inline"}),t("div",{staticClass:"content bottom"},[t("a",{staticClass:"content-link project-download",attrs:{href:e.projectFilesUrl}},[e._v(" "+e._s(e.$t("tutorials.project-files"))+" "),t("InlineDownloadIcon",{staticClass:"small-icon icon-inline"})],1)])],1):e._e(),e.xcodeRequirement?t("div",{staticClass:"item"},[t("XcodeIcon",{staticClass:"item-large-icon icon-inline"}),t("div",{staticClass:"content bottom"},[e.isTargetIDE?t("span",[e._v(e._s(e.xcodeRequirement.title))]):t("a",{staticClass:"content-link",attrs:{href:e.xcodeRequirement.url}},[e._v(" "+e._s(e.xcodeRequirement.title)+" "),t("InlineChevronRightIcon",{staticClass:"icon-inline small-icon xcode-icon"})],1)])],1):e._e()])},tn=[],nn=n(7214),sn=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"xcode-icon",attrs:{viewBox:"0 0 14 14",themeId:"xcode"}},[t("path",{attrs:{d:"M2.668 4.452l-1.338-2.229 0.891-0.891 2.229 1.338 1.338 2.228 3.667 3.666 0.194-0.194 2.933 2.933c0.13 0.155 0.209 0.356 0.209 0.576 0 0.497-0.403 0.9-0.9 0.9-0.22 0-0.421-0.079-0.577-0.209l0.001 0.001-2.934-2.933 0.181-0.181-3.666-3.666z"}}),t("path",{attrs:{d:"M11.824 1.277l-0.908 0.908c-0.091 0.091-0.147 0.216-0.147 0.354 0 0.106 0.033 0.205 0.090 0.286l-0.001-0.002 0.058 0.069 0.185 0.185c0.090 0.090 0.215 0.146 0.353 0.146 0.107 0 0.205-0.033 0.286-0.090l-0.002 0.001 0.069-0.057 0.909-0.908c0.118 0.24 0.187 0.522 0.187 0.82 0 1.045-0.848 1.893-1.893 1.893-0.296 0-0.577-0.068-0.826-0.189l0.011 0.005-5.5 5.5c0.116 0.238 0.184 0.518 0.184 0.813 0 1.045-0.848 1.893-1.893 1.893-0.296 0-0.576-0.068-0.826-0.189l0.011 0.005 0.908-0.909c0.090-0.090 0.146-0.215 0.146-0.353 0-0.107-0.033-0.205-0.090-0.286l0.001 0.002-0.057-0.069-0.185-0.185c-0.091-0.091-0.216-0.147-0.354-0.147-0.106 0-0.205 0.033-0.286 0.090l0.002-0.001-0.069 0.058-0.908 0.908c-0.116-0.238-0.184-0.518-0.184-0.813 0-1.045 0.847-1.892 1.892-1.892 0.293 0 0.571 0.067 0.819 0.186l-0.011-0.005 5.5-5.5c-0.116-0.238-0.184-0.519-0.184-0.815 0-1.045 0.847-1.892 1.892-1.892 0.296 0 0.577 0.068 0.827 0.19l-0.011-0.005z"}})])},rn=[],on={name:"XcodeIcon",components:{SVGIcon:C.Z}},an=on,ln=(0,w.Z)(an,sn,rn,!1,null,null,null),cn=ln.exports,un=n(8785),dn=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"inline-download-icon",attrs:{viewBox:"0 0 14 14",themeId:"inline-download"}},[t("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5z"}}),t("path",{attrs:{d:"M7.51 2.964l-0.001 5.431 1.308-2.041 0.842 0.539-2.664 4.162-2.633-4.164 0.845-0.534 1.303 2.059 0.001-5.452z"}})])},pn=[],hn={name:"InlineDownloadIcon",components:{SVGIcon:C.Z}},mn=hn,vn=(0,w.Z)(mn,dn,pn,!1,null,null,null),fn=vn.exports,gn={name:"HeroMetadata",components:{InlineDownloadIcon:fn,InlineChevronRightIcon:un.Z,DownloadIcon:nn.Z,XcodeIcon:cn},inject:["isTargetIDE"],props:{projectFilesUrl:{type:String},estimatedTimeInMinutes:{type:Number},xcodeRequirement:{type:Object,required:!1}}},yn=gn,Cn=(0,w.Z)(yn,en,tn,!1,null,"94ff76c0",null),bn=Cn.exports,_n={name:"Hero",components:{PlayIcon:Yt.Z,GenericModal:Xt.Z,Column:{render(e){return e(kt.Z,{props:{span:{large:7,medium:9,small:12}}},this.$slots.default)}},ContentNode:qe["default"],Headline:Kt,Metadata:bn,Row:wt.Z,Asset:Ie.Z,LinkableSection:tt},mixins:[A.Z],props:{title:{type:String,required:!0},chapter:{type:String},content:{type:Array},projectFiles:{type:String},estimatedTimeInMinutes:{type:Number},xcodeRequirement:{type:String,required:!1},video:{type:String},backgroundImage:{type:String}},computed:{backgroundImageUrl(){const e=this.references[this.backgroundImage]||{},{variants:t=[]}=e,n=t.find((e=>e.traits.includes("light")));return(0,Jt.AH)((n||{}).url)},projectFilesUrl(){return this.projectFiles?(0,Jt.AH)(this.references[this.projectFiles].url):null},bgStyle(){return{backgroundImage:(0,Jt.eZ)(this.backgroundImageUrl)}},xcodeRequirementData(){return this.references[this.xcodeRequirement]},sectionTitle(){return"Introduction"}},data(){return{callToActionModalVisible:!1}},methods:{async toggleCallToActionModal(){this.callToActionModalVisible=!0,await this.$nextTick();const e=this.$refs.asset.$el.querySelector("video");if(e)try{await e.play(),e.muted=!1}catch(t){}},handleVideoEnd(){this.callToActionModalVisible=!1}}},wn=_n,kn=(0,w.Z)(wn,Mt,Ft,!1,null,"2a434750",null),Sn=kn.exports,xn={name:"Hero",components:{TutorialHero:Sn},props:Sn.props},An=xn,Tn=(0,w.Z)(An,Lt,Bt,!1,null,"35a9482f",null),In=Tn.exports,$n=function(){var e=this,t=e._self._c;return t("TutorialAssessments",e._b({scopedSlots:e._u([{key:"success",fn:function(){return[t("p",[e._v("Great job, you've answered all the questions for this article.")])]},proxy:!0}])},"TutorialAssessments",e.$props,!1))},Nn=[],qn=function(){var e=this,t=e._self._c;return t("LinkableSection",{staticClass:"assessments-wrapper",attrs:{anchor:e.anchor,title:e.title}},[t("Row",{ref:"assessments",staticClass:"assessments"},[t("MainColumn",[t("Row",{staticClass:"banner"},[t("HeaderColumn",[t("h2",{staticClass:"title"},[e._v(e._s(e.title))])])],1),e.completed?t("div",{staticClass:"success"},[e._t("success",(function(){return[t("p",[e._v(e._s(e.SuccessMessage))])]}))],2):t("div",[t("Progress",e._b({ref:"progress"},"Progress",e.progress,!1)),t("Quiz",{key:e.activeIndex,attrs:{choices:e.activeAssessment.choices,content:e.activeAssessment.content,isLast:e.isLast,title:e.activeAssessment.title},on:{submit:e.onSubmit,advance:e.onAdvance,"see-results":e.onSeeResults}})],1),t("div",{staticClass:"visuallyhidden",attrs:{"aria-live":"assertive"}},[e.completed?e._t("success",(function(){return[e._v(" "+e._s(e.SuccessMessage)+" ")]})):e._e()],2)],1)],1)],1)},Pn=[],Dn=function(){var e=this,t=e._self._c;return t("Row",[t("p",{staticClass:"title"},[e._v(e._s(e.$t("tutorials.question-of",{index:e.index,total:e.total})))])])},Zn=[],Rn={name:"AssessmentsProgress",components:{Row:wt.Z},props:{index:{type:Number,required:!0},total:{type:Number,required:!0}}},On=Rn,Ln=(0,w.Z)(On,Dn,Zn,!1,null,"28135d78",null),Bn=Ln.exports,Mn=function(){var e=this,t=e._self._c;return t("div",{staticClass:"quiz"},[t("ContentNode",{staticClass:"title",attrs:{content:e.title}}),e.content?t("ContentNode",{staticClass:"question-content",attrs:{content:e.content}}):e._e(),t("fieldset",{staticClass:"choices"},[t("legend",{staticClass:"visuallyhidden"},[e._v(e._s(e.$t("tutorials.assessment.legend")))]),e._l(e.choices,(function(n,s){return t("label",{key:s,class:e.choiceClasses[s]},[t(e.getIconComponent(s),{tag:"component",staticClass:"choice-icon"}),t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedIndex,expression:"selectedIndex"}],attrs:{type:"radio",name:"assessment"},domProps:{value:s,checked:e._q(e.selectedIndex,s)},on:{change:function(t){e.selectedIndex=s}}}),t("ContentNode",{staticClass:"question",attrs:{content:n.content}}),e.userChoices[s].checked?[t("ContentNode",{staticClass:"answer",attrs:{content:n.justification}}),n.reaction?t("p",{staticClass:"answer"},[e._v(e._s(n.reaction))]):e._e()]:e._e()],2)}))],2),t("div",{staticClass:"visuallyhidden",attrs:{"aria-live":"assertive"}},[null!=e.checkedIndex?t("i18n",{attrs:{path:"tutorials.assessment.answer-result",tag:"span"},scopedSlots:e._u([{key:"answer",fn:function(){return[t("ContentNode",{staticClass:"question",attrs:{content:e.choices[e.checkedIndex].content}})]},proxy:!0},{key:"result",fn:function(){return[e._v(e._s(e.choices[e.checkedIndex].isCorrect?e.$t("tutorials.assessment.correct"):e.$t("tutorials.assessment.incorrect")))]},proxy:!0}],null,!1,511264553)}):e._e()],1),t("div",{staticClass:"controls"},[t("ButtonLink",{staticClass:"check",attrs:{disabled:null===e.selectedIndex||e.showNextQuestion},nativeOn:{click:function(t){return e.submit.apply(null,arguments)}}},[e._v(" "+e._s(e.$t("tutorials.submit"))+" ")]),e.isLast?t("ButtonLink",{staticClass:"results",attrs:{disabled:!e.showNextQuestion},nativeOn:{click:function(t){return e.seeResults.apply(null,arguments)}}},[e._v(" "+e._s(e.$t("tutorials.next"))+" ")]):t("ButtonLink",{staticClass:"next",attrs:{disabled:!e.showNextQuestion},nativeOn:{click:function(t){return e.advance.apply(null,arguments)}}},[e._v(" "+e._s(e.$t("tutorials.assessment.next-question"))+" ")])],1)],1)},Fn=[],Vn=n(5281),jn=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"reset-circle-icon",attrs:{viewBox:"0 0 14 14",themeId:"reset-circle"}},[t("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5v0c0-3.038-2.462-5.5-5.5-5.5v0z"}}),t("path",{attrs:{d:"M3.828 4.539l0.707-0.707 5.657 5.657-0.707 0.707-5.657-5.657z"}}),t("path",{attrs:{d:"M3.828 9.489l5.657-5.657 0.707 0.707-5.657 5.657-0.707-0.707z"}})])},En=[],Hn={name:"ResetCircleIcon",components:{SVGIcon:C.Z}},Un=Hn,zn=(0,w.Z)(Un,jn,En,!1,null,null,null),Gn=zn.exports,Wn=function(){var e=this,t=e._self._c;return t("SVGIcon",{staticClass:"check-circle-icon",attrs:{viewBox:"0 0 14 14",themeId:"check-circle"}},[t("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5v0c0-3.038-2.462-5.5-5.5-5.5v0z"}}),t("path",{attrs:{d:"M9.626 3.719l0.866 0.5-3.5 6.062-3.464-2 0.5-0.866 2.6 1.5z"}})])},Qn=[],Kn={name:"CheckCircleIcon",components:{SVGIcon:C.Z}},Xn=Kn,Yn=(0,w.Z)(Xn,Wn,Qn,!1,null,null,null),Jn=Yn.exports,es={name:"Quiz",components:{CheckCircleIcon:Jn,ResetCircleIcon:Gn,ContentNode:qe["default"],ButtonLink:Vn.Z},props:{content:{type:Array,required:!1},choices:{type:Array,required:!0},isLast:{type:Boolean,default:!1},title:{type:Array,required:!0}},data(){return{userChoices:this.choices.map((()=>({checked:!1}))),selectedIndex:null,checkedIndex:null}},computed:{correctChoices(){return this.choices.reduce(((e,t,n)=>t.isCorrect?e.add(n):e),new Set)},choiceClasses(){return this.userChoices.map(((e,t)=>({choice:!0,active:this.selectedIndex===t,disabled:e.checked||this.showNextQuestion,correct:e.checked&&this.choices[t].isCorrect,incorrect:e.checked&&!this.choices[t].isCorrect})))},showNextQuestion(){return Array.from(this.correctChoices).every((e=>this.userChoices[e].checked))}},methods:{getIconComponent(e){const t=this.userChoices[e];if(t&&t.checked)return this.choices[e].isCorrect?Jn:Gn},submit(){this.$set(this.userChoices,this.selectedIndex,{checked:!0}),this.checkedIndex=this.selectedIndex,this.$emit("submit")},advance(){this.$emit("advance")},seeResults(){this.$emit("see-results")}}},ts=es,ns=(0,w.Z)(ts,Mn,Fn,!1,null,"61b03ec2",null),ss=ns.exports;const is=12,rs="tutorials.assessment.success-message";var os={name:"Assessments",constants:{SuccessMessage:rs},components:{LinkableSection:tt,Quiz:ss,Progress:Bn,Row:wt.Z,HeaderColumn:{render(e){return e(kt.Z,{props:{isCentered:{large:!0},span:{large:10}}},this.$slots.default)}},MainColumn:{render(e){return e(kt.Z,{props:{isCentered:{large:!0},span:{large:10,medium:10,small:12}}},this.$slots.default)}}},props:{assessments:{type:Array,required:!0},anchor:{type:String,required:!0}},inject:["navigationBarHeight"],data(){return{activeIndex:0,completed:!1,SuccessMessage:this.$t(rs)}},computed:{activeAssessment(){return this.assessments[this.activeIndex]},isLast(){return this.activeIndex===this.assessments.length-1},progress(){return{index:this.activeIndex+1,total:this.assessments.length}},title(){return this.$t("tutorials.assessment.check-your-understanding")}},methods:{scrollTo(e,t=0){e.scrollIntoView(!0),window.scrollBy(0,-this.navigationBarHeight-t)},onSubmit(){this.$nextTick((()=>{this.scrollTo(this.$refs.progress.$el,is)}))},onAdvance(){this.activeIndex+=1,this.$nextTick((()=>{this.scrollTo(this.$refs.progress.$el,is)}))},onSeeResults(){this.completed=!0,this.$nextTick((()=>{this.scrollTo(this.$refs.assessments.$el,is)}))}}},as=os,ls=(0,w.Z)(as,qn,Pn,!1,null,"65e3c02c",null),cs=ls.exports,us={name:"Assessments",components:{TutorialAssessments:cs},props:cs.props},ds=us,ps=(0,w.Z)(ds,$n,Nn,!1,null,"6db06128",null),hs=ps.exports;const ms={articleBody:"articleBody",callToAction:"callToAction",hero:"hero",assessments:"assessments"};var vs={name:"Article",components:{NavigationBar:be,PortalTarget:h.YC},mixins:[_e.Z],inject:{isTargetIDE:{default:!1},store:{default(){return{reset(){},setReferences(){}}}}},props:{hierarchy:{type:Object,required:!0},metadata:{type:Object,required:!0},references:{type:Object,required:!0},sections:{type:Array,required:!0,validator:e=>e.every((({kind:e})=>Object.prototype.hasOwnProperty.call(ms,e)))},identifierUrl:{type:String,required:!0}},computed:{heroSection(){return this.sections.find(this.isHero)},heroTitle(){return(this.heroSection||{}).title},pageTitle(){return this.heroTitle?`${this.heroTitle} — ${this.metadata.category} Tutorials`:void 0},pageDescription:({heroSection:e,extractFirstParagraphText:t})=>e?t(e.content):null},methods:{componentFor(e){const{kind:t}=e;return{[ms.articleBody]:vt,[ms.callToAction]:Ot,[ms.hero]:In,[ms.assessments]:hs}[t]},isHero(e){return e.kind===ms.hero},propsFor(e){const{abstract:t,action:n,anchor:s,assessments:i,backgroundImage:r,chapter:o,content:a,estimatedTimeInMinutes:l,kind:c,media:u,projectFiles:d,title:p,video:h,xcodeRequirement:m}=e;return{[ms.articleBody]:{content:a},[ms.callToAction]:{abstract:t,action:n,media:u,title:p},[ms.hero]:{backgroundImage:r,chapter:o,content:a,estimatedTimeInMinutes:l,projectFiles:d,title:p,video:h,xcodeRequirement:m},[ms.assessments]:{anchor:s,assessments:i}}[c]}},created(){m["default"].setAvailableLocales(this.metadata.availableLocales),this.store.reset(),this.store.setReferences(this.references)},watch:{references(e){this.store.setReferences(e)},"metadata.availableLocales":function(e){m["default"].setAvailableLocales(e)}},SectionKind:ms},fs=vs,gs=(0,w.Z)(fs,d,p,!1,null,"9d2d5cc2",null),ys=gs.exports,Cs=function(){var e=this,t=e._self._c;return t("div",{staticClass:"tutorial"},[e.isTargetIDE?e._e():t("NavigationBar",{attrs:{technology:e.metadata.category,chapters:e.hierarchy.modules,topic:e.tutorialTitle||"",rootReference:e.hierarchy.reference,identifierUrl:e.identifierUrl}}),t("main",{attrs:{id:"app-main",tabindex:"0"}},[e._l(e.sections,(function(e,n){return t("Section",{key:n,attrs:{section:e}})})),t("BreakpointEmitter",{on:{change:e.handleBreakpointChange}})],2),t("PortalTarget",{attrs:{name:"modal-destination",multiple:""}})],1)},bs=[],_s=n(8571),ws=function(){var e=this,t=e._self._c;return t("div",{staticClass:"sections"},e._l(e.tasks,(function(n,s){return t("Section",e._b({key:s,attrs:{id:n.anchor,sectionNumber:s+1,isRuntimePreviewVisible:e.isRuntimePreviewVisible},on:{"runtime-preview-toggle":e.onRuntimePreviewToggle}},"Section",n,!1))})),1)},ks=[],Ss=function(){var e=this,t=e._self._c;return t("LinkableSection",{staticClass:"section",attrs:{anchor:e.anchor,title:e.introProps.title}},[t("Intro",e._b({},"Intro",e.introProps,!1)),e.stepsSection.length>0?t("Steps",{attrs:{content:e.stepsSection,isRuntimePreviewVisible:e.isRuntimePreviewVisible,sectionNumber:e.sectionNumber},on:{"runtime-preview-toggle":e.onRuntimePreviewToggle}}):e._e()],1)},xs=[],As=function(){var e=this,t=e._self._c;return t("div",{staticClass:"intro-container"},[t("Row",{class:["intro",`intro-${e.sectionNumber}`,{ide:e.isTargetIDE}]},[t("Column",{staticClass:"left"},[t("Headline",{attrs:{level:2},scopedSlots:e._u([{key:"eyebrow",fn:function(){return[t("router-link",{attrs:{to:e.sectionLink}},[e._v(" "+e._s(e.$t("sections.title",{number:e.sectionNumber}))+" ")])]},proxy:!0}])},[e._v(" "+e._s(e.title)+" ")]),t("ContentNode",{attrs:{content:e.content}})],1),t("Column",{staticClass:"right"},[t("div",{staticClass:"media"},[e.media?t("Asset",{attrs:{videoAutoplays:"",videoMuted:"",identifier:e.media}}):e._e()],1)])],1),e.expandedSections.length>0?t("ExpandedIntro",{staticClass:"expanded-intro",attrs:{content:e.expandedSections}}):e._e()],1)},Ts=[],Is={name:"SectionIntro",inject:{isTargetIDE:{default:()=>!1}},components:{Asset:Ie.Z,ContentNode:qe["default"],ExpandedIntro:dt,Headline:Kt,Row:wt.Z,Column:{render(e){return e(kt.Z,{props:{span:{large:6,small:12}}},this.$slots.default)}}},props:{sectionAnchor:{type:String,required:!0},content:{type:Array,required:!0},media:{type:String,required:!0},title:{type:String,required:!0},sectionNumber:{type:Number,required:!0},expandedSections:{type:Array,default:()=>[]}},methods:{focus(){this.$emit("focus",this.media)}},computed:{sectionLink(){return{path:this.$route.path,hash:this.sectionAnchor,query:this.$route.query}}}},$s=Is,Ns=(0,w.Z)($s,As,Ts,!1,null,"7dcf2d10",null),qs=Ns.exports,Ps=function(){var e=this,t=e._self._c;return t("div",{staticClass:"steps"},[t("div",{staticClass:"content-container"},e._l(e.contentNodes,(function(n,s){return t(n.component,e._b({key:s,ref:"contentNodes",refInFor:!0,tag:"component",class:e.contentClass(s),attrs:{currentIndex:e.activeStep}},"component",n.props,!1))})),1),e.isBreakpointSmall?e._e():t("BackgroundTheme",{staticClass:"asset-container",class:e.assetContainerClasses},[t("transition",{attrs:{name:"fade"}},[e.visibleAsset.media?t("div",{key:e.visibleAsset.media,class:["asset-wrapper",{ide:e.isTargetIDE}]},[t("Asset",{ref:"asset",staticClass:"step-asset",attrs:{videoAutoplays:"",videoMuted:"",identifier:e.visibleAsset.media}})],1):e._e(),e.visibleAsset.code?t("CodePreview",{attrs:{code:e.visibleAsset.code,preview:e.visibleAsset.runtimePreview,isRuntimePreviewVisible:e.isRuntimePreviewVisible},on:{"runtime-preview-toggle":e.onRuntimePreviewToggle}},[e.visibleAsset.runtimePreview?t("transition",{attrs:{name:"fade"}},[t("Asset",{key:e.visibleAsset.runtimePreview,attrs:{identifier:e.visibleAsset.runtimePreview}})],1):e._e()],1):e._e()],1)],1)],1)},Ds=[],Zs=function(){var e=this,t=e._self._c;return t("div",{class:["code-preview",{ide:e.isTargetIDE}]},[t("CodeTheme",[e.code?t("CodeListing",e._b({attrs:{showLineNumbers:""}},"CodeListing",e.codeProps,!1)):e._e()],1),t("div",{staticClass:"runtime-preview",class:e.runtimePreviewClasses,style:e.previewStyles},[t("div",{staticClass:"runtimve-preview__container"},[t("button",{staticClass:"header",attrs:{disabled:!e.hasRuntimePreview,title:e.runtimePreviewTitle},on:{click:e.togglePreview}},[t("span",{staticClass:"runtime-preview-label",attrs:{"aria-label":e.textAriaLabel}},[e._v(e._s(e.togglePreviewText))]),t("DiagonalArrowIcon",{staticClass:"icon-inline preview-icon",class:[e.shouldDisplayHideLabel?"preview-hide":"preview-show"]})],1),t("transition",{on:{leave:e.handleLeave}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.shouldDisplayHideLabel,expression:"shouldDisplayHideLabel"}],staticClass:"runtime-preview-asset"},[e._t("default")],2)])],1)])],1)},Rs=[],Os=n(5996),Ls=n(6817),Bs=n(8093);const{BreakpointName:Ms}=o["default"].constants;function Fs({width:e,height:t},n=1){const s=400,i=e<=s?1.75:3;return{width:e/(i/n),height:t/(i/n)}}var Vs={name:"CodePreview",inject:{isTargetIDE:{default:!1},store:{default(){return{state:{references:{}}}}}},components:{DiagonalArrowIcon:Ls.Z,CodeListing:Os.Z,CodeTheme:Bs.Z},props:{code:{type:String,required:!0},preview:{type:String,required:!1},isRuntimePreviewVisible:{type:Boolean,required:!0}},data(){return{tutorialState:this.store.state}},computed:{references:({tutorialState:e})=>e.references,currentBreakpoint(){return this.tutorialState.breakpoint},hasRuntimePreview(){return!!this.preview},previewAssetSize(){const e=this.hasRuntimePreview?this.references[this.preview]:{},t=(e.variants||[{}])[0]||{},n={width:900};let s=t.size||{};s.width||s.height||(s=n);const i=this.currentBreakpoint===Ms.medium?.8:1;return Fs(s,i)},previewSize(){const e={width:102};return this.shouldDisplayHideLabel&&this.previewAssetSize?{width:this.previewAssetSize.width}:e},previewStyles(){const{width:e}=this.previewSize;return{width:`${e}px`}},codeProps(){return this.references[this.code]},runtimePreviewClasses(){return{collapsed:!this.shouldDisplayHideLabel,disabled:!this.hasRuntimePreview,"runtime-preview-ide":this.isTargetIDE}},shouldDisplayHideLabel(){return this.hasRuntimePreview&&this.isRuntimePreviewVisible},runtimePreviewTitle(){return this.hasRuntimePreview?null:this.$t("tutorials.preview.no-preview-available-step")},togglePreviewText(){return this.$tc("tutorials.preview.title",this.hasRuntimePreview?1:0)},textAriaLabel(){return`${this.togglePreviewText}, ${this.shouldDisplayHideLabel?this.$t("verbs.hide"):this.$t("verbs.show")}`}},methods:{handleLeave(e,t){setTimeout(t,200)},togglePreview(){this.hasRuntimePreview&&this.$emit("runtime-preview-toggle",!this.isRuntimePreviewVisible)}}},js=Vs,Es=(0,w.Z)(js,Zs,Rs,!1,null,"395e30cd",null),Hs=Es.exports,Us=n(5657),zs=function(){var e=this,t=e._self._c;return t("div",{style:e.backgroundStyle},[e._t("default")],2)},Gs=[],Ws={name:"BackgroundTheme",data(){return{codeThemeState:_s.Z.state}},computed:{backgroundStyle(){const{codeColors:e}=this.codeThemeState;return e?{"--background":e.background}:null}}},Qs=Ws,Ks=(0,w.Z)(Qs,zs,Gs,!1,null,null,null),Xs=Ks.exports,Ys=function(){var e=this,t=e._self._c;return t("div",{class:["step-container",`step-${e.stepNumber}`]},[t("div",{ref:"step",staticClass:"step",class:{focused:e.isActive},attrs:{"data-index":e.index}},[t("p",{staticClass:"step-label"},[e._v(e._s(e.$t("tutorials.step",{number:e.stepNumber})))]),t("ContentNode",{attrs:{content:e.content}}),e.caption&&e.caption.length>0?t("ContentNode",{staticClass:"caption",attrs:{content:e.caption}}):e._e()],1),e.isBreakpointSmall||!e.isTargetIDE?t("div",{staticClass:"media-container"},[e.media?t("Asset",{attrs:{identifier:e.media,videoAutoplays:"",videoMuted:""}}):e._e(),e.code?t("MobileCodePreview",{attrs:{code:e.code}},[e.runtimePreview?t("Asset",{staticClass:"preview",attrs:{identifier:e.runtimePreview}}):e._e()],1):e._e()],1):e._e()])},Js=[],ei=function(){var e=this,t=e._self._c;return t("BackgroundTheme",{staticClass:"mobile-code-preview"},[e.code?t("GenericModal",{staticClass:"full-code-listing-modal",attrs:{theme:e.isTargetIDE?"code":"light",codeBackgroundColorOverride:e.modalBackgroundColor,isFullscreen:"",visible:e.fullCodeIsVisible},on:{"update:visible":function(t){e.fullCodeIsVisible=t}}},[t("div",{staticClass:"full-code-listing-modal-content"},[t("CodeTheme",[t("CodeListing",e._b({staticClass:"full-code-listing",attrs:{showLineNumbers:""}},"CodeListing",e.codeProps,!1))],1)],1)]):e._e(),t("CodeTheme",[e.code?t("MobileCodeListing",e._b({attrs:{showLineNumbers:""},on:{"file-name-click":e.toggleFullCode}},"MobileCodeListing",e.codeProps,!1)):e._e()],1),t("CodeTheme",{staticClass:"preview-toggle-container"},[t("PreviewToggle",{attrs:{isActionable:!!e.$slots.default},on:{click:e.togglePreview}})],1),e.$slots.default?t("GenericModal",{staticClass:"runtime-preview-modal",attrs:{theme:e.isTargetIDE?"dynamic":"light",isFullscreen:"",visible:e.previewIsVisible},on:{"update:visible":function(t){e.previewIsVisible=t}}},[t("div",{staticClass:"runtime-preview-modal-content"},[t("span",{staticClass:"runtime-preview-label"},[e._v(e._s(e.$tc("tutorials.preview.title",1)))]),e._t("default")],2)]):e._e()],1)},ti=[],ni=function(){var e=this,t=e._self._c;return t("div",{staticClass:"code-listing-preview",attrs:{"data-syntax":e.syntax}},[t("CodeListing",{attrs:{fileName:e.fileName,syntax:e.syntax,fileType:e.fileType,content:e.previewedLines,startLineNumber:e.displayedRange.start,highlights:e.highlights,showLineNumbers:"",isFileNameActionable:""},on:{"file-name-click":function(t){return e.$emit("file-name-click")}}})],1)},si=[],ii={name:"MobileCodeListing",components:{CodeListing:Os.Z},props:{fileName:String,syntax:String,fileType:String,content:{type:Array,required:!0},highlights:{type:Array,default:()=>[]}},computed:{highlightedLineNumbers(){return new Set(this.highlights.map((({line:e})=>e)))},firstHighlightRange(){if(0===this.highlightedLineNumbers.size)return{start:1,end:this.content.length};const e=Math.min(...this.highlightedLineNumbers.values());let t=e;while(this.highlightedLineNumbers.has(t+1))t+=1;return{start:e,end:t}},displayedRange(){const e=this.firstHighlightRange,t=e.start-2<1?1:e.start-2,n=e.end+3>=this.content.length+1?this.content.length+1:e.end+3;return{start:t,end:n}},previewedLines(){return this.content.slice(this.displayedRange.start-1,this.displayedRange.end-1)}}},ri=ii,oi=(0,w.Z)(ri,ni,si,!1,null,"0bdf2f26",null),ai=oi.exports,li=function(){var e=this,t=e._self._c;return t("span",{staticClass:"toggle-preview"},[e.isActionable?t("a",{staticClass:"toggle-text",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.$emit("click")}}},[e._v(" "+e._s(e.$tc("tutorials.preview.title",1))+" "),t("InlinePlusCircleIcon",{staticClass:"toggle-icon icon-inline"})],1):t("span",{staticClass:"toggle-text"},[e._v(" "+e._s(e.$tc("tutorials.preview.title",0))+" ")])])},ci=[],ui=n(6772),di={name:"MobileCodePreviewToggle",components:{InlinePlusCircleIcon:ui.Z},props:{isActionable:{type:Boolean,required:!0}}},pi=di,hi=(0,w.Z)(pi,li,ci,!1,null,"78763c14",null),mi=hi.exports,vi={name:"MobileCodePreview",inject:["isTargetIDE"],mixins:[A.Z],components:{GenericModal:Xt.Z,CodeListing:Os.Z,MobileCodeListing:ai,PreviewToggle:mi,CodeTheme:Bs.Z,BackgroundTheme:Xs},props:{code:{type:String,required:!0}},computed:{codeProps(){return this.references[this.code]},modalBackgroundColor(){const{codeColors:e}=this.store.state;return e?e.background:null}},data(){return{previewIsVisible:!1,fullCodeIsVisible:!1}},methods:{togglePreview(){this.previewIsVisible=!this.previewIsVisible},toggleFullCode(){this.fullCodeIsVisible=!this.fullCodeIsVisible}}},fi=vi,gi=(0,w.Z)(fi,ei,ti,!1,null,"b1691954",null),yi=gi.exports;const{BreakpointName:Ci}=o["default"].constants;var bi={name:"Step",components:{Asset:Ie.Z,MobileCodePreview:yi,ContentNode:qe["default"]},inject:["isTargetIDE","store"],props:{code:{type:String,required:!1},content:{type:Array,required:!0},caption:{type:Array,required:!1},media:{type:String,required:!1},runtimePreview:{type:String,required:!1},sectionNumber:{type:Number,required:!0},stepNumber:{type:Number,required:!0},numberOfSteps:{type:Number,required:!0},index:{type:Number,required:!0},currentIndex:{type:Number,required:!0}},data(){return{tutorialState:this.store.state}},computed:{isBreakpointSmall(){return this.tutorialState.breakpoint===Ci.small},isActive:({index:e,currentIndex:t})=>e===t}},_i=bi,wi=(0,w.Z)(_i,Ys,Js,!1,null,"d0198556",null),ki=wi.exports;const{BreakpointName:Si}=o["default"].constants,{IntersectionDirections:xi}=Xe["default"].constants,Ai="-35% 0% -65% 0%";var Ti={name:"SectionSteps",components:{ContentNode:qe["default"],Step:ki,Asset:Ie.Z,CodePreview:Hs,BackgroundTheme:Xs},mixins:[Xe["default"]],constants:{IntersectionMargins:Ai},inject:["isTargetIDE","store"],data(){const e=this.content.findIndex(this.isStepNode),{code:t,media:n,runtimePreview:s}=this.content[e]||{};return{tutorialState:this.store.state,visibleAsset:{media:n,code:t,runtimePreview:s},activeStep:e}},computed:{assetContainerClasses(){return{"for-step-code":!!this.visibleAsset.code,ide:this.isTargetIDE}},numberOfSteps(){return this.content.filter(this.isStepNode).length},contentNodes(){return this.content.reduce((({stepCounter:e,nodes:t},n,s)=>{const{type:i,...r}=n,o=this.isStepNode(n),a=o?e+1:e;return o?{stepCounter:e+1,nodes:t.concat({component:ki,type:i,props:{...r,stepNumber:a,index:s,numberOfSteps:this.numberOfSteps,sectionNumber:this.sectionNumber}})}:{stepCounter:e,nodes:t.concat({component:qe["default"],type:i,props:{content:[n]}})}}),{stepCounter:0,nodes:[]}).nodes},isBreakpointSmall(){return this.tutorialState.breakpoint===Si.small},stepNodes:({contentNodes:e,isStepNode:t})=>e.filter(t),intersectionRootMargin:()=>Ai},async mounted(){await(0,Us.J)(8),this.findClosestStepNode()},methods:{isStepNode({type:e}){return"step"===e},contentClass(e){return{[`interstitial interstitial-${e+1}`]:!this.isStepNode(this.content[e])}},onReverseIntoLastStep(){const{asset:e}=this.$refs;if(e){const t=e.$el.querySelector("video");t&&(t.currentTime=0,t.play().catch((()=>{})))}},onFocus(e){const{code:t,media:n,runtimePreview:s}=this.content[e];this.activeStep=e,this.visibleAsset={code:t,media:n,runtimePreview:s}},onRuntimePreviewToggle(e){this.$emit("runtime-preview-toggle",e)},findClosestStepNode(){const e=.333*window.innerHeight;let t=null,n=0;this.stepNodes.forEach((s=>{const{index:i}=s.props,r=this.$refs.contentNodes[i].$refs.step;if(!r)return;const{top:o,bottom:a}=r.getBoundingClientRect(),l=o-e,c=a-e,u=Math.abs(l+c);(0===n||u<=n)&&(n=u,t=i)})),null!==t&&this.onFocus(t)},getIntersectionTargets(){const{stepNodes:e,$refs:t}=this;return e.map((({props:{index:e}})=>t.contentNodes[e].$refs.step))},onIntersect(e){const{target:t,isIntersecting:n}=e;if(!n)return;const s=parseFloat(t.getAttribute("data-index"));this.intersectionScrollDirection===xi.down&&s===this.stepNodes[this.stepNodes.length-1].props.index&&this.onReverseIntoLastStep(),this.onFocus(s)}},props:{content:{type:Array,required:!0},isRuntimePreviewVisible:{type:Boolean,require:!0},sectionNumber:{type:Number,required:!0}}},Ii=Ti,$i=(0,w.Z)(Ii,Ps,Ds,!1,null,"e3061a7c",null),Ni=$i.exports,qi={name:"Section",components:{Intro:qs,LinkableSection:tt,Steps:Ni},computed:{introProps(){const[{content:e,media:t},...n]=this.contentSection;return{content:e,expandedSections:n,media:t,sectionAnchor:this.anchor,sectionNumber:this.sectionNumber,title:this.title}}},props:{anchor:{type:String,required:!0},title:{type:String,required:!0},contentSection:{type:Array,required:!0},stepsSection:{type:Array,required:!0},sectionNumber:{type:Number,required:!0},isRuntimePreviewVisible:{type:Boolean,required:!0}},methods:{onRuntimePreviewToggle(e){this.$emit("runtime-preview-toggle",e)}}},Pi=qi,Di=(0,w.Z)(Pi,Ss,xs,!1,null,"6b3a0b3a",null),Zi=Di.exports,Ri={name:"SectionList",components:{Section:Zi},data(){return{isRuntimePreviewVisible:!0}},props:{tasks:{type:Array,required:!0}},methods:{onRuntimePreviewToggle(e){this.isRuntimePreviewVisible=e}}},Oi=Ri,Li=(0,w.Z)(Oi,ws,ks,!1,null,"79a75e9e",null),Bi=Li.exports;const Mi={assessments:cs,hero:Sn,tasks:Bi,callToAction:Pt},Fi=new Set(Object.keys(Mi)),Vi={name:"TutorialSection",render:function(e){const{kind:t,...n}=this.section,s=Mi[t];return s?e(s,{props:n}):null},props:{section:{type:Object,required:!0,validator:e=>Fi.has(e.kind)}}};var ji={name:"Tutorial",mixins:[_e.Z],components:{NavigationBar:be,Section:Vi,PortalTarget:h.YC,BreakpointEmitter:o["default"]},inject:["isTargetIDE","store"],computed:{heroSection(){return this.sections.find((({kind:e})=>"hero"===e))},tutorialTitle(){return(this.heroSection||{}).title},pageTitle(){return this.tutorialTitle?`${this.tutorialTitle} — ${this.metadata.category} Tutorials`:void 0},pageDescription:({heroSection:e,extractFirstParagraphText:t})=>e?t(e.content):null},props:{sections:{type:Array,required:!0},references:{type:Object,required:!0},hierarchy:{type:Object,required:!0},metadata:{type:Object,required:!0},identifierUrl:{type:String,required:!0}},methods:{handleBreakpointChange(e){this.store.updateBreakpoint(e)},handleCodeColorsChange(e){_s.Z.updateCodeColors(e)}},created(){m["default"].setAvailableLocales(this.metadata.availableLocales),this.store.reset(),this.store.setReferences(this.references)},watch:{references(e){this.store.setReferences(e)},"metadata.availableLocales":function(e){m["default"].setAvailableLocales(e)}},mounted(){this.$bridge.on("codeColors",this.handleCodeColorsChange),this.$bridge.send({type:"requestCodeColors"})},beforeDestroy(){this.$bridge.off("codeColors",this.handleCodeColorsChange)}},Ei=ji,Hi=(0,w.Z)(Ei,Cs,bs,!1,null,"1631abcb",null),Ui=Hi.exports,zi=n(1789),Gi=n(5184);const Wi={article:"article",tutorial:"project"};var Qi={name:"Topic",inject:{isTargetIDE:{default:!1}},mixins:[zi.Z,Gi.Z],data(){return{topicData:null}},computed:{navigationBarHeight(){return this.isTargetIDE?0:52},store(){return u},hierarchy(){const{hierarchy:e={}}=this.topicData,{technologyNavigation:t=["overview","tutorials","resources"]}=e||{};return{...e,technologyNavigation:t}},topicKey:({$route:e,topicData:t})=>[e.path,t.identifier.interfaceLanguage].join()},beforeRouteEnter(e,t,n){e.meta.skipFetchingData?n((e=>e.newContentMounted())):(0,r.Ek)(e,t,n).then((e=>n((t=>{t.topicData=e})))).catch(n)},beforeRouteUpdate(e,t,n){(0,r.Us)(e,t)?(0,r.Ek)(e,t,n).then((e=>{this.topicData=e,n()})).catch(n):n()},created(){this.store.reset()},mounted(){this.$bridge.on("contentUpdate",this.handleContentUpdateFromBridge)},beforeDestroy(){this.$bridge.off("contentUpdate",this.handleContentUpdateFromBridge)},methods:{componentFor(e){const{kind:t}=e;return{[Wi.article]:ys,[Wi.tutorial]:Ui}[t]},propsFor(e){const{hierarchy:t,kind:n,metadata:s,references:i,sections:r,identifier:o}=e;return{[Wi.article]:{hierarchy:t,metadata:s,references:i,sections:r,identifierUrl:o.url},[Wi.tutorial]:{hierarchy:t,metadata:s,references:i,sections:r,identifierUrl:o.url}}[n]}},provide(){return{navigationBarHeight:this.navigationBarHeight,store:this.store}},watch:{topicData(){this.$nextTick((()=>{this.newContentMounted()}))}}},Ki=Qi,Xi=(0,w.Z)(Ki,s,i,!1,null,null,null),Yi=Xi.exports}}]); \ No newline at end of file diff --git a/docs/js/tutorials-overview.2d184ec0.js b/docs/js/tutorials-overview.2d184ec0.js new file mode 100644 index 00000000..65dc96fe --- /dev/null +++ b/docs/js/tutorials-overview.2d184ec0.js @@ -0,0 +1,10 @@ +/*! + * This source file is part of the Swift.org open source project + * + * Copyright (c) 2021 Apple Inc. and the Swift project authors + * Licensed under Apache License v2.0 with Runtime Library Exception + * + * See https://swift.org/LICENSE.txt for license information + * See https://swift.org/CONTRIBUTORS.txt for Swift project authors + */ +"use strict";(self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[843],{7214:function(t,e,n){n.d(e,{Z:function(){return u}});var i=function(){var t=this,e=t._self._c;return e("SVGIcon",{staticClass:"download-icon",attrs:{viewBox:"0 0 14 14",themeId:"download"}},[e("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5zM7 1.5c-3.038 0-5.5 2.462-5.5 5.5s2.462 5.5 5.5 5.5c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5z"}}),e("path",{attrs:{d:"M7.51 2.964l-0.001 5.431 1.308-2.041 0.842 0.539-2.664 4.162-2.633-4.164 0.845-0.534 1.303 2.059 0.001-5.452z"}})])},s=[],o=n(9742),a={name:"DownloadIcon",components:{SVGIcon:o.Z}},r=a,l=n(1001),c=(0,l.Z)(r,i,s,!1,null,null,null),u=c.exports},7181:function(t,e,n){n.d(e,{Z:function(){return u}});var i=function(){var t=this,e=t._self._c;return e("SVGIcon",{staticClass:"inline-close-icon",attrs:{viewBox:"0 0 14 14",themeId:"inline-close"}},[e("path",{attrs:{d:"M11.91 1l1.090 1.090-4.917 4.915 4.906 4.905-1.090 1.090-4.906-4.905-4.892 4.894-1.090-1.090 4.892-4.894-4.903-4.904 1.090-1.090 4.903 4.904z"}})])},s=[],o=n(9742),a={name:"InlineCloseIcon",components:{SVGIcon:o.Z}},r=a,l=n(1001),c=(0,l.Z)(r,i,s,!1,null,null,null),u=c.exports},2573:function(t,e,n){n.d(e,{Z:function(){return c}});var i=function(){var t=this,e=t._self._c;return e("router-link",{staticClass:"nav-title-content",attrs:{to:t.to}},[e("span",{staticClass:"title"},[t._t("default")],2),e("span",{staticClass:"subhead"},[t._v(" "),t._t("subhead")],2)])},s=[],o={name:"NavTitleContainer",props:{to:{type:[String,Object],required:!0}}},a=o,r=n(1001),l=(0,r.Z)(a,i,s,!1,null,"854b4dd6",null),c=l.exports},9732:function(t,e,n){n.d(e,{Z:function(){return c}});var i,s,o={name:"TransitionExpand",functional:!0,render(t,e){const n={props:{name:"expand"},on:{afterEnter(t){t.style.height="auto"},enter(t){const{width:e}=getComputedStyle(t);t.style.width=e,t.style.position="absolute",t.style.visibility="hidden",t.style.height="auto";const{height:n}=getComputedStyle(t);t.style.width=null,t.style.position=null,t.style.visibility=null,t.style.height=0,getComputedStyle(t).height,requestAnimationFrame((()=>{t.style.height=n}))},leave(t){const{height:e}=getComputedStyle(t);t.style.height=e,getComputedStyle(t).height,requestAnimationFrame((()=>{t.style.height=0}))}}};return t("transition",n,e.children)}},a=o,r=n(1001),l=(0,r.Z)(a,i,s,!1,null,null,null),c=l.exports},8147:function(t,e,n){n.r(e),n.d(e,{default:function(){return Ee}});var i=function(){var t=this,e=t._self._c;return t.topicData?e("Overview",t._b({key:t.topicKey},"Overview",t.overviewProps,!1)):t._e()},s=[],o=n(8841),a=n(1789),r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"tutorials-overview"},[t.isTargetIDE?t._e():e("Nav",{staticClass:"theme-dark",attrs:{sections:t.otherSections}},[t._v(" "+t._s(t.title)+" ")]),e("main",{staticClass:"main",attrs:{id:"app-main",tabindex:"0"}},[e("div",{staticClass:"radial-gradient"},[t._t("above-hero"),t.heroSection?e("Hero",{attrs:{action:t.heroSection.action,content:t.heroSection.content,estimatedTime:t.metadata.estimatedTime,image:t.heroSection.image,title:t.heroSection.title}}):t._e()],2),t.otherSections.length>0?e("LearningPath",{attrs:{sections:t.otherSections}}):t._e()],1)],1)},l=[],c=n(4030),u={state:{activeTutorialLink:null,activeVolume:null,references:{}},reset(){this.state.activeTutorialLink=null,this.state.activeVolume=null,this.state.references={}},setActiveSidebarLink(t){this.state.activeTutorialLink=t},setActiveVolume(t){this.state.activeVolume=t},setReferences(t){this.state.references=t}},m=function(){var t=this,e=t._self._c;return e("NavBase",{scopedSlots:t._u([{key:"menu-items",fn:function(){return[e("NavMenuItemBase",{staticClass:"in-page-navigation"},[e("TutorialsNavigation",{attrs:{sections:t.sections}})],1),t._t("menu-items")]},proxy:!0}],null,!0)},[e("NavTitleContainer",{attrs:{to:t.buildUrl(t.$route.path,t.$route.query)},scopedSlots:t._u([{key:"default",fn:function(){return[t._t("default")]},proxy:!0},{key:"subhead",fn:function(){return[t._v(t._s(t.$tc("tutorials.title",2)))]},proxy:!0}],null,!0)})],1)},d=[],p=n(2586),h=function(){var t=this,e=t._self._c;return e("nav",{staticClass:"tutorials-navigation"},[e("TutorialsNavigationList",t._l(t.sections,(function(n,i){return e("li",{key:`${n.name}_${i}`,class:t.sectionClasses(n)},[t.isVolume(n)?e(t.componentForVolume(n),t._b({tag:"component",on:{"select-menu":t.onSelectMenu,"deselect-menu":t.onDeselectMenu}},"component",t.propsForVolume(n),!1),t._l(n.chapters,(function(n){return e("li",{key:n.name},[e("TutorialsNavigationLink",[t._v(" "+t._s(n.name)+" ")])],1)})),0):t.isResources(n)?e("TutorialsNavigationLink",[t._v(" "+t._s(t.$t("sections.resources"))+" ")]):t._e()],1)})),0)],1)},v=[],f=function(){var t=this,e=t._self._c;return e("router-link",{staticClass:"tutorials-navigation-link",class:{active:t.active},attrs:{to:t.fragment},nativeOn:{click:function(e){return t.handleFocusAndScroll(t.fragment.hash)}}},[t._t("default")],2)},_=[],g=n(3208),C=n(3704),y={name:"TutorialsNavigationLink",mixins:[C.Z],inject:{store:{default:()=>({state:{}})}},data(){return{state:this.store.state}},computed:{active:({state:{activeTutorialLink:t},text:e})=>e===t,fragment:({text:t,$route:e})=>({hash:(0,g.HA)(t),query:e.query}),text:({$slots:{default:[{text:t}]}})=>t.trim()}},b=y,T=n(1001),S=(0,T.Z)(b,f,_,!1,null,"e9f9b59c",null),k=S.exports,V=function(){var t=this,e=t._self._c;return e("ol",{staticClass:"tutorials-navigation-list"},[t._t("default")],2)},Z=[],x={name:"TutorialsNavigationList"},I=x,N=(0,T.Z)(I,V,Z,!1,null,"4e0180fa",null),A=N.exports,w=function(){var t=this,e=t._self._c;return e("div",{staticClass:"tutorials-navigation-menu",class:{collapsed:t.collapsed}},[e("button",{staticClass:"toggle",attrs:{"aria-expanded":t.collapsed?"false":"true",type:"button"},on:{click:function(e){return e.stopPropagation(),t.onClick.apply(null,arguments)}}},[e("span",{staticClass:"text"},[t._v(t._s(t.title))]),e("InlineCloseIcon",{staticClass:"toggle-icon icon-inline"})],1),e("transition-expand",[t.collapsed?t._e():e("div",{staticClass:"tutorials-navigation-menu-content"},[e("TutorialsNavigationList",{attrs:{"aria-label":t.$t("tutorials.nav.chapters")}},[t._t("default")],2)],1)])],1)},q=[],$=n(7181),L=n(9732),M={name:"TutorialsNavigationMenu",components:{InlineCloseIcon:$.Z,TransitionExpand:L.Z,TutorialsNavigationList:A},props:{collapsed:{type:Boolean,default:!0},title:{type:String,required:!0}},methods:{onClick(){this.collapsed?this.$emit("select-menu",this.title):this.$emit("deselect-menu")}}},D=M,F=(0,T.Z)(D,w,q,!1,null,"489416f8",null),R=F.exports;const O={resources:"resources",volume:"volume"};var j={name:"TutorialsNavigation",components:{TutorialsNavigationLink:k,TutorialsNavigationList:A,TutorialsNavigationMenu:R},constants:{SectionKind:O},inject:{store:{default:()=>({setActiveVolume(){}})}},data(){return{state:this.store.state}},props:{sections:{type:Array,required:!0}},computed:{activeVolume:({state:t})=>t.activeVolume},methods:{sectionClasses(t){return{volume:this.isVolume(t),"volume--named":this.isNamedVolume(t),resource:this.isResources(t)}},componentForVolume:({name:t})=>t?R:A,isResources:({kind:t})=>t===O.resources,isVolume:({kind:t})=>t===O.volume,activateFirstNamedVolume(){const{isNamedVolume:t,sections:e}=this,n=e.find(t);n&&this.store.setActiveVolume(n.name)},isNamedVolume(t){return this.isVolume(t)&&t.name},onDeselectMenu(){this.store.setActiveVolume(null)},onSelectMenu(t){this.store.setActiveVolume(t)},propsForVolume({name:t}){const{activeVolume:e}=this;return t?{collapsed:t!==e,title:t}:{"aria-label":"Chapters"}}},created(){this.activateFirstNamedVolume()}},B=j,G=(0,T.Z)(B,h,v,!1,null,"79093ed6",null),H=G.exports,z=n(2573),P=n(2449),E=n(535);const U={resources:"resources",volume:"volume"};var K={name:"Nav",constants:{SectionKind:U},components:{NavMenuItemBase:E.Z,NavTitleContainer:z.Z,TutorialsNavigation:H,NavBase:p.Z},props:{sections:{type:Array,require:!0}},methods:{buildUrl:P.Q2}},Q=K,J=(0,T.Z)(Q,m,d,!1,null,"54bcce6d",null),W=J.exports,X=n(2974),Y=function(){var t=this,e=t._self._c;return e("section",{staticClass:"hero"},[e("div",{staticClass:"copy-container"},[e("h1",{staticClass:"title"},[t._v(t._s(t.title))]),t.content?e("ContentNode",{attrs:{content:t.content}}):t._e(),t.estimatedTime?e("p",{staticClass:"meta"},[e("TimerIcon"),e("span",{staticClass:"meta-content"},[e("strong",{staticClass:"time"},[t._v(t._s(t.estimatedTime))]),e("span",[t._v(" "+t._s(t.$t("tutorials.estimated-time")))])])],1):t._e(),t.action?e("CallToActionButton",{attrs:{action:t.action,"aria-label":t.$t("tutorials.overriding-title",{newTitle:t.action.overridingTitle,title:t.title}),isDark:""}}):t._e()],1),t.image?e("Asset",{attrs:{identifier:t.image}}):t._e()],1)},tt=[],et=n(4655),nt=n(7605),it=n(9519),st=function(){var t=this,e=t._self._c;return e("SVGIcon",{staticClass:"timer-icon",attrs:{viewBox:"0 0 14 14",themeId:"timer"}},[e("path",{attrs:{d:"M7 0.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5c-3.59 0-6.5-2.91-6.5-6.5v0c0-3.59 2.91-6.5 6.5-6.5v0zM7 2c-2.761 0-5 2.239-5 5s2.239 5 5 5c2.761 0 5-2.239 5-5v0c0-2.761-2.239-5-5-5v0z"}}),e("path",{attrs:{d:"M6.51 3.51h1.5v3.5h-1.5v-3.5z"}}),e("path",{attrs:{d:"M6.51 7.010h4v1.5h-4v-1.5z"}})])},ot=[],at=n(9742),rt={name:"TimerIcon",components:{SVGIcon:at.Z}},lt=rt,ct=(0,T.Z)(lt,st,ot,!1,null,null,null),ut=ct.exports,mt={name:"Hero",components:{Asset:et.Z,CallToActionButton:nt.Z,ContentNode:it["default"],TimerIcon:ut},props:{action:{type:Object,required:!1},content:{type:Array,required:!1},estimatedTime:{type:String,required:!1},image:{type:String,required:!1},title:{type:String,required:!0}}},dt=mt,pt=(0,T.Z)(dt,Y,tt,!1,null,"400ffab5",null),ht=pt.exports,vt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"learning-path",class:t.classes},[e("div",{staticClass:"main-container"},[t.isTargetIDE?t._e():e("div",{staticClass:"secondary-content-container"},[e("TutorialsNavigation",{attrs:{sections:t.sections,"aria-label":t.$t("sections.on-this-page")}})],1),e("div",{staticClass:"primary-content-container"},[e("div",{staticClass:"content-sections-container"},[t._l(t.volumes,(function(n,i){return e("Volume",t._b({key:`volume_${i}`,staticClass:"content-section"},"Volume",t.propsFor(n),!1))})),t._l(t.otherSections,(function(n,i){return e(t.componentFor(n),t._b({key:`resource_${i}`,tag:"component",staticClass:"content-section"},"component",t.propsFor(n),!1))}))],2)])])])},ft=[],_t=function(){var t=this,e=t._self._c;return e("section",{staticClass:"resources",attrs:{id:"resources",tabindex:"-1"}},[e("VolumeName",{attrs:{name:t.$t("sections.resources"),content:t.content}}),e("TileGroup",{attrs:{tiles:t.tiles}})],1)},gt=[],Ct=n(9146);const yt={topOneThird:"-30% 0% -70% 0%",center:"-50% 0% -50% 0%"};var bt={mixins:[Ct["default"]],computed:{intersectionRoot(){return null},intersectionRootMargin(){return yt.center}},methods:{onIntersect(t){if(!t.isIntersecting)return;const e=this.onIntersectViewport;e?e():console.warn("onIntersectViewportCenter not implemented")}}},Tt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"volume-name"},[t.image?e("Asset",{staticClass:"image",attrs:{identifier:t.image,"aria-hidden":"true"}}):t._e(),e("h2",{staticClass:"name"},[t._v(" "+t._s(t.name)+" ")]),t.content?e("ContentNode",{attrs:{content:t.content}}):t._e()],1)},St=[],kt={name:"VolumeName",components:{ContentNode:it["default"],Asset:et.Z},props:{image:{type:String,required:!1},content:{type:Array,required:!1},name:{type:String,required:!1}}},Vt=kt,Zt=(0,T.Z)(Vt,Tt,St,!1,null,"569db166",null),xt=Zt.exports,It=function(){var t=this,e=t._self._c;return e("div",{staticClass:"tile-group",class:t.countClass},t._l(t.tiles,(function(n){return e("Tile",t._b({key:n.title},"Tile",t.propsFor(n),!1))})),1)},Nt=[],At=function(){var t=this,e=t._self._c;return e("div",{staticClass:"tile"},[t.identifier?e("div",{staticClass:"icon"},[e(t.iconComponent,{tag:"component"})],1):t._e(),e("div",{staticClass:"title"},[t._v(t._s(t.title))]),e("ContentNode",{attrs:{content:t.content}}),t.action?e("DestinationDataProvider",{attrs:{destination:t.action},scopedSlots:t._u([{key:"default",fn:function({url:n,title:i}){return[e("Reference",{staticClass:"link",attrs:{url:n}},[t._v(" "+t._s(i)+" "),e("InlineChevronRightIcon",{staticClass:"link-icon icon-inline"})],1)]}}],null,!1,2081312588)}):t._e()],1)},wt=[],qt=n(7775),$t=function(){var t=this,e=t._self._c;return e("SVGIcon",{staticClass:"document-icon",attrs:{viewBox:"0 0 14 14",themeId:"document"}},[e("path",{attrs:{d:"M11.2,5.3,8,2l-.1-.1H2.8V12.1h8.5V6.3l-.1-1ZM8,3.2l2,2.1H8Zm2.4,8H3.6V2.8H7V6.3h3.4Z"}})])},Lt=[],Mt={name:"DocumentIcon",components:{SVGIcon:at.Z}},Dt=Mt,Ft=(0,T.Z)(Dt,$t,Lt,!1,null,"3a80772b",null),Rt=Ft.exports,Ot=n(7214),jt=function(){var t=this,e=t._self._c;return e("SVGIcon",{staticClass:"forum-icon",attrs:{viewBox:"0 0 14 14",themeId:"forum"}},[e("path",{attrs:{d:"M13 1v9h-7l-1.5 3-1.5-3h-2v-9zM12 2h-10v7h1.616l0.884 1.763 0.88-1.763h6.62z"}}),e("path",{attrs:{d:"M3 4h8.001v1h-8.001v-1z"}}),e("path",{attrs:{d:"M3 6h8.001v1h-8.001v-1z"}})])},Bt=[],Gt={name:"ForumIcon",components:{SVGIcon:at.Z}},Ht=Gt,zt=(0,T.Z)(Ht,jt,Bt,!1,null,null,null),Pt=zt.exports,Et=n(6698),Ut=n(4260),Kt=n(8785),Qt=n(1295);const Jt={documentation:"documentation",downloads:"downloads",featured:"featured",forums:"forums",sampleCode:"sampleCode",videos:"videos"};var Wt={name:"Tile",constants:{Identifier:Jt},components:{DestinationDataProvider:Qt.Z,InlineChevronRightIcon:Kt.Z,ContentNode:it["default"],CurlyBracketsIcon:qt.Z,DocumentIcon:Rt,DownloadIcon:Ot.Z,ForumIcon:Pt,PlayIcon:Et.Z,Reference:Ut.Z},props:{action:{type:Object,required:!1},content:{type:Array,required:!0},identifier:{type:String,required:!1},title:{type:String,require:!0}},computed:{iconComponent:({identifier:t})=>({[Jt.documentation]:Rt,[Jt.downloads]:Ot.Z,[Jt.forums]:Pt,[Jt.sampleCode]:qt.Z,[Jt.videos]:Et.Z}[t])}},Xt=Wt,Yt=(0,T.Z)(Xt,At,wt,!1,null,"74dbeb68",null),te=Yt.exports,ee={name:"TileGroup",components:{Tile:te},props:{tiles:{type:Array,required:!0}},computed:{countClass:({tiles:t})=>`count-${t.length}`},methods:{propsFor:({action:t,content:e,identifier:n,title:i})=>({action:t,content:e,identifier:n,title:i})}},ne=ee,ie=(0,T.Z)(ne,It,Nt,!1,null,"4cacce0a",null),se=ie.exports,oe={name:"Resources",mixins:[bt],inject:{store:{default:()=>({setActiveSidebarLink(){},setActiveVolume(){}})}},components:{VolumeName:xt,TileGroup:se},computed:{intersectionRootMargin:()=>yt.topOneThird},props:{content:{type:Array,required:!1},tiles:{type:Array,required:!0}},methods:{onIntersectViewport(){this.store.setActiveSidebarLink("Resources"),this.store.setActiveVolume(null)}}},ae=oe,re=(0,T.Z)(ae,_t,gt,!1,null,"7f8022c1",null),le=re.exports,ce=function(){var t=this,e=t._self._c;return e("section",{staticClass:"volume"},[t.name?e("VolumeName",t._b({},"VolumeName",{name:t.name,image:t.image,content:t.content},!1)):t._e(),t._l(t.chapters,(function(n,i){return e("Chapter",{key:n.name,staticClass:"tile",attrs:{content:n.content,image:n.image,name:n.name,number:i+1,topics:t.lookupTopics(n.tutorials),volumeHasName:!!t.name}})}))],2)},ue=[],me=function(){var t=this,e=t._self._c;return e("section",{staticClass:"chapter",attrs:{id:t.anchor,tabindex:"-1"}},[e("div",{staticClass:"info"},[e("Asset",{attrs:{identifier:t.image,"aria-hidden":"true"}}),e("div",{staticClass:"intro"},[e(t.volumeHasName?"h3":"h2",{tag:"component",staticClass:"name",attrs:{"aria-label":`${t.name} - ${t.$tc("tutorials.sections.chapter",{number:t.number})}`}},[e("span",{staticClass:"eyebrow",attrs:{"aria-hidden":"true"}},[t._v(" "+t._s(t.$t("tutorials.sections.chapter",{number:t.number}))+" ")]),e("span",{staticClass:"name-text",attrs:{"aria-hidden":"true"}},[t._v(t._s(t.name))])]),t.content?e("ContentNode",{attrs:{content:t.content}}):t._e()],1)],1),e("TopicList",{attrs:{topics:t.topics}})],1)},de=[],pe=function(){var t=this,e=t._self._c;return e("ol",{staticClass:"topic-list"},t._l(t.topics,(function(n){return e("li",{key:n.url,staticClass:"topic",class:[t.kindClassFor(n),{"no-time-estimate":!n.estimatedTime}]},[e("div",{staticClass:"topic-icon"},[e(t.iconComponent(n),{tag:"component"})],1),e("router-link",{staticClass:"container",attrs:{to:t.buildUrl(n.url,t.$route.query),"aria-label":t.ariaLabelFor(n)}},[e("div",{staticClass:"link"},[t._v(t._s(n.title))]),n.estimatedTime?e("div",{staticClass:"time"},[e("TimerIcon"),e("span",{staticClass:"time-label"},[t._v(t._s(n.estimatedTime))])],1):t._e()])],1)})),0)},he=[],ve=n(5692),fe=n(8638);const _e={article:"article",tutorial:"project"},ge={article:"article",tutorial:"tutorial"},Ce={[_e.article]:"Article",[_e.tutorial]:"Tutorial"};var ye={name:"ChapterTopicList",components:{TimerIcon:ut},constants:{TopicKind:_e,TopicKindClass:ge,TopicKindIconLabel:Ce},props:{topics:{type:Array,required:!0}},methods:{buildUrl:P.Q2,iconComponent:({kind:t})=>({[_e.article]:ve.Z,[_e.tutorial]:fe.Z}[t]),kindClassFor:({kind:t})=>({[_e.article]:ge.article,[_e.tutorial]:ge.tutorial}[t]),formatTime(t){return t.replace("min",` ${this.$t("tutorials.time.minutes.full")}`).replace("hrs",` ${this.$t("tutorials.time.hours.full")}`)},ariaLabelFor(t){const{title:e,estimatedTime:n,kind:i}=t,s=[e,Ce[i]];return n&&s.push(`${this.formatTime(n)} ${this.$t("tutorials.estimated-time")}`),s.join(" - ")}}},be=ye,Te=(0,T.Z)(be,pe,he,!1,null,"0589dc3b",null),Se=Te.exports,ke={name:"Chapter",mixins:[bt],inject:{store:{default:()=>({setActiveSidebarLink(){},setActiveVolume(){}})}},components:{Asset:et.Z,ContentNode:it["default"],TopicList:Se},props:{content:{type:Array,required:!1},image:{type:String,required:!0},name:{type:String,required:!0},number:{type:Number,required:!0},topics:{type:Array,required:!0},volumeHasName:{type:Boolean,default:!1}},computed:{anchor:({name:t})=>(0,g.HA)(t),intersectionRootMargin:()=>yt.topOneThird},methods:{onIntersectViewport(){this.store.setActiveSidebarLink(this.name),this.volumeHasName||this.store.setActiveVolume(null)}}},Ve=ke,Ze=(0,T.Z)(Ve,me,de,!1,null,"7468bc5e",null),xe=Ze.exports,Ie={name:"Volume",mixins:[bt],components:{VolumeName:xt,Chapter:xe},computed:{references:({store:t})=>t.state.references,intersectionRootMargin:()=>yt.topOneThird},inject:{store:{default:()=>({setActiveVolume(){},state:{references:{}}})}},props:{chapters:{type:Array,required:!0},content:{type:Array,required:!1},image:{type:String,required:!1},name:{type:String,required:!1}},methods:{lookupTopics(t){return t.reduce(((t,e)=>t.concat(this.references[e]||[])),[])},onIntersectViewport(){this.name&&this.store.setActiveVolume(this.name)}}},Ne=Ie,Ae=(0,T.Z)(Ne,ce,ue,!1,null,"540dbf10",null),we=Ae.exports;const qe={resources:"resources",volume:"volume"};var $e={name:"LearningPath",components:{Resources:le,TutorialsNavigation:H,Volume:we},constants:{SectionKind:qe},inject:{isTargetIDE:{default:!1}},props:{sections:{type:Array,required:!0,validator:t=>t.every((t=>Object.prototype.hasOwnProperty.call(qe,t.kind)))}},computed:{classes:({isTargetIDE:t})=>({ide:t}),partitionedSections:({sections:t})=>t.reduce((([t,e],n)=>n.kind===qe.volume?[t.concat(n),e]:[t,e.concat(n)]),[[],[]]),volumes:({partitionedSections:t})=>t[0],otherSections:({partitionedSections:t})=>t[1]},methods:{componentFor:({kind:t})=>({[qe.resources]:le,[qe.volume]:we}[t]),propsFor:({chapters:t,content:e,image:n,kind:i,name:s,tiles:o})=>({[qe.resources]:{content:e,tiles:o},[qe.volume]:{chapters:t,content:e,image:n,name:s}}[i])}},Le=$e,Me=(0,T.Z)(Le,vt,ft,!1,null,"69a72bbc",null),De=Me.exports;const Fe={hero:"hero",resources:"resources",volume:"volume"};var Re={name:"TutorialsOverview",components:{Hero:ht,LearningPath:De,Nav:W},mixins:[X.Z],constants:{SectionKind:Fe},inject:{isTargetIDE:{default:!1}},props:{metadata:{type:Object,default:()=>({})},references:{type:Object,default:()=>({})},sections:{type:Array,default:()=>[],validator:t=>t.every((t=>Object.prototype.hasOwnProperty.call(Fe,t.kind)))}},computed:{pageTitle:({title:t})=>[t,"Tutorials"].filter(Boolean).join(" "),pageDescription:({heroSection:t,extractFirstParagraphText:e})=>t?e(t.content):null,partitionedSections:({sections:t})=>t.reduce((([t,e],n)=>n.kind===Fe.hero?[t.concat(n),e]:[t,e.concat(n)]),[[],[]]),heroSections:({partitionedSections:t})=>t[0],otherSections:({partitionedSections:t})=>t[1],heroSection:({heroSections:t})=>t[0],store:()=>u,title:({metadata:{category:t=""}})=>t},provide(){return{store:this.store}},created(){c["default"].setAvailableLocales(this.metadata.availableLocales),this.store.reset(),this.store.setReferences(this.references)},watch:{references(t){this.store.setReferences(t)},"metadata.availableLocales":function(t){c["default"].setAvailableLocales(t)}}},Oe=Re,je=(0,T.Z)(Oe,r,l,!1,null,"5381f0aa",null),Be=je.exports,Ge=n(5184),He={name:"TutorialsOverview",components:{Overview:Be},mixins:[a.Z,Ge.Z],data(){return{topicData:null}},computed:{overviewProps:({topicData:{metadata:t,references:e,sections:n}})=>({metadata:t,references:e,sections:n}),topicKey:({$route:t,topicData:e})=>[t.path,e.identifier.interfaceLanguage].join()},beforeRouteEnter(t,e,n){t.meta.skipFetchingData?n((t=>t.newContentMounted())):(0,o.Ek)(t,e,n).then((t=>n((e=>{e.topicData=t})))).catch(n)},beforeRouteUpdate(t,e,n){(0,o.Us)(t,e)?(0,o.Ek)(t,e,n).then((t=>{this.topicData=t,n()})).catch(n):n()},mounted(){this.$bridge.on("contentUpdate",this.handleContentUpdateFromBridge)},beforeDestroy(){this.$bridge.off("contentUpdate",this.handleContentUpdateFromBridge)},watch:{topicData(){this.$nextTick((()=>{this.newContentMounted()}))}}},ze=He,Pe=(0,T.Z)(ze,i,s,!1,null,null,null),Ee=Pe.exports}}]); \ No newline at end of file diff --git a/docs/linkable-entities.json b/docs/linkable-entities.json new file mode 100644 index 00000000..6bce1232 --- /dev/null +++ b/docs/linkable-entities.json @@ -0,0 +1 @@ +[{"availableLanguages":["swift"],"abstract":[{"type":"text","text":"Initialize an instance with a "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","isActive":true},{"type":"text","text":" in the form of a closure."}],"taskGroups":[],"usr":"s:20AWSLambdaRuntimeCore06LambdaB0C4bodyACyAA23StreamingClosureHandlerVGy7NIOCore10ByteBufferV_AA0D20ResponseStreamWriter_pAA0D7ContextVtYaYbKc_tcAFRszrlufc","language":"swift","kind":"org.swift.docc.kind.initializer","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(body:)","fragments":[{"text":"convenience","kind":"keyword"},{"text":" ","kind":"text"},{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"body"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", any ","kind":"text"},{"kind":"typeIdentifier","text":"LambdaResponseStreamWriter","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","kind":"typeIdentifier","text":"LambdaContext"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"kind":"text","text":") "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"Handler"},{"text":" == ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore23StreamingClosureHandlerV","text":"StreamingClosureHandler","kind":"typeIdentifier"}],"title":"init(body:)","path":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(body:)"},{"language":"swift","taskGroups":[],"fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"kind":"org.swift.docc.kind.associatedType","usr":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP6OutputQa","availableLanguages":["swift"],"title":"Output","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output","path":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter\/output"},{"kind":"org.swift.docc.kind.structure","availableLanguages":["swift"],"taskGroups":[{"title":"Initializers","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/init(body:)"]},{"title":"Instance Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/handle(_:responseWriter:context:)"]}],"abstract":[{"type":"text","text":"A "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","type":"reference","isActive":true},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax.","type":"text"}],"path":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler","language":"swift","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"StreamingClosureHandler","kind":"identifier"}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler","title":"StreamingClosureHandler","usr":"s:20AWSLambdaRuntimeCore23StreamingClosureHandlerV"},{"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/handle(_:outputWriter:context:)","kind":"org.swift.docc.kind.instanceMethod","language":"swift","usr":"s:20AWSLambdaRuntimeCore20LambdaHandlerAdapterV6handle_12outputWriter7contextyx_qd__AA0D7ContextVtYaKAA0d8ResponseI0Rd__6OutputQyd__AJRt0_lF","abstract":[{"type":"text","text":"Passes the generic "},{"type":"codeVoice","code":"Event"},{"text":" object to the ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"type":"text","text":" function, and"},{"type":"text","text":" "},{"type":"text","text":"the resulting output is then written to "},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","type":"reference"},{"text":"’s ","type":"text"},{"type":"codeVoice","code":"outputWriter"},{"type":"text","text":"."}],"title":"handle(_:outputWriter:context:)","taskGroups":[],"path":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter\/handle(_:outputwriter:context:)","availableLanguages":["swift"],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"event"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"text":", ","kind":"text"},{"text":"outputWriter","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"some","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaResponseWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Output"},{"kind":"text","text":">, "},{"kind":"externalParam","text":"context"},{"kind":"text","text":": "},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","kind":"typeIdentifier","text":"LambdaContext"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}]},{"abstract":[{"text":"Generic output type.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"This is the type that the "},{"code":"handle","type":"codeVoice"},{"type":"text","text":" function will send through the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"},{"type":"text","text":"."}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output","availableLanguages":["swift"],"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"title":"Output","path":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/output","language":"swift","taskGroups":[],"kind":"org.swift.docc.kind.associatedType","usr":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa"},{"availableLanguages":["swift"],"path":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/init(decoder:handler:)","abstract":[{"type":"text","text":"Initializes an instance given a decoder, and a handler with a "},{"code":"Void","type":"codeVoice"},{"text":" output.","type":"text"}],"kind":"org.swift.docc.kind.initializer","taskGroups":[],"usr":"s:20AWSLambdaRuntimeCore20LambdaCodableAdapterV7decoder7handlerACyxq_ytq1_AA11VoidEncoderVGq1__xtcytRs0_AGRs2_yt6OutputRtzrlufc","title":"init(decoder:handler:)","fragments":[{"kind":"keyword","text":"init"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"decoder"},{"text":": ","kind":"text"},{"text":"Decoder","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"handler","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Handler"},{"text":") ","kind":"text"},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"text":"Output","kind":"typeIdentifier"},{"text":" == (), ","kind":"text"},{"kind":"typeIdentifier","text":"Encoder"},{"text":" == ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore11VoidEncoderV","text":"VoidEncoder","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Handler","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"Output","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa"},{"text":" == ()","kind":"text"}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(decoder:handler:)","language":"swift"},{"kind":"org.swift.docc.kind.initializer","path":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/init(encoder:decoder:handler:)","usr":"s:20AWSLambdaRuntimeCore20LambdaCodableAdapterV7encoder7decoder7handlerACyxq_q0_q1_q2_Gq2__q1_xtcSER0_rlufc","fragments":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"encoder"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Encoder"},{"text":", ","kind":"text"},{"text":"decoder","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Decoder"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"handler"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Handler"},{"text":") ","kind":"text"},{"text":"where","kind":"keyword"},{"kind":"text","text":" "},{"text":"Output","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:SE","text":"Encodable","kind":"typeIdentifier"}],"abstract":[{"text":"Initializes an instance given an encoder, decoder, and a handler with a non-","type":"text"},{"type":"codeVoice","code":"Void"},{"type":"text","text":" output."}],"title":"init(encoder:decoder:handler:)","language":"swift","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(encoder:decoder:handler:)","availableLanguages":["swift"],"taskGroups":[]},{"path":"\/documentation\/awslambdaruntimecore\/voidencoder\/encode(_:into:)","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/encode(_:into:)","usr":"s:20AWSLambdaRuntimeCore11VoidEncoderV6encode_4intoyyt_7NIOCore10ByteBufferVztKF","availableLanguages":["swift"],"title":"encode(_:into:)","taskGroups":[],"kind":"org.swift.docc.kind.instanceMethod","language":"swift","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"encode","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"value"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"kind":"text","text":", "},{"kind":"externalParam","text":"into"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"buffer"},{"text":": ","kind":"text"},{"text":"inout","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer"},{"text":") ","kind":"text"},{"text":"throws","kind":"keyword"}]},{"path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/requestid","usr":"s:20AWSLambdaRuntimeCore13LambdaContextV9requestIDSSvp","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"requestID","kind":"identifier"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"title":"requestID","kind":"org.swift.docc.kind.instanceProperty","availableLanguages":["swift"],"taskGroups":[],"language":"swift","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/requestID","abstract":[{"text":"The request ID, which identifies the request that triggered the function invocation.","type":"text"}]},{"title":"AWSLambdaRuntimeCore","usr":"AWSLambdaRuntimeCore","availableLanguages":["swift"],"language":"swift","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","kind":"org.swift.docc.kind.module","taskGroups":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/quick-setup","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Deployment"],"title":"Essentials"},{"title":"Articles","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/0001-v2-api"]},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime"],"title":"Classes"},{"title":"Protocols","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"]},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder"],"title":"Structures"},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda"],"title":"Enumerations"}],"abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"path":"\/documentation\/awslambdaruntimecore"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/deadline","title":"deadline","abstract":[{"text":"The timestamp that the function times out.","type":"text"}],"availableLanguages":["swift"],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/deadline","usr":"s:20AWSLambdaRuntimeCore13LambdaContextV8deadline8Dispatch0G8WallTimeVvp","language":"swift","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"deadline"},{"text":": ","kind":"text"},{"text":"DispatchWallTime","kind":"typeIdentifier","preciseIdentifier":"s:8Dispatch0A8WallTimeV"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"taskGroups":[],"kind":"org.swift.docc.kind.instanceProperty"},{"language":"swift","taskGroups":[],"usr":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP14writeAndFinishyy7NIOCore10ByteBufferVYaKF","path":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/writeandfinish(_:)","title":"writeAndFinish(_:)","kind":"org.swift.docc.kind.instanceMethod","abstract":[{"text":"Write a response part into the stream and then end the stream as well as the underlying HTTP response.","type":"text"}],"availableLanguages":["swift"],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"writeAndFinish","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"buffer","kind":"internalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"},{"title":"Your First Lambda Function Written in Swift","availableLanguages":["swift"],"abstract":[{"type":"text","text":"A step-by-step tutorial to learn how to implement, build, test, and deploy your first Lambda function written in Swift."}],"kind":"org.swift.docc.kind.technology","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content","language":"swift","path":"\/tutorials\/table-of-content","taskGroups":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/table-of-content\/$volume"]}]},{"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/init(encoder:streamWriter:)","title":"init(encoder:streamWriter:)","path":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter\/init(encoder:streamwriter:)","language":"swift","kind":"org.swift.docc.kind.initializer","abstract":[{"type":"text","text":"Initializes an instance given an encoder and an underlying "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","isActive":true},{"type":"text","text":"."}],"taskGroups":[],"usr":"s:20AWSLambdaRuntimeCore27LambdaCodableResponseWriterV7encoder06streamG0ACyxq_q0_Gq__q0_tcfc","fragments":[{"kind":"keyword","text":"init"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"encoder"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Encoder"},{"kind":"text","text":", "},{"text":"streamWriter","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Base"},{"text":")","kind":"text"}],"availableLanguages":["swift"]},{"kind":"org.swift.docc.kind.instanceMethod","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"event"},{"text":": ","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","kind":"typeIdentifier"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Output"}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/handle(_:context:)","abstract":[{"type":"text","text":"Calls the provided "},{"type":"codeVoice","code":"self.body"},{"text":" closure with the generic ","type":"text"},{"code":"Event","type":"codeVoice"},{"text":" object representing the incoming event, and the ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","isActive":true,"type":"reference"}],"usr":"s:20AWSLambdaRuntimeCore14ClosureHandlerV6handle_7contextq_x_AA13LambdaContextVtYaKF","language":"swift","availableLanguages":["swift"],"title":"handle(_:context:)","path":"\/documentation\/awslambdaruntimecore\/closurehandler\/handle(_:context:)","taskGroups":[]},{"kind":"org.swift.docc.kind.protocol","language":"swift","availableLanguages":["swift"],"taskGroups":[{"title":"Associated Types","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"]},{"title":"Instance Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"]}],"title":"LambdaHandler","path":"\/documentation\/awslambdaruntimecore\/lambdahandler","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaHandler"}],"abstract":[{"type":"text","text":"This handler protocol is intended to serve the most common use-cases."},{"text":" ","type":"text"},{"text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","isActive":true,"type":"reference"},{"text":" object and encoding the returned ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"type":"text","text":" object is handled by the library."},{"text":" ","type":"text"},{"type":"text","text":"The"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},{"text":" function simply receives the generic ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event"},{"type":"text","text":" object as input and returns the generic "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","isActive":true},{"type":"text","text":" object."}],"usr":"s:20AWSLambdaRuntimeCore13LambdaHandlerP","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"},{"taskGroups":[],"language":"swift","path":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler\/handle(_:responsewriter:context:)","fragments":[{"kind":"keyword","text":"mutating"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"handle"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"event"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ByteBuffer","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":", "},{"kind":"externalParam","text":"responseWriter"},{"text":": ","kind":"text"},{"kind":"keyword","text":"some"},{"text":" ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","text":"LambdaResponseStreamWriter","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}],"kind":"org.swift.docc.kind.instanceMethod","usr":"s:20AWSLambdaRuntimeCore22StreamingLambdaHandlerP6handle_14responseWriter7contexty7NIOCore10ByteBufferV_qd__AA0E7ContextVtYaKAA0e14ResponseStreamI0Rd__lF","abstract":[{"text":"The handler function – implement the business logic of the Lambda function here.","type":"text"}],"title":"handle(_:responseWriter:context:)","availableLanguages":["swift"],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter","taskGroups":[{"title":"Associated Types","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output"]},{"title":"Instance Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/write(_:)"]}],"title":"LambdaResponseWriter","language":"swift","usr":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP","availableLanguages":["swift"],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LambdaResponseWriter","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP6OutputQa"},{"text":">","kind":"text"}],"abstract":[{"text":"Used with ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","isActive":true},{"text":".","type":"text"},{"type":"text","text":" "},{"type":"text","text":"A mechanism to “return” an output from "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","isActive":true},{"text":" without the function needing to","type":"text"},{"text":" ","type":"text"},{"text":"have a return type and exit at that point. This allows for background work to be executed ","type":"text"},{"inlineContent":[{"type":"text","text":"after"}],"type":"emphasis"},{"text":" a response has been sent to the AWS Lambda response endpoint.","type":"text"}],"kind":"org.swift.docc.kind.protocol","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter"},{"language":"swift","path":"\/tutorials\/awslambdaruntimecore\/03-prerequisites","kind":"org.swift.docc.kind.tutorialarticle","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-prerequisites","title":"Prerequisites","availableLanguages":["swift"],"taskGroups":[{"identifiers":[]}]},{"usr":"s:20AWSLambdaRuntimeCore13LambdaContextV16debugDescriptionSSvp","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/debugDescription","path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/debugdescription","availableLanguages":["swift"],"taskGroups":[],"title":"debugDescription","kind":"org.swift.docc.kind.instanceProperty","language":"swift","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"debugDescription"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}]},{"availableLanguages":["swift"],"language":"swift","taskGroups":[{"title":"Type Properties","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/defaultEventLoop"]},{"title":"Type Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/env(_:)"]}],"path":"\/documentation\/awslambdaruntimecore\/lambda","usr":"s:20AWSLambdaRuntimeCore6LambdaO","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"text":"Lambda","kind":"identifier"}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda","kind":"org.swift.docc.kind.enumeration","title":"Lambda"},{"kind":"org.swift.docc.kind.article","language":"swift","taskGroups":[],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/0001-v2-api","availableLanguages":["swift"],"title":"v2 API proposal for swift-aws-lambda-runtime","abstract":[{"type":"codeVoice","code":"swift-aws-lambda-runtime"},{"text":" is an important library for the Swift on Server ecosystem. The initial API was written before","type":"text"},{"type":"text","text":" "},{"text":"async\/await was introduced to Swift. When async\/await was introduced, shims were added to bridge between the underlying","type":"text"},{"type":"text","text":" "},{"text":"SwiftNIO ","type":"text"},{"code":"EventLoop","type":"codeVoice"},{"type":"text","text":" interfaces and async\/await. However, just like "},{"type":"codeVoice","code":"gRPC-swift"},{"type":"text","text":" and "},{"type":"codeVoice","code":"postgres-nio"},{"type":"text","text":", we now want to"},{"text":" ","type":"text"},{"type":"text","text":"shift to solely using async\/await instead of "},{"type":"codeVoice","code":"EventLoop"},{"type":"text","text":" interfaces. For this, large parts of the current API have to be"},{"type":"text","text":" "},{"text":"reconsidered.","type":"text"}],"path":"\/documentation\/awslambdaruntimecore\/0001-v2-api"},{"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output","title":"Output","path":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/output","taskGroups":[],"language":"swift","usr":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP0E0Qa","availableLanguages":["swift"],"fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"kind":"org.swift.docc.kind.associatedType"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/write(_:)","kind":"org.swift.docc.kind.instanceMethod","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","abstract":[{"text":"Write a response part into the stream. Bytes written are streamed continually.","type":"text"}],"availableLanguages":["swift"],"language":"swift","title":"write(_:)","usr":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP5writeyy7NIOCore10ByteBufferVYaKF","taskGroups":[],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"buffer"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"ByteBuffer","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}]},{"usr":"s:20AWSLambdaRuntimeCore06LambdaB0C7handler9eventLoop6loggerACyxGxn_7NIOCore05EventG0_p7Logging6LoggerVtcfc","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(handler:eventLoop:logger:)","language":"swift","path":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(handler:eventloop:logger:)","availableLanguages":["swift"],"title":"init(handler:eventLoop:logger:)","taskGroups":[],"kind":"org.swift.docc.kind.initializer","fragments":[{"kind":"keyword","text":"init"},{"text":"(","kind":"text"},{"text":"handler","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"sending ","kind":"attribute"},{"text":"Handler","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"eventLoop"},{"text":": any ","kind":"text"},{"kind":"typeIdentifier","text":"EventLoop","preciseIdentifier":"s:7NIOCore9EventLoopP"},{"kind":"text","text":" = Lambda.defaultEventLoop, "},{"text":"logger","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Logging6LoggerV","text":"Logger"},{"text":" = Logger(label: \"LambdaRuntime\"))","kind":"text"}]},{"usr":"s:20AWSLambdaRuntimeCore22StreamingLambdaHandlerP","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler","kind":"org.swift.docc.kind.protocol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"StreamingLambdaHandler","kind":"identifier"}],"availableLanguages":["swift"],"language":"swift","title":"StreamingLambdaHandler","path":"\/documentation\/awslambdaruntimecore\/streaminglambdahandler","taskGroups":[{"title":"Instance Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"]}],"abstract":[{"type":"text","text":"The base handler protocol that receives a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" representing the incoming event and returns the response as a "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" too."},{"type":"text","text":" "},{"text":"This handler protocol supports response streaming. Bytes can be streamed outwards through the ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","type":"reference","isActive":true},{"type":"text","text":" "},{"text":"passed as an argument in the ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","type":"reference","isActive":true},{"text":" function.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"Background work can also be executed after returning the response. After closing the response stream by calling"},{"text":" ","type":"text"},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","type":"reference"},{"text":" or ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)","isActive":true,"type":"reference"},{"text":",","type":"text"},{"type":"text","text":" "},{"text":"the ","type":"text"},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)","type":"reference"},{"type":"text","text":" function is free to execute any background work."}]},{"language":"swift","kind":"org.swift.docc.kind.article","taskGroups":[],"path":"\/documentation\/awslambdaruntimecore\/deployment","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Deployment","title":"Deploying your Swift Lambda functions","abstract":[{"text":"Learn how to deploy your Swift Lambda functions to AWS.","type":"text"}],"availableLanguages":["swift"]},{"abstract":[{"text":"The protocol a decoder must conform to so that it can be used with ","type":"text"},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","type":"reference"},{"text":" to decode incoming","type":"text"},{"type":"text","text":" "},{"code":"ByteBuffer","type":"codeVoice"},{"text":" events.","type":"text"}],"path":"\/documentation\/awslambdaruntimecore\/lambdaeventdecoder","taskGroups":[{"title":"Instance Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder\/decode(_:from:)"]}],"language":"swift","title":"LambdaEventDecoder","availableLanguages":["swift"],"kind":"org.swift.docc.kind.protocol","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder","usr":"s:20AWSLambdaRuntimeCore18LambdaEventDecoderP","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaEventDecoder","kind":"identifier"}]},{"abstract":[{"type":"text","text":"For invocations from the AWS Mobile SDK, data about the client application and device."}],"path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/clientcontext","taskGroups":[],"language":"swift","kind":"org.swift.docc.kind.instanceProperty","title":"clientContext","usr":"s:20AWSLambdaRuntimeCore13LambdaContextV06clientE0SSSgvp","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/clientContext","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"clientContext","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"? { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"availableLanguages":["swift"]},{"title":"init(decoder:body:)","abstract":[{"type":"text","text":"Initialize an instance with a "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","isActive":true},{"text":" defined in the form of a closure ","type":"text"},{"inlineContent":[{"text":"with a ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" return type"}],"type":"strong"},{"text":", an encoder, and a decoder.","type":"text"}],"kind":"org.swift.docc.kind.initializer","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(decoder:body:)","usr":"s:20AWSLambdaRuntimeCore06LambdaB0C7decoder4bodyACyAA0D14CodableAdapterVyAA0d7HandlerH0Vyqd__ytAA07ClosureI0Vyqd__ytGGqd__ytqd_0_AA11VoidEncoderVGGqd_0__yqd___AA0D7ContextVtYaKcntcAPRszSeRd__AA0D12EventDecoderRd_0_r0_lufc","path":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(decoder:body:)","language":"swift","availableLanguages":["swift"],"taskGroups":[],"fragments":[{"text":"convenience","kind":"keyword"},{"kind":"text","text":" "},{"text":"init","kind":"keyword"},{"text":"<","kind":"text"},{"text":"Event","kind":"genericParameter"},{"text":", ","kind":"text"},{"text":"Decoder","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"decoder","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Decoder","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"body","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"attribute","text":"sending "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":", "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":") ","kind":"text"},{"kind":"keyword","text":"where"},{"text":" ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"text":" == ","kind":"text"},{"text":"LambdaCodableAdapter","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaCodableAdapterV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaHandlerAdapterV","text":"LambdaHandlerAdapter"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":", (), "},{"text":"ClosureHandler","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore14ClosureHandlerV"},{"text":"<","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"kind":"text","text":", ()>>, "},{"text":"Event","kind":"typeIdentifier"},{"text":", (), ","kind":"text"},{"kind":"typeIdentifier","text":"Decoder"},{"text":", ","kind":"text"},{"text":"VoidEncoder","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore11VoidEncoderV"},{"kind":"text","text":">, "},{"kind":"typeIdentifier","text":"Event"},{"text":" : ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Se","text":"Decodable"},{"text":", ","kind":"text"},{"text":"Decoder","kind":"typeIdentifier"},{"kind":"text","text":" : "},{"text":"LambdaEventDecoder","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore18LambdaEventDecoderP"}]},{"title":"LambdaHandlerAdapter","taskGroups":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/init(handler:)"],"title":"Initializers"},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/handle(_:outputWriter:context:)"],"title":"Instance Methods"}],"path":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaHandlerAdapter"},{"kind":"text","text":"<"},{"text":"Event","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"Output"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"Handler"},{"text":"> ","kind":"text"},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"text":" == ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"Event","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"text":" == ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa","text":"Output"},{"text":", ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"text":"LambdaHandler","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP"}],"kind":"org.swift.docc.kind.structure","language":"swift","availableLanguages":["swift"],"abstract":[{"type":"text","text":"Adapts a "},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference"},{"text":" conforming handler to conform to ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"},{"text":".","type":"text"}],"usr":"s:20AWSLambdaRuntimeCore20LambdaHandlerAdapterV","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter"},{"path":"\/documentation\/awslambdaruntimecore\/closurehandler\/init(body:)-9o0yg","taskGroups":[],"title":"init(body:)","availableLanguages":["swift"],"kind":"org.swift.docc.kind.initializer","language":"swift","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-9o0yg","usr":"s:20AWSLambdaRuntimeCore14ClosureHandlerV4bodyACyxytGyx_AA13LambdaContextVtYaKc_tcytRs_rlufc","abstract":[{"type":"text","text":"Initialize with a closure handler over a generic "},{"type":"codeVoice","code":"Input"},{"type":"text","text":" type, and a "},{"type":"codeVoice","code":"Void"},{"type":"text","text":" "},{"type":"codeVoice","code":"Output"},{"type":"text","text":"."}],"fragments":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"kind":"externalParam","text":"body"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") "},{"kind":"keyword","text":"where"},{"text":" ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"text":" == ()","kind":"text"}]},{"taskGroups":[],"fragments":[{"text":"convenience","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"init"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"Event"},{"kind":"text","text":", "},{"text":"Output","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"Encoder"},{"kind":"text","text":", "},{"text":"Decoder","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"encoder","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Encoder","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"decoder"},{"text":": ","kind":"text"},{"text":"Decoder","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"body","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"attribute","text":"sending "},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","kind":"typeIdentifier","text":"LambdaContext"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":") "},{"kind":"keyword","text":"where"},{"text":" ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"text":" == ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaCodableAdapterV","text":"LambdaCodableAdapter","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaHandlerAdapterV","text":"LambdaHandlerAdapter","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Output"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"ClosureHandler","preciseIdentifier":"s:20AWSLambdaRuntimeCore14ClosureHandlerV"},{"kind":"text","text":"<"},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":">>, "},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Decoder"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Encoder"},{"text":">, ","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:Se","text":"Decodable","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Output"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:SE","text":"Encodable","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Output","kind":"typeIdentifier"},{"text":" == ","kind":"text"},{"kind":"typeIdentifier","text":"Encoder"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP0E0Qa","kind":"typeIdentifier","text":"Output"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Encoder"},{"kind":"text","text":" : "},{"text":"LambdaOutputEncoder","preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Decoder","kind":"typeIdentifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore18LambdaEventDecoderP","text":"LambdaEventDecoder"}],"availableLanguages":["swift"],"language":"swift","title":"init(encoder:decoder:body:)","path":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/init(encoder:decoder:body:)","abstract":[{"text":"Initialize an instance with a ","type":"text"},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference"},{"type":"text","text":" defined in the form of a closure "},{"type":"strong","inlineContent":[{"type":"text","text":"with a non-"},{"type":"codeVoice","code":"Void"},{"type":"text","text":" return type"}]},{"type":"text","text":", an encoder, and a decoder."}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(encoder:decoder:body:)","usr":"s:20AWSLambdaRuntimeCore06LambdaB0C7encoder7decoder4bodyACyAA0D14CodableAdapterVyAA0d7HandlerI0Vyqd__qd_0_AA07ClosureJ0Vyqd__qd_0_GGqd__qd_0_qd_2_qd_1_GGqd_1__qd_2_qd_0_qd___AA0D7ContextVtYaKcntcAORszSeRd__SERd_0_6OutputQyd_1_Rsd_0_AA0dM7EncoderRd_1_AA0D12EventDecoderRd_2_r2_lufc","kind":"org.swift.docc.kind.initializer"},{"usr":"s:20AWSLambdaRuntimeCore11VoidEncoderV6Outputa","language":"swift","fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Output"},{"kind":"text","text":" = "},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"}],"availableLanguages":["swift"],"kind":"org.swift.docc.kind.typeAlias","title":"VoidEncoder.Output","path":"\/documentation\/awslambdaruntimecore\/voidencoder\/output","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/Output","taskGroups":[]},{"kind":"org.swift.docc.kind.instanceProperty","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/invokedFunctionARN","language":"swift","path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/invokedfunctionarn","title":"invokedFunctionARN","taskGroups":[],"usr":"s:20AWSLambdaRuntimeCore13LambdaContextV18invokedFunctionARNSSvp","abstract":[{"type":"text","text":"The ARN of the Lambda function, version, or alias that’s specified in the invocation."}],"availableLanguages":["swift"],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"invokedFunctionARN"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}]},{"path":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","abstract":[{"type":"text","text":"Generic input type."},{"text":" ","type":"text"},{"text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume.","type":"text"}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","kind":"org.swift.docc.kind.associatedType","title":"Event","availableLanguages":["swift"],"usr":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","language":"swift","taskGroups":[],"fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Event"},{"text":" : ","kind":"text"},{"text":"Decodable","kind":"typeIdentifier","preciseIdentifier":"s:Se"}]},{"kind":"org.swift.docc.kind.tutorialarticle","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda","language":"swift","taskGroups":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda#When-to-use-AWS-Lambda"]}],"title":"What is AWS Lambda","availableLanguages":["swift"],"path":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda"},{"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/02-what-is-lambda#When-to-use-AWS-Lambda","path":"\/tutorials\/awslambdaruntimecore\/02-what-is-lambda#When-to-use-AWS-Lambda","taskGroups":[],"title":"When to use AWS Lambda","availableLanguages":["swift"],"language":"swift","kind":"org.swift.docc.kind.landmark"},{"path":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter\/handle(_:responsewriter:context:)","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/handle(_:responseWriter:context:)","kind":"org.swift.docc.kind.instanceMethod","usr":"s:20AWSLambdaRuntimeCore20LambdaCodableAdapterV6handle_14responseWriter7contexty7NIOCore10ByteBufferV_qd__AA0D7ContextVtYaKAA0d14ResponseStreamI0Rd__lF","availableLanguages":["swift"],"language":"swift","fragments":[{"kind":"keyword","text":"mutating"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"Writer"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"request"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"ByteBuffer","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":", "},{"text":"responseWriter","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Writer"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"LambdaContext","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"kind":"text","text":" "},{"text":"where","kind":"keyword"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"Writer"},{"text":" : ","kind":"text"},{"text":"LambdaResponseStreamWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP"}],"abstract":[{"type":"text","text":"A "},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler\/handle(_:responseWriter:context:)"},{"type":"text","text":" wrapper."}],"taskGroups":[],"title":"handle(_:responseWriter:context:)"},{"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/run()","taskGroups":[],"title":"run()","path":"\/documentation\/awslambdaruntimecore\/lambdaruntime\/run()","usr":"s:20AWSLambdaRuntimeCore06LambdaB0C3runyyYaKF","language":"swift","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"run"},{"text":"() ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}],"availableLanguages":["swift"],"kind":"org.swift.docc.kind.instanceMethod"},{"kind":"org.swift.docc.kind.instanceProperty","title":"traceID","taskGroups":[],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/traceID","abstract":[{"type":"text","text":"The AWS X-Ray tracing header."}],"usr":"s:20AWSLambdaRuntimeCore13LambdaContextV7traceIDSSvp","language":"swift","path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/traceid","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"traceID"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"availableLanguages":["swift"]},{"availableLanguages":["swift"],"abstract":[{"type":"text","text":"This protocol is exactly like "},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference"},{"type":"text","text":", with the only difference being the added support for executing background"},{"text":" ","type":"text"},{"type":"text","text":"work after the result has been sent to the AWS Lambda control plane."},{"text":" ","type":"text"},{"type":"text","text":"This is achieved by not having a return type in the "},{"type":"codeVoice","code":"handle"},{"text":" function. The output is instead written into a","type":"text"},{"text":" ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","type":"reference","isActive":true},{"type":"text","text":"that is passed in as an argument, meaning that the"},{"type":"text","text":" "},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","type":"reference"},{"text":" function is then","type":"text"},{"type":"text","text":" "},{"type":"text","text":"free to implement any background work after the result has been sent to the AWS Lambda control plane."}],"taskGroups":[{"title":"Associated Types","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Event","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Output"]},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)"],"title":"Instance Methods"}],"kind":"org.swift.docc.kind.protocol","language":"swift","path":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler","title":"LambdaWithBackgroundProcessingHandler","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaWithBackgroundProcessingHandler"}],"usr":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP"},{"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/init(body:)","taskGroups":[],"abstract":[{"text":"Initialize an instance from a handler function in the form of a closure.","type":"text"}],"availableLanguages":["swift"],"path":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler\/init(body:)","language":"swift","kind":"org.swift.docc.kind.initializer","usr":"s:20AWSLambdaRuntimeCore23StreamingClosureHandlerV4bodyACy7NIOCore10ByteBufferV_AA26LambdaResponseStreamWriter_pAA0K7ContextVtYaYbKc_tcfc","fragments":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"body"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"ByteBuffer","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":", any "},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","kind":"typeIdentifier","text":"LambdaResponseStreamWriter"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"text":")","kind":"text"}],"title":"init(body:)"},{"availableLanguages":["swift"],"abstract":[{"type":"text","text":"Encode the generic type "},{"type":"codeVoice","code":"Output"},{"text":" the handler has returned into a ","type":"text"},{"type":"codeVoice","code":"ByteBuffer"},{"text":".","type":"text"}],"usr":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP6encode_4intoy0E0Qz_7NIOCore10ByteBufferVztKF","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/encode(_:into:)","title":"encode(_:into:)","path":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder\/encode(_:into:)","kind":"org.swift.docc.kind.instanceMethod","taskGroups":[],"language":"swift","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"encode"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"value","kind":"internalParam"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP0E0Qa","text":"Output","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"into"},{"text":" ","kind":"text"},{"text":"buffer","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"text":"ByteBuffer","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"}]},{"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","language":"swift","availableLanguages":["swift"],"path":"\/documentation\/awslambdaruntimecore\/closurehandler","abstract":[{"text":"A ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference","isActive":true},{"text":" conforming handler object that can be constructed with a closure.","type":"text"},{"text":" ","type":"text"},{"text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax.","type":"text"}],"title":"ClosureHandler","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"ClosureHandler","kind":"identifier"},{"text":"<","kind":"text"},{"text":"Event","kind":"genericParameter"},{"kind":"text","text":", "},{"text":"Output","kind":"genericParameter"},{"text":"> ","kind":"text"},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"text":"Event","kind":"typeIdentifier"},{"kind":"text","text":" : "},{"preciseIdentifier":"s:Se","text":"Decodable","kind":"typeIdentifier"}],"kind":"org.swift.docc.kind.structure","usr":"s:20AWSLambdaRuntimeCore14ClosureHandlerV","taskGroups":[{"title":"Initializers","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-5sz8r","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-9o0yg"]},{"title":"Instance Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/handle(_:context:)"]}]},{"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder","kind":"org.swift.docc.kind.structure","usr":"s:20AWSLambdaRuntimeCore11VoidEncoderV","title":"VoidEncoder","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"VoidEncoder","kind":"identifier"}],"path":"\/documentation\/awslambdaruntimecore\/voidencoder","language":"swift","availableLanguages":["swift"],"taskGroups":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/init()"],"title":"Initializers"},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/encode(_:into:)"],"title":"Instance Methods"},{"title":"Type Aliases","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/Output"]}]},{"language":"swift","path":"\/documentation\/awslambdaruntimecore\/lambdaeventdecoder\/decode(_:from:)","title":"decode(_:from:)","abstract":[{"type":"text","text":"Decode the "},{"type":"codeVoice","code":"ByteBuffer"},{"type":"text","text":" representing the received event into the generic "},{"type":"codeVoice","code":"Event"},{"text":" type","type":"text"},{"type":"text","text":" "},{"type":"text","text":"the handler will receive."}],"usr":"s:20AWSLambdaRuntimeCore18LambdaEventDecoderP6decode_4fromqd__qd__m_7NIOCore10ByteBufferVtKSeRd__lF","kind":"org.swift.docc.kind.instanceMethod","availableLanguages":["swift"],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"decode"},{"text":"<","kind":"text"},{"text":"Event","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"type","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"kind":"text","text":".Type, "},{"text":"from","kind":"externalParam"},{"kind":"text","text":" "},{"text":"buffer","kind":"internalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7NIOCore10ByteBufferV","text":"ByteBuffer","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":" "},{"text":"where","kind":"keyword"},{"kind":"text","text":" "},{"text":"Event","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:Se","text":"Decodable","kind":"typeIdentifier"}],"taskGroups":[],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaEventDecoder\/decode(_:from:)"},{"abstract":[{"type":"text","text":"Generic output type."},{"type":"text","text":" "},{"type":"text","text":"This is the return type of the "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","isActive":true},{"type":"text","text":" function."}],"taskGroups":[],"title":"Output","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"language":"swift","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","path":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","availableLanguages":["swift"],"usr":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa","kind":"org.swift.docc.kind.associatedType"},{"taskGroups":[],"title":"handle(_:context:)","path":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","kind":"org.swift.docc.kind.instanceMethod","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"availableLanguages":["swift"],"language":"swift","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"event"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"Event","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa","text":"Output"}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","usr":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6handle_7context6OutputQz5EventQz_AA0D7ContextVtYaKF"},{"kind":"org.swift.docc.kind.instanceMethod","path":"\/documentation\/awslambdaruntimecore\/streamingclosurehandler\/handle(_:responsewriter:context:)","availableLanguages":["swift"],"usr":"s:20AWSLambdaRuntimeCore23StreamingClosureHandlerV6handle_14responseWriter7contexty7NIOCore10ByteBufferV_xAA13LambdaContextVtYaKAA0n14ResponseStreamI0RzlF","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"handle","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"event"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"ByteBuffer","preciseIdentifier":"s:7NIOCore10ByteBufferV"},{"text":", ","kind":"text"},{"text":"responseWriter","kind":"externalParam"},{"kind":"text","text":": "},{"text":"some","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaResponseStreamWriter","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingClosureHandler\/handle(_:responseWriter:context:)","title":"handle(_:responseWriter:context:)","abstract":[{"text":"Calls the provided ","type":"text"},{"type":"codeVoice","code":"self.body"},{"text":" closure with the ","type":"text"},{"code":"ByteBuffer","type":"codeVoice"},{"text":" invocation event, the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter"},{"type":"text","text":", and the "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","isActive":true,"type":"reference"}],"taskGroups":[],"language":"swift"},{"availableLanguages":["swift"],"taskGroups":[],"language":"swift","kind":"org.swift.docc.kind.instanceProperty","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/logger","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"logger","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Logger","preciseIdentifier":"s:7Logging6LoggerV","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"abstract":[{"code":"Logger","type":"codeVoice"},{"text":" to log with.","type":"text"}],"title":"logger","usr":"s:20AWSLambdaRuntimeCore13LambdaContextV6logger7Logging6LoggerVvp","path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/logger"},{"fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"defaultEventLoop"},{"text":": any ","kind":"text"},{"text":"EventLoop","kind":"typeIdentifier","preciseIdentifier":"s:7NIOCore9EventLoopP"}],"kind":"org.swift.docc.kind.typeProperty","abstract":[{"type":"text","text":"The default EventLoop the Lambda is scheduled on."}],"usr":"s:20AWSLambdaRuntimeCore6LambdaO16defaultEventLoop7NIOCore0fG0_pvpZ","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/defaultEventLoop","title":"defaultEventLoop","availableLanguages":["swift"],"path":"\/documentation\/awslambdaruntimecore\/lambda\/defaulteventloop","taskGroups":[],"language":"swift"},{"taskGroups":[],"title":"cognitoIdentity","kind":"org.swift.docc.kind.instanceProperty","abstract":[{"text":"For invocations from the AWS Mobile SDK, data about the Amazon Cognito identity provider.","type":"text"}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/cognitoIdentity","path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/cognitoidentity","language":"swift","usr":"s:20AWSLambdaRuntimeCore13LambdaContextV15cognitoIdentitySSSgvp","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"cognitoIdentity","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"? { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"availableLanguages":["swift"]},{"fragments":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"handler"},{"kind":"text","text":": "},{"text":"Handler","kind":"typeIdentifier"},{"kind":"text","text":")"}],"taskGroups":[],"language":"swift","availableLanguages":["swift"],"usr":"s:20AWSLambdaRuntimeCore20LambdaHandlerAdapterV7handlerACyxq_q0_Gq0__tcfc","path":"\/documentation\/awslambdaruntimecore\/lambdahandleradapter\/init(handler:)","abstract":[{"text":"Initializes an instance given a concrete handler.","type":"text"}],"kind":"org.swift.docc.kind.initializer","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandlerAdapter\/init(handler:)","title":"init(handler:)"},{"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/getRemainingTime()","language":"swift","taskGroups":[],"availableLanguages":["swift"],"path":"\/documentation\/awslambdaruntimecore\/lambdacontext\/getremainingtime()","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"getRemainingTime"},{"kind":"text","text":"() -> "},{"text":"Duration","preciseIdentifier":"s:s8DurationV","kind":"typeIdentifier"}],"title":"getRemainingTime()","usr":"s:20AWSLambdaRuntimeCore13LambdaContextV16getRemainingTimes8DurationVyF","kind":"org.swift.docc.kind.instanceMethod"},{"taskGroups":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)"],"title":"Instance Methods"}],"usr":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","language":"swift","title":"LambdaResponseStreamWriter","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","abstract":[{"text":"A writer object to write the Lambda response stream into. The HTTP response is started lazily.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"before the first call to "},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/write(_:)","isActive":true},{"text":" or ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/writeAndFinish(_:)","isActive":true},{"type":"text","text":"."}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"LambdaResponseStreamWriter","kind":"identifier"}],"availableLanguages":["swift"],"path":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter","kind":"org.swift.docc.kind.protocol"},{"path":"\/documentation\/awslambdaruntimecore\/lambdaruntime","kind":"org.swift.docc.kind.class","usr":"s:20AWSLambdaRuntimeCore06LambdaB0C","title":"LambdaRuntime","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime","taskGroups":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(body:)","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(decoder:body:)","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(encoder:decoder:body:)","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/init(handler:eventLoop:logger:)"],"title":"Initializers"},{"title":"Instance Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaRuntime\/run()"]}],"fragments":[{"text":"final","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"LambdaRuntime","kind":"identifier"},{"text":"<","kind":"text"},{"text":"Handler","kind":"genericParameter"},{"text":"> ","kind":"text"},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"text":"StreamingLambdaHandler","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore22StreamingLambdaHandlerP"}],"language":"swift","availableLanguages":["swift"]},{"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/write(_:)","taskGroups":[],"language":"swift","availableLanguages":["swift"],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"write"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"output"},{"kind":"text","text":": "},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"}],"path":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter\/write(_:)","kind":"org.swift.docc.kind.instanceMethod","usr":"s:20AWSLambdaRuntimeCore27LambdaCodableResponseWriterV5writeyyxYaKF","title":"write(_:)"},{"language":"swift","abstract":[{"type":"text","text":"End the response stream and the underlying HTTP response."}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter\/finish()","path":"\/documentation\/awslambdaruntimecore\/lambdaresponsestreamwriter\/finish()","kind":"org.swift.docc.kind.instanceMethod","availableLanguages":["swift"],"usr":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP6finishyyYaKF","taskGroups":[],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"finish"},{"text":"() ","kind":"text"},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"title":"finish()"},{"availableLanguages":["swift"],"title":"LambdaOutputEncoder","path":"\/documentation\/awslambdaruntimecore\/lambdaoutputencoder","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder","kind":"org.swift.docc.kind.protocol","usr":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP","language":"swift","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LambdaOutputEncoder"}],"taskGroups":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output"],"title":"Associated Types"},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/encode(_:into:)"],"title":"Instance Methods"}],"abstract":[{"type":"text","text":"The protocol an encoder must conform to so that it can be used with "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter"},{"text":" to encode the generic","type":"text"},{"text":" ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaOutputEncoder\/Output"},{"type":"text","text":" object into a "},{"code":"ByteBuffer","type":"codeVoice"},{"type":"text","text":"."}]},{"path":"\/documentation\/awslambdaruntimecore\/lambda\/env(_:)","kind":"org.swift.docc.kind.typeMethod","usr":"s:20AWSLambdaRuntimeCore6LambdaO3envySSSgSSFZ","title":"env(_:)","language":"swift","abstract":[{"type":"text","text":"Utility to access\/read environment variables"}],"taskGroups":[],"availableLanguages":["swift"],"fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"env"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"name"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"?","kind":"text"}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/Lambda\/env(_:)"},{"fragments":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"text":"body","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"text":", ","kind":"text"},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":") "},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":" : "},{"preciseIdentifier":"s:SE","text":"Encodable","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Initialize with a closure handler over generic "},{"type":"codeVoice","code":"Input"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"Output"},{"type":"text","text":" types."}],"title":"init(body:)","language":"swift","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-5sz8r","availableLanguages":["swift"],"usr":"s:20AWSLambdaRuntimeCore14ClosureHandlerV4bodyACyxq_Gq_x_AA13LambdaContextVtYaKc_tcSER_rlufc","kind":"org.swift.docc.kind.initializer","taskGroups":[],"path":"\/documentation\/awslambdaruntimecore\/closurehandler\/init(body:)-5sz8r"},{"title":"Event","availableLanguages":["swift"],"usr":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Event"},{"kind":"text","text":" : "},{"text":"Decodable","kind":"typeIdentifier","preciseIdentifier":"s:Se"}],"language":"swift","path":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/event","kind":"org.swift.docc.kind.associatedType","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/Event","abstract":[{"type":"text","text":"Generic input type."},{"type":"text","text":" "},{"text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume.","type":"text"}],"taskGroups":[]},{"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler\/handle(_:outputWriter:context:)","taskGroups":[],"usr":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6handle_12outputWriter7contexty5EventQz_qd__AA0D7ContextVtYaKAA0d8ResponseK0Rd__6OutputQyd__ALRtzlF","availableLanguages":["swift"],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"handle"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"event","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa","text":"Event"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"outputWriter"},{"kind":"text","text":": "},{"kind":"keyword","text":"some"},{"kind":"text","text":" "},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP","text":"LambdaResponseWriter","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","kind":"typeIdentifier","text":"Output"},{"text":">, ","kind":"text"},{"text":"context","kind":"externalParam"},{"kind":"text","text":": "},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"}],"kind":"org.swift.docc.kind.instanceMethod","path":"\/documentation\/awslambdaruntimecore\/lambdawithbackgroundprocessinghandler\/handle(_:outputwriter:context:)","title":"handle(_:outputWriter:context:)","language":"swift","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}]},{"abstract":[{"type":"text","text":"Learn how to create your first project in 3 minutes."}],"language":"swift","taskGroups":[],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/quick-setup","path":"\/documentation\/awslambdaruntimecore\/quick-setup","availableLanguages":["swift"],"kind":"org.swift.docc.kind.article","title":"Getting Started Quickly"},{"kind":"org.swift.docc.kind.tutorialarticle","language":"swift","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/01-overview","path":"\/tutorials\/awslambdaruntimecore\/01-overview","title":"Overview","taskGroups":[{"identifiers":[]}],"availableLanguages":["swift"]},{"kind":"org.swift.docc.kind.initializer","availableLanguages":["swift"],"usr":"s:20AWSLambdaRuntimeCore11VoidEncoderVACycfc","taskGroups":[],"fragments":[{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"title":"init()","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/VoidEncoder\/init()","language":"swift","path":"\/documentation\/awslambdaruntimecore\/voidencoder\/init()"},{"abstract":[{"text":"A ","type":"text"},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseStreamWriter","type":"reference"},{"text":" wrapper that conforms to ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter","isActive":true},{"type":"text","text":"."}],"taskGroups":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/init(encoder:streamWriter:)"],"title":"Initializers"},{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter\/write(_:)"],"title":"Instance Methods"}],"usr":"s:20AWSLambdaRuntimeCore27LambdaCodableResponseWriterV","path":"\/documentation\/awslambdaruntimecore\/lambdacodableresponsewriter","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableResponseWriter","kind":"org.swift.docc.kind.structure","title":"LambdaCodableResponseWriter","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaCodableResponseWriter","kind":"identifier"},{"text":"<","kind":"text"},{"text":"Output","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"Encoder"},{"text":", ","kind":"text"},{"text":"Base","kind":"genericParameter"},{"text":"> ","kind":"text"},{"kind":"keyword","text":"where"},{"text":" ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"text":" == ","kind":"text"},{"text":"Encoder","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP0E0Qa","text":"Output"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Encoder"},{"text":" : ","kind":"text"},{"text":"LambdaOutputEncoder","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Base"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore26LambdaResponseStreamWriterP","kind":"typeIdentifier","text":"LambdaResponseStreamWriter"}],"language":"swift","availableLanguages":["swift"]},{"abstract":[{"type":"text","text":"Adapts a "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaWithBackgroundProcessingHandler"},{"text":" conforming handler to conform to ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/StreamingLambdaHandler"},{"type":"text","text":"."}],"language":"swift","kind":"org.swift.docc.kind.structure","availableLanguages":["swift"],"usr":"s:20AWSLambdaRuntimeCore20LambdaCodableAdapterV","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaCodableAdapter"},{"text":"<","kind":"text"},{"text":"Handler","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"Event"},{"text":", ","kind":"text"},{"text":"Output","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"Decoder"},{"text":", ","kind":"text"},{"text":"Encoder","kind":"genericParameter"},{"kind":"text","text":"> "},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"Handler"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP","text":"LambdaWithBackgroundProcessingHandler","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Event","kind":"typeIdentifier"},{"text":" == ","kind":"text"},{"text":"Handler","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Event","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP5EventQa"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Output"},{"kind":"text","text":" == "},{"kind":"typeIdentifier","text":"Handler"},{"kind":"text","text":"."},{"text":"Output","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa"},{"text":", ","kind":"text"},{"text":"Decoder","kind":"typeIdentifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore18LambdaEventDecoderP","text":"LambdaEventDecoder"},{"text":", ","kind":"text"},{"text":"Encoder","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP","text":"LambdaOutputEncoder"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Handler"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore37LambdaWithBackgroundProcessingHandlerP6OutputQa","text":"Output"},{"text":" == ","kind":"text"},{"text":"Encoder","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore19LambdaOutputEncoderP0E0Qa","kind":"typeIdentifier","text":"Output"}],"taskGroups":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(decoder:handler:)","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/init(encoder:decoder:handler:)"],"title":"Initializers"},{"title":"Instance Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter\/handle(_:responseWriter:context:)"]}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaCodableAdapter","title":"LambdaCodableAdapter","path":"\/documentation\/awslambdaruntimecore\/lambdacodableadapter"},{"availableLanguages":["swift"],"language":"swift","kind":"org.swift.docc.kind.tutorial","abstract":[{"type":"text","text":"Learn how to package your code for AWS Lambda and to deploy it using the AWS Management Console"}],"title":"Deploy your function to AWS Lambda","path":"\/tutorials\/awslambdaruntimecore\/04-deploy-function","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function","taskGroups":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Compile-for-Amazon-Linux","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Create-an-Lambda-Function","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Invoke-your-Lambda-function"]}]},{"availableLanguages":["swift"],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Compile-for-Amazon-Linux","taskGroups":[],"language":"swift","title":"Compile for Amazon Linux","path":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Compile-for-Amazon-Linux","abstract":[{"type":"text","text":"Learn how to compile your code to run it on Amazon Linux."}],"kind":"org.swift.docc.kind.landmark"},{"path":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Create-an-Lambda-Function","language":"swift","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Create-an-Lambda-Function","availableLanguages":["swift"],"kind":"org.swift.docc.kind.landmark","title":"Create an Lambda Function","taskGroups":[],"abstract":[{"type":"text","text":"Learn how to create a Lambda function using the AWS Management Console and to deploy your zip file"}]},{"kind":"org.swift.docc.kind.landmark","availableLanguages":["swift"],"path":"\/tutorials\/awslambdaruntimecore\/04-deploy-function#Invoke-your-Lambda-function","abstract":[{"type":"text","text":"Learn how to invoke the Lambda function using the AWS Lambda API and the AWS command line."}],"taskGroups":[],"title":"Invoke your Lambda function","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/04-deploy-function#Invoke-your-Lambda-function","language":"swift"},{"path":"\/tutorials\/awslambdaruntimecore\/03-write-function","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function","kind":"org.swift.docc.kind.tutorial","availableLanguages":["swift"],"title":"Write your first Lambda function","language":"swift","abstract":[{"type":"text","text":"Learn how to create your project, add dependencies, and create and test your first Lambda function in Swift."}],"taskGroups":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Initialize-a-new-project","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Add-the-project-dependencies","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Write-the-function-code","doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Test-Your-Code-Locally"]}]},{"availableLanguages":["swift"],"language":"swift","kind":"org.swift.docc.kind.landmark","abstract":[{"text":"Create a new swift project and open Xcode.","type":"text"}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Initialize-a-new-project","taskGroups":[],"path":"\/tutorials\/awslambdaruntimecore\/03-write-function#Initialize-a-new-project","title":"Initialize a new project"},{"abstract":[{"text":"Prepare ","type":"text"},{"type":"codeVoice","code":"Package.swift"},{"type":"text","text":" to define the project targets and dependencies."}],"taskGroups":[],"language":"swift","kind":"org.swift.docc.kind.landmark","path":"\/tutorials\/awslambdaruntimecore\/03-write-function#Add-the-project-dependencies","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Add-the-project-dependencies","availableLanguages":["swift"],"title":"Add the project dependencies"},{"availableLanguages":["swift"],"path":"\/tutorials\/awslambdaruntimecore\/03-write-function#Write-the-function-code","kind":"org.swift.docc.kind.landmark","abstract":[{"type":"text","text":"Now that our project structure is ready, let’s write the code of your Lambda function. Perform the following steps in Xcode or another IDE of your choice."}],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Write-the-function-code","taskGroups":[],"title":"Write the function code","language":"swift"},{"abstract":[{"type":"text","text":"Before to deploy your Lambda to AWS, you want to ensure that it works on your local machine."}],"taskGroups":[],"language":"swift","kind":"org.swift.docc.kind.landmark","path":"\/tutorials\/awslambdaruntimecore\/03-write-function#Test-Your-Code-Locally","title":"Test Your Code Locally","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/tutorials\/AWSLambdaRuntimeCore\/03-write-function#Test-Your-Code-Locally","availableLanguages":["swift"]},{"usr":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP5writeyy6OutputQzYaKF","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"write","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"output"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore20LambdaResponseWriterP6OutputQa","text":"Output","kind":"typeIdentifier"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"}],"language":"swift","referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/write(_:)","kind":"org.swift.docc.kind.instanceMethod","taskGroups":[],"title":"write(_:)","path":"\/documentation\/awslambdaruntimecore\/lambdaresponsewriter\/write(_:)","availableLanguages":["swift"],"abstract":[{"text":"Sends the generic ","type":"text"},{"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaResponseWriter\/Output","isActive":true},{"type":"text","text":" object (representing the computed result of the handler)"},{"text":" ","type":"text"},{"text":"to the AWS Lambda response endpoint.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"This function simply serves as a mechanism to return the computed result from a handler function"},{"text":" ","type":"text"},{"type":"text","text":"without an explicit "},{"code":"return","type":"codeVoice"},{"text":".","type":"text"}]},{"path":"\/documentation\/awslambdaruntimecore\/lambdacontext","kind":"org.swift.docc.kind.structure","usr":"s:20AWSLambdaRuntimeCore13LambdaContextV","title":"LambdaContext","taskGroups":[{"identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/clientContext","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/cognitoIdentity","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/deadline","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/debugDescription","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/invokedFunctionARN","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/logger","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/requestID","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/traceID"],"title":"Instance Properties"},{"title":"Instance Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext\/getRemainingTime()"]}],"language":"swift","abstract":[{"text":"Lambda runtime context.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"The Lambda runtime generates and passes the "},{"code":"LambdaContext","type":"codeVoice"},{"text":" to the Lambda handler as an argument.","type":"text"}],"availableLanguages":["swift"],"referenceURL":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LambdaContext"}]}] \ No newline at end of file diff --git a/docs/metadata.json b/docs/metadata.json new file mode 100644 index 00000000..43b26dd8 --- /dev/null +++ b/docs/metadata.json @@ -0,0 +1 @@ +{"bundleID":"AWSLambdaRuntimeCore","schemaVersion":{"minor":1,"major":0,"patch":0},"bundleDisplayName":"AWSLambdaRuntimeCore"} \ No newline at end of file diff --git a/docs/tutorials/awslambdaruntimecore/01-overview/index.html b/docs/tutorials/awslambdaruntimecore/01-overview/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/tutorials/awslambdaruntimecore/01-overview/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/tutorials/awslambdaruntimecore/02-what-is-lambda/index.html b/docs/tutorials/awslambdaruntimecore/02-what-is-lambda/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/tutorials/awslambdaruntimecore/02-what-is-lambda/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/tutorials/awslambdaruntimecore/03-prerequisites/index.html b/docs/tutorials/awslambdaruntimecore/03-prerequisites/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/tutorials/awslambdaruntimecore/03-prerequisites/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/tutorials/awslambdaruntimecore/03-write-function/index.html b/docs/tutorials/awslambdaruntimecore/03-write-function/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/tutorials/awslambdaruntimecore/03-write-function/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/tutorials/awslambdaruntimecore/04-deploy-function/index.html b/docs/tutorials/awslambdaruntimecore/04-deploy-function/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/tutorials/awslambdaruntimecore/04-deploy-function/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/tutorials/table-of-content/index.html b/docs/tutorials/table-of-content/index.html new file mode 100644 index 00000000..f5a26503 --- /dev/null +++ b/docs/tutorials/table-of-content/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file