From 14d8efedd11c8fe5fb9dd0c5ad6a777f66e40c44 Mon Sep 17 00:00:00 2001 From: aws Date: Mon, 20 Jan 2020 17:13:06 +0000 Subject: [PATCH] Release of Version 1.6.0 --- aws-greengrass-core-sdk/index.js | 36 +- aws-greengrass-core-sdk/iotdata.js | 129 +- aws-greengrass-core-sdk/lambda.js | 87 +- aws-greengrass-core-sdk/package.json | 17 + aws-greengrass-core-sdk/secretsmanager.js | 65 +- .../stream-manager/client.js | 520 ++ .../stream-manager/data/index.js | 6194 ++++++++++++++++ .../stream-manager/exceptions.js | 43 + .../stream-manager/index.js | 9 + .../stream-manager/util.js | 188 + docs/AWS/IotData.html | 688 -- docs/AWS/Lambda.html | 441 -- docs/AWS/SecretsManager.html | 291 - docs/aws-greengrass-core-sdk.IotData.html | 1145 +++ docs/aws-greengrass-core-sdk.Lambda.html | 585 ++ ...ws-greengrass-core-sdk.SecretsManager.html | 435 ++ ...dk.StreamManager.AppendMessageRequest.html | 1095 +++ ...k.StreamManager.AppendMessageResponse.html | 1391 ++++ ...core-sdk.StreamManager.ConnectRequest.html | 1391 ++++ ...ore-sdk.StreamManager.ConnectResponse.html | 2279 ++++++ ...eamManager.CreateMessageStreamRequest.html | 799 +++ ...amManager.CreateMessageStreamResponse.html | 1095 +++ ...eamManager.DeleteMessageStreamRequest.html | 799 +++ ...amManager.DeleteMessageStreamResponse.html | 1095 +++ ...mManager.DescribeMessageStreamRequest.html | 799 +++ ...Manager.DescribeMessageStreamResponse.html | 1391 ++++ ...re-sdk.StreamManager.ExportDefinition.html | 1107 +++ ...ass-core-sdk.StreamManager.HTTPConfig.html | 1724 +++++ ...-sdk.StreamManager.IoTAnalyticsConfig.html | 2025 ++++++ ...-core-sdk.StreamManager.KinesisConfig.html | 1722 +++++ ...-sdk.StreamManager.ListStreamsRequest.html | 503 ++ ...sdk.StreamManager.ListStreamsResponse.html | 1391 ++++ ...ngrass-core-sdk.StreamManager.Message.html | 1407 ++++ ...s-core-sdk.StreamManager.MessageFrame.html | 799 +++ ...StreamManager.MessageStreamDefinition.html | 2628 +++++++ ...nfo-MessageStreamInfo._exportStatuses.html | 310 + ...Info-MessageStreamInfo._storageStatus.html | 281 + ...e-sdk.StreamManager.MessageStreamInfo.html | 2996 ++++++++ ...rass-core-sdk.StreamManager.Operation.html | 1195 ++++ ...ss-core-sdk.StreamManager.Persistence.html | 312 + ...sdk.StreamManager.ReadMessagesOptions.html | 1422 ++++ ...sdk.StreamManager.ReadMessagesRequest.html | 1095 +++ ...dk.StreamManager.ReadMessagesResponse.html | 1391 ++++ ...-sdk.StreamManager.ResponseStatusCode.html | 1279 ++++ ...core-sdk.StreamManager.StrategyOnFull.html | 314 + ...sdk.StreamManager.StreamManagerClient.html | 1783 +++++ ...aws-greengrass-core-sdk.StreamManager.html | 219 + docs/aws-greengrass-core-sdk.html | 150 + docs/class_list.html | 98 - docs/css/common.css | 6 - docs/css/full_list.css | 58 - docs/css/highlight.github.css | 127 - docs/css/style.css | 484 -- docs/fonts/OpenSans-Bold-webfont.eot | Bin 0 -> 19544 bytes docs/fonts/OpenSans-Bold-webfont.svg | 1830 +++++ docs/fonts/OpenSans-Bold-webfont.woff | Bin 0 -> 22432 bytes docs/fonts/OpenSans-BoldItalic-webfont.eot | Bin 0 -> 20133 bytes docs/fonts/OpenSans-BoldItalic-webfont.svg | 1830 +++++ docs/fonts/OpenSans-BoldItalic-webfont.woff | Bin 0 -> 23048 bytes docs/fonts/OpenSans-Italic-webfont.eot | Bin 0 -> 20265 bytes docs/fonts/OpenSans-Italic-webfont.svg | 1830 +++++ docs/fonts/OpenSans-Italic-webfont.woff | Bin 0 -> 23188 bytes docs/fonts/OpenSans-Light-webfont.eot | Bin 0 -> 19514 bytes docs/fonts/OpenSans-Light-webfont.svg | 1831 +++++ docs/fonts/OpenSans-Light-webfont.woff | Bin 0 -> 22248 bytes docs/fonts/OpenSans-LightItalic-webfont.eot | Bin 0 -> 20535 bytes docs/fonts/OpenSans-LightItalic-webfont.svg | 1835 +++++ docs/fonts/OpenSans-LightItalic-webfont.woff | Bin 0 -> 23400 bytes docs/fonts/OpenSans-Regular-webfont.eot | Bin 0 -> 19836 bytes docs/fonts/OpenSans-Regular-webfont.svg | 1831 +++++ docs/fonts/OpenSans-Regular-webfont.woff | Bin 0 -> 22660 bytes docs/global.html | 1117 +++ docs/index.html | 459 +- docs/index.js.html | 84 + docs/iotdata.js.html | 283 + docs/js/app.js | 243 - docs/js/full_list.js | 216 - docs/js/highlight.pack.js | 1 - docs/js/jquery.js | 4 - docs/lambda.js.html | 242 + docs/scripts/linenumber.js | 25 + docs/scripts/prettify/Apache-License-2.0.txt | 202 + docs/scripts/prettify/lang-css.js | 2 + docs/scripts/prettify/prettify.js | 28 + docs/secretsmanager.js.html | 193 + docs/stream-manager_client.js.html | 571 ++ docs/stream-manager_data_index.js.html | 6244 +++++++++++++++++ docs/stream-manager_index.js.html | 60 + docs/styles/jsdoc-default.css | 358 + docs/styles/prettify-jsdoc.css | 111 + docs/styles/prettify-tomorrow.css | 132 + .../StreamManagerKinesis/index.js | 85 + README.md => readme.md | 66 +- 93 files changed, 68556 insertions(+), 2990 deletions(-) create mode 100644 aws-greengrass-core-sdk/package.json create mode 100644 aws-greengrass-core-sdk/stream-manager/client.js create mode 100644 aws-greengrass-core-sdk/stream-manager/data/index.js create mode 100644 aws-greengrass-core-sdk/stream-manager/exceptions.js create mode 100644 aws-greengrass-core-sdk/stream-manager/index.js create mode 100644 aws-greengrass-core-sdk/stream-manager/util.js delete mode 100644 docs/AWS/IotData.html delete mode 100644 docs/AWS/Lambda.html delete mode 100644 docs/AWS/SecretsManager.html create mode 100644 docs/aws-greengrass-core-sdk.IotData.html create mode 100644 docs/aws-greengrass-core-sdk.Lambda.html create mode 100644 docs/aws-greengrass-core-sdk.SecretsManager.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.AppendMessageRequest.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.AppendMessageResponse.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.ConnectRequest.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.ConnectResponse.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.CreateMessageStreamRequest.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamRequest.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamRequest.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.ExportDefinition.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.HTTPConfig.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.KinesisConfig.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.ListStreamsRequest.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.ListStreamsResponse.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.Message.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.MessageFrame.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.MessageStreamInfo-MessageStreamInfo._exportStatuses.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.MessageStreamInfo-MessageStreamInfo._storageStatus.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.MessageStreamInfo.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.Operation.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.Persistence.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.ResponseStatusCode.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.StrategyOnFull.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.StreamManagerClient.html create mode 100644 docs/aws-greengrass-core-sdk.StreamManager.html create mode 100644 docs/aws-greengrass-core-sdk.html delete mode 100644 docs/class_list.html delete mode 100644 docs/css/common.css delete mode 100644 docs/css/full_list.css delete mode 100644 docs/css/highlight.github.css delete mode 100644 docs/css/style.css create mode 100644 docs/fonts/OpenSans-Bold-webfont.eot create mode 100644 docs/fonts/OpenSans-Bold-webfont.svg create mode 100644 docs/fonts/OpenSans-Bold-webfont.woff create mode 100644 docs/fonts/OpenSans-BoldItalic-webfont.eot create mode 100644 docs/fonts/OpenSans-BoldItalic-webfont.svg create mode 100644 docs/fonts/OpenSans-BoldItalic-webfont.woff create mode 100644 docs/fonts/OpenSans-Italic-webfont.eot create mode 100644 docs/fonts/OpenSans-Italic-webfont.svg create mode 100644 docs/fonts/OpenSans-Italic-webfont.woff create mode 100644 docs/fonts/OpenSans-Light-webfont.eot create mode 100644 docs/fonts/OpenSans-Light-webfont.svg create mode 100644 docs/fonts/OpenSans-Light-webfont.woff create mode 100644 docs/fonts/OpenSans-LightItalic-webfont.eot create mode 100644 docs/fonts/OpenSans-LightItalic-webfont.svg create mode 100644 docs/fonts/OpenSans-LightItalic-webfont.woff create mode 100644 docs/fonts/OpenSans-Regular-webfont.eot create mode 100644 docs/fonts/OpenSans-Regular-webfont.svg create mode 100644 docs/fonts/OpenSans-Regular-webfont.woff create mode 100644 docs/global.html create mode 100644 docs/index.js.html create mode 100644 docs/iotdata.js.html delete mode 100644 docs/js/app.js delete mode 100644 docs/js/full_list.js delete mode 100644 docs/js/highlight.pack.js delete mode 100644 docs/js/jquery.js create mode 100644 docs/lambda.js.html create mode 100644 docs/scripts/linenumber.js create mode 100644 docs/scripts/prettify/Apache-License-2.0.txt create mode 100644 docs/scripts/prettify/lang-css.js create mode 100644 docs/scripts/prettify/prettify.js create mode 100644 docs/secretsmanager.js.html create mode 100644 docs/stream-manager_client.js.html create mode 100644 docs/stream-manager_data_index.js.html create mode 100644 docs/stream-manager_index.js.html create mode 100644 docs/styles/jsdoc-default.css create mode 100644 docs/styles/prettify-jsdoc.css create mode 100644 docs/styles/prettify-tomorrow.css create mode 100644 greengrassExamples/StreamManagerKinesis/index.js rename README.md => readme.md (74%) diff --git a/aws-greengrass-core-sdk/index.js b/aws-greengrass-core-sdk/index.js index 9bdb902..3b81684 100644 --- a/aws-greengrass-core-sdk/index.js +++ b/aws-greengrass-core-sdk/index.js @@ -1,7 +1,33 @@ /* - * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ -exports.GreengrassInterfaceVersion = '1.4'; -exports.Lambda = require('./lambda'); -exports.IotData = require('./iotdata'); -exports.SecretsManager = require('./secretsmanager'); +exports.GreengrassInterfaceVersion = '1.5'; + +/** + * @namespace aws-greengrass-core-sdk + */ + +const fail = (name, error) => { + console.error(`Unable to load aws-greengrass-core-sdk.${name} due to: `, error); +}; + +try { + exports.Lambda = require('./lambda'); +} catch (e) { + fail('Lambda', e); +} +try { + exports.IotData = require('./iotdata'); +} catch (e) { + fail('IotData', e); +} +try { + exports.SecretsManager = require('./secretsmanager'); +} catch (e) { + fail('SecretsManager', e); +} +try { + exports.StreamManager = require('./stream-manager'); +} catch (e) { + fail('StreamManager', e); +} diff --git a/aws-greengrass-core-sdk/iotdata.js b/aws-greengrass-core-sdk/iotdata.js index 753b3a2..412d201 100644 --- a/aws-greengrass-core-sdk/iotdata.js +++ b/aws-greengrass-core-sdk/iotdata.js @@ -2,28 +2,66 @@ * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ -const Buffer = require('buffer').Buffer; +const { Buffer } = require('buffer'); +const GreengrassCommon = require('aws-greengrass-common-js'); const Lambda = require('./lambda'); const Util = require('./util'); -const GreengrassCommon = require('aws-greengrass-common-js'); - -const envVars = GreengrassCommon.envVars; -const MY_FUNCTION_ARN = envVars.MY_FUNCTION_ARN; -const SHADOW_FUNCTION_ARN = envVars.SHADOW_FUNCTION_ARN; -const ROUTER_FUNCTION_ARN = envVars.ROUTER_FUNCTION_ARN; +const { envVars } = GreengrassCommon; +const { MY_FUNCTION_ARN } = envVars; +const { SHADOW_FUNCTION_ARN } = envVars; +const { ROUTER_FUNCTION_ARN } = envVars; + +/** + * Constructs a service interface object. Each API operation is exposed as a function on service. + * + * @class + * @memberOf aws-greengrass-core-sdk + * + * @example Sending a Request Using IotData + * var iotdata = new GG.IotData(); + * iotdata.getThingShadow(params, function (err, data) { + * if (err) console.log(err, err.stack); // an error occurred + * else console.log(data); // successful response + * }); + */ class IotData { + /** + * Constructs a service object. This object has one method for each API operation. + * + * @example Constructing a IotData object + * var iotdata = new GG.IotData(); + */ constructor() { this.lambda = new Lambda(); } + /** + * Called when a response from the service is returned. + * + * @callback iotDataCallback + * @param err {Error} The error object returned from the request. Set to null if the request is successful. + * @param data {Object} The de-serialized data returned from the request. Set to null if a request error occurs. + * @param data.payload {Buffer|TypedArray|Blob|String} The state information in JSON format + */ + /** + * Gets the thing shadow for the specified thing. + * + * @param params {Object} + * @param params.thingName {String} The name of the thing. + * @param callback {iotDataCallback} The callback. + * + * @example Calling the getThingShadow operation + * var params = { + * thingName: 'STRING_VALUE' // required + * }; + * iotdata.getThingShadow(params, function(err, data) { + * if (err) console.log(err, err.stack); // an error occurred + * else console.log(data); // successful response + * }); + */ getThingShadow(params, callback) { - /* - * Call shadow lambda to obtain current shadow state. - * @param {object} params object contains parameters for the call - * REQUIRED: 'thingName' the name of the thing - */ const thingName = Util.getParameter(params, 'thingName'); if (thingName === undefined) { callback(new Error('"thingName" is a required parameter.'), null); @@ -34,13 +72,25 @@ class IotData { this._shadowOperation('get', thingName, payload, callback); } + /** + * Updates the thing shadow for the specified thing. + * + * @param params {Object} + * @param params.thingName {String} The name of the thing. + * @param params.payload {String} The state information as a JSON string. + * @param callback {iotDataCallback} The callback. + * + * @example Calling the updateThingShadow operation + * var params = { + * payload: 'Proper JSON data', // required + * thingName: 'STRING_VALUE' // required + * }; + * iotdata.updateThingShadow(params, function(err, data) { + * if (err) console.log(err, err.stack); // an error occurred + * else console.log(data); // successful response + * }); + */ updateThingShadow(params, callback) { - /* - * Call shadow lambda to update current shadow state. - * @param {object} params object contains parameters for the call - * REQUIRED: 'thingName' the name of the thing - * 'payload' the state information in JSON format - */ const thingName = Util.getParameter(params, 'thingName'); if (thingName === undefined) { callback(new Error('"thingName" is a required parameter.'), null); @@ -56,12 +106,14 @@ class IotData { this._shadowOperation('update', thingName, payload, callback); } + /** + * Call shadow lambda to delete the shadow state. + * + * @param params {Object} + * @param params.thingName {String} The name of the thing whose shadow should be deleted. + * @param callback {iotDataCallback} The callback. + */ deleteThingShadow(params, callback) { - /* - * Call shadow lambda to delete the shadow state. - * @param {object} params object contains parameters for the call - * REQUIRED: 'thingName' the name of the thing - */ const thingName = Util.getParameter(params, 'thingName'); if (thingName === undefined) { callback(new Error('"thingName" is a required parameter.'), null); @@ -72,14 +124,27 @@ class IotData { this._shadowOperation('delete', thingName, payload, callback); } + /** + * Publishes a message within Greengrass. + * + * @param params {Object} + * @param params.topic {String} The name of the MQTT topic. + * @param params.payload {Buffer|TypedArray|Blob|String} The payload to be sent. + * @param params.queueFullPolicy {'AllOrError'|'BestEffort'} Specify whether to enforce message delivery to all destinations. Options are 'AllOrError' and 'BestEffort'. Defaults to 'BestEffort' when omitted. + * @param callback {iotDataCallback} The callback. + * + * @example Calling the publish operation + * var params = { + * topic: 'STRING_VALUE', // required + * payload: new Buffer('...') || 'STRING_VALUE', + * queueFullPolicy: 'AllOrError' || 'BestEffort' + * }; + * iotdata.publish(params, function(err, data) { + * if (err) console.log(err, err.stack); // an error occurred + * else console.log(data); // successful response + * }); + */ publish(params, callback) { - /* - * Publishes state information. - * @param {object} params object contains parameters for the call - * REQUIRED: 'topic' the topic name to be published - * 'payload' the state information in JSON format - * OPTIONAL: 'queueFullPolicy' the policy for GGC to take when its internal queue is full - */ const topic = Util.getParameter(params, 'topic'); if (topic === undefined) { callback(new Error('"topic" is a required parameter'), null); @@ -131,9 +196,9 @@ class IotData { this.lambda.invoke(invokeParams, (err, data) => { if (err) { - callback(err, null); // an error occurred + callback(err, null); // an error occurred } else { - callback(null, data); // successful response + callback(null, data); // successful response } }); } diff --git a/aws-greengrass-core-sdk/lambda.js b/aws-greengrass-core-sdk/lambda.js index 4eed968..dda7ec7 100644 --- a/aws-greengrass-core-sdk/lambda.js +++ b/aws-greengrass-core-sdk/lambda.js @@ -2,20 +2,94 @@ * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ -const Util = require('./util'); const IPCClient = require('aws-greengrass-ipc-sdk-js'); const GreengrassCommon = require('aws-greengrass-common-js'); -const logging = require('aws-greengrass-common-js').logging; +const { logging } = require('aws-greengrass-common-js'); +const Util = require('./util'); -const AUTH_TOKEN = GreengrassCommon.envVars.AUTH_TOKEN; +const { AUTH_TOKEN } = GreengrassCommon.envVars; const logger = new logging.LocalWatchLogger(); +/** + * Constructs a service interface object. Each API operation is exposed as a function on service. + * @class + * @memberOf aws-greengrass-core-sdk + */ class Lambda { + /** + * Constructs a service object. This object has one method for each API operation. + * + * @example Constructing a Lambda object + * var lambda = new GG.Lambda(); + */ constructor() { this.ipc = new IPCClient(AUTH_TOKEN); } + /** + * Called when a response from the service is returned. + * + * @callback lambdaCallback + * @param err {Error} The error object returned from the request. Set to null if the request is successful. + * @param data {Object} The de-serialized data returned from the request. Set to null if a request error occurs. + * @param data.StatusCode {Integer} The HTTP status code will be in the 200 range for successful request. For the RequestResponse invocation type this status code will be 200. + * For the Event invocation type this status code will be 202. + * @param data.FunctionError {String} Indicates whether an error occurred while executing the Lambda function. If an error occurred this field will have one of two values; Handled or Unhandled. + * Handled errors are errors that are reported by the function while the Unhandled errors are those detected and reported by AWS Lambda. + * Unhandled errors include out of memory errors and function timeouts. For information about how to report an Handled error, + * see Programming Model. + * @param data.Payload {Buffer|TypedArray|Blob|String} It is the result returned by the Lambda function. This is present only if the invocation type is RequestResponse. + *
In the event of a function error this field contains a message describing the error. For the Handled errors the Lambda function will report this message. For Unhandled errors AWS Lambda reports the message. + */ + + /** + * Invokes a specific Lambda function.
+ * In Greengrass, version of the Lambda which you would like to invoke needs to be provided. + * + * @param params {Object} + * @param params.FunctionName {String} The Lambda function name. You can specify Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). + * @param params.InvocationType {String?} By default, the Invoke API assumes RequestResponse invocation type. + * You can optionally request asynchronous execution by specifying Event as the InvocationType. Possible values include: + * + * @param params.ClientContext {String?} Using the ClientContext you can pass client-specific information to the Lambda function you are invoking. + * You can then process the client information in your Lambda function as you choose through the context variable. + * For an example of a ClientContext JSON, see the main page or an example folder for an example. + *
The ClientContext JSON must be base64-encoded. + * @param params.Payload {Buffer|TypedArray|Blob|String} Payload that you want to provide to your Lambda function as input. + * @param params.Qualifier {String?} You can use this optional parameter to specify a Lambda function version if it was not included in the FunctionName field. + * If you specify a function version, the API uses the qualified function ARN to invoke a specific Lambda function. + *
If you don't provide this parameter, then the API uses the FunctionName field only. If it does not have a version number of the target lambda, the call will fail. + * @param callback {lambdaCallback} The callback. + * + * @example To invoke a Lambda function + * //This operation invokes a Lambda function + * + * var params = { + * ClientContext: "MyApp", + * FunctionName: "MyFunction", + * InvocationType: "Event", + * Payload: , + * Qualifier: "1" + * }; + * lambda.invoke(params, function(err, data) { + * if (err) console.log(err, err.stack); // an error occurred + * else console.log(data); // successful response + * }); + * + * @example Calling the invoke operation + * var params = { + * FunctionName: 'STRING_VALUE', // required + * ClientContext: 'STRING_VALUE', + * InvocationType: Event | RequestResponse, + * Payload: , + * Qualifier: 'STRING_VALUE' + * }; + * lambda.invoke(params, function(err, data) { + * if (err) console.log(err, err.stack); // an error occurred + * else console.log(data); // successful response + * }); + */ invoke(params, callback) { const functionName = Util.getParameter(params, 'FunctionName'); if (functionName === undefined) { @@ -67,11 +141,12 @@ class Lambda { // GGC v1.9.0 or newer functionArn = GreengrassCommon.buildFunctionArn( arnFields.unqualifiedArn, - finalQualifier); + finalQualifier, + ); } else { // older version of GGC - throw new Error('Function buildFunctionArn not found. buildFunctionArn is introduced in GGC v1.9.0. ' + - 'Please check your GGC version.'); + throw new Error('Function buildFunctionArn not found. buildFunctionArn is introduced in GGC v1.9.0. ' + + 'Please check your GGC version.'); } // verify client context is base64 encoded diff --git a/aws-greengrass-core-sdk/package.json b/aws-greengrass-core-sdk/package.json new file mode 100644 index 0000000..b61949f --- /dev/null +++ b/aws-greengrass-core-sdk/package.json @@ -0,0 +1,17 @@ +{ + "name": "aws-greengrass-core-sdk", + "version": "1.6.0", + "main": "index.js", + "dependencies": { + "cbor": "5.0.1" + }, + "license": "Apache-2.0", + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com" + }, + "repository": { + "type": "git", + "url": "git://github.com/aws/aws-greengrass-core-sdk-js" + } +} diff --git a/aws-greengrass-core-sdk/secretsmanager.js b/aws-greengrass-core-sdk/secretsmanager.js index 18aa173..ef6103b 100644 --- a/aws-greengrass-core-sdk/secretsmanager.js +++ b/aws-greengrass-core-sdk/secretsmanager.js @@ -1,11 +1,11 @@ /* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ -const Buffer = require('buffer').Buffer; +const { Buffer } = require('buffer'); +const GreengrassCommon = require('aws-greengrass-common-js'); const Lambda = require('./lambda'); const Util = require('./util'); -const GreengrassCommon = require('aws-greengrass-common-js'); const KEY_SECRET_ID = 'SecretId'; const KEY_VERSION_ID = 'VersionId'; @@ -14,14 +14,62 @@ const KEY_SECRET_ARN = 'ARN'; const KEY_SECRET_NAME = 'Name'; const KEY_CREATED_DATE = 'CreatedDate'; -const envVars = GreengrassCommon.envVars; -const SECRETS_MANAGER_FUNCTION_ARN = envVars.SECRETS_MANAGER_FUNCTION_ARN; +const { envVars } = GreengrassCommon; +const { SECRETS_MANAGER_FUNCTION_ARN } = envVars; +/** + * Constructs a service interface object. Each API operation is exposed as a function on service. + * @class + * @memberOf aws-greengrass-core-sdk + */ class SecretsManager { + /** + * Constructs a service object. This object has one method for each API operation. + * + * @example Constructing a SecretsManager object + * var secretsmanager = new GG.SecretsManager(); + */ constructor() { this.lambda = new Lambda(); } + /** + * Called when a response from the service is returned. + * + * @callback secretsManagerCallback + * @param err {Error} The error object returned from the request. Set to null if the request is successful. + * @param data {Object} The de-serialized data returned from the request. Set to null if a request error occurs. + * @param data.ARN {String} The ARN of the secret. + * @param data.Name {String} The friendly name of the secret. + * @param data.VersionId {String} The unique identifier of this version of the secret. + * @param data.SecretBinary {Buffer|TypedArray|Blob|String} The decrypted part of the protected secret information that was originally provided as binary data in the form of a byte array. + * The response parameter represents the binary data as a base64-encoded string. + * @param data.SecretString {String} The decrypted part of the protected secret information that was originally provided as a string. + * @param data.VersionStages {String[]} Specifies the secret version that you want to retrieve by the staging label attached to the version. + *
Staging labels are used to keep track of different versions during the rotation process. + */ + + /** + * Retrieves a specific local secret value. + * + * @param params {Object} + * @param params.SecretId {String} Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret. + * @param params.VersionStage {String} Specifies the secret version that you want to retrieve by the staging label attached to the version. + *
Staging labels are used to keep track of different versions during the rotation process. + * @param callback {secretsManagerCallback} The callback. + * + * @example Retrieving a local secret value + * // This operation retrieves a local secret value + * + * var params = { + * SecretId: "STRING_VALUE", + * VersionStage: "STRING_VALUE" + * }; + * secretsmanager.getSecretValue(params, function(err, data) { + * if (err) console.log(err, err.stack); // an error occurred + * else console.log(data); // successful response + * }); + */ getSecretValue(params, callback) { const secretId = Util.getParameter(params, KEY_SECRET_ID); const versionId = Util.getParameter(params, KEY_VERSION_ID); @@ -41,8 +89,7 @@ class SecretsManager { return; } - const getSecretValueRequestBytes = - SecretsManager._generateGetSecretValueRequestBytes(secretId, versionId, versionStage); + const getSecretValueRequestBytes = SecretsManager._generateGetSecretValueRequestBytes(secretId, versionId, versionStage); const invokeParams = { FunctionName: SECRETS_MANAGER_FUNCTION_ARN, @@ -53,11 +100,11 @@ class SecretsManager { this.lambda.invoke(invokeParams, (err, data) => { if (err) { - callback(err, null); // an error occurred + callback(err, null); // an error occurred } else if (SecretsManager._is200Response(data.Payload)) { - callback(null, data.Payload); // successful response + callback(null, data.Payload); // successful response } else { - callback(new Error(JSON.stringify(data.Payload)), null); // error response + callback(new Error(JSON.stringify(data.Payload)), null); // error response } }); } diff --git a/aws-greengrass-core-sdk/stream-manager/client.js b/aws-greengrass-core-sdk/stream-manager/client.js new file mode 100644 index 0000000..2f88686 --- /dev/null +++ b/aws-greengrass-core-sdk/stream-manager/client.js @@ -0,0 +1,520 @@ +'use strict'; + +/* eslint-disable no-restricted-syntax */ +/* + * Copyright (c) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +const cbor = require('cbor'); +const net = require('net'); +const smData = require('aws-greengrass-core-sdk/stream-manager/data'); +const exceptions = require('./exceptions'); +const util = require('./util'); + +// Consts +const PROTOCOL_VERSION = '1.0.0'; +const SDK_VERSION = '1.0.0'; +const CONNECT_VERSION = 1; + +const removeFromArray = (arr, f) => { + arr.indexOf(f) !== -1 && arr.splice(arr.indexOf(f), 1); +}; + +/** + * Stream manager client + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + * + * @example StreamManager Usage + * const { StreamManagerClient } = require('aws-greengrass-core-sdk/stream-manager'); + * const client = new StreamManagerClient(); + * c.onConnected(async () => { + * // Do work with the client (c) here. + * }); + */ +class StreamManagerClient { + #closed = false; + + /** + * @type {module:net.Socket} + */ + #socket = null; + + #authToken = null; + + #connected = false; + + /** + * @typedef Logger + * @type {Object} + * @property {function(...*)} error + * @property {function(...*)} info + * @property {function(...*)} debug + */ + + /** + * @type {?Logger} + */ + #logger = null; + + #requestMap = {}; + + connectCallbacks = []; + + errorCallbacks = []; + + #defaultParams = { + port: null, + host: '127.0.0.1', + onConnectCb: null, + onErrorCb: null, + logger: { + error: console.error, + debug: console.debug, + info: console.info, + }, + }; + + /** + * Constructs a new Stream Manager client. Once connected, onConnectCb will be called and + * the client can then be used. + * + * @param {Object?} opts All these options are optional. + * @param {Number} opts.port + * @param {String} opts.host + * @param {Function?} opts.onConnectCb Optional callback to be called once the client has connected. + * @param {Function(Error)?} opts.onErrorCb Optional, but highly suggested callback to be called when a connection error occurs. + * @param {Logger?} opts.logger + */ + constructor(opts) { + let { + // eslint-disable-next-line prefer-const + port, host, onConnectCb, onErrorCb, logger, + } = { + // Apply defaults + ...this.#defaultParams, + // Then possibly override them with what the user set + ...opts, + }; + + if (port === null) { + port = parseInt(process.env.STREAM_MANAGER_SERVER_PORT || 8088, 10); + } + this.#logger = logger; + this.port = port; + this.host = host; + this.#authToken = process.env.AWS_CONTAINER_AUTHORIZATION_TOKEN || null; + + if (typeof onConnectCb === 'function') { + this.onConnected(onConnectCb); + } + if (typeof onErrorCb === 'function') { + this.onError(onErrorCb); + } + + this.__connect(); + } + + async __connect() { + try { + await new Promise((resolve, reject) => { + if (this.#closed) { + return reject(new exceptions.StreamManagerException('Client is closed and cannot be reopened')); + } + if (this.#connected) { + return resolve(); + } + + const newSock = net.createConnection({ + port: this.port, + host: this.host, + // Set high water mark so that we can read 1 full packet (1GB) at a time instead of needing to + // try to read multiple times and combine the results. The HWM adjusts how much the socket will + // buffer when reading. + readableHighWaterMark: util.MAX_PACKET_SIZE, + }, async () => { + try { + // Connection started + this.#logger.debug(`Opening connection to ${this.host}:${this.port}`); + this.#connected = false; + + const request = new smData.ConnectRequest() + .withProtocolVersion(PROTOCOL_VERSION) + .withSdkVersion(SDK_VERSION) + .withAuthToken(this.#authToken) + .withRequestId(util.uuidv4()); + + // Write the connect version + newSock.write(util.intToBuffer(CONNECT_VERSION, 1)); + + // Write request to socket + const frame = new smData.MessageFrame(smData.Operation.Connect, cbor.encode(request.asMap())); + const byteFrame = util.encodeFrame(frame); + newSock.write(byteFrame.header); + newSock.write(byteFrame.payload); + + await this.__read(newSock); + // Only now that we're connected should we set/replace the socket + this.#socket = newSock; + resolve(); + } catch (errors) { + reject(errors); + } + }); + + newSock.on('error', (e) => { + this.#logger.error(e); + this.errorCallbacks.forEach((f) => f(e)); + newSock.end(); + + if (!this.#connected) { + reject(e); + } + }); + + newSock.on('end', () => { + this.#logger.info('Socket is ending'); + }); + + newSock.on('close', () => { + newSock.destroy(); + this.#connected = false; + }); + }); + + // Set us to be in connected mode + this.#connected = true; + this.#logger.info('Successfully connected'); + this.connectCallbacks.forEach((f) => { + try { + f(); + } finally { + // After calling the connect callback remove it so we don't call it multiple times. + // A client should only connect once. + removeFromArray(this.connectCallbacks, f); + } + }); + } catch (e) { + this.#logger.error(e); + this.errorCallbacks.forEach((f) => f(e)); + throw e; + } + } + + __readSocket(n, socket, resolve = null, reject = null) { + if (resolve && reject) { + if (this.#closed) { + reject(); + } + + const r = socket.read(n); + if (r === null) { + socket.once('readable', () => { + this.__readSocket(n, socket, resolve, reject); + }); + return; + } + resolve(r); + return; + } + + return new Promise((res, rej) => { + if (this.#closed) { + rej(); + } + this.__readSocket(n, socket, res, rej); + }); + } + + async __read(socket = this.#socket) { + if (this.#connected) { + const frame = await this.__readMessageFrame(socket); + this.__handleReadResponse(cbor.decodeFirstSync(frame.payload), frame); + } else { + // Read connect version + const connectResponseVersion = util.intFromBuffer(await this.__readSocket(1, socket)); + if (connectResponseVersion !== CONNECT_VERSION) { + this.#logger.error('Unexpected response from the server, Connect version:', connectResponseVersion); + throw new exceptions.ConnectFailedException('Failed to establish connection with the server'); + } + + // Read connect response + let response = await this.__readMessageFrame(socket); + + if (response.operation === smData.Operation.ConnectResponse) { + const payload = cbor.decodeFirstSync(response.payload); + response = smData.ConnectResponse.fromMap(payload); + this.#logger.debug('Received ConnectResponse from server:', response); + } else { + this.#logger.error('Received data with unexpected operation', response.operation); + throw new exceptions.ConnectFailedException('Failed to establish connection with the server'); + } + + if (response.status !== smData.ResponseStatusCode.Success) { + this.#logger.error('Received ConnectResponse with unexpected status', response.status); + throw new exceptions.ConnectFailedException('Failed to establish connection with the server'); + } + } + + // Put ourselves back in the event loop to handle the next messages + setImmediate(async () => { + try { + await this.__read(); + } catch (e) { + // Only bubble up the errors when we're actually connected and not closed + if (this.#connected && !this.#closed) { + this.errorCallbacks.forEach((f) => f(e)); + } + } + }); + } + + async __readMessageFrame(socket) { + const length = util.intFromBuffer(await this.__readSocket(4, socket)); + const operation = util.intFromBuffer(await this.__readSocket(1, socket)); + + let op = smData.Operation.fromMap(operation); + if (typeof op === 'undefined') { + this.#logger.error('Found unknown operation', operation); + op = smData.Operation.Unknown; + } + + return new smData.MessageFrame(op, await this.__readSocket(length - 1, socket)); + } + + __handleReadResponse(data, frame) { + if (frame.operation === smData.Operation.ReadMessagesResponse) { + const response = smData.ReadMessagesResponse.fromMap(data); + this.#logger.debug('Received ReadMessagesResponse from server'); + this.#requestMap[response.requestId](response); + } else if (frame.operation === smData.Operation.CreateMessageStreamResponse) { + const response = smData.CreateMessageStreamResponse.fromMap(data); + this.#logger.debug('Received CreateMessageStreamResponse from server', frame); + this.#requestMap[response.requestId](response); + } else if (frame.operation === smData.Operation.DeleteMessageStreamResponse) { + const response = smData.DeleteMessageStreamResponse.fromMap(data); + this.#logger.debug('Received DeleteMessageStreamResponse from server', frame); + this.#requestMap[response.requestId](response); + } else if (frame.operation === smData.Operation.AppendMessageResponse) { + const response = smData.AppendMessageResponse.fromMap(data); + this.#logger.debug('Received AppendMessageResponse from server', frame); + this.#requestMap[response.requestId](response); + } else if (frame.operation === smData.Operation.ListStreamsResponse) { + const response = smData.ListStreamsResponse.fromMap(data); + this.#logger.debug('Received ListStreamsResponse from server', frame); + this.#requestMap[response.requestId](response); + } else if (frame.operation === smData.Operation.DescribeMessageStreamResponse) { + const response = smData.DescribeMessageStreamResponse.fromMap(data); + this.#logger.debug('Received DescribeMessageStreamResponse from server', frame); + this.#requestMap[response.requestId](response); + } else if (frame.operation === smData.Operation.Unknown) { + this.#logger.error('Received response with unknown operation from server', frame); + try { + const { requestId } = cbor.decodeFirstSync(frame.payload); + this.#requestMap[requestId](frame); + } catch { + // We tried our best to figure out the request id, but it failed. + // We already logged the unknown smData.Operation, so there's nothing + // else we can do at this point + } + } else { + this.#logger.error('Received data with unhandled operation', frame.operation); + } + } + + async _sendAndReceive(operation, data) { + if (this.#closed) { + throw new exceptions.StreamManagerException('Client is closed and cannot be reopened'); + } + + if (data.requestId === null) { + // eslint-disable-next-line no-param-reassign + data.requestId = util.uuidv4(); + } + + const validation = util.isInvalid(data); + if (validation) { + throw new exceptions.ValidationException(validation); + } + + // If we're not connected, immediately try to reconnect + if (!this.#connected) { + await this.__connect(); + } + + const promise = new Promise(((resolve, reject) => { + this.#requestMap[data.requestId] = (result) => { + // Drop async queue from request map + delete this.#requestMap[data.requestId]; + if (result instanceof smData.MessageFrame && result.operation === smData.Operation.Unknown) { + reject(new exceptions.ClientException('Received response with unknown operation from server')); + } + + resolve(result); + }; + })); + + // Write request to socket + const frame = new smData.MessageFrame(operation, cbor.encode(data.asMap())); + const byteFrame = util.encodeFrame(frame); + this.#socket.write(byteFrame.header); + this.#socket.write(byteFrame.payload); + + return promise; + } + + static __validateReadMessagesOptions(options) { + if (options !== null) { + if (!(options instanceof smData.ReadMessagesOptions)) { + throw new exceptions.ValidationException('options argument to read_messages must be a ReadMessageOptions object'); + } + const validation = util.isInvalid(options); + if (validation) { + throw new exceptions.ValidationException(validation); + } + + if ( + options.minMessageCount !== null + && options.maxMessageCount !== null + && options.minMessageCount > options.maxMessageCount + ) { + throw new exceptions.ValidationException('minMessageCount must be less than or equal to maxMessageCount'); + } + } + } + + /** + * Append a message into the specified message stream. Returns the sequence number of the message + * if it was successfully appended. + * + * @param streamName {string} The name of the stream to append to. + * @param data {Buffer} Buffer containing the data to be written. + * @returns {Promise} + */ + async appendMessage(streamName, data) { + const request = new smData.AppendMessageRequest().withName(streamName).withPayload(data); + const result = await this._sendAndReceive(smData.Operation.AppendMessage, request); + util.throwOnErrorResponse(result); + return result.sequenceNumber; + } + + /** + * Create a message stream with a given definition. + * + * @param definition {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + * @returns {Promise} + */ + async createMessageStream(definition) { + if (!(definition instanceof smData.MessageStreamDefinition)) { + throw new exceptions.ValidationException('definition argument to create_stream must be a MessageStreamDefinition object'); + } + const request = new smData.CreateMessageStreamRequest().withDefinition(definition); + const result = await this._sendAndReceive(smData.Operation.CreateMessageStream, request); + util.throwOnErrorResponse(result); + } + + /** + * Deletes a message stream based on its name. Nothing is returned if the request succeeds. + * An error will be thrown if the request fails. + * + * @param streamName {string} The name of the stream to be deleted. + * @returns {Promise} + */ + async deleteMessageStream(streamName) { + const request = new smData.DeleteMessageStreamRequest().withName(streamName); + const result = await this._sendAndReceive(smData.Operation.DeleteMessageStream, request); + util.throwOnErrorResponse(result); + } + + /** + * Read message(s) from a chosen stream with options. If no options are specified it will try to read + * 1 message from the stream. + * + * @param streamName {string} The name of the stream to read from. + * @param options {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions?} Options used when reading from the stream of type {@linkcode aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}. + * Defaults are: + *
    + *
  • desiredStartSequenceNumber: 0
  • + *
  • minMessageCount: 1
  • + *
  • maxMessageCount: 1
  • + *
  • readTimeoutMillis: 0
    // Where 0 here represents that the server will immediately return the messages
    +     * // or an exception if there were not enough messages available.
  • + *
+ *

+ * If desiredStartSequenceNumber is specified in the options and is less + * than the current beginning of the stream, returned messages will start + * at the beginning of the stream and not necessarily the desiredStartSequenceNumber. + *

+ * @returns {Promise} List of one or more messages. + */ + async readMessages(streamName, options = null) { + StreamManagerClient.__validateReadMessagesOptions(options); + const request = new smData.ReadMessagesRequest().withStreamName(streamName).withReadMessagesOptions(options); + const result = await this._sendAndReceive(smData.Operation.ReadMessages, request); + util.throwOnErrorResponse(result); + return result.messages; + } + + /** + * List the streams in StreamManager. Returns a list of their names. + * + * @returns {Promise} + */ + async listStreams() { + const request = new smData.ListStreamsRequest(); + const result = await this._sendAndReceive(smData.Operation.ListStreams, request); + util.throwOnErrorResponse(result); + return result.streams; + } + + /** + * Describe a message stream to get metadata including the stream's definition, + * size, and exporter statuses. + * + * @param streamName {string} The name of the stream to describe + * @returns {Promise} + */ + async describeMessageStream(streamName) { + const request = new smData.DescribeMessageStreamRequest().withName(streamName); + const result = await this._sendAndReceive(smData.Operation.DescribeMessageStream, request); + util.throwOnErrorResponse(result); + return result.messageStreamInfo; + } + + /** + * Add a callback for when the client connects. + * @param f {function} + */ + onConnected(f) { + if (this.#connected) { + f(); + } else { + this.connectCallbacks.push(f); + } + } + + /** + * Add a callback for when an error occurs. + * @param f {function} + */ + onError(f) { + this.errorCallbacks.push(f); + } + + /** + * Close the connection + */ + close() { + if (this.#socket) { + this.#socket.end(); + } + this.#closed = true; + } +} + +module.exports = { + ...smData, + StreamManagerClient: StreamManagerClient, + ...exceptions, +}; diff --git a/aws-greengrass-core-sdk/stream-manager/data/index.js b/aws-greengrass-core-sdk/stream-manager/data/index.js new file mode 100644 index 0000000..e720f69 --- /dev/null +++ b/aws-greengrass-core-sdk/stream-manager/data/index.js @@ -0,0 +1,6194 @@ +/** + * StrategyOnFull is used in the MessageStreamDefinition when creating a stream. + It defines the behavior when the stream has reached the maximum size. + RejectNewData: any append message request after the stream is full will be rejected with an exception. + OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message. + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class StrategyOnFull { + + #value = null; + constructor(value = null) { + if (!(value in Object.values(StrategyOnFull.options))) { + throw new Error("Value must be one of the enumerated options"); + } + this.#value = value; + } + + static fromMap(d) { + return StrategyOnFull[StrategyOnFull.optionsFlipped[d]]; + } + + asMap() { + return this.#value; + } +}; +Object.defineProperty(StrategyOnFull, "options", { + value: { + RejectNewData: 0, + OverwriteOldestData: 1, + } +}); +Object.defineProperty(StrategyOnFull, "optionsFlipped", { + value: { + 0: "RejectNewData", + 1: "OverwriteOldestData", + } +}); + +/** + * @member {aws-greengrass-core-sdk.StreamManager.StrategyOnFull} RejectNewData + * @memberOf aws-greengrass-core-sdk.StreamManager.StrategyOnFull# + * @readonly + */ +Object.defineProperty(StrategyOnFull, "RejectNewData", { + value: new StrategyOnFull(0) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.StrategyOnFull} OverwriteOldestData + * @memberOf aws-greengrass-core-sdk.StreamManager.StrategyOnFull# + * @readonly + */ +Object.defineProperty(StrategyOnFull, "OverwriteOldestData", { + value: new StrategyOnFull(1) +}); + +/** + * Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. + Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk. + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class Persistence { + + #value = null; + constructor(value = null) { + if (!(value in Object.values(Persistence.options))) { + throw new Error("Value must be one of the enumerated options"); + } + this.#value = value; + } + + static fromMap(d) { + return Persistence[Persistence.optionsFlipped[d]]; + } + + asMap() { + return this.#value; + } +}; +Object.defineProperty(Persistence, "options", { + value: { + File: 0, + Memory: 1, + } +}); +Object.defineProperty(Persistence, "optionsFlipped", { + value: { + 0: "File", + 1: "Memory", + } +}); + +/** + * @member {aws-greengrass-core-sdk.StreamManager.Persistence} File + * @memberOf aws-greengrass-core-sdk.StreamManager.Persistence# + * @readonly + */ +Object.defineProperty(Persistence, "File", { + value: new Persistence(0) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Persistence} Memory + * @memberOf aws-greengrass-core-sdk.StreamManager.Persistence# + * @readonly + */ +Object.defineProperty(Persistence, "Memory", { + value: new Persistence(1) +}); + +/** + * (Internal Only) Request object to connect to the service + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class ConnectRequest { + #__requestId = null; + #__protocolVersion = null; + #__sdkVersion = null; + #__authToken = null; + + /** + * @param requestId {String} + * @param protocolVersion {String} + * @param sdkVersion {String} + * @param authToken {String} + */ + constructor( + requestId = null, + protocolVersion = null, + sdkVersion = null, + authToken = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + if (protocolVersion !== null && !(typeof protocolVersion === "string")) { + throw new Error("protocolVersion must be String"); + } + + if (sdkVersion !== null && !(typeof sdkVersion === "string")) { + throw new Error("sdkVersion must be String"); + } + + if (authToken !== null && !(typeof authToken === "string")) { + throw new Error("authToken must be String"); + } + + this.#__requestId = requestId; + this.#__protocolVersion = protocolVersion; + this.#__sdkVersion = sdkVersion; + this.#__authToken = authToken; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ConnectRequest} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + /** + * @returns {String} + + */ + get protocolVersion() { + return this.#__protocolVersion; + } + /** + * @param value {String} + */ + set protocolVersion(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("protocolVersion must be String"); + } + + this.#__protocolVersion = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ConnectRequest} + */ + withProtocolVersion(value) { + this.protocolVersion = value; + return this; + } + + /** + * @returns {String} + + */ + get sdkVersion() { + return this.#__sdkVersion; + } + /** + * @param value {String} + */ + set sdkVersion(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("sdkVersion must be String"); + } + + this.#__sdkVersion = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ConnectRequest} + */ + withSdkVersion(value) { + this.sdkVersion = value; + return this; + } + + /** + * @returns {String} + + */ + get authToken() { + return this.#__authToken; + } + /** + * @param value {String} + */ + set authToken(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("authToken must be String"); + } + + this.#__authToken = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ConnectRequest} + */ + withAuthToken(value) { + this.authToken = value; + return this; + } + + static fromMap(d) { + const ret = new ConnectRequest(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + if ("protocolVersion" in d) { + ret.protocolVersion = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["protocolVersion"]) : d["protocolVersion"]; + } + if ("sdkVersion" in d) { + ret.sdkVersion = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["sdkVersion"]) : d["sdkVersion"]; + } + if ("authToken" in d) { + ret.authToken = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["authToken"]) : d["authToken"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + if (this.protocolVersion !== null) { + d["protocolVersion"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.protocolVersion), "asMap") ? this.protocolVersion.asMap() : this.protocolVersion; + } + if (this.sdkVersion !== null) { + d["sdkVersion"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.sdkVersion), "asMap") ? this.sdkVersion.asMap() : this.sdkVersion; + } + if (this.authToken !== null) { + d["authToken"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.authToken), "asMap") ? this.authToken.asMap() : this.authToken; + } + return d; + } +}; + +Object.defineProperty(ConnectRequest, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + protocolVersion: { + 'type': String, + 'subtype': null + }, + sdkVersion: { + 'type': String, + 'subtype': null + }, + authToken: { + 'type': String, + 'subtype': null + }, + } +}); +Object.defineProperty(ConnectRequest, "formatsMap", { + value: {} +}); +Object.defineProperty(ConnectRequest, "validationsMap", { + value: { + 'requestId': { + 'required': true, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'protocolVersion': { + 'required': true, + }, + 'sdkVersion': { + 'required': false, + }, + 'authToken': { + 'required': false, + }, + } +}); + +/** + * (Internal Only) Enum defining possible response status codes from StreamManager server. + Success: Request succeeded. + UnknownFailure: Encountered unknown StreamManager server failure. + Unauthorized: Client is not authorized to perform this request. + InvalidRequest: Client request is invalid. + RequestPayloadTooLarge: Request payload is too large. + ResourceNotFound: The requested resource does not exist. + ServerTimeout: Server took too long and timed out. + ResponsePayloadTooLarge: Server response exceeded the max allowed response payload size by the protocol. + UnsupportedConnectVersion: Server does not support the Connect version presented by the Client. + UnexpectedOperation: Operation presented was not expected by the Server. + UnsupportedProtocolVersion: Protocol version presented by the Client is not compatible with the Server. + InvalidProtocolVersion: Protocol version presented by the Client is not valid. + FailedToConnect: Client failed to connect to the Server. + NotEnoughMessages: There is not enough messages to return. + MessageStoreReadError: Read messages encountered an error. + OutOfMemoryError: Server ran out of memory. + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class ResponseStatusCode { + + #value = null; + constructor(value = null) { + if (!(value in Object.values(ResponseStatusCode.options))) { + throw new Error("Value must be one of the enumerated options"); + } + this.#value = value; + } + + static fromMap(d) { + return ResponseStatusCode[ResponseStatusCode.optionsFlipped[d]]; + } + + asMap() { + return this.#value; + } +}; +Object.defineProperty(ResponseStatusCode, "options", { + value: { + Success: 0, + UnknownFailure: 1, + Unauthorized: 2, + InvalidRequest: 3, + RequestPayloadTooLarge: 4, + ResourceNotFound: 5, + ServerTimeout: 6, + ResponsePayloadTooLarge: 7, + UnsupportedConnectVersion: 8, + UnexpectedOperation: 9, + UnsupportedProtocolVersion: 10, + InvalidProtocolVersion: 11, + FailedToConnect: 12, + NotEnoughMessages: 13, + MessageStoreReadError: 14, + OutOfMemoryError: 15, + } +}); +Object.defineProperty(ResponseStatusCode, "optionsFlipped", { + value: { + 0: "Success", + 1: "UnknownFailure", + 2: "Unauthorized", + 3: "InvalidRequest", + 4: "RequestPayloadTooLarge", + 5: "ResourceNotFound", + 6: "ServerTimeout", + 7: "ResponsePayloadTooLarge", + 8: "UnsupportedConnectVersion", + 9: "UnexpectedOperation", + 10: "UnsupportedProtocolVersion", + 11: "InvalidProtocolVersion", + 12: "FailedToConnect", + 13: "NotEnoughMessages", + 14: "MessageStoreReadError", + 15: "OutOfMemoryError", + } +}); + +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} Success + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "Success", { + value: new ResponseStatusCode(0) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} UnknownFailure + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "UnknownFailure", { + value: new ResponseStatusCode(1) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} Unauthorized + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "Unauthorized", { + value: new ResponseStatusCode(2) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} InvalidRequest + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "InvalidRequest", { + value: new ResponseStatusCode(3) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} RequestPayloadTooLarge + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "RequestPayloadTooLarge", { + value: new ResponseStatusCode(4) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} ResourceNotFound + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "ResourceNotFound", { + value: new ResponseStatusCode(5) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} ServerTimeout + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "ServerTimeout", { + value: new ResponseStatusCode(6) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} ResponsePayloadTooLarge + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "ResponsePayloadTooLarge", { + value: new ResponseStatusCode(7) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} UnsupportedConnectVersion + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "UnsupportedConnectVersion", { + value: new ResponseStatusCode(8) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} UnexpectedOperation + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "UnexpectedOperation", { + value: new ResponseStatusCode(9) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} UnsupportedProtocolVersion + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "UnsupportedProtocolVersion", { + value: new ResponseStatusCode(10) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} InvalidProtocolVersion + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "InvalidProtocolVersion", { + value: new ResponseStatusCode(11) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} FailedToConnect + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "FailedToConnect", { + value: new ResponseStatusCode(12) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} NotEnoughMessages + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "NotEnoughMessages", { + value: new ResponseStatusCode(13) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} MessageStoreReadError + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "MessageStoreReadError", { + value: new ResponseStatusCode(14) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} OutOfMemoryError + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode# + * @readonly + */ +Object.defineProperty(ResponseStatusCode, "OutOfMemoryError", { + value: new ResponseStatusCode(15) +}); + +/** + * Internal Only + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class ConnectResponse { + #__requestId = null; + #__status = null; + #__errorMessage = null; + #__protocolVersion = null; + #__supportedProtocolVersions = null; + #__serverVersion = null; + #__clientIdentifier = null; + + /** + * @param requestId {String} + * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @param errorMessage {String} + * @param protocolVersion {String} + * @param supportedProtocolVersions {String[]} + * @param serverVersion {String} + * @param clientIdentifier {String} + */ + constructor( + requestId = null, + status = null, + errorMessage = null, + protocolVersion = null, + supportedProtocolVersions = null, + serverVersion = null, + clientIdentifier = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + if (status !== null && !(status instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + if (errorMessage !== null && !(typeof errorMessage === "string")) { + throw new Error("errorMessage must be String"); + } + + if (protocolVersion !== null && !(typeof protocolVersion === "string")) { + throw new Error("protocolVersion must be String"); + } + + if (supportedProtocolVersions !== null && !(supportedProtocolVersions instanceof Array)) { + throw new Error("supportedProtocolVersions must be Array"); + } + if (supportedProtocolVersions !== null && !supportedProtocolVersions.every((v) => typeof v === "string")) { + throw new Error("supportedProtocolVersions array values must be String"); + } + + if (serverVersion !== null && !(typeof serverVersion === "string")) { + throw new Error("serverVersion must be String"); + } + + if (clientIdentifier !== null && !(typeof clientIdentifier === "string")) { + throw new Error("clientIdentifier must be String"); + } + + this.#__requestId = requestId; + this.#__status = status; + this.#__errorMessage = errorMessage; + this.#__protocolVersion = protocolVersion; + this.#__supportedProtocolVersions = supportedProtocolVersions; + this.#__serverVersion = serverVersion; + this.#__clientIdentifier = clientIdentifier; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + + */ + get status() { + return this.#__status; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + */ + set status(value) { + if (value !== null && !(value instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + this.#__status = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse} + */ + withStatus(value) { + this.status = value; + return this; + } + + /** + * @returns {String} + + */ + get errorMessage() { + return this.#__errorMessage; + } + /** + * @param value {String} + */ + set errorMessage(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("errorMessage must be String"); + } + + this.#__errorMessage = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse} + */ + withErrorMessage(value) { + this.errorMessage = value; + return this; + } + + /** + * @returns {String} + + */ + get protocolVersion() { + return this.#__protocolVersion; + } + /** + * @param value {String} + */ + set protocolVersion(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("protocolVersion must be String"); + } + + this.#__protocolVersion = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse} + */ + withProtocolVersion(value) { + this.protocolVersion = value; + return this; + } + + /** + * @returns {String[]} + + */ + get supportedProtocolVersions() { + return this.#__supportedProtocolVersions; + } + /** + * @param value {String[]} + */ + set supportedProtocolVersions(value) { + if (value !== null && !(value instanceof Array)) { + throw new Error("supportedProtocolVersions must be Array"); + } + if (value !== null && !value.every((v) => typeof v === "string")) { + throw new Error("supportedProtocolVersions array values must be String"); + } + + this.#__supportedProtocolVersions = value; + } + /** + * @param value {String[]} + * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse} + */ + withSupportedProtocolVersions(value) { + this.supportedProtocolVersions = value; + return this; + } + + /** + * @returns {String} + + */ + get serverVersion() { + return this.#__serverVersion; + } + /** + * @param value {String} + */ + set serverVersion(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("serverVersion must be String"); + } + + this.#__serverVersion = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse} + */ + withServerVersion(value) { + this.serverVersion = value; + return this; + } + + /** + * @returns {String} + + */ + get clientIdentifier() { + return this.#__clientIdentifier; + } + /** + * @param value {String} + */ + set clientIdentifier(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("clientIdentifier must be String"); + } + + this.#__clientIdentifier = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse} + */ + withClientIdentifier(value) { + this.clientIdentifier = value; + return this; + } + + static fromMap(d) { + const ret = new ConnectResponse(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + if ("status" in d) { + ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"]; + } + if ("errorMessage" in d) { + ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"]; + } + if ("protocolVersion" in d) { + ret.protocolVersion = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["protocolVersion"]) : d["protocolVersion"]; + } + if ("supportedProtocolVersions" in d) { + ret.supportedProtocolVersions = d["supportedProtocolVersions"].reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(v) : v); + return acc; + }, []); + } + if ("serverVersion" in d) { + ret.serverVersion = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["serverVersion"]) : d["serverVersion"]; + } + if ("clientIdentifier" in d) { + ret.clientIdentifier = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["clientIdentifier"]) : d["clientIdentifier"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + if (this.status !== null) { + d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status; + } + if (this.errorMessage !== null) { + d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage; + } + if (this.protocolVersion !== null) { + d["protocolVersion"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.protocolVersion), "asMap") ? this.protocolVersion.asMap() : this.protocolVersion; + } + if (this.supportedProtocolVersions !== null) { + d["supportedProtocolVersions"] = this.supportedProtocolVersions.reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v); + return acc; + }, []); + } + if (this.serverVersion !== null) { + d["serverVersion"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.serverVersion), "asMap") ? this.serverVersion.asMap() : this.serverVersion; + } + if (this.clientIdentifier !== null) { + d["clientIdentifier"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.clientIdentifier), "asMap") ? this.clientIdentifier.asMap() : this.clientIdentifier; + } + return d; + } +}; + +Object.defineProperty(ConnectResponse, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + status: { + 'type': ResponseStatusCode, + 'subtype': null + }, + errorMessage: { + 'type': String, + 'subtype': null + }, + protocolVersion: { + 'type': String, + 'subtype': null + }, + supportedProtocolVersions: { + 'type': Array, + 'subtype': String + }, + serverVersion: { + 'type': String, + 'subtype': null + }, + clientIdentifier: { + 'type': String, + 'subtype': null + }, + } +}); +Object.defineProperty(ConnectResponse, "formatsMap", { + value: {} +}); +Object.defineProperty(ConnectResponse, "validationsMap", { + value: { + 'requestId': { + 'required': false, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'status': { + 'required': true, + }, + 'errorMessage': { + 'required': false, + }, + 'protocolVersion': { + 'required': false, + }, + 'supportedProtocolVersions': { + 'required': false, + }, + 'serverVersion': { + 'required': false, + }, + 'clientIdentifier': { + 'required': false, + }, + } +}); + +/** + * Internal Only + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class Operation { + + #value = null; + constructor(value = null) { + if (!(value in Object.values(Operation.options))) { + throw new Error("Value must be one of the enumerated options"); + } + this.#value = value; + } + + static fromMap(d) { + return Operation[Operation.optionsFlipped[d]]; + } + + asMap() { + return this.#value; + } +}; +Object.defineProperty(Operation, "options", { + value: { + Unknown: 0, + Connect: 1, + CreateMessageStream: 2, + DeleteMessageStream: 3, + AppendMessage: 4, + ReadMessages: 5, + ConnectResponse: 6, + CreateMessageStreamResponse: 7, + DeleteMessageStreamResponse: 8, + AppendMessageResponse: 9, + ReadMessagesResponse: 10, + ListStreams: 11, + ListStreamsResponse: 12, + DescribeMessageStream: 13, + DescribeMessageStreamResponse: 14, + } +}); +Object.defineProperty(Operation, "optionsFlipped", { + value: { + 0: "Unknown", + 1: "Connect", + 2: "CreateMessageStream", + 3: "DeleteMessageStream", + 4: "AppendMessage", + 5: "ReadMessages", + 6: "ConnectResponse", + 7: "CreateMessageStreamResponse", + 8: "DeleteMessageStreamResponse", + 9: "AppendMessageResponse", + 10: "ReadMessagesResponse", + 11: "ListStreams", + 12: "ListStreamsResponse", + 13: "DescribeMessageStream", + 14: "DescribeMessageStreamResponse", + } +}); + +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} Unknown + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "Unknown", { + value: new Operation(0) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} Connect + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "Connect", { + value: new Operation(1) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} CreateMessageStream + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "CreateMessageStream", { + value: new Operation(2) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} DeleteMessageStream + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "DeleteMessageStream", { + value: new Operation(3) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} AppendMessage + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "AppendMessage", { + value: new Operation(4) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} ReadMessages + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "ReadMessages", { + value: new Operation(5) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} ConnectResponse + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "ConnectResponse", { + value: new Operation(6) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} CreateMessageStreamResponse + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "CreateMessageStreamResponse", { + value: new Operation(7) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} DeleteMessageStreamResponse + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "DeleteMessageStreamResponse", { + value: new Operation(8) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} AppendMessageResponse + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "AppendMessageResponse", { + value: new Operation(9) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} ReadMessagesResponse + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "ReadMessagesResponse", { + value: new Operation(10) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} ListStreams + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "ListStreams", { + value: new Operation(11) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} ListStreamsResponse + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "ListStreamsResponse", { + value: new Operation(12) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} DescribeMessageStream + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "DescribeMessageStream", { + value: new Operation(13) +}); +/** + * @member {aws-greengrass-core-sdk.StreamManager.Operation} DescribeMessageStreamResponse + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation# + * @readonly + */ +Object.defineProperty(Operation, "DescribeMessageStreamResponse", { + value: new Operation(14) +}); + +/** + * Internal Only + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class MessageFrame { + #__operation = null; + #__payload = null; + + /** + * @param operation {aws-greengrass-core-sdk.StreamManager.Operation} + * @param payload {Buffer} + */ + constructor( + operation = null, + payload = null, + ) { + if (operation !== null && !(operation instanceof Operation)) { + throw new Error("operation must be Operation"); + } + + if (payload !== null && !(payload instanceof Buffer)) { + throw new Error("payload must be Buffer"); + } + + this.#__operation = operation; + this.#__payload = payload; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.Operation} + + */ + get operation() { + return this.#__operation; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.Operation} + */ + set operation(value) { + if (value !== null && !(value instanceof Operation)) { + throw new Error("operation must be Operation"); + } + + this.#__operation = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.Operation} + * @returns {aws-greengrass-core-sdk.StreamManager.MessageFrame} + */ + withOperation(value) { + this.operation = value; + return this; + } + + /** + * @returns {Buffer} + + */ + get payload() { + return this.#__payload; + } + /** + * @param value {Buffer} + */ + set payload(value) { + if (value !== null && !(value instanceof Buffer)) { + throw new Error("payload must be Buffer"); + } + + this.#__payload = value; + } + /** + * @param value {Buffer} + * @returns {aws-greengrass-core-sdk.StreamManager.MessageFrame} + */ + withPayload(value) { + this.payload = value; + return this; + } + + static fromMap(d) { + const ret = new MessageFrame(); + if ("operation" in d) { + ret.operation = Object.prototype.hasOwnProperty.call(Operation, "fromMap") ? Operation.fromMap(d["operation"]) : d["operation"]; + } + if ("payload" in d) { + ret.payload = Object.prototype.hasOwnProperty.call(Buffer, "fromMap") ? Buffer.fromMap(d["payload"]) : d["payload"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.operation !== null) { + d["operation"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.operation), "asMap") ? this.operation.asMap() : this.operation; + } + if (this.payload !== null) { + d["payload"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.payload), "asMap") ? this.payload.asMap() : this.payload; + } + return d; + } +}; + +Object.defineProperty(MessageFrame, "typesMap", { + value: { + operation: { + 'type': Operation, + 'subtype': null + }, + payload: { + 'type': Buffer, + 'subtype': null + }, + } +}); +Object.defineProperty(MessageFrame, "formatsMap", { + value: {} +}); +Object.defineProperty(MessageFrame, "validationsMap", { + value: { + 'operation': { + 'required': true, + }, + 'payload': { + 'required': true, + }, + } +}); + +/** + * This export destination is not supported! The interface may change at any time without notice and should not be relied on for any production use. + There are no guarantees around its correctness. + This configures an HTTP endpoint which sends a POST request to the provided URI. Each request contains a single message in the body of the request. + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class HTTPConfig { + #__identifier = null; + #__uri = null; + #__batchSize = null; + #__batchIntervalMillis = null; + #__priority = null; + + /** + * @param identifier {String} A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + * @param uri {String} URL for HTTP endpoint which should receive the POST requests for export. + * @param batchSize {Number} The maximum size of a batch to send to the destination. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum batch size is 1 and the maximum is 500. + * @param batchIntervalMillis {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + * @param priority {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. + */ + constructor( + identifier = null, + uri = null, + batchSize = null, + batchIntervalMillis = null, + priority = null, + ) { + if (identifier !== null && !(typeof identifier === "string")) { + throw new Error("identifier must be String"); + } + + if (uri !== null && !(typeof uri === "string")) { + throw new Error("uri must be String"); + } + + if (batchSize !== null && !(typeof batchSize === "number")) { + throw new Error("batchSize must be Number"); + } + + if (batchIntervalMillis !== null && !(typeof batchIntervalMillis === "number")) { + throw new Error("batchIntervalMillis must be Number"); + } + + if (priority !== null && !(typeof priority === "number")) { + throw new Error("priority must be Number"); + } + + this.#__identifier = identifier; + this.#__uri = uri; + this.#__batchSize = batchSize; + this.#__batchIntervalMillis = batchIntervalMillis; + this.#__priority = priority; + } + + /** + * A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + * @returns {String} + + */ + get identifier() { + return this.#__identifier; + } + /** + * @param value {String} A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + */ + set identifier(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("identifier must be String"); + } + + this.#__identifier = value; + } + /** + * @param value {String} A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + * @returns {aws-greengrass-core-sdk.StreamManager.HTTPConfig} + */ + withIdentifier(value) { + this.identifier = value; + return this; + } + + /** + * URL for HTTP endpoint which should receive the POST requests for export. + * @returns {String} + + */ + get uri() { + return this.#__uri; + } + /** + * @param value {String} URL for HTTP endpoint which should receive the POST requests for export. + */ + set uri(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("uri must be String"); + } + + this.#__uri = value; + } + /** + * @param value {String} URL for HTTP endpoint which should receive the POST requests for export. + * @returns {aws-greengrass-core-sdk.StreamManager.HTTPConfig} + */ + withUri(value) { + this.uri = value; + return this; + } + + /** + * The maximum size of a batch to send to the destination. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum batch size is 1 and the maximum is 500. + * @returns {Number} + + */ + get batchSize() { + return this.#__batchSize; + } + /** + * @param value {Number} The maximum size of a batch to send to the destination. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum batch size is 1 and the maximum is 500. + */ + set batchSize(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("batchSize must be Number"); + } + + this.#__batchSize = value; + } + /** + * @param value {Number} The maximum size of a batch to send to the destination. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum batch size is 1 and the maximum is 500. + * @returns {aws-greengrass-core-sdk.StreamManager.HTTPConfig} + */ + withBatchSize(value) { + this.batchSize = value; + return this; + } + + /** + * The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + * @returns {Number} + + */ + get batchIntervalMillis() { + return this.#__batchIntervalMillis; + } + /** + * @param value {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + */ + set batchIntervalMillis(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("batchIntervalMillis must be Number"); + } + + this.#__batchIntervalMillis = value; + } + /** + * @param value {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + * @returns {aws-greengrass-core-sdk.StreamManager.HTTPConfig} + */ + withBatchIntervalMillis(value) { + this.batchIntervalMillis = value; + return this; + } + + /** + * Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. + * @returns {Number} + + */ + get priority() { + return this.#__priority; + } + /** + * @param value {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. + */ + set priority(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("priority must be Number"); + } + + this.#__priority = value; + } + /** + * @param value {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. + * @returns {aws-greengrass-core-sdk.StreamManager.HTTPConfig} + */ + withPriority(value) { + this.priority = value; + return this; + } + + static fromMap(d) { + const ret = new HTTPConfig(); + if ("identifier" in d) { + ret.identifier = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["identifier"]) : d["identifier"]; + } + if ("uri" in d) { + ret.uri = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["uri"]) : d["uri"]; + } + if ("batchSize" in d) { + ret.batchSize = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["batchSize"]) : d["batchSize"]; + } + if ("batchIntervalMillis" in d) { + ret.batchIntervalMillis = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["batchIntervalMillis"]) : d["batchIntervalMillis"]; + } + if ("priority" in d) { + ret.priority = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["priority"]) : d["priority"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.identifier !== null) { + d["identifier"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.identifier), "asMap") ? this.identifier.asMap() : this.identifier; + } + if (this.uri !== null) { + d["uri"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.uri), "asMap") ? this.uri.asMap() : this.uri; + } + if (this.batchSize !== null) { + d["batchSize"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.batchSize), "asMap") ? this.batchSize.asMap() : this.batchSize; + } + if (this.batchIntervalMillis !== null) { + d["batchIntervalMillis"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.batchIntervalMillis), "asMap") ? this.batchIntervalMillis.asMap() : this.batchIntervalMillis; + } + if (this.priority !== null) { + d["priority"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.priority), "asMap") ? this.priority.asMap() : this.priority; + } + return d; + } +}; + +Object.defineProperty(HTTPConfig, "typesMap", { + value: { + identifier: { + 'type': String, + 'subtype': null + }, + uri: { + 'type': String, + 'subtype': null + }, + batchSize: { + 'type': Number, + 'subtype': null + }, + batchIntervalMillis: { + 'type': Number, + 'subtype': null + }, + priority: { + 'type': Number, + 'subtype': null + }, + } +}); +Object.defineProperty(HTTPConfig, "formatsMap", { + value: {} +}); +Object.defineProperty(HTTPConfig, "validationsMap", { + value: { + 'identifier': { + 'required': true, + 'minLength': 1, + 'maxLength': 255, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'uri': { + 'required': true, + 'minLength': 1, + }, + 'batchSize': { + 'required': false, + 'maximum': 500, + 'minimum': 1, + }, + 'batchIntervalMillis': { + 'required': false, + 'maximum': 9223372036854, + 'minimum': 60000, + }, + 'priority': { + 'required': false, + 'maximum': 10, + 'minimum': 1, + }, + } +}); + +/** + * Configuration object for IoT Analytics export destination. + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class IoTAnalyticsConfig { + #__identifier = null; + #__iotChannel = null; + #__iotMsgIdPrefix = null; + #__batchSize = null; + #__batchIntervalMillis = null; + #__priority = null; + + /** + * @param identifier {String} A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + * @param iotChannel {String} The name of the IoT Analytics Channel that this exporter should upload to + * @param iotMsgIdPrefix {String} A string prefixed to each unique message id. After this prefix, StreamManager may append more data to make the message ID unique. + This prefix must be less than 32 characters. + * @param batchSize {Number} The maximum size of a batch to send to IoT Analytics. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 100. + * @param batchIntervalMillis {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + * @param priority {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. + */ + constructor( + identifier = null, + iotChannel = null, + iotMsgIdPrefix = null, + batchSize = null, + batchIntervalMillis = null, + priority = null, + ) { + if (identifier !== null && !(typeof identifier === "string")) { + throw new Error("identifier must be String"); + } + + if (iotChannel !== null && !(typeof iotChannel === "string")) { + throw new Error("iotChannel must be String"); + } + + if (iotMsgIdPrefix !== null && !(typeof iotMsgIdPrefix === "string")) { + throw new Error("iotMsgIdPrefix must be String"); + } + + if (batchSize !== null && !(typeof batchSize === "number")) { + throw new Error("batchSize must be Number"); + } + + if (batchIntervalMillis !== null && !(typeof batchIntervalMillis === "number")) { + throw new Error("batchIntervalMillis must be Number"); + } + + if (priority !== null && !(typeof priority === "number")) { + throw new Error("priority must be Number"); + } + + this.#__identifier = identifier; + this.#__iotChannel = iotChannel; + this.#__iotMsgIdPrefix = iotMsgIdPrefix; + this.#__batchSize = batchSize; + this.#__batchIntervalMillis = batchIntervalMillis; + this.#__priority = priority; + } + + /** + * A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + * @returns {String} + + */ + get identifier() { + return this.#__identifier; + } + /** + * @param value {String} A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + */ + set identifier(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("identifier must be String"); + } + + this.#__identifier = value; + } + /** + * @param value {String} A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig} + */ + withIdentifier(value) { + this.identifier = value; + return this; + } + + /** + * The name of the IoT Analytics Channel that this exporter should upload to + * @returns {String} + + */ + get iotChannel() { + return this.#__iotChannel; + } + /** + * @param value {String} The name of the IoT Analytics Channel that this exporter should upload to + */ + set iotChannel(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("iotChannel must be String"); + } + + this.#__iotChannel = value; + } + /** + * @param value {String} The name of the IoT Analytics Channel that this exporter should upload to + * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig} + */ + withIotChannel(value) { + this.iotChannel = value; + return this; + } + + /** + * A string prefixed to each unique message id. After this prefix, StreamManager may append more data to make the message ID unique. + This prefix must be less than 32 characters. + * @returns {String} + + */ + get iotMsgIdPrefix() { + return this.#__iotMsgIdPrefix; + } + /** + * @param value {String} A string prefixed to each unique message id. After this prefix, StreamManager may append more data to make the message ID unique. + This prefix must be less than 32 characters. + */ + set iotMsgIdPrefix(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("iotMsgIdPrefix must be String"); + } + + this.#__iotMsgIdPrefix = value; + } + /** + * @param value {String} A string prefixed to each unique message id. After this prefix, StreamManager may append more data to make the message ID unique. + This prefix must be less than 32 characters. + * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig} + */ + withIotMsgIdPrefix(value) { + this.iotMsgIdPrefix = value; + return this; + } + + /** + * The maximum size of a batch to send to IoT Analytics. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 100. + * @returns {Number} + + */ + get batchSize() { + return this.#__batchSize; + } + /** + * @param value {Number} The maximum size of a batch to send to IoT Analytics. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 100. + */ + set batchSize(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("batchSize must be Number"); + } + + this.#__batchSize = value; + } + /** + * @param value {Number} The maximum size of a batch to send to IoT Analytics. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 100. + * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig} + */ + withBatchSize(value) { + this.batchSize = value; + return this; + } + + /** + * The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + * @returns {Number} + + */ + get batchIntervalMillis() { + return this.#__batchIntervalMillis; + } + /** + * @param value {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + */ + set batchIntervalMillis(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("batchIntervalMillis must be Number"); + } + + this.#__batchIntervalMillis = value; + } + /** + * @param value {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig} + */ + withBatchIntervalMillis(value) { + this.batchIntervalMillis = value; + return this; + } + + /** + * Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. + * @returns {Number} + + */ + get priority() { + return this.#__priority; + } + /** + * @param value {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. + */ + set priority(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("priority must be Number"); + } + + this.#__priority = value; + } + /** + * @param value {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. + * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig} + */ + withPriority(value) { + this.priority = value; + return this; + } + + static fromMap(d) { + const ret = new IoTAnalyticsConfig(); + if ("identifier" in d) { + ret.identifier = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["identifier"]) : d["identifier"]; + } + if ("iotChannel" in d) { + ret.iotChannel = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["iotChannel"]) : d["iotChannel"]; + } + if ("iotMsgIdPrefix" in d) { + ret.iotMsgIdPrefix = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["iotMsgIdPrefix"]) : d["iotMsgIdPrefix"]; + } + if ("batchSize" in d) { + ret.batchSize = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["batchSize"]) : d["batchSize"]; + } + if ("batchIntervalMillis" in d) { + ret.batchIntervalMillis = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["batchIntervalMillis"]) : d["batchIntervalMillis"]; + } + if ("priority" in d) { + ret.priority = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["priority"]) : d["priority"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.identifier !== null) { + d["identifier"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.identifier), "asMap") ? this.identifier.asMap() : this.identifier; + } + if (this.iotChannel !== null) { + d["iotChannel"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.iotChannel), "asMap") ? this.iotChannel.asMap() : this.iotChannel; + } + if (this.iotMsgIdPrefix !== null) { + d["iotMsgIdPrefix"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.iotMsgIdPrefix), "asMap") ? this.iotMsgIdPrefix.asMap() : this.iotMsgIdPrefix; + } + if (this.batchSize !== null) { + d["batchSize"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.batchSize), "asMap") ? this.batchSize.asMap() : this.batchSize; + } + if (this.batchIntervalMillis !== null) { + d["batchIntervalMillis"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.batchIntervalMillis), "asMap") ? this.batchIntervalMillis.asMap() : this.batchIntervalMillis; + } + if (this.priority !== null) { + d["priority"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.priority), "asMap") ? this.priority.asMap() : this.priority; + } + return d; + } +}; + +Object.defineProperty(IoTAnalyticsConfig, "typesMap", { + value: { + identifier: { + 'type': String, + 'subtype': null + }, + iotChannel: { + 'type': String, + 'subtype': null + }, + iotMsgIdPrefix: { + 'type': String, + 'subtype': null + }, + batchSize: { + 'type': Number, + 'subtype': null + }, + batchIntervalMillis: { + 'type': Number, + 'subtype': null + }, + priority: { + 'type': Number, + 'subtype': null + }, + } +}); +Object.defineProperty(IoTAnalyticsConfig, "formatsMap", { + value: {} +}); +Object.defineProperty(IoTAnalyticsConfig, "validationsMap", { + value: { + 'identifier': { + 'required': true, + 'minLength': 1, + 'maxLength': 255, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'iotChannel': { + 'required': true, + 'minLength': 1, + }, + 'iotMsgIdPrefix': { + 'required': false, + 'maxLength': 32, + }, + 'batchSize': { + 'required': false, + 'maximum': 100, + 'minimum': 1, + }, + 'batchIntervalMillis': { + 'required': false, + 'maximum': 9223372036854, + 'minimum': 60000, + }, + 'priority': { + 'required': false, + 'maximum': 10, + 'minimum': 1, + }, + } +}); + +/** + * Configuration object for Kinesis data streams export destination. + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class KinesisConfig { + #__identifier = null; + #__kinesisStreamName = null; + #__batchSize = null; + #__batchIntervalMillis = null; + #__priority = null; + + /** + * @param identifier {String} A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + * @param kinesisStreamName {String} The name of the Kinesis data stream that this exporter should upload to + * @param batchSize {Number} The maximum size of a batch to send to Kinesis. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 500. + * @param batchIntervalMillis {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + * @param priority {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. + */ + constructor( + identifier = null, + kinesisStreamName = null, + batchSize = null, + batchIntervalMillis = null, + priority = null, + ) { + if (identifier !== null && !(typeof identifier === "string")) { + throw new Error("identifier must be String"); + } + + if (kinesisStreamName !== null && !(typeof kinesisStreamName === "string")) { + throw new Error("kinesisStreamName must be String"); + } + + if (batchSize !== null && !(typeof batchSize === "number")) { + throw new Error("batchSize must be Number"); + } + + if (batchIntervalMillis !== null && !(typeof batchIntervalMillis === "number")) { + throw new Error("batchIntervalMillis must be Number"); + } + + if (priority !== null && !(typeof priority === "number")) { + throw new Error("priority must be Number"); + } + + this.#__identifier = identifier; + this.#__kinesisStreamName = kinesisStreamName; + this.#__batchSize = batchSize; + this.#__batchIntervalMillis = batchIntervalMillis; + this.#__priority = priority; + } + + /** + * A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + * @returns {String} + + */ + get identifier() { + return this.#__identifier; + } + /** + * @param value {String} A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + */ + set identifier(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("identifier must be String"); + } + + this.#__identifier = value; + } + /** + * @param value {String} A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + * @returns {aws-greengrass-core-sdk.StreamManager.KinesisConfig} + */ + withIdentifier(value) { + this.identifier = value; + return this; + } + + /** + * The name of the Kinesis data stream that this exporter should upload to + * @returns {String} + + */ + get kinesisStreamName() { + return this.#__kinesisStreamName; + } + /** + * @param value {String} The name of the Kinesis data stream that this exporter should upload to + */ + set kinesisStreamName(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("kinesisStreamName must be String"); + } + + this.#__kinesisStreamName = value; + } + /** + * @param value {String} The name of the Kinesis data stream that this exporter should upload to + * @returns {aws-greengrass-core-sdk.StreamManager.KinesisConfig} + */ + withKinesisStreamName(value) { + this.kinesisStreamName = value; + return this; + } + + /** + * The maximum size of a batch to send to Kinesis. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 500. + * @returns {Number} + + */ + get batchSize() { + return this.#__batchSize; + } + /** + * @param value {Number} The maximum size of a batch to send to Kinesis. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 500. + */ + set batchSize(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("batchSize must be Number"); + } + + this.#__batchSize = value; + } + /** + * @param value {Number} The maximum size of a batch to send to Kinesis. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 500. + * @returns {aws-greengrass-core-sdk.StreamManager.KinesisConfig} + */ + withBatchSize(value) { + this.batchSize = value; + return this; + } + + /** + * The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + * @returns {Number} + + */ + get batchIntervalMillis() { + return this.#__batchIntervalMillis; + } + /** + * @param value {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + */ + set batchIntervalMillis(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("batchIntervalMillis must be Number"); + } + + this.#__batchIntervalMillis = value; + } + /** + * @param value {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + * @returns {aws-greengrass-core-sdk.StreamManager.KinesisConfig} + */ + withBatchIntervalMillis(value) { + this.batchIntervalMillis = value; + return this; + } + + /** + * Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. + * @returns {Number} + + */ + get priority() { + return this.#__priority; + } + /** + * @param value {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. + */ + set priority(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("priority must be Number"); + } + + this.#__priority = value; + } + /** + * @param value {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. + * @returns {aws-greengrass-core-sdk.StreamManager.KinesisConfig} + */ + withPriority(value) { + this.priority = value; + return this; + } + + static fromMap(d) { + const ret = new KinesisConfig(); + if ("identifier" in d) { + ret.identifier = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["identifier"]) : d["identifier"]; + } + if ("kinesisStreamName" in d) { + ret.kinesisStreamName = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["kinesisStreamName"]) : d["kinesisStreamName"]; + } + if ("batchSize" in d) { + ret.batchSize = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["batchSize"]) : d["batchSize"]; + } + if ("batchIntervalMillis" in d) { + ret.batchIntervalMillis = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["batchIntervalMillis"]) : d["batchIntervalMillis"]; + } + if ("priority" in d) { + ret.priority = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["priority"]) : d["priority"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.identifier !== null) { + d["identifier"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.identifier), "asMap") ? this.identifier.asMap() : this.identifier; + } + if (this.kinesisStreamName !== null) { + d["kinesisStreamName"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.kinesisStreamName), "asMap") ? this.kinesisStreamName.asMap() : this.kinesisStreamName; + } + if (this.batchSize !== null) { + d["batchSize"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.batchSize), "asMap") ? this.batchSize.asMap() : this.batchSize; + } + if (this.batchIntervalMillis !== null) { + d["batchIntervalMillis"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.batchIntervalMillis), "asMap") ? this.batchIntervalMillis.asMap() : this.batchIntervalMillis; + } + if (this.priority !== null) { + d["priority"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.priority), "asMap") ? this.priority.asMap() : this.priority; + } + return d; + } +}; + +Object.defineProperty(KinesisConfig, "typesMap", { + value: { + identifier: { + 'type': String, + 'subtype': null + }, + kinesisStreamName: { + 'type': String, + 'subtype': null + }, + batchSize: { + 'type': Number, + 'subtype': null + }, + batchIntervalMillis: { + 'type': Number, + 'subtype': null + }, + priority: { + 'type': Number, + 'subtype': null + }, + } +}); +Object.defineProperty(KinesisConfig, "formatsMap", { + value: {} +}); +Object.defineProperty(KinesisConfig, "validationsMap", { + value: { + 'identifier': { + 'required': true, + 'minLength': 1, + 'maxLength': 255, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'kinesisStreamName': { + 'required': true, + 'minLength': 1, + }, + 'batchSize': { + 'required': false, + 'maximum': 500, + 'minimum': 1, + }, + 'batchIntervalMillis': { + 'required': false, + 'maximum': 9223372036854, + 'minimum': 60000, + }, + 'priority': { + 'required': false, + 'maximum': 10, + 'minimum': 1, + }, + } +}); + +/** + * Defines how and where the stream is uploaded + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class ExportDefinition { + #__http = null; + #__iotAnalytics = null; + #__kinesis = null; + + /** + * @param http {aws-greengrass-core-sdk.StreamManager.HTTPConfig[]} Defines how the stream is uploaded to an HTTP endpoint + * @param iotAnalytics {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig[]} Defines how the stream is uploaded to IoT Analytics + * @param kinesis {aws-greengrass-core-sdk.StreamManager.KinesisConfig[]} Defines how the stream is uploaded to Kinesis + */ + constructor( + http = null, + iotAnalytics = null, + kinesis = null, + ) { + if (http !== null && !(http instanceof Array)) { + throw new Error("http must be Array"); + } + if (http !== null && !http.every((v) => v instanceof HTTPConfig)) { + throw new Error("http array values must be HTTPConfig"); + } + + if (iotAnalytics !== null && !(iotAnalytics instanceof Array)) { + throw new Error("iotAnalytics must be Array"); + } + if (iotAnalytics !== null && !iotAnalytics.every((v) => v instanceof IoTAnalyticsConfig)) { + throw new Error("iotAnalytics array values must be IoTAnalyticsConfig"); + } + + if (kinesis !== null && !(kinesis instanceof Array)) { + throw new Error("kinesis must be Array"); + } + if (kinesis !== null && !kinesis.every((v) => v instanceof KinesisConfig)) { + throw new Error("kinesis array values must be KinesisConfig"); + } + + this.#__http = http; + this.#__iotAnalytics = iotAnalytics; + this.#__kinesis = kinesis; + } + + /** + * Defines how the stream is uploaded to an HTTP endpoint + * @returns {aws-greengrass-core-sdk.StreamManager.HTTPConfig[]} + + */ + get http() { + return this.#__http; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.HTTPConfig[]} Defines how the stream is uploaded to an HTTP endpoint + */ + set http(value) { + if (value !== null && !(value instanceof Array)) { + throw new Error("http must be Array"); + } + if (value !== null && !value.every((v) => v instanceof HTTPConfig)) { + throw new Error("http array values must be HTTPConfig"); + } + + this.#__http = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.HTTPConfig[]} Defines how the stream is uploaded to an HTTP endpoint + * @returns {aws-greengrass-core-sdk.StreamManager.ExportDefinition} + */ + withHttp(value) { + this.http = value; + return this; + } + + /** + * Defines how the stream is uploaded to IoT Analytics + * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig[]} + + */ + get iotAnalytics() { + return this.#__iotAnalytics; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig[]} Defines how the stream is uploaded to IoT Analytics + */ + set iotAnalytics(value) { + if (value !== null && !(value instanceof Array)) { + throw new Error("iotAnalytics must be Array"); + } + if (value !== null && !value.every((v) => v instanceof IoTAnalyticsConfig)) { + throw new Error("iotAnalytics array values must be IoTAnalyticsConfig"); + } + + this.#__iotAnalytics = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig[]} Defines how the stream is uploaded to IoT Analytics + * @returns {aws-greengrass-core-sdk.StreamManager.ExportDefinition} + */ + withIotAnalytics(value) { + this.iotAnalytics = value; + return this; + } + + /** + * Defines how the stream is uploaded to Kinesis + * @returns {aws-greengrass-core-sdk.StreamManager.KinesisConfig[]} + + */ + get kinesis() { + return this.#__kinesis; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.KinesisConfig[]} Defines how the stream is uploaded to Kinesis + */ + set kinesis(value) { + if (value !== null && !(value instanceof Array)) { + throw new Error("kinesis must be Array"); + } + if (value !== null && !value.every((v) => v instanceof KinesisConfig)) { + throw new Error("kinesis array values must be KinesisConfig"); + } + + this.#__kinesis = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.KinesisConfig[]} Defines how the stream is uploaded to Kinesis + * @returns {aws-greengrass-core-sdk.StreamManager.ExportDefinition} + */ + withKinesis(value) { + this.kinesis = value; + return this; + } + + static fromMap(d) { + const ret = new ExportDefinition(); + if ("http" in d) { + ret.http = d["http"].reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(HTTPConfig, "fromMap") ? HTTPConfig.fromMap(v) : v); + return acc; + }, []); + } + if ("iotAnalytics" in d) { + ret.iotAnalytics = d["iotAnalytics"].reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(IoTAnalyticsConfig, "fromMap") ? IoTAnalyticsConfig.fromMap(v) : v); + return acc; + }, []); + } + if ("kinesis" in d) { + ret.kinesis = d["kinesis"].reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(KinesisConfig, "fromMap") ? KinesisConfig.fromMap(v) : v); + return acc; + }, []); + } + return ret; + } + + asMap() { + const d = {}; + if (this.http !== null) { + d["http"] = this.http.reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v); + return acc; + }, []); + } + if (this.iotAnalytics !== null) { + d["iotAnalytics"] = this.iotAnalytics.reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v); + return acc; + }, []); + } + if (this.kinesis !== null) { + d["kinesis"] = this.kinesis.reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v); + return acc; + }, []); + } + return d; + } +}; + +Object.defineProperty(ExportDefinition, "typesMap", { + value: { + http: { + 'type': Array, + 'subtype': HTTPConfig + }, + iotAnalytics: { + 'type': Array, + 'subtype': IoTAnalyticsConfig + }, + kinesis: { + 'type': Array, + 'subtype': KinesisConfig + }, + } +}); +Object.defineProperty(ExportDefinition, "formatsMap", { + value: {} +}); +Object.defineProperty(ExportDefinition, "validationsMap", { + value: { + 'http': { + 'required': false, + }, + 'iotAnalytics': { + 'required': false, + }, + 'kinesis': { + 'required': false, + }, + } +}); + +/** + * Object defining a message stream used in the CreateMessageStream API. + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class MessageStreamDefinition { + #__name = null; + #__maxSize = null; + #__streamSegmentSize = null; + #__timeToLiveMillis = null; + #__strategyOnFull = null; + #__persistence = null; + #__flushOnWrite = null; + #__exportDefinition = null; + + /** + * @param name {String} The unique name of the stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + * @param maxSize {Number} The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB. + * @param streamSegmentSize {Number} The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB. + Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted. + * @param timeToLiveMillis {Number} Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + * @param strategyOnFull {aws-greengrass-core-sdk.StreamManager.StrategyOnFull} What to do when the maximum size of the stream is reached. + RejectNewData: any append message request after the stream is full will be rejected with an exception. + OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message. + * @param persistence {aws-greengrass-core-sdk.StreamManager.Persistence} Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. + Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk. + * @param flushOnWrite {Boolean} This only applies when Persistence is set to File mode. + Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false. + * @param exportDefinition {aws-greengrass-core-sdk.StreamManager.ExportDefinition} Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail. + */ + constructor( + name = null, + maxSize = 268435456, + streamSegmentSize = 16777216, + timeToLiveMillis = null, + strategyOnFull = null, + persistence = null, + flushOnWrite = null, + exportDefinition = null, + ) { + if (name !== null && !(typeof name === "string")) { + throw new Error("name must be String"); + } + + if (maxSize !== null && !(typeof maxSize === "number")) { + throw new Error("maxSize must be Number"); + } + + if (streamSegmentSize !== null && !(typeof streamSegmentSize === "number")) { + throw new Error("streamSegmentSize must be Number"); + } + + if (timeToLiveMillis !== null && !(typeof timeToLiveMillis === "number")) { + throw new Error("timeToLiveMillis must be Number"); + } + + if (strategyOnFull !== null && !(strategyOnFull instanceof StrategyOnFull)) { + throw new Error("strategyOnFull must be StrategyOnFull"); + } + + if (persistence !== null && !(persistence instanceof Persistence)) { + throw new Error("persistence must be Persistence"); + } + + if (flushOnWrite !== null && !(typeof flushOnWrite === "boolean")) { + throw new Error("flushOnWrite must be Boolean"); + } + + if (exportDefinition !== null && !(exportDefinition instanceof ExportDefinition)) { + throw new Error("exportDefinition must be ExportDefinition"); + } + + this.#__name = name; + this.#__maxSize = maxSize; + this.#__streamSegmentSize = streamSegmentSize; + this.#__timeToLiveMillis = timeToLiveMillis; + this.#__strategyOnFull = strategyOnFull; + this.#__persistence = persistence; + this.#__flushOnWrite = flushOnWrite; + this.#__exportDefinition = exportDefinition; + } + + /** + * The unique name of the stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + * @returns {String} + + */ + get name() { + return this.#__name; + } + /** + * @param value {String} The unique name of the stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + */ + set name(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("name must be String"); + } + + this.#__name = value; + } + /** + * @param value {String} The unique name of the stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + */ + withName(value) { + this.name = value; + return this; + } + + /** + * The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB. + * @returns {Number} + + */ + get maxSize() { + return this.#__maxSize; + } + /** + * @param value {Number} The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB. + */ + set maxSize(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("maxSize must be Number"); + } + + this.#__maxSize = value; + } + /** + * @param value {Number} The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + */ + withMaxSize(value) { + this.maxSize = value; + return this; + } + + /** + * The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB. + Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted. + * @returns {Number} + + */ + get streamSegmentSize() { + return this.#__streamSegmentSize; + } + /** + * @param value {Number} The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB. + Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted. + */ + set streamSegmentSize(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("streamSegmentSize must be Number"); + } + + this.#__streamSegmentSize = value; + } + /** + * @param value {Number} The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB. + Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + */ + withStreamSegmentSize(value) { + this.streamSegmentSize = value; + return this; + } + + /** + * Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + * @returns {Number} + + */ + get timeToLiveMillis() { + return this.#__timeToLiveMillis; + } + /** + * @param value {Number} Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + */ + set timeToLiveMillis(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("timeToLiveMillis must be Number"); + } + + this.#__timeToLiveMillis = value; + } + /** + * @param value {Number} Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + */ + withTimeToLiveMillis(value) { + this.timeToLiveMillis = value; + return this; + } + + /** + * What to do when the maximum size of the stream is reached. + RejectNewData: any append message request after the stream is full will be rejected with an exception. + OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message. + * @returns {aws-greengrass-core-sdk.StreamManager.StrategyOnFull} + + */ + get strategyOnFull() { + return this.#__strategyOnFull; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.StrategyOnFull} What to do when the maximum size of the stream is reached. + RejectNewData: any append message request after the stream is full will be rejected with an exception. + OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message. + */ + set strategyOnFull(value) { + if (value !== null && !(value instanceof StrategyOnFull)) { + throw new Error("strategyOnFull must be StrategyOnFull"); + } + + this.#__strategyOnFull = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.StrategyOnFull} What to do when the maximum size of the stream is reached. + RejectNewData: any append message request after the stream is full will be rejected with an exception. + OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + */ + withStrategyOnFull(value) { + this.strategyOnFull = value; + return this; + } + + /** + * Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. + Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk. + * @returns {aws-greengrass-core-sdk.StreamManager.Persistence} + + */ + get persistence() { + return this.#__persistence; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.Persistence} Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. + Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk. + */ + set persistence(value) { + if (value !== null && !(value instanceof Persistence)) { + throw new Error("persistence must be Persistence"); + } + + this.#__persistence = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.Persistence} Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. + Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + */ + withPersistence(value) { + this.persistence = value; + return this; + } + + /** + * This only applies when Persistence is set to File mode. + Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false. + * @returns {Boolean} + + */ + get flushOnWrite() { + return this.#__flushOnWrite; + } + /** + * @param value {Boolean} This only applies when Persistence is set to File mode. + Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false. + */ + set flushOnWrite(value) { + if (value !== null && !(typeof value === "boolean")) { + throw new Error("flushOnWrite must be Boolean"); + } + + this.#__flushOnWrite = value; + } + /** + * @param value {Boolean} This only applies when Persistence is set to File mode. + Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + */ + withFlushOnWrite(value) { + this.flushOnWrite = value; + return this; + } + + /** + * Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail. + * @returns {aws-greengrass-core-sdk.StreamManager.ExportDefinition} + + */ + get exportDefinition() { + return this.#__exportDefinition; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ExportDefinition} Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail. + */ + set exportDefinition(value) { + if (value !== null && !(value instanceof ExportDefinition)) { + throw new Error("exportDefinition must be ExportDefinition"); + } + + this.#__exportDefinition = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ExportDefinition} Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + */ + withExportDefinition(value) { + this.exportDefinition = value; + return this; + } + + static fromMap(d) { + const ret = new MessageStreamDefinition(); + if ("name" in d) { + ret.name = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["name"]) : d["name"]; + } + if ("maxSize" in d) { + ret.maxSize = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["maxSize"]) : d["maxSize"]; + } + if ("streamSegmentSize" in d) { + ret.streamSegmentSize = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["streamSegmentSize"]) : d["streamSegmentSize"]; + } + if ("timeToLiveMillis" in d) { + ret.timeToLiveMillis = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["timeToLiveMillis"]) : d["timeToLiveMillis"]; + } + if ("strategyOnFull" in d) { + ret.strategyOnFull = Object.prototype.hasOwnProperty.call(StrategyOnFull, "fromMap") ? StrategyOnFull.fromMap(d["strategyOnFull"]) : d["strategyOnFull"]; + } + if ("persistence" in d) { + ret.persistence = Object.prototype.hasOwnProperty.call(Persistence, "fromMap") ? Persistence.fromMap(d["persistence"]) : d["persistence"]; + } + if ("flushOnWrite" in d) { + ret.flushOnWrite = Object.prototype.hasOwnProperty.call(Boolean, "fromMap") ? Boolean.fromMap(d["flushOnWrite"]) : d["flushOnWrite"]; + } + if ("exportDefinition" in d) { + ret.exportDefinition = Object.prototype.hasOwnProperty.call(ExportDefinition, "fromMap") ? ExportDefinition.fromMap(d["exportDefinition"]) : d["exportDefinition"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.name !== null) { + d["name"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.name), "asMap") ? this.name.asMap() : this.name; + } + if (this.maxSize !== null) { + d["maxSize"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.maxSize), "asMap") ? this.maxSize.asMap() : this.maxSize; + } + if (this.streamSegmentSize !== null) { + d["streamSegmentSize"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.streamSegmentSize), "asMap") ? this.streamSegmentSize.asMap() : this.streamSegmentSize; + } + if (this.timeToLiveMillis !== null) { + d["timeToLiveMillis"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.timeToLiveMillis), "asMap") ? this.timeToLiveMillis.asMap() : this.timeToLiveMillis; + } + if (this.strategyOnFull !== null) { + d["strategyOnFull"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.strategyOnFull), "asMap") ? this.strategyOnFull.asMap() : this.strategyOnFull; + } + if (this.persistence !== null) { + d["persistence"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.persistence), "asMap") ? this.persistence.asMap() : this.persistence; + } + if (this.flushOnWrite !== null) { + d["flushOnWrite"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.flushOnWrite), "asMap") ? this.flushOnWrite.asMap() : this.flushOnWrite; + } + if (this.exportDefinition !== null) { + d["exportDefinition"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.exportDefinition), "asMap") ? this.exportDefinition.asMap() : this.exportDefinition; + } + return d; + } +}; + +Object.defineProperty(MessageStreamDefinition, "typesMap", { + value: { + name: { + 'type': String, + 'subtype': null + }, + maxSize: { + 'type': Number, + 'subtype': null + }, + streamSegmentSize: { + 'type': Number, + 'subtype': null + }, + timeToLiveMillis: { + 'type': Number, + 'subtype': null + }, + strategyOnFull: { + 'type': StrategyOnFull, + 'subtype': null + }, + persistence: { + 'type': Persistence, + 'subtype': null + }, + flushOnWrite: { + 'type': Boolean, + 'subtype': null + }, + exportDefinition: { + 'type': ExportDefinition, + 'subtype': null + }, + } +}); +Object.defineProperty(MessageStreamDefinition, "formatsMap", { + value: {} +}); +Object.defineProperty(MessageStreamDefinition, "validationsMap", { + value: { + 'name': { + 'required': true, + 'minLength': 1, + 'maxLength': 255, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'maxSize': { + 'required': false, + 'maximum': 9223372036854775807, + 'minimum': 1024, + }, + 'streamSegmentSize': { + 'required': false, + 'maximum': 2147483647, + 'minimum': 1024, + }, + 'timeToLiveMillis': { + 'required': false, + 'maximum': 9223372036854, + 'minimum': 60000, + }, + 'strategyOnFull': { + 'required': true, + }, + 'persistence': { + 'required': false, + }, + 'flushOnWrite': { + 'required': false, + }, + 'exportDefinition': { + 'required': false, + }, + } +}); + +/** + * Message stream information including its definition, storage status and export status + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class MessageStreamInfo { + #__definition = null; + #__storageStatus = null; + #__exportStatuses = null; + + /** + * @param definition {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + * @param storageStatus {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus} Stream status including oldest/newest sequence number and total bytes + * @param exportStatuses {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses[]} + */ + constructor( + definition = null, + storageStatus = null, + exportStatuses = null, + ) { + if (definition !== null && !(definition instanceof MessageStreamDefinition)) { + throw new Error("definition must be MessageStreamDefinition"); + } + + if (storageStatus !== null && !(storageStatus instanceof MessageStreamInfo._storageStatus)) { + throw new Error("storageStatus must be MessageStreamInfo._storageStatus"); + } + + if (exportStatuses !== null && !(exportStatuses instanceof Array)) { + throw new Error("exportStatuses must be Array"); + } + if (exportStatuses !== null && !exportStatuses.every((v) => v instanceof MessageStreamInfo._exportStatuses)) { + throw new Error("exportStatuses array values must be MessageStreamInfo._exportStatuses"); + } + + this.#__definition = definition; + this.#__storageStatus = storageStatus; + this.#__exportStatuses = exportStatuses; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + + */ + get definition() { + return this.#__definition; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + */ + set definition(value) { + if (value !== null && !(value instanceof MessageStreamDefinition)) { + throw new Error("definition must be MessageStreamDefinition"); + } + + this.#__definition = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo} + */ + withDefinition(value) { + this.definition = value; + return this; + } + + /** + * Stream status including oldest/newest sequence number and total bytes + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus} + + */ + get storageStatus() { + return this.#__storageStatus; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus} Stream status including oldest/newest sequence number and total bytes + */ + set storageStatus(value) { + if (value !== null && !(value instanceof MessageStreamInfo._storageStatus)) { + throw new Error("storageStatus must be MessageStreamInfo._storageStatus"); + } + + this.#__storageStatus = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus} Stream status including oldest/newest sequence number and total bytes + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo} + */ + withStorageStatus(value) { + this.storageStatus = value; + return this; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses[]} + + */ + get exportStatuses() { + return this.#__exportStatuses; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses[]} + */ + set exportStatuses(value) { + if (value !== null && !(value instanceof Array)) { + throw new Error("exportStatuses must be Array"); + } + if (value !== null && !value.every((v) => v instanceof MessageStreamInfo._exportStatuses)) { + throw new Error("exportStatuses array values must be MessageStreamInfo._exportStatuses"); + } + + this.#__exportStatuses = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses[]} + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo} + */ + withExportStatuses(value) { + this.exportStatuses = value; + return this; + } + + static fromMap(d) { + const ret = new MessageStreamInfo(); + if ("definition" in d) { + ret.definition = Object.prototype.hasOwnProperty.call(MessageStreamDefinition, "fromMap") ? MessageStreamDefinition.fromMap(d["definition"]) : d["definition"]; + } + if ("storageStatus" in d) { + ret.storageStatus = Object.prototype.hasOwnProperty.call(MessageStreamInfo._storageStatus, "fromMap") ? MessageStreamInfo._storageStatus.fromMap(d["storageStatus"]) : d["storageStatus"]; + } + if ("exportStatuses" in d) { + ret.exportStatuses = d["exportStatuses"].reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(MessageStreamInfo._exportStatuses, "fromMap") ? MessageStreamInfo._exportStatuses.fromMap(v) : v); + return acc; + }, []); + } + return ret; + } + + asMap() { + const d = {}; + if (this.definition !== null) { + d["definition"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.definition), "asMap") ? this.definition.asMap() : this.definition; + } + if (this.storageStatus !== null) { + d["storageStatus"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.storageStatus), "asMap") ? this.storageStatus.asMap() : this.storageStatus; + } + if (this.exportStatuses !== null) { + d["exportStatuses"] = this.exportStatuses.reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v); + return acc; + }, []); + } + return d; + } +}; + +MessageStreamInfo._storageStatus = + /** + * Stream status including oldest/newest sequence number and total bytes + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ + class _storageStatus { + #__oldestSequenceNumber = null; + #__newestSequenceNumber = null; + #__totalBytes = null; + + /** + * @param oldestSequenceNumber {Number} The sequence number of the first message which is still accessible in the stream. + * @param newestSequenceNumber {Number} The sequence number of the last appended message. + * @param totalBytes {Number} The current total size of the stream in bytes. + */ + constructor( + oldestSequenceNumber = null, + newestSequenceNumber = null, + totalBytes = null, + ) { + if (oldestSequenceNumber !== null && !(typeof oldestSequenceNumber === "number")) { + throw new Error("oldestSequenceNumber must be Number"); + } + + if (newestSequenceNumber !== null && !(typeof newestSequenceNumber === "number")) { + throw new Error("newestSequenceNumber must be Number"); + } + + if (totalBytes !== null && !(typeof totalBytes === "number")) { + throw new Error("totalBytes must be Number"); + } + + this.#__oldestSequenceNumber = oldestSequenceNumber; + this.#__newestSequenceNumber = newestSequenceNumber; + this.#__totalBytes = totalBytes; + } + + /** + * The sequence number of the first message which is still accessible in the stream. + * @returns {Number} + + */ + get oldestSequenceNumber() { + return this.#__oldestSequenceNumber; + } + /** + * @param value {Number} The sequence number of the first message which is still accessible in the stream. + */ + set oldestSequenceNumber(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("oldestSequenceNumber must be Number"); + } + + this.#__oldestSequenceNumber = value; + } + /** + * @param value {Number} The sequence number of the first message which is still accessible in the stream. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus} + */ + withOldestSequenceNumber(value) { + this.oldestSequenceNumber = value; + return this; + } + + /** + * The sequence number of the last appended message. + * @returns {Number} + + */ + get newestSequenceNumber() { + return this.#__newestSequenceNumber; + } + /** + * @param value {Number} The sequence number of the last appended message. + */ + set newestSequenceNumber(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("newestSequenceNumber must be Number"); + } + + this.#__newestSequenceNumber = value; + } + /** + * @param value {Number} The sequence number of the last appended message. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus} + */ + withNewestSequenceNumber(value) { + this.newestSequenceNumber = value; + return this; + } + + /** + * The current total size of the stream in bytes. + * @returns {Number} + + */ + get totalBytes() { + return this.#__totalBytes; + } + /** + * @param value {Number} The current total size of the stream in bytes. + */ + set totalBytes(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("totalBytes must be Number"); + } + + this.#__totalBytes = value; + } + /** + * @param value {Number} The current total size of the stream in bytes. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus} + */ + withTotalBytes(value) { + this.totalBytes = value; + return this; + } + + static fromMap(d) { + const ret = new MessageStreamInfo._storageStatus(); + if ("oldestSequenceNumber" in d) { + ret.oldestSequenceNumber = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["oldestSequenceNumber"]) : d["oldestSequenceNumber"]; + } + if ("newestSequenceNumber" in d) { + ret.newestSequenceNumber = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["newestSequenceNumber"]) : d["newestSequenceNumber"]; + } + if ("totalBytes" in d) { + ret.totalBytes = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["totalBytes"]) : d["totalBytes"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.oldestSequenceNumber !== null) { + d["oldestSequenceNumber"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.oldestSequenceNumber), "asMap") ? this.oldestSequenceNumber.asMap() : this.oldestSequenceNumber; + } + if (this.newestSequenceNumber !== null) { + d["newestSequenceNumber"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.newestSequenceNumber), "asMap") ? this.newestSequenceNumber.asMap() : this.newestSequenceNumber; + } + if (this.totalBytes !== null) { + d["totalBytes"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.totalBytes), "asMap") ? this.totalBytes.asMap() : this.totalBytes; + } + return d; + } + }; + +Object.defineProperty(MessageStreamInfo._storageStatus, "typesMap", { + value: { + oldestSequenceNumber: { + 'type': Number, + 'subtype': null + }, + newestSequenceNumber: { + 'type': Number, + 'subtype': null + }, + totalBytes: { + 'type': Number, + 'subtype': null + }, + } +}); +Object.defineProperty(MessageStreamInfo._storageStatus, "formatsMap", { + value: {} +}); +Object.defineProperty(MessageStreamInfo._storageStatus, "validationsMap", { + value: { + 'oldestSequenceNumber': { + 'required': false, + }, + 'newestSequenceNumber': { + 'required': false, + }, + 'totalBytes': { + 'required': false, + }, + } +}); + +MessageStreamInfo._exportStatuses = + /** + * Export status including the export identifier and the last exported sequence number for that export task + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ + class _exportStatuses { + #__exportConfigIdentifier = null; + #__lastExportedSequenceNumber = null; + #__lastExportTime = null; + #__errorMessage = null; + + /** + * @param exportConfigIdentifier {String} The unique export identifier. + * @param lastExportedSequenceNumber {Number} The sequence number of the last message which was successfully exported. + * @param lastExportTime {Number} The last time an export was attempted. Data is Unix epoch time in milliseconds. + * @param errorMessage {String} Error message from the last export attempt if it failed. + */ + constructor( + exportConfigIdentifier = null, + lastExportedSequenceNumber = null, + lastExportTime = null, + errorMessage = null, + ) { + if (exportConfigIdentifier !== null && !(typeof exportConfigIdentifier === "string")) { + throw new Error("exportConfigIdentifier must be String"); + } + + if (lastExportedSequenceNumber !== null && !(typeof lastExportedSequenceNumber === "number")) { + throw new Error("lastExportedSequenceNumber must be Number"); + } + + if (lastExportTime !== null && !(typeof lastExportTime === "number")) { + throw new Error("lastExportTime must be Number"); + } + + if (errorMessage !== null && !(typeof errorMessage === "string")) { + throw new Error("errorMessage must be String"); + } + + this.#__exportConfigIdentifier = exportConfigIdentifier; + this.#__lastExportedSequenceNumber = lastExportedSequenceNumber; + this.#__lastExportTime = lastExportTime; + this.#__errorMessage = errorMessage; + } + + /** + * The unique export identifier. + * @returns {String} + + */ + get exportConfigIdentifier() { + return this.#__exportConfigIdentifier; + } + /** + * @param value {String} The unique export identifier. + */ + set exportConfigIdentifier(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("exportConfigIdentifier must be String"); + } + + this.#__exportConfigIdentifier = value; + } + /** + * @param value {String} The unique export identifier. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses} + */ + withExportConfigIdentifier(value) { + this.exportConfigIdentifier = value; + return this; + } + + /** + * The sequence number of the last message which was successfully exported. + * @returns {Number} + + */ + get lastExportedSequenceNumber() { + return this.#__lastExportedSequenceNumber; + } + /** + * @param value {Number} The sequence number of the last message which was successfully exported. + */ + set lastExportedSequenceNumber(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("lastExportedSequenceNumber must be Number"); + } + + this.#__lastExportedSequenceNumber = value; + } + /** + * @param value {Number} The sequence number of the last message which was successfully exported. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses} + */ + withLastExportedSequenceNumber(value) { + this.lastExportedSequenceNumber = value; + return this; + } + + /** + * The last time an export was attempted. Data is Unix epoch time in milliseconds. + * @returns {Number} + + */ + get lastExportTime() { + return this.#__lastExportTime; + } + /** + * @param value {Number} The last time an export was attempted. Data is Unix epoch time in milliseconds. + */ + set lastExportTime(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("lastExportTime must be Number"); + } + + this.#__lastExportTime = value; + } + /** + * @param value {Number} The last time an export was attempted. Data is Unix epoch time in milliseconds. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses} + */ + withLastExportTime(value) { + this.lastExportTime = value; + return this; + } + + /** + * Error message from the last export attempt if it failed. + * @returns {String} + + */ + get errorMessage() { + return this.#__errorMessage; + } + /** + * @param value {String} Error message from the last export attempt if it failed. + */ + set errorMessage(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("errorMessage must be String"); + } + + this.#__errorMessage = value; + } + /** + * @param value {String} Error message from the last export attempt if it failed. + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses} + */ + withErrorMessage(value) { + this.errorMessage = value; + return this; + } + + static fromMap(d) { + const ret = new MessageStreamInfo._exportStatuses(); + if ("exportConfigIdentifier" in d) { + ret.exportConfigIdentifier = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["exportConfigIdentifier"]) : d["exportConfigIdentifier"]; + } + if ("lastExportedSequenceNumber" in d) { + ret.lastExportedSequenceNumber = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["lastExportedSequenceNumber"]) : d["lastExportedSequenceNumber"]; + } + if ("lastExportTime" in d) { + ret.lastExportTime = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["lastExportTime"]) : d["lastExportTime"]; + } + if ("errorMessage" in d) { + ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.exportConfigIdentifier !== null) { + d["exportConfigIdentifier"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.exportConfigIdentifier), "asMap") ? this.exportConfigIdentifier.asMap() : this.exportConfigIdentifier; + } + if (this.lastExportedSequenceNumber !== null) { + d["lastExportedSequenceNumber"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.lastExportedSequenceNumber), "asMap") ? this.lastExportedSequenceNumber.asMap() : this.lastExportedSequenceNumber; + } + if (this.lastExportTime !== null) { + d["lastExportTime"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.lastExportTime), "asMap") ? this.lastExportTime.asMap() : this.lastExportTime; + } + if (this.errorMessage !== null) { + d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage; + } + return d; + } + }; + +Object.defineProperty(MessageStreamInfo._exportStatuses, "typesMap", { + value: { + exportConfigIdentifier: { + 'type': String, + 'subtype': null + }, + lastExportedSequenceNumber: { + 'type': Number, + 'subtype': null + }, + lastExportTime: { + 'type': Number, + 'subtype': null + }, + errorMessage: { + 'type': String, + 'subtype': null + }, + } +}); +Object.defineProperty(MessageStreamInfo._exportStatuses, "formatsMap", { + value: {} +}); +Object.defineProperty(MessageStreamInfo._exportStatuses, "validationsMap", { + value: { + 'exportConfigIdentifier': { + 'required': false, + }, + 'lastExportedSequenceNumber': { + 'required': true, + }, + 'lastExportTime': { + 'required': false, + }, + 'errorMessage': { + 'required': false, + }, + } +}); + +Object.defineProperty(MessageStreamInfo, "typesMap", { + value: { + definition: { + 'type': MessageStreamDefinition, + 'subtype': null + }, + storageStatus: { + 'type': MessageStreamInfo._storageStatus, + 'subtype': null + }, + exportStatuses: { + 'type': Array, + 'subtype': MessageStreamInfo._exportStatuses + }, + } +}); +Object.defineProperty(MessageStreamInfo, "formatsMap", { + value: {} +}); +Object.defineProperty(MessageStreamInfo, "validationsMap", { + value: { + 'definition': { + 'required': true, + }, + 'storageStatus': { + 'required': true, + }, + 'exportStatuses': { + 'required': false, + }, + } +}); + +/** + * Message object containing metadata and the user's payload + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class Message { + #__streamName = null; + #__sequenceNumber = null; + #__ingestTime = null; + #__payload = null; + + /** + * @param streamName {String} The name of the stream which this message is in. + * @param sequenceNumber {Number} The sequence number of this message within the stream. + * @param ingestTime {Number} The time that the message was ingested to Stream Manager. Data is Unix epoch time in milliseconds. + * @param payload {Buffer} The binary message data. + */ + constructor( + streamName = null, + sequenceNumber = null, + ingestTime = null, + payload = null, + ) { + if (streamName !== null && !(typeof streamName === "string")) { + throw new Error("streamName must be String"); + } + + if (sequenceNumber !== null && !(typeof sequenceNumber === "number")) { + throw new Error("sequenceNumber must be Number"); + } + + if (ingestTime !== null && !(typeof ingestTime === "number")) { + throw new Error("ingestTime must be Number"); + } + + if (payload !== null && !(payload instanceof Buffer)) { + throw new Error("payload must be Buffer"); + } + + this.#__streamName = streamName; + this.#__sequenceNumber = sequenceNumber; + this.#__ingestTime = ingestTime; + this.#__payload = payload; + } + + /** + * The name of the stream which this message is in. + * @returns {String} + + */ + get streamName() { + return this.#__streamName; + } + /** + * @param value {String} The name of the stream which this message is in. + */ + set streamName(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("streamName must be String"); + } + + this.#__streamName = value; + } + /** + * @param value {String} The name of the stream which this message is in. + * @returns {aws-greengrass-core-sdk.StreamManager.Message} + */ + withStreamName(value) { + this.streamName = value; + return this; + } + + /** + * The sequence number of this message within the stream. + * @returns {Number} + + */ + get sequenceNumber() { + return this.#__sequenceNumber; + } + /** + * @param value {Number} The sequence number of this message within the stream. + */ + set sequenceNumber(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("sequenceNumber must be Number"); + } + + this.#__sequenceNumber = value; + } + /** + * @param value {Number} The sequence number of this message within the stream. + * @returns {aws-greengrass-core-sdk.StreamManager.Message} + */ + withSequenceNumber(value) { + this.sequenceNumber = value; + return this; + } + + /** + * The time that the message was ingested to Stream Manager. Data is Unix epoch time in milliseconds. + * @returns {Number} + + */ + get ingestTime() { + return this.#__ingestTime; + } + /** + * @param value {Number} The time that the message was ingested to Stream Manager. Data is Unix epoch time in milliseconds. + */ + set ingestTime(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("ingestTime must be Number"); + } + + this.#__ingestTime = value; + } + /** + * @param value {Number} The time that the message was ingested to Stream Manager. Data is Unix epoch time in milliseconds. + * @returns {aws-greengrass-core-sdk.StreamManager.Message} + */ + withIngestTime(value) { + this.ingestTime = value; + return this; + } + + /** + * The binary message data. + * @returns {Buffer} + + */ + get payload() { + return this.#__payload; + } + /** + * @param value {Buffer} The binary message data. + */ + set payload(value) { + if (value !== null && !(value instanceof Buffer)) { + throw new Error("payload must be Buffer"); + } + + this.#__payload = value; + } + /** + * @param value {Buffer} The binary message data. + * @returns {aws-greengrass-core-sdk.StreamManager.Message} + */ + withPayload(value) { + this.payload = value; + return this; + } + + static fromMap(d) { + const ret = new Message(); + if ("streamName" in d) { + ret.streamName = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["streamName"]) : d["streamName"]; + } + if ("sequenceNumber" in d) { + ret.sequenceNumber = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["sequenceNumber"]) : d["sequenceNumber"]; + } + if ("ingestTime" in d) { + ret.ingestTime = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["ingestTime"]) : d["ingestTime"]; + } + if ("payload" in d) { + ret.payload = Object.prototype.hasOwnProperty.call(Buffer, "fromMap") ? Buffer.fromMap(d["payload"]) : d["payload"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.streamName !== null) { + d["streamName"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.streamName), "asMap") ? this.streamName.asMap() : this.streamName; + } + if (this.sequenceNumber !== null) { + d["sequenceNumber"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.sequenceNumber), "asMap") ? this.sequenceNumber.asMap() : this.sequenceNumber; + } + if (this.ingestTime !== null) { + d["ingestTime"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.ingestTime), "asMap") ? this.ingestTime.asMap() : this.ingestTime; + } + if (this.payload !== null) { + d["payload"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.payload), "asMap") ? this.payload.asMap() : this.payload; + } + return d; + } +}; + +Object.defineProperty(Message, "typesMap", { + value: { + streamName: { + 'type': String, + 'subtype': null + }, + sequenceNumber: { + 'type': Number, + 'subtype': null + }, + ingestTime: { + 'type': Number, + 'subtype': null + }, + payload: { + 'type': Buffer, + 'subtype': null + }, + } +}); +Object.defineProperty(Message, "formatsMap", { + value: {} +}); +Object.defineProperty(Message, "validationsMap", { + value: { + 'streamName': { + 'required': true, + }, + 'sequenceNumber': { + 'required': false, + }, + 'ingestTime': { + 'required': false, + }, + 'payload': { + 'required': true, + }, + } +}); + +/** + * Options for the ReadMessages API. All fields are optional. + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class ReadMessagesOptions { + #__desiredStartSequenceNumber = null; + #__minMessageCount = null; + #__maxMessageCount = null; + #__readTimeoutMillis = null; + + /** + * @param desiredStartSequenceNumber {Number} The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum. + * @param minMessageCount {Number} The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown. + The minimum values is 1 and the maximum value is 2147483647. + * @param maxMessageCount {Number} The maximum number of messages that will be returned. + The minimum values is the value of the minimum message count and the maximum value is 2147483647. + * @param readTimeoutMillis {Number} The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages. + If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown. + If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached. + The maximum value is the value of the client timeout. + */ + constructor( + desiredStartSequenceNumber = null, + minMessageCount = 1, + maxMessageCount = null, + readTimeoutMillis = 0, + ) { + if (desiredStartSequenceNumber !== null && !(typeof desiredStartSequenceNumber === "number")) { + throw new Error("desiredStartSequenceNumber must be Number"); + } + + if (minMessageCount !== null && !(typeof minMessageCount === "number")) { + throw new Error("minMessageCount must be Number"); + } + + if (maxMessageCount !== null && !(typeof maxMessageCount === "number")) { + throw new Error("maxMessageCount must be Number"); + } + + if (readTimeoutMillis !== null && !(typeof readTimeoutMillis === "number")) { + throw new Error("readTimeoutMillis must be Number"); + } + + this.#__desiredStartSequenceNumber = desiredStartSequenceNumber; + this.#__minMessageCount = minMessageCount; + this.#__maxMessageCount = maxMessageCount; + this.#__readTimeoutMillis = readTimeoutMillis; + } + + /** + * The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum. + * @returns {Number} + + */ + get desiredStartSequenceNumber() { + return this.#__desiredStartSequenceNumber; + } + /** + * @param value {Number} The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum. + */ + set desiredStartSequenceNumber(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("desiredStartSequenceNumber must be Number"); + } + + this.#__desiredStartSequenceNumber = value; + } + /** + * @param value {Number} The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum. + * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions} + */ + withDesiredStartSequenceNumber(value) { + this.desiredStartSequenceNumber = value; + return this; + } + + /** + * The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown. + The minimum values is 1 and the maximum value is 2147483647. + * @returns {Number} + + */ + get minMessageCount() { + return this.#__minMessageCount; + } + /** + * @param value {Number} The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown. + The minimum values is 1 and the maximum value is 2147483647. + */ + set minMessageCount(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("minMessageCount must be Number"); + } + + this.#__minMessageCount = value; + } + /** + * @param value {Number} The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown. + The minimum values is 1 and the maximum value is 2147483647. + * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions} + */ + withMinMessageCount(value) { + this.minMessageCount = value; + return this; + } + + /** + * The maximum number of messages that will be returned. + The minimum values is the value of the minimum message count and the maximum value is 2147483647. + * @returns {Number} + + */ + get maxMessageCount() { + return this.#__maxMessageCount; + } + /** + * @param value {Number} The maximum number of messages that will be returned. + The minimum values is the value of the minimum message count and the maximum value is 2147483647. + */ + set maxMessageCount(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("maxMessageCount must be Number"); + } + + this.#__maxMessageCount = value; + } + /** + * @param value {Number} The maximum number of messages that will be returned. + The minimum values is the value of the minimum message count and the maximum value is 2147483647. + * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions} + */ + withMaxMessageCount(value) { + this.maxMessageCount = value; + return this; + } + + /** + * The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages. + If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown. + If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached. + The maximum value is the value of the client timeout. + * @returns {Number} + + */ + get readTimeoutMillis() { + return this.#__readTimeoutMillis; + } + /** + * @param value {Number} The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages. + If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown. + If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached. + The maximum value is the value of the client timeout. + */ + set readTimeoutMillis(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("readTimeoutMillis must be Number"); + } + + this.#__readTimeoutMillis = value; + } + /** + * @param value {Number} The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages. + If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown. + If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached. + The maximum value is the value of the client timeout. + * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions} + */ + withReadTimeoutMillis(value) { + this.readTimeoutMillis = value; + return this; + } + + static fromMap(d) { + const ret = new ReadMessagesOptions(); + if ("desiredStartSequenceNumber" in d) { + ret.desiredStartSequenceNumber = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["desiredStartSequenceNumber"]) : d["desiredStartSequenceNumber"]; + } + if ("minMessageCount" in d) { + ret.minMessageCount = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["minMessageCount"]) : d["minMessageCount"]; + } + if ("maxMessageCount" in d) { + ret.maxMessageCount = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["maxMessageCount"]) : d["maxMessageCount"]; + } + if ("readTimeoutMillis" in d) { + ret.readTimeoutMillis = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["readTimeoutMillis"]) : d["readTimeoutMillis"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.desiredStartSequenceNumber !== null) { + d["desiredStartSequenceNumber"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.desiredStartSequenceNumber), "asMap") ? this.desiredStartSequenceNumber.asMap() : this.desiredStartSequenceNumber; + } + if (this.minMessageCount !== null) { + d["minMessageCount"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.minMessageCount), "asMap") ? this.minMessageCount.asMap() : this.minMessageCount; + } + if (this.maxMessageCount !== null) { + d["maxMessageCount"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.maxMessageCount), "asMap") ? this.maxMessageCount.asMap() : this.maxMessageCount; + } + if (this.readTimeoutMillis !== null) { + d["readTimeoutMillis"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.readTimeoutMillis), "asMap") ? this.readTimeoutMillis.asMap() : this.readTimeoutMillis; + } + return d; + } +}; + +Object.defineProperty(ReadMessagesOptions, "typesMap", { + value: { + desiredStartSequenceNumber: { + 'type': Number, + 'subtype': null + }, + minMessageCount: { + 'type': Number, + 'subtype': null + }, + maxMessageCount: { + 'type': Number, + 'subtype': null + }, + readTimeoutMillis: { + 'type': Number, + 'subtype': null + }, + } +}); +Object.defineProperty(ReadMessagesOptions, "formatsMap", { + value: {} +}); +Object.defineProperty(ReadMessagesOptions, "validationsMap", { + value: { + 'desiredStartSequenceNumber': { + 'required': false, + 'maximum': 9223372036854775807, + 'minimum': 0, + }, + 'minMessageCount': { + 'required': false, + 'maximum': 2147483647, + 'minimum': 1, + }, + 'maxMessageCount': { + 'required': false, + 'maximum': 2147483647, + 'minimum': 1, + }, + 'readTimeoutMillis': { + 'required': false, + 'maximum': 9223372036854, + 'minimum': 0, + }, + } +}); + +/** + * (Internal Only) Request object for creating a message stream + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class CreateMessageStreamRequest { + #__requestId = null; + #__definition = null; + + /** + * @param requestId {String} + * @param definition {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + */ + constructor( + requestId = null, + definition = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + if (definition !== null && !(definition instanceof MessageStreamDefinition)) { + throw new Error("definition must be MessageStreamDefinition"); + } + + this.#__requestId = requestId; + this.#__definition = definition; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamRequest} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + + */ + get definition() { + return this.#__definition; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + */ + set definition(value) { + if (value !== null && !(value instanceof MessageStreamDefinition)) { + throw new Error("definition must be MessageStreamDefinition"); + } + + this.#__definition = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} + * @returns {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamRequest} + */ + withDefinition(value) { + this.definition = value; + return this; + } + + static fromMap(d) { + const ret = new CreateMessageStreamRequest(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + if ("definition" in d) { + ret.definition = Object.prototype.hasOwnProperty.call(MessageStreamDefinition, "fromMap") ? MessageStreamDefinition.fromMap(d["definition"]) : d["definition"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + if (this.definition !== null) { + d["definition"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.definition), "asMap") ? this.definition.asMap() : this.definition; + } + return d; + } +}; + +Object.defineProperty(CreateMessageStreamRequest, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + definition: { + 'type': MessageStreamDefinition, + 'subtype': null + }, + } +}); +Object.defineProperty(CreateMessageStreamRequest, "formatsMap", { + value: {} +}); +Object.defineProperty(CreateMessageStreamRequest, "validationsMap", { + value: { + 'requestId': { + 'required': true, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'definition': { + 'required': true, + }, + } +}); + +/** + * Internal Only + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class CreateMessageStreamResponse { + #__requestId = null; + #__status = null; + #__errorMessage = null; + + /** + * @param requestId {String} + * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @param errorMessage {String} + */ + constructor( + requestId = null, + status = null, + errorMessage = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + if (status !== null && !(status instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + if (errorMessage !== null && !(typeof errorMessage === "string")) { + throw new Error("errorMessage must be String"); + } + + this.#__requestId = requestId; + this.#__status = status; + this.#__errorMessage = errorMessage; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + + */ + get status() { + return this.#__status; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + */ + set status(value) { + if (value !== null && !(value instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + this.#__status = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @returns {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse} + */ + withStatus(value) { + this.status = value; + return this; + } + + /** + * @returns {String} + + */ + get errorMessage() { + return this.#__errorMessage; + } + /** + * @param value {String} + */ + set errorMessage(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("errorMessage must be String"); + } + + this.#__errorMessage = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse} + */ + withErrorMessage(value) { + this.errorMessage = value; + return this; + } + + static fromMap(d) { + const ret = new CreateMessageStreamResponse(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + if ("status" in d) { + ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"]; + } + if ("errorMessage" in d) { + ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + if (this.status !== null) { + d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status; + } + if (this.errorMessage !== null) { + d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage; + } + return d; + } +}; + +Object.defineProperty(CreateMessageStreamResponse, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + status: { + 'type': ResponseStatusCode, + 'subtype': null + }, + errorMessage: { + 'type': String, + 'subtype': null + }, + } +}); +Object.defineProperty(CreateMessageStreamResponse, "formatsMap", { + value: {} +}); +Object.defineProperty(CreateMessageStreamResponse, "validationsMap", { + value: { + 'requestId': { + 'required': true, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'status': { + 'required': true, + }, + 'errorMessage': { + 'required': false, + }, + } +}); + +/** + * (Internal Only) Request object for deleting a message stream + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class DeleteMessageStreamRequest { + #__requestId = null; + #__name = null; + + /** + * @param requestId {String} + * @param name {String} + */ + constructor( + requestId = null, + name = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + if (name !== null && !(typeof name === "string")) { + throw new Error("name must be String"); + } + + this.#__requestId = requestId; + this.#__name = name; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamRequest} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + /** + * @returns {String} + + */ + get name() { + return this.#__name; + } + /** + * @param value {String} + */ + set name(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("name must be String"); + } + + this.#__name = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamRequest} + */ + withName(value) { + this.name = value; + return this; + } + + static fromMap(d) { + const ret = new DeleteMessageStreamRequest(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + if ("name" in d) { + ret.name = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["name"]) : d["name"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + if (this.name !== null) { + d["name"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.name), "asMap") ? this.name.asMap() : this.name; + } + return d; + } +}; + +Object.defineProperty(DeleteMessageStreamRequest, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + name: { + 'type': String, + 'subtype': null + }, + } +}); +Object.defineProperty(DeleteMessageStreamRequest, "formatsMap", { + value: {} +}); +Object.defineProperty(DeleteMessageStreamRequest, "validationsMap", { + value: { + 'requestId': { + 'required': true, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'name': { + 'required': true, + 'minLength': 1, + 'maxLength': 255, + 'pattern': /^[\w ,.\-_]*$/, + }, + } +}); + +/** + * Internal Only + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class DeleteMessageStreamResponse { + #__requestId = null; + #__status = null; + #__errorMessage = null; + + /** + * @param requestId {String} + * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @param errorMessage {String} + */ + constructor( + requestId = null, + status = null, + errorMessage = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + if (status !== null && !(status instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + if (errorMessage !== null && !(typeof errorMessage === "string")) { + throw new Error("errorMessage must be String"); + } + + this.#__requestId = requestId; + this.#__status = status; + this.#__errorMessage = errorMessage; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + + */ + get status() { + return this.#__status; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + */ + set status(value) { + if (value !== null && !(value instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + this.#__status = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @returns {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse} + */ + withStatus(value) { + this.status = value; + return this; + } + + /** + * @returns {String} + + */ + get errorMessage() { + return this.#__errorMessage; + } + /** + * @param value {String} + */ + set errorMessage(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("errorMessage must be String"); + } + + this.#__errorMessage = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse} + */ + withErrorMessage(value) { + this.errorMessage = value; + return this; + } + + static fromMap(d) { + const ret = new DeleteMessageStreamResponse(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + if ("status" in d) { + ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"]; + } + if ("errorMessage" in d) { + ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + if (this.status !== null) { + d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status; + } + if (this.errorMessage !== null) { + d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage; + } + return d; + } +}; + +Object.defineProperty(DeleteMessageStreamResponse, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + status: { + 'type': ResponseStatusCode, + 'subtype': null + }, + errorMessage: { + 'type': String, + 'subtype': null + }, + } +}); +Object.defineProperty(DeleteMessageStreamResponse, "formatsMap", { + value: {} +}); +Object.defineProperty(DeleteMessageStreamResponse, "validationsMap", { + value: { + 'requestId': { + 'required': true, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'status': { + 'required': true, + }, + 'errorMessage': { + 'required': false, + }, + } +}); + +/** + * (Internal Only) Request object for describing a message stream + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class DescribeMessageStreamRequest { + #__requestId = null; + #__name = null; + + /** + * @param requestId {String} + * @param name {String} + */ + constructor( + requestId = null, + name = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + if (name !== null && !(typeof name === "string")) { + throw new Error("name must be String"); + } + + this.#__requestId = requestId; + this.#__name = name; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamRequest} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + /** + * @returns {String} + + */ + get name() { + return this.#__name; + } + /** + * @param value {String} + */ + set name(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("name must be String"); + } + + this.#__name = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamRequest} + */ + withName(value) { + this.name = value; + return this; + } + + static fromMap(d) { + const ret = new DescribeMessageStreamRequest(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + if ("name" in d) { + ret.name = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["name"]) : d["name"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + if (this.name !== null) { + d["name"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.name), "asMap") ? this.name.asMap() : this.name; + } + return d; + } +}; + +Object.defineProperty(DescribeMessageStreamRequest, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + name: { + 'type': String, + 'subtype': null + }, + } +}); +Object.defineProperty(DescribeMessageStreamRequest, "formatsMap", { + value: {} +}); +Object.defineProperty(DescribeMessageStreamRequest, "validationsMap", { + value: { + 'requestId': { + 'required': true, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'name': { + 'required': true, + 'minLength': 1, + 'maxLength': 255, + 'pattern': /^[\w ,.\-_]*$/, + }, + } +}); + +/** + * (Internal Only) Response object for describing a message stream + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class DescribeMessageStreamResponse { + #__requestId = null; + #__status = null; + #__errorMessage = null; + #__messageStreamInfo = null; + + /** + * @param requestId {String} + * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @param errorMessage {String} + * @param messageStreamInfo {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo} + */ + constructor( + requestId = null, + status = null, + errorMessage = null, + messageStreamInfo = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + if (status !== null && !(status instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + if (errorMessage !== null && !(typeof errorMessage === "string")) { + throw new Error("errorMessage must be String"); + } + + if (messageStreamInfo !== null && !(messageStreamInfo instanceof MessageStreamInfo)) { + throw new Error("messageStreamInfo must be MessageStreamInfo"); + } + + this.#__requestId = requestId; + this.#__status = status; + this.#__errorMessage = errorMessage; + this.#__messageStreamInfo = messageStreamInfo; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + + */ + get status() { + return this.#__status; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + */ + set status(value) { + if (value !== null && !(value instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + this.#__status = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @returns {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse} + */ + withStatus(value) { + this.status = value; + return this; + } + + /** + * @returns {String} + + */ + get errorMessage() { + return this.#__errorMessage; + } + /** + * @param value {String} + */ + set errorMessage(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("errorMessage must be String"); + } + + this.#__errorMessage = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse} + */ + withErrorMessage(value) { + this.errorMessage = value; + return this; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo} + + */ + get messageStreamInfo() { + return this.#__messageStreamInfo; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo} + */ + set messageStreamInfo(value) { + if (value !== null && !(value instanceof MessageStreamInfo)) { + throw new Error("messageStreamInfo must be MessageStreamInfo"); + } + + this.#__messageStreamInfo = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo} + * @returns {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse} + */ + withMessageStreamInfo(value) { + this.messageStreamInfo = value; + return this; + } + + static fromMap(d) { + const ret = new DescribeMessageStreamResponse(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + if ("status" in d) { + ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"]; + } + if ("errorMessage" in d) { + ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"]; + } + if ("messageStreamInfo" in d) { + ret.messageStreamInfo = Object.prototype.hasOwnProperty.call(MessageStreamInfo, "fromMap") ? MessageStreamInfo.fromMap(d["messageStreamInfo"]) : d["messageStreamInfo"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + if (this.status !== null) { + d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status; + } + if (this.errorMessage !== null) { + d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage; + } + if (this.messageStreamInfo !== null) { + d["messageStreamInfo"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.messageStreamInfo), "asMap") ? this.messageStreamInfo.asMap() : this.messageStreamInfo; + } + return d; + } +}; + +Object.defineProperty(DescribeMessageStreamResponse, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + status: { + 'type': ResponseStatusCode, + 'subtype': null + }, + errorMessage: { + 'type': String, + 'subtype': null + }, + messageStreamInfo: { + 'type': MessageStreamInfo, + 'subtype': null + }, + } +}); +Object.defineProperty(DescribeMessageStreamResponse, "formatsMap", { + value: {} +}); +Object.defineProperty(DescribeMessageStreamResponse, "validationsMap", { + value: { + 'requestId': { + 'required': true, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'status': { + 'required': true, + }, + 'errorMessage': { + 'required': false, + }, + 'messageStreamInfo': { + 'required': false, + }, + } +}); + +/** + * (Intenral Only) Request object for appending to a message stream + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class AppendMessageRequest { + #__requestId = null; + #__name = null; + #__payload = null; + + /** + * @param requestId {String} + * @param name {String} + * @param payload {Buffer} + */ + constructor( + requestId = null, + name = null, + payload = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + if (name !== null && !(typeof name === "string")) { + throw new Error("name must be String"); + } + + if (payload !== null && !(payload instanceof Buffer)) { + throw new Error("payload must be Buffer"); + } + + this.#__requestId = requestId; + this.#__name = name; + this.#__payload = payload; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageRequest} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + /** + * @returns {String} + + */ + get name() { + return this.#__name; + } + /** + * @param value {String} + */ + set name(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("name must be String"); + } + + this.#__name = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageRequest} + */ + withName(value) { + this.name = value; + return this; + } + + /** + * @returns {Buffer} + + */ + get payload() { + return this.#__payload; + } + /** + * @param value {Buffer} + */ + set payload(value) { + if (value !== null && !(value instanceof Buffer)) { + throw new Error("payload must be Buffer"); + } + + this.#__payload = value; + } + /** + * @param value {Buffer} + * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageRequest} + */ + withPayload(value) { + this.payload = value; + return this; + } + + static fromMap(d) { + const ret = new AppendMessageRequest(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + if ("name" in d) { + ret.name = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["name"]) : d["name"]; + } + if ("payload" in d) { + ret.payload = Object.prototype.hasOwnProperty.call(Buffer, "fromMap") ? Buffer.fromMap(d["payload"]) : d["payload"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + if (this.name !== null) { + d["name"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.name), "asMap") ? this.name.asMap() : this.name; + } + if (this.payload !== null) { + d["payload"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.payload), "asMap") ? this.payload.asMap() : this.payload; + } + return d; + } +}; + +Object.defineProperty(AppendMessageRequest, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + name: { + 'type': String, + 'subtype': null + }, + payload: { + 'type': Buffer, + 'subtype': null + }, + } +}); +Object.defineProperty(AppendMessageRequest, "formatsMap", { + value: {} +}); +Object.defineProperty(AppendMessageRequest, "validationsMap", { + value: { + 'requestId': { + 'required': true, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'name': { + 'required': true, + 'minLength': 1, + 'maxLength': 255, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'payload': { + 'required': true, + 'minLength': 1, + }, + } +}); + +/** + * Internal Only + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class AppendMessageResponse { + #__requestId = null; + #__status = null; + #__errorMessage = null; + #__sequenceNumber = null; + + /** + * @param requestId {String} + * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @param errorMessage {String} + * @param sequenceNumber {Number} + */ + constructor( + requestId = null, + status = null, + errorMessage = null, + sequenceNumber = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + if (status !== null && !(status instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + if (errorMessage !== null && !(typeof errorMessage === "string")) { + throw new Error("errorMessage must be String"); + } + + if (sequenceNumber !== null && !(typeof sequenceNumber === "number")) { + throw new Error("sequenceNumber must be Number"); + } + + this.#__requestId = requestId; + this.#__status = status; + this.#__errorMessage = errorMessage; + this.#__sequenceNumber = sequenceNumber; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageResponse} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + + */ + get status() { + return this.#__status; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + */ + set status(value) { + if (value !== null && !(value instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + this.#__status = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageResponse} + */ + withStatus(value) { + this.status = value; + return this; + } + + /** + * @returns {String} + + */ + get errorMessage() { + return this.#__errorMessage; + } + /** + * @param value {String} + */ + set errorMessage(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("errorMessage must be String"); + } + + this.#__errorMessage = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageResponse} + */ + withErrorMessage(value) { + this.errorMessage = value; + return this; + } + + /** + * @returns {Number} + + */ + get sequenceNumber() { + return this.#__sequenceNumber; + } + /** + * @param value {Number} + */ + set sequenceNumber(value) { + if (value !== null && !(typeof value === "number")) { + throw new Error("sequenceNumber must be Number"); + } + + this.#__sequenceNumber = value; + } + /** + * @param value {Number} + * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageResponse} + */ + withSequenceNumber(value) { + this.sequenceNumber = value; + return this; + } + + static fromMap(d) { + const ret = new AppendMessageResponse(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + if ("status" in d) { + ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"]; + } + if ("errorMessage" in d) { + ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"]; + } + if ("sequenceNumber" in d) { + ret.sequenceNumber = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["sequenceNumber"]) : d["sequenceNumber"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + if (this.status !== null) { + d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status; + } + if (this.errorMessage !== null) { + d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage; + } + if (this.sequenceNumber !== null) { + d["sequenceNumber"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.sequenceNumber), "asMap") ? this.sequenceNumber.asMap() : this.sequenceNumber; + } + return d; + } +}; + +Object.defineProperty(AppendMessageResponse, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + status: { + 'type': ResponseStatusCode, + 'subtype': null + }, + errorMessage: { + 'type': String, + 'subtype': null + }, + sequenceNumber: { + 'type': Number, + 'subtype': null + }, + } +}); +Object.defineProperty(AppendMessageResponse, "formatsMap", { + value: {} +}); +Object.defineProperty(AppendMessageResponse, "validationsMap", { + value: { + 'requestId': { + 'required': true, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'status': { + 'required': true, + }, + 'errorMessage': { + 'required': false, + }, + 'sequenceNumber': { + 'required': false, + }, + } +}); + +/** + * (Internal Only) Request object for reading from a message stream. readMessagesOptions is optional. + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class ReadMessagesRequest { + #__requestId = null; + #__streamName = null; + #__readMessagesOptions = null; + + /** + * @param requestId {String} + * @param streamName {String} + * @param readMessagesOptions {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions} + */ + constructor( + requestId = null, + streamName = null, + readMessagesOptions = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + if (streamName !== null && !(typeof streamName === "string")) { + throw new Error("streamName must be String"); + } + + if (readMessagesOptions !== null && !(readMessagesOptions instanceof ReadMessagesOptions)) { + throw new Error("readMessagesOptions must be ReadMessagesOptions"); + } + + this.#__requestId = requestId; + this.#__streamName = streamName; + this.#__readMessagesOptions = readMessagesOptions; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + /** + * @returns {String} + + */ + get streamName() { + return this.#__streamName; + } + /** + * @param value {String} + */ + set streamName(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("streamName must be String"); + } + + this.#__streamName = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest} + */ + withStreamName(value) { + this.streamName = value; + return this; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions} + + */ + get readMessagesOptions() { + return this.#__readMessagesOptions; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions} + */ + set readMessagesOptions(value) { + if (value !== null && !(value instanceof ReadMessagesOptions)) { + throw new Error("readMessagesOptions must be ReadMessagesOptions"); + } + + this.#__readMessagesOptions = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions} + * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest} + */ + withReadMessagesOptions(value) { + this.readMessagesOptions = value; + return this; + } + + static fromMap(d) { + const ret = new ReadMessagesRequest(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + if ("streamName" in d) { + ret.streamName = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["streamName"]) : d["streamName"]; + } + if ("readMessagesOptions" in d) { + ret.readMessagesOptions = Object.prototype.hasOwnProperty.call(ReadMessagesOptions, "fromMap") ? ReadMessagesOptions.fromMap(d["readMessagesOptions"]) : d["readMessagesOptions"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + if (this.streamName !== null) { + d["streamName"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.streamName), "asMap") ? this.streamName.asMap() : this.streamName; + } + if (this.readMessagesOptions !== null) { + d["readMessagesOptions"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.readMessagesOptions), "asMap") ? this.readMessagesOptions.asMap() : this.readMessagesOptions; + } + return d; + } +}; + +Object.defineProperty(ReadMessagesRequest, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + streamName: { + 'type': String, + 'subtype': null + }, + readMessagesOptions: { + 'type': ReadMessagesOptions, + 'subtype': null + }, + } +}); +Object.defineProperty(ReadMessagesRequest, "formatsMap", { + value: {} +}); +Object.defineProperty(ReadMessagesRequest, "validationsMap", { + value: { + 'requestId': { + 'required': true, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'streamName': { + 'required': true, + 'minLength': 1, + 'maxLength': 255, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'readMessagesOptions': { + 'required': false, + }, + } +}); + +/** + * Internal Only + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class ReadMessagesResponse { + #__requestId = null; + #__messages = null; + #__status = null; + #__errorMessage = null; + + /** + * @param requestId {String} + * @param messages {aws-greengrass-core-sdk.StreamManager.Message[]} + * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @param errorMessage {String} + */ + constructor( + requestId = null, + messages = null, + status = null, + errorMessage = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + if (messages !== null && !(messages instanceof Array)) { + throw new Error("messages must be Array"); + } + if (messages !== null && !messages.every((v) => v instanceof Message)) { + throw new Error("messages array values must be Message"); + } + + if (status !== null && !(status instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + if (errorMessage !== null && !(typeof errorMessage === "string")) { + throw new Error("errorMessage must be String"); + } + + this.#__requestId = requestId; + this.#__messages = messages; + this.#__status = status; + this.#__errorMessage = errorMessage; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.Message[]} + + */ + get messages() { + return this.#__messages; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.Message[]} + */ + set messages(value) { + if (value !== null && !(value instanceof Array)) { + throw new Error("messages must be Array"); + } + if (value !== null && !value.every((v) => v instanceof Message)) { + throw new Error("messages array values must be Message"); + } + + this.#__messages = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.Message[]} + * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse} + */ + withMessages(value) { + this.messages = value; + return this; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + + */ + get status() { + return this.#__status; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + */ + set status(value) { + if (value !== null && !(value instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + this.#__status = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse} + */ + withStatus(value) { + this.status = value; + return this; + } + + /** + * @returns {String} + + */ + get errorMessage() { + return this.#__errorMessage; + } + /** + * @param value {String} + */ + set errorMessage(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("errorMessage must be String"); + } + + this.#__errorMessage = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse} + */ + withErrorMessage(value) { + this.errorMessage = value; + return this; + } + + static fromMap(d) { + const ret = new ReadMessagesResponse(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + if ("messages" in d) { + ret.messages = d["messages"].reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(Message, "fromMap") ? Message.fromMap(v) : v); + return acc; + }, []); + } + if ("status" in d) { + ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"]; + } + if ("errorMessage" in d) { + ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + if (this.messages !== null) { + d["messages"] = this.messages.reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v); + return acc; + }, []); + } + if (this.status !== null) { + d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status; + } + if (this.errorMessage !== null) { + d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage; + } + return d; + } +}; + +Object.defineProperty(ReadMessagesResponse, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + messages: { + 'type': Array, + 'subtype': Message + }, + status: { + 'type': ResponseStatusCode, + 'subtype': null + }, + errorMessage: { + 'type': String, + 'subtype': null + }, + } +}); +Object.defineProperty(ReadMessagesResponse, "formatsMap", { + value: {} +}); +Object.defineProperty(ReadMessagesResponse, "validationsMap", { + value: { + 'requestId': { + 'required': false, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'messages': { + 'required': false, + }, + 'status': { + 'required': false, + }, + 'errorMessage': { + 'required': false, + }, + } +}); + +/** + * (Internal Only) Request object to list all available streams. There are no options. + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class ListStreamsRequest { + #__requestId = null; + + /** + * @param requestId {String} + */ + constructor( + requestId = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = requestId; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ListStreamsRequest} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + static fromMap(d) { + const ret = new ListStreamsRequest(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + return d; + } +}; + +Object.defineProperty(ListStreamsRequest, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + } +}); +Object.defineProperty(ListStreamsRequest, "formatsMap", { + value: {} +}); +Object.defineProperty(ListStreamsRequest, "validationsMap", { + value: { + 'requestId': { + 'required': true, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + } +}); + +/** + * Internal Only + * + * @class + * @memberOf aws-greengrass-core-sdk.StreamManager + */ +class ListStreamsResponse { + #__requestId = null; + #__status = null; + #__errorMessage = null; + #__streams = null; + + /** + * @param requestId {String} + * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @param errorMessage {String} + * @param streams {String[]} + */ + constructor( + requestId = null, + status = null, + errorMessage = null, + streams = null, + ) { + if (requestId !== null && !(typeof requestId === "string")) { + throw new Error("requestId must be String"); + } + + if (status !== null && !(status instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + if (errorMessage !== null && !(typeof errorMessage === "string")) { + throw new Error("errorMessage must be String"); + } + + if (streams !== null && !(streams instanceof Array)) { + throw new Error("streams must be Array"); + } + if (streams !== null && !streams.every((v) => typeof v === "string")) { + throw new Error("streams array values must be String"); + } + + this.#__requestId = requestId; + this.#__status = status; + this.#__errorMessage = errorMessage; + this.#__streams = streams; + } + + /** + * @returns {String} + + */ + get requestId() { + return this.#__requestId; + } + /** + * @param value {String} + */ + set requestId(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("requestId must be String"); + } + + this.#__requestId = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ListStreamsResponse} + */ + withRequestId(value) { + this.requestId = value; + return this; + } + + /** + * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + + */ + get status() { + return this.#__status; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + */ + set status(value) { + if (value !== null && !(value instanceof ResponseStatusCode)) { + throw new Error("status must be ResponseStatusCode"); + } + + this.#__status = value; + } + /** + * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} + * @returns {aws-greengrass-core-sdk.StreamManager.ListStreamsResponse} + */ + withStatus(value) { + this.status = value; + return this; + } + + /** + * @returns {String} + + */ + get errorMessage() { + return this.#__errorMessage; + } + /** + * @param value {String} + */ + set errorMessage(value) { + if (value !== null && !(typeof value === "string")) { + throw new Error("errorMessage must be String"); + } + + this.#__errorMessage = value; + } + /** + * @param value {String} + * @returns {aws-greengrass-core-sdk.StreamManager.ListStreamsResponse} + */ + withErrorMessage(value) { + this.errorMessage = value; + return this; + } + + /** + * @returns {String[]} + + */ + get streams() { + return this.#__streams; + } + /** + * @param value {String[]} + */ + set streams(value) { + if (value !== null && !(value instanceof Array)) { + throw new Error("streams must be Array"); + } + if (value !== null && !value.every((v) => typeof v === "string")) { + throw new Error("streams array values must be String"); + } + + this.#__streams = value; + } + /** + * @param value {String[]} + * @returns {aws-greengrass-core-sdk.StreamManager.ListStreamsResponse} + */ + withStreams(value) { + this.streams = value; + return this; + } + + static fromMap(d) { + const ret = new ListStreamsResponse(); + if ("requestId" in d) { + ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"]; + } + if ("status" in d) { + ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"]; + } + if ("errorMessage" in d) { + ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"]; + } + if ("streams" in d) { + ret.streams = d["streams"].reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(v) : v); + return acc; + }, []); + } + return ret; + } + + asMap() { + const d = {}; + if (this.requestId !== null) { + d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId; + } + if (this.status !== null) { + d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status; + } + if (this.errorMessage !== null) { + d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage; + } + if (this.streams !== null) { + d["streams"] = this.streams.reduce((acc, v) => { + acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v); + return acc; + }, []); + } + return d; + } +}; + +Object.defineProperty(ListStreamsResponse, "typesMap", { + value: { + requestId: { + 'type': String, + 'subtype': null + }, + status: { + 'type': ResponseStatusCode, + 'subtype': null + }, + errorMessage: { + 'type': String, + 'subtype': null + }, + streams: { + 'type': Array, + 'subtype': String + }, + } +}); +Object.defineProperty(ListStreamsResponse, "formatsMap", { + value: {} +}); +Object.defineProperty(ListStreamsResponse, "validationsMap", { + value: { + 'requestId': { + 'required': true, + 'minLength': 1, + 'pattern': /^[\w ,.\-_]*$/, + }, + 'status': { + 'required': true, + }, + 'errorMessage': { + 'required': false, + }, + 'streams': { + 'required': false, + }, + } +}); + +/** + * @type {{ +StrategyOnFull: StrategyOnFull, +Persistence: Persistence, +ConnectRequest: ConnectRequest, +ResponseStatusCode: ResponseStatusCode, +ConnectResponse: ConnectResponse, +Operation: Operation, +MessageFrame: MessageFrame, +HTTPConfig: HTTPConfig, +IoTAnalyticsConfig: IoTAnalyticsConfig, +KinesisConfig: KinesisConfig, +ExportDefinition: ExportDefinition, +MessageStreamDefinition: MessageStreamDefinition, +MessageStreamInfo: MessageStreamInfo, +Message: Message, +ReadMessagesOptions: ReadMessagesOptions, +CreateMessageStreamRequest: CreateMessageStreamRequest, +CreateMessageStreamResponse: CreateMessageStreamResponse, +DeleteMessageStreamRequest: DeleteMessageStreamRequest, +DeleteMessageStreamResponse: DeleteMessageStreamResponse, +DescribeMessageStreamRequest: DescribeMessageStreamRequest, +DescribeMessageStreamResponse: DescribeMessageStreamResponse, +AppendMessageRequest: AppendMessageRequest, +AppendMessageResponse: AppendMessageResponse, +ReadMessagesRequest: ReadMessagesRequest, +ReadMessagesResponse: ReadMessagesResponse, +ListStreamsRequest: ListStreamsRequest, +ListStreamsResponse: ListStreamsResponse +}} + */ +module.exports = { + StrategyOnFull, + Persistence, + ConnectRequest, + ResponseStatusCode, + ConnectResponse, + Operation, + MessageFrame, + HTTPConfig, + IoTAnalyticsConfig, + KinesisConfig, + ExportDefinition, + MessageStreamDefinition, + MessageStreamInfo, + Message, + ReadMessagesOptions, + CreateMessageStreamRequest, + CreateMessageStreamResponse, + DeleteMessageStreamRequest, + DeleteMessageStreamResponse, + DescribeMessageStreamRequest, + DescribeMessageStreamResponse, + AppendMessageRequest, + AppendMessageResponse, + ReadMessagesRequest, + ReadMessagesResponse, + ListStreamsRequest, + ListStreamsResponse, +}; \ No newline at end of file diff --git a/aws-greengrass-core-sdk/stream-manager/exceptions.js b/aws-greengrass-core-sdk/stream-manager/exceptions.js new file mode 100644 index 0000000..d1b4377 --- /dev/null +++ b/aws-greengrass-core-sdk/stream-manager/exceptions.js @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +// eslint-disable-next-line max-classes-per-file +class StreamManagerException extends Error { + constructor(message = '', status = null, requestId = null) { + super(message); + this.status = status; + this.requestId = requestId; + } +} + +class ClientException extends StreamManagerException {} +class ConnectFailedException extends ClientException {} +class InvalidRequestException extends StreamManagerException {} +class MessageStoreReadErrorException extends StreamManagerException {} +class NotEnoughMessagesException extends StreamManagerException {} +class RequestPayloadTooLargeException extends StreamManagerException {} +class ResourceNotFoundException extends StreamManagerException {} +class ResponsePayloadTooLargeException extends StreamManagerException {} +class ServerOutOfMemoryException extends StreamManagerException {} +class ServerTimeoutException extends StreamManagerException {} +class UnauthorizedException extends StreamManagerException {} +class UnknownFailureException extends StreamManagerException {} +class ValidationException extends ClientException {} + +module.exports = { + ClientException, + ConnectFailedException, + InvalidRequestException, + MessageStoreReadErrorException, + NotEnoughMessagesException, + RequestPayloadTooLargeException, + ResourceNotFoundException, + ResponsePayloadTooLargeException, + ServerOutOfMemoryException, + ServerTimeoutException, + StreamManagerException, + UnauthorizedException, + UnknownFailureException, + ValidationException, +}; diff --git a/aws-greengrass-core-sdk/stream-manager/index.js b/aws-greengrass-core-sdk/stream-manager/index.js new file mode 100644 index 0000000..33820d4 --- /dev/null +++ b/aws-greengrass-core-sdk/stream-manager/index.js @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +/** + * @namespace aws-greengrass-core-sdk.StreamManager + */ + +module.exports = require('./client'); diff --git a/aws-greengrass-core-sdk/stream-manager/util.js b/aws-greengrass-core-sdk/stream-manager/util.js new file mode 100644 index 0000000..1ed8a3f --- /dev/null +++ b/aws-greengrass-core-sdk/stream-manager/util.js @@ -0,0 +1,188 @@ +/* eslint-disable no-restricted-syntax */ +/* + * Copyright (c) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +const smData = require('aws-greengrass-core-sdk/stream-manager/data'); +const exceptions = require('./exceptions'); + +// eslint-disable-next-line no-bitwise +const MAX_PACKET_SIZE = 1 << 30; +const LENGTH_FIELD_SIZE_BYTES = 4; +const OP_FIELD_SIZE_BYTES = 1; +const HEADER_SIZE_BYTES = LENGTH_FIELD_SIZE_BYTES + OP_FIELD_SIZE_BYTES; + +const intToBuffer = (i, length = 4) => { + const buf = Buffer.alloc(length); + if (length === 4) { + buf.writeInt32BE(i, 0); + } else if (length === 1) { + buf.writeInt8(i, 0); + } else { + throw new Error('Illegal value specified for intToBuffer length. Must be 1 or 4.'); + } + return buf; +}; + +const intFromBuffer = (b) => { + if (b.length >= 4) { + return b.readInt32BE(0); + } else { + return b.readInt8(0); + } +}; + +const encodeFrame = (frame) => { + if (frame.payload.length + 1 > MAX_PACKET_SIZE) { + throw new exceptions.RequestPayloadTooLargeException(); + } + + const buf = Buffer.alloc(HEADER_SIZE_BYTES); + buf.writeInt32BE(frame.payload.length + 1, 0); + buf.writeInt8(frame.operation.asMap(), LENGTH_FIELD_SIZE_BYTES); + return { header: buf, payload: frame.payload }; +}; + +/** + * From https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript + * @ignore + * @returns {string} + */ +const uuidv4 = () => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { + // eslint-disable-next-line no-bitwise + const r = Math.random() * 16 | 0; + const + // eslint-disable-next-line no-bitwise,no-mixed-operators + v = c === 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); +}); + +const isInvalid = (o) => { + if (o === null || typeof o === 'undefined') { + return false; + } + if (!Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(o).constructor, 'validationsMap')) { + return false; + } + + for (const [propName, validations] of Object.entries(Object.getPrototypeOf(o).constructor.validationsMap)) { + if (!(propName in o)) { + return `Object is malformed, missing property: ${propName}`; + } + + // Validate all properties on arrays + if (o[propName] instanceof Array) { + for (const [i, v] of o[propName].entries()) { + const result = isInvalid(v); + if (result) { + return `Property ${propName}[${i}] is invalid because ${result}`; + } + } + } + + // Validate the property + if ('required' in validations && validations.required && o[propName] === null) { + return `Property ${propName} is required, but was null`; + } + if ( + 'minLength' in validations + && o[propName] !== null + && o[propName].length < validations.minLength + ) { + return `Property ${propName} must have a minimum length of ${validations.minLength}, but found length of ${o[propName].length}`; + } + if ( + 'maxLength' in validations + && o[propName] !== null + && o[propName].length > validations.maxLength + ) { + return `Property ${propName} must have a maximum length of ${validations.maxLength}, but found length of ${o[propName].length}`; + } + if ( + 'minItems' in validations + && o[propName] !== null + && o[propName].length < validations.minItems + ) { + return `Property ${propName} must have at least ${validations.minItems} items, but found ${o[propName].length}`; + } + if ( + 'maxItems' in validations + && o[propName] !== null + && o[propName].length > validations.maxItems + ) { + return `Property ${propName} must have at most ${validations.maxItems} items, but found ${o[propName].length}`; + } + if ( + 'maximum' in validations + && o[propName] !== null + && o[propName] > validations.maximum + ) { + return `Property ${propName} must be at most ${validations.maximum}`; + } + if ( + 'minimum' in validations + && o[propName] !== null + && o[propName] < validations.minimum + ) { + return `Property ${propName} must be at least ${validations.minimum}`; + } + if ( + 'pattern' in validations + && o[propName] !== null + && o[propName].match(validations.pattern) === null + ) { + return `Property ${propName} must match regex ${validations.pattern}`; + } + } + + // Recurse down to check validity of objects within objects + for (const propName of Object.keys(Object.getPrototypeOf(o).constructor.validationsMap)) { + const result = isInvalid(o[propName]); + if (result) { + return `Property ${propName} is invalid because ${result}`; + } + } + + return false; +}; + +const throwOnErrorResponse = (response) => { + // eslint-disable-next-line no-empty + if (response.status === smData.ResponseStatusCode.Success) { + + } else if (response.status === smData.ResponseStatusCode.InvalidRequest) { + throw new exceptions.InvalidRequestException(response.errorMessage, response.status, response.requestId); + } else if (response.status === smData.ResponseStatusCode.RequestPayloadTooLarge) { + throw new exceptions.RequestPayloadTooLargeException(response.errorMessage, response.status, response.requestId); + } else if (response.status === smData.ResponseStatusCode.ResourceNotFound) { + throw new exceptions.ResourceNotFoundException(response.errorMessage, response.status, response.requestId); + } else if (response.status === smData.ResponseStatusCode.ResponsePayloadTooLarge) { + throw new exceptions.ResponsePayloadTooLargeException(response.errorMessage, response.status, response.requestId); + } else if (response.status === smData.ResponseStatusCode.ServerTimeout) { + throw new exceptions.ServerTimeoutException(response.errorMessage, response.status, response.requestId); + } else if (response.status === smData.ResponseStatusCode.Unauthorized) { + throw new exceptions.UnauthorizedException(response.errorMessage, response.status, response.requestId); + } else if (response.status === smData.ResponseStatusCode.UnknownFailure) { + throw new exceptions.UnknownFailureException(response.errorMessage, response.status, response.requestId); + } else if (response.status === smData.ResponseStatusCode.NotEnoughMessages) { + throw new exceptions.NotEnoughMessagesException(response.errorMessage, response.status, response.requestId); + } else if (response.status === smData.ResponseStatusCode.MessageStoreReadError) { + throw new exceptions.MessageStoreReadErrorException(response.errorMessage, response.status, response.requestId); + } else if (response.status === smData.ResponseStatusCode.OutOfMemoryError) { + throw new exceptions.ServerOutOfMemoryException(response.errorMessage, response.status, response.requestId); + } else { + throw new exceptions.StreamManagerException( + 'Client is not able to understand this server response status code', 'Unrecognized', response.requestId, + ); + } +}; + +module.exports = { + intToBuffer, + intFromBuffer, + encodeFrame, + uuidv4, + isInvalid, + throwOnErrorResponse, + MAX_PACKET_SIZE, +}; diff --git a/docs/AWS/IotData.html b/docs/AWS/IotData.html deleted file mode 100644 index b2f6afa..0000000 --- a/docs/AWS/IotData.html +++ /dev/null @@ -1,688 +0,0 @@ - - - - - - - Class: AWS.IotData - - — AWS SDK for JavaScript - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -

Class: AWS.IotData - - - -

-
- -
-
Identifier:
-
iotdata
-
-
-
API Version:
-
2017-09-20
-
- - - -
-
Defined in:
-
iotdata.js
-
- -
-

Overview

-
- -

Constructs a service interface object. Each API operation is exposed as a -function on service.

- -

Sending a Request Using IotData

- -
var iotdata = new GG.IotData();
-iotdata.getThingShadow(params, function (err, data) {
-  if (err) console.log(err, err.stack); // an error occurred
-  else     console.log(data);           // successful response
-});
-
- -

Constructor Summary - collapse -

- - - -

Method Summary - collapse -

- - - -
-

Constructor Details

- -
-

- - new GG.IotData() ⇒ Object - - - - - -

-
- -

Constructs a service object. This object has one method for each API operation.

- - -
-
-
- -
-

Examples:

- - -

Constructing a IotData object

-

- -
var iotdata = new GG.IotData();
- -
- -
-
- -
- -
-

Method Details

-
-

- - getThingShadow(params = {}, callback) - -

-
-

Gets the thing shadow for the specified thing.

- -
-
-
- -
-

Examples:

- - -

Calling the getThingShadow operation

-

- -
var params = {
-  thingName: 'STRING_VALUE' /* required */
-};
-iotdata.getThingShadow(params, function(err, data) {
-  if (err) console.log(err, err.stack); // an error occurred
-  else     console.log(data);           // successful response
-});
- -
-

Parameters:

-
    - -
  • - - params - - - (Object) - - - (defaults to: {}) - - - — -
      -
    • thingName — (String)

      The name of the thing.

    • -
    - -
    - -
  • - -
- - -

Callback (callback):

-
    -
  • - function(err, data) { ... } -
    -
    -

    Called when a response from the service is returned.

    - - -
    -
    -
    - -

    Parameters:

    -
      - -
    • - - err - - - (Error) - - - - — -

      the error object returned from the request. -Set to null if the request is successful.

      -
      - -
    • - -
    • - - data - - - (Object) - - - - — -

      the de-serialized data returned from -the request. Set to null if a request error occurs. -The data object has the following properties:

      - -
        -
      • payload — (Buffer, Typed Array, Blob, String)

        The state information, in JSON format.

      • -
      - -
      - -
    • - -
    - - - -
    -
  • -
- - -

Returns:

-
    - -
  • -

    Nothing

    -
    - -
  • - -
- -
-
- -
-

- - publish(params = {}, callback) - - - - - -

-
-

Publishes a message within Greengrass.

- -
-
-
- -
-

Examples:

- - -

Calling the publish operation

-

- -
var params = {
-  topic: 'STRING_VALUE', /* required */
-  payload: new Buffer('...') || 'STRING_VALUE',
-  queueFullPolicy: 'AllOrError' || 'BestEffort'
-};
-iotdata.publish(params, function(err, data) {
-  if (err) console.log(err, err.stack); // an error occurred
-  else     console.log(data);           // successful response
-});
- -
-

Parameters:

-
    - -
  • - - params - - - (Object) - - - (defaults to: {}) - - - — -
      -
    • topic — (String)

      The name of the MQTT topic.

    • -
    • payload — (Buffer, Typed Array, Blob, String)
    • -
    • queueFullPolicy— (String)

      Specify whether to enforce message delivery to all destinations. Options are 'AllOrError' and 'BestEffort'. Defaults to 'BestEffort' when omitted.

    • -
    - -
    - -
  • - -
- - -

Callback (callback):

-
    -
  • - function(err, data) { ... } -
    -
    -

    Called when a response from the service is returned.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - err - - - (Error) - - - - — -

      the error object returned from the request. -Set to null if the request is successful.

      -
      - -
    • - -
    • - - data - - - (Object) - - - - — -

      the de-serialized data returned from -the request. Set to null if a request error occurs.

      -
      - -
    • - -
    - - - -
    -
  • -
- - -

Returns:

-
    - -
  • -

    Nothing

    -
    - -
  • - -
- -
-
- -
-

- - updateThingShadow(params = {}, callback) ⇒ GG.Request - - - - - -

-
-

Updates the thing shadow for the specified thing.

- - -
-
-
- -
-

Examples:

- - -

Calling the updateThingShadow operation

-

- -
var params = {
-  payload: 'Proper JSON data', /* required */
-  thingName: 'STRING_VALUE' /* required */
-};
-iotdata.updateThingShadow(params, function(err, data) {
-  if (err) console.log(err, err.stack); // an error occurred
-  else     console.log(data);           // successful response
-});
- -
-

Parameters:

-
    - -
  • - - params - - - (Object) - - - (defaults to: {}) - - - — -
      -
    • thingName — (String)

      The name of the thing.

    • -
    • payload — (Proper JSON data)

      The state information, in JSON format.

    • -
    - -
    - -
  • - -
- - -

Callback (callback):

-
    -
  • - function(err, data) { ... } -
    -
    -

    Called when a response from the service is returned.

    - - -
    -
    -
    - -

    Parameters:

    -
      - -
    • - - err - - - (Error) - - - - — -

      the error object returned from the request. -Set to null if the request is successful.

      -
      - -
    • - -
    • - - data - - - (Object) - - - - — -

      the de-serialized data returned from -the request. Set to null if a request error occurs. -The data object has the following properties:

      - -
        -
      • payload — (Buffer, Typed Array, Blob, String)

        The state information, in JSON format.

      • -
      - -
      - -
    • - -
    - - - -
    -
  • -
- - -

Returns:

-
    - -
  • -

    Nothing

    -
    - -
  • - -
- -
-
- -
- - -
- - - - - - - - - - - - - - -
- - diff --git a/docs/AWS/Lambda.html b/docs/AWS/Lambda.html deleted file mode 100644 index 62d0621..0000000 --- a/docs/AWS/Lambda.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - - Class: AWS.Lambda - - — AWS SDK for JavaScript - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- -

Class: AWS.Lambda - - - -

-
-
-
Identifier:
-
lambda
-
-
-
API Version:
-
2017-09-20
-
- - - -
-
Defined in:
-
lambda.js
-
- -
-

Overview

-
-
-

Constructs a service interface object. Each API operation is exposed as a - function on service.

- -

Constructor Summary - collapse -

- - - -

Method Summary - collapse -

- - - - - - - - -
-

Constructor Details

- -
-

- - new GG.Lambda() ⇒ Object - - - - - -

-
-
-

Constructs a service object. This object has one method for each - API operation.

- - -
-
-
- -
-

Examples:

- - -

-

-

Constructing a Lambda object

-
-

- -
var lambda = new GG.Lambda();
- -
- -
-
- -
- -
-

Method Details

- -
-

- - invoke(params = {}, callback) ⇒ AWS.Request - - - - - -

-
-
-

Invokes a specific Lambda function.

- -

-

In Greengrass, version of the Lambda which you would like to invoke needs to be provided.

-

- -
-

Service Reference:

- -
- - - -
-
-
- -
-

Examples:

- - -

-

-

To invoke a Lambda function

-
-

- -

-/* This operation invokes a Lambda function */
-
- var params = {
-  ClientContext: "MyApp",
-  FunctionName: "MyFunction",
-  InvocationType: "Event",
-  Payload: <json | binary>,
-  Qualifier: "1"
- };
- lambda.invoke(params, function(err, data) {
-   if (err) console.log(err, err.stack); // an error occurred
-   else     console.log(data);           // successful response
- });
- - -

-

-

Calling the invoke operation

-
-

- -
var params = {
-  FunctionName: 'STRING_VALUE', /* required */
-  ClientContext: 'STRING_VALUE',
-  InvocationType: Event | RequestResponse,
-  Payload: <json | binary>,
-  Qualifier: 'STRING_VALUE'
-};
-lambda.invoke(params, function(err, data) {
-  if (err) console.log(err, err.stack); // an error occurred
-  else     console.log(data);           // successful response
-});
- -
-

Parameters:

-
    - -
  • - - params - - - (Object) - - - (defaults to: {}) - - - — -
    -
      -
    • FunctionName — (String)

      The Lambda function name.

      -

      You can specify Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).

    • -
    • InvocationType — (String)

      By default, the Invoke API assumes RequestResponse invocation type. You can optionally request asynchronous execution by specifying Event as the InvocationType.

      - Possible values include: - -
        -
      • "Event"
      • -
      • "RequestResponse"
      • -
      -
    • -
    • ClientContext — (String)

      Using the ClientContext you can pass client-specific information to the Lambda function you are invoking. You can then process the client information in your Lambda function as you choose through the context variable. For an example of a ClientContext JSON, see the main page or an example folder for an example.

      -

      The ClientContext JSON must be base64-encoded.

      -
    • -
    • Payload

      Payload that you want to provide to your Lambda function as input. Please refer to the main page or examples for proper formats.

      -
    • -
    • Qualifier — (String)

      You can use this optional parameter to specify a Lambda function version if it was not included in the FunctionName field. If you specify a function version, the API uses the qualified function ARN to invoke a specific Lambda function.

      -

      If you don't provide this parameter, then the API uses the FunctionName field only. If it does not have a version number of the target lambda, the call will fail.

      -
    • -
    - -
    - -
  • - -
- - -

Callback (callback):

-
    -
  • - function(err, data) { ... } -
    -
    -

    Called when a response from the service is returned.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - err - - - (Error) - - - - — -
      -

      the error object returned from the request. - Set to null if the request is successful.

      -
      - -
    • - -
    • - - data - - - (Object) - - - - — -
      -

      the de-serialized data returned from - the request. Set to null if a request error occurs. - The data object has the following properties:

      - -
        -
      • StatusCode — (Integer)

        The HTTP status code will be in the 200 range for successful request. For the RequestResponse invocation type this status code will be 200. For the Event invocation type this status code will be 202.

        -
      • -
      • FunctionError — (String)

        Indicates whether an error occurred while executing the Lambda function. If an error occurred this field will have one of two values; Handled or Unhandled. Handled errors are errors that are reported by the function while the Unhandled errors are those detected and reported by AWS Lambda. Unhandled errors include out of memory errors and function timeouts. For information about how to report an Handled error, see Programming Model.

        -
      • -
      • Payload — (Buffer, Typed Array, Blob, String)

        It is the result returned by the Lambda function. This is present only if the invocation type is RequestResponse.

        -

        In the event of a function error this field contains a message describing the error. For the Handled errors the Lambda function will report this message. For Unhandled errors AWS Lambda reports the message.

        -
      • -
      - -
      - -
    • - -
    - - - -
    -
  • -
- -
-
-
- - -
- - - - - - - - - - - - - - -
- - - diff --git a/docs/AWS/SecretsManager.html b/docs/AWS/SecretsManager.html deleted file mode 100644 index 118b1e7..0000000 --- a/docs/AWS/SecretsManager.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - Class: AWS.SecretsManager - — AWS SDK for JavaScript - - - - - - - - - - - - - -
- - -
- -

Class: AWS.SecretsManager -

-
-
-
Identifier:
-
SecretsManager
-
-
-
API Version:
-
2018-11-26
-
-
-
Defined in:
-
secretsmanager.js
-
-
-

Overview

-
-
-

Constructs a service interface object. Each API operation is exposed as a - function on service. -

-

Constructor Summary - collapse -

- -

Method Summary - collapse -

- -
-

Constructor Details

-
-

- new GG.SecretsManager() ⇒ Object -

-
-
-

Constructs a service object. This object has one method for each - API operation. -

-
-
-
-
-

Examples:

-

-

-

Constructing a SecretsManager object

-
-

-
var secretsmanager = new GG.SecretsManager();
-
-
-
-
-
-

Method Details

-
-

- getSecretValue(params = {}, callback) -

-
-
-

Retrieves a specific local secret value.

-
-
-
-
-

Examples:

-

-

-

Retrieving a local secret value

-
-

-

-/* This operation retrieves a local secret value */
-
- var params = {
-   SecretId: "STRING_VALUE",
-   VersionStage: "STRING_VALUE"
- };
- secretsmanager.getSecretValue(params, function(err, data) {
-   if (err) console.log(err, err.stack); // an error occurred
-   else     console.log(data);           // successful response
- });
-
-

Parameters:

-
    -
  • - params - (Object) - (defaults to: {}) - — -
    -
      -
    • - SecretId — (String) -

      Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

      -
    • -
    • - VersionStage — (String) -

      Specifies the secret version that you want to retrieve by the staging label attached to the version.

      -

      Staging labels are used to keep track of different versions during the rotation process.

      -
    • -
    -
    -
  • -
-

Callback(callback):

-
    -
  • - function(err, data) { ... } -
    -
    -

    Called when a response from the service is returned.

    -
    -
    -
    -

    Parameters:

    -
      -
    • - err - (Error) - — -
      -

      the error object returned from the request. - Set to null if the request is successful. -

      -
      -
    • -
    • - data - (Object) - — -
      -

      the de-serialized data returned from - the request. Set to null if a request error occurs. - The data object has the following properties: -

      -
        -
      • - ARN — (String) -

        The ARN of the secret.

        -
      • -
      • - Name — (String) -

        The friendly name of the secret.

        -
      • -
      • - VersionId — (String) -

        The unique identifier of this version of the secret.

        -
      • -
      • - SecretBinary — (Buffer, Typed Array, Blob, String) -

        The decrypted part of the protected secret information that was originally provided as binary data in the form of a byte array. The response parameter represents the binary data as a base64-encoded string.

        -
      • -
      • - SecretString — (String) -

        The decrypted part of the protected secret information that was originally provided as a string.

        -
      • -
      • - VersionStages — (Array<String>) -

        Specifies the secret version that you want to retrieve by the staging label attached to the version.

        -

        Staging labels are used to keep track of different versions during the rotation process.

        -
      • -
      -
      -
    • -
    -
    -
  • -
-

Returns:

-
    -
  • -
    -

    Nothing

    -
    -
  • -
-
-
-
-
- - - - - - - - - - - -
- - - diff --git a/docs/aws-greengrass-core-sdk.IotData.html b/docs/aws-greengrass-core-sdk.IotData.html new file mode 100644 index 0000000..157c447 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.IotData.html @@ -0,0 +1,1145 @@ + + + + + JSDoc: Class: IotData + + + + + + + + + + +
+ +

Class: IotData

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk~IotData()

+ +
Constructs a service interface object. Each API operation is exposed as a function on service.
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new IotData()

+ + + + + + +
+ Constructs a service object. This object has one method for each API operation. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Example
+ +

Constructing a IotData object

+ +
var iotdata = new GG.IotData();
+ + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

deleteThingShadow(params, callback)

+ + + + + + +
+ Call shadow lambda to delete the shadow state. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
params + + +Object + + + + +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
thingName + + +String + + + + The name of the thing whose shadow should be deleted.
+ +
callback + + +iotDataCallback + + + + The callback.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

getThingShadow(params, callback)

+ + + + + + +
+ Gets the thing shadow for the specified thing. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
params + + +Object + + + + +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
thingName + + +String + + + + The name of the thing.
+ +
callback + + +iotDataCallback + + + + The callback.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Example
+ +

Calling the getThingShadow operation

+ +
var params = {
+  thingName: 'STRING_VALUE' // required
+};
+iotdata.getThingShadow(params, function(err, data) {
+  if (err) console.log(err, err.stack); // an error occurred
+  else     console.log(data);           // successful response
+});
+ + + + + + + + + +

publish(params, callback)

+ + + + + + +
+ Publishes a message within Greengrass. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
params + + +Object + + + + +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
topic + + +String + + + + The name of the MQTT topic.
payload + + +Buffer +| + +TypedArray +| + +Blob +| + +String + + + + The payload to be sent.
queueFullPolicy + + +'AllOrError' +| + +'BestEffort' + + + + Specify whether to enforce message delivery to all destinations. Options are 'AllOrError' and 'BestEffort'. Defaults to 'BestEffort' when omitted.
+ +
callback + + +iotDataCallback + + + + The callback.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Example
+ +

Calling the publish operation

+ +
var params = {
+  topic: 'STRING_VALUE', // required
+  payload: new Buffer('...') || 'STRING_VALUE',
+  queueFullPolicy: 'AllOrError' || 'BestEffort'
+};
+iotdata.publish(params, function(err, data) {
+  if (err) console.log(err, err.stack); // an error occurred
+  else     console.log(data);           // successful response
+});
+ + + + + + + + + +

updateThingShadow(params, callback)

+ + + + + + +
+ Updates the thing shadow for the specified thing. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
params + + +Object + + + + +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
thingName + + +String + + + + The name of the thing.
payload + + +String + + + + The state information as a JSON string.
+ +
callback + + +iotDataCallback + + + + The callback.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Example
+ +

Calling the updateThingShadow operation

+ +
var params = {
+  payload: 'Proper JSON data', // required
+  thingName: 'STRING_VALUE' // required
+};
+iotdata.updateThingShadow(params, function(err, data) {
+  if (err) console.log(err, err.stack); // an error occurred
+  else     console.log(data);           // successful response
+});
+ + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.Lambda.html b/docs/aws-greengrass-core-sdk.Lambda.html new file mode 100644 index 0000000..fcacd25 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.Lambda.html @@ -0,0 +1,585 @@ + + + + + JSDoc: Class: Lambda + + + + + + + + + + +
+ +

Class: Lambda

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk~Lambda()

+ +
Constructs a service interface object. Each API operation is exposed as a function on service.
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new Lambda()

+ + + + + + +
+ Constructs a service object. This object has one method for each API operation. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Example
+ +

Constructing a Lambda object

+ +
var lambda = new GG.Lambda();
+ + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

invoke(params, callback)

+ + + + + + +
+ Invokes a specific Lambda function.
+In Greengrass, version of the Lambda which you would like to invoke needs to be provided. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
params + + +Object + + + + +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
FunctionName + + +String + + + + + + + + + + The Lambda function name. You can specify Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail).
InvocationType + + +String + + + + + + + + <nullable>
+ + + +
By default, the Invoke API assumes RequestResponse invocation type. +You can optionally request asynchronous execution by specifying Event as the InvocationType. Possible values include: +
  • "Event"
  • "RequestResponse"
ClientContext + + +String + + + + + + + + <nullable>
+ + + +
Using the ClientContext you can pass client-specific information to the Lambda function you are invoking. +You can then process the client information in your Lambda function as you choose through the context variable. +For an example of a ClientContext JSON, see the main page or an example folder for an example. +
The ClientContext JSON must be base64-encoded.
Payload + + +Buffer +| + +TypedArray +| + +Blob +| + +String + + + + + + + + + + Payload that you want to provide to your Lambda function as input.
Qualifier + + +String + + + + + + + + <nullable>
+ + + +
You can use this optional parameter to specify a Lambda function version if it was not included in the FunctionName field. +If you specify a function version, the API uses the qualified function ARN to invoke a specific Lambda function. +
If you don't provide this parameter, then the API uses the FunctionName field only. If it does not have a version number of the target lambda, the call will fail.
+ +
callback + + +lambdaCallback + + + + The callback.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Examples
+ +

To invoke a Lambda function

+ +
//This operation invokes a Lambda function
+
+var params = {
+  ClientContext: "MyApp",
+  FunctionName: "MyFunction",
+  InvocationType: "Event",
+  Payload: <json | binary>,
+  Qualifier: "1"
+};
+lambda.invoke(params, function(err, data) {
+  if (err) console.log(err, err.stack); // an error occurred
+  else     console.log(data);           // successful response
+});
+ +

Calling the invoke operation

+ +
var params = {
+  FunctionName: 'STRING_VALUE', // required
+  ClientContext: 'STRING_VALUE',
+  InvocationType: Event | RequestResponse,
+  Payload: <json | binary>,
+  Qualifier: 'STRING_VALUE'
+};
+lambda.invoke(params, function(err, data) {
+  if (err) console.log(err, err.stack); // an error occurred
+  else     console.log(data);           // successful response
+});
+ + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.SecretsManager.html b/docs/aws-greengrass-core-sdk.SecretsManager.html new file mode 100644 index 0000000..be53b80 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.SecretsManager.html @@ -0,0 +1,435 @@ + + + + + JSDoc: Class: SecretsManager + + + + + + + + + + +
+ +

Class: SecretsManager

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk~SecretsManager()

+ +
Constructs a service interface object. Each API operation is exposed as a function on service.
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new SecretsManager()

+ + + + + + +
+ Constructs a service object. This object has one method for each API operation. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Example
+ +

Constructing a SecretsManager object

+ +
var secretsmanager = new GG.SecretsManager();
+ + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

getSecretValue(params, callback)

+ + + + + + +
+ Retrieves a specific local secret value. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
params + + +Object + + + + +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
SecretId + + +String + + + + Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.
VersionStage + + +String + + + + Specifies the secret version that you want to retrieve by the staging label attached to the version. +
Staging labels are used to keep track of different versions during the rotation process.
+ +
callback + + +secretsManagerCallback + + + + The callback.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Example
+ +

Retrieving a local secret value

+ +
// This operation retrieves a local secret value
+
+var params = {
+  SecretId: "STRING_VALUE",
+  VersionStage: "STRING_VALUE"
+};
+secretsmanager.getSecretValue(params, function(err, data) {
+  if (err) console.log(err, err.stack); // an error occurred
+  else     console.log(data);           // successful response
+});
+ + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.AppendMessageRequest.html b/docs/aws-greengrass-core-sdk.StreamManager.AppendMessageRequest.html new file mode 100644 index 0000000..0bf24a0 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.AppendMessageRequest.html @@ -0,0 +1,1095 @@ + + + + + JSDoc: Class: AppendMessageRequest + + + + + + + + + + +
+ +

Class: AppendMessageRequest

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~AppendMessageRequest(requestId, name, payload)

+ +
(Intenral Only) Request object for appending to a message stream
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new AppendMessageRequest(requestId, name, payload)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
name + + +String + + + + + + null + +
payload + + +Buffer + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

name

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

name

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

payload

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

payload

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withName(value) → {aws-greengrass-core-sdk.StreamManager.AppendMessageRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.AppendMessageRequest + + +
+
+ + + + + + + + + + + + + +

withPayload(value) → {aws-greengrass-core-sdk.StreamManager.AppendMessageRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Buffer + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.AppendMessageRequest + + +
+
+ + + + + + + + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.AppendMessageRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.AppendMessageRequest + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.AppendMessageResponse.html b/docs/aws-greengrass-core-sdk.StreamManager.AppendMessageResponse.html new file mode 100644 index 0000000..0080d13 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.AppendMessageResponse.html @@ -0,0 +1,1391 @@ + + + + + JSDoc: Class: AppendMessageResponse + + + + + + + + + + +
+ +

Class: AppendMessageResponse

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~AppendMessageResponse(requestId, status, errorMessage, sequenceNumber)

+ +
Internal Only
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new AppendMessageResponse(requestId, status, errorMessage, sequenceNumber)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
status + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + + + + null + +
errorMessage + + +String + + + + + + null + +
sequenceNumber + + +Number + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

sequenceNumber

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

sequenceNumber

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withErrorMessage(value) → {aws-greengrass-core-sdk.StreamManager.AppendMessageResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.AppendMessageResponse + + +
+
+ + + + + + + + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.AppendMessageResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.AppendMessageResponse + + +
+
+ + + + + + + + + + + + + +

withSequenceNumber(value) → {aws-greengrass-core-sdk.StreamManager.AppendMessageResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.AppendMessageResponse + + +
+
+ + + + + + + + + + + + + +

withStatus(value) → {aws-greengrass-core-sdk.StreamManager.AppendMessageResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.AppendMessageResponse + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.ConnectRequest.html b/docs/aws-greengrass-core-sdk.StreamManager.ConnectRequest.html new file mode 100644 index 0000000..fe7066a --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.ConnectRequest.html @@ -0,0 +1,1391 @@ + + + + + JSDoc: Class: ConnectRequest + + + + + + + + + + +
+ +

Class: ConnectRequest

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~ConnectRequest(requestId, protocolVersion, sdkVersion, authToken)

+ +
(Internal Only) Request object to connect to the service
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new ConnectRequest(requestId, protocolVersion, sdkVersion, authToken)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
protocolVersion + + +String + + + + + + null + +
sdkVersion + + +String + + + + + + null + +
authToken + + +String + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

authToken

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

authToken

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

protocolVersion

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

protocolVersion

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

sdkVersion

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

sdkVersion

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withAuthToken(value) → {aws-greengrass-core-sdk.StreamManager.ConnectRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ConnectRequest + + +
+
+ + + + + + + + + + + + + +

withProtocolVersion(value) → {aws-greengrass-core-sdk.StreamManager.ConnectRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ConnectRequest + + +
+
+ + + + + + + + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.ConnectRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ConnectRequest + + +
+
+ + + + + + + + + + + + + +

withSdkVersion(value) → {aws-greengrass-core-sdk.StreamManager.ConnectRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ConnectRequest + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.ConnectResponse.html b/docs/aws-greengrass-core-sdk.StreamManager.ConnectResponse.html new file mode 100644 index 0000000..7cb6642 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.ConnectResponse.html @@ -0,0 +1,2279 @@ + + + + + JSDoc: Class: ConnectResponse + + + + + + + + + + +
+ +

Class: ConnectResponse

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~ConnectResponse(requestId, status, errorMessage, protocolVersion, supportedProtocolVersions, serverVersion, clientIdentifier)

+ +
Internal Only
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new ConnectResponse(requestId, status, errorMessage, protocolVersion, supportedProtocolVersions, serverVersion, clientIdentifier)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
status + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + + + + null + +
errorMessage + + +String + + + + + + null + +
protocolVersion + + +String + + + + + + null + +
supportedProtocolVersions + + +Array.<String> + + + + + + null + +
serverVersion + + +String + + + + + + null + +
clientIdentifier + + +String + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

clientIdentifier

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

clientIdentifier

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

protocolVersion

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

protocolVersion

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

serverVersion

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

serverVersion

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

supportedProtocolVersions

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

supportedProtocolVersions

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withClientIdentifier(value) → {aws-greengrass-core-sdk.StreamManager.ConnectResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ConnectResponse + + +
+
+ + + + + + + + + + + + + +

withErrorMessage(value) → {aws-greengrass-core-sdk.StreamManager.ConnectResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ConnectResponse + + +
+
+ + + + + + + + + + + + + +

withProtocolVersion(value) → {aws-greengrass-core-sdk.StreamManager.ConnectResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ConnectResponse + + +
+
+ + + + + + + + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.ConnectResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ConnectResponse + + +
+
+ + + + + + + + + + + + + +

withServerVersion(value) → {aws-greengrass-core-sdk.StreamManager.ConnectResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ConnectResponse + + +
+
+ + + + + + + + + + + + + +

withStatus(value) → {aws-greengrass-core-sdk.StreamManager.ConnectResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ConnectResponse + + +
+
+ + + + + + + + + + + + + +

withSupportedProtocolVersions(value) → {aws-greengrass-core-sdk.StreamManager.ConnectResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Array.<String> + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ConnectResponse + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.CreateMessageStreamRequest.html b/docs/aws-greengrass-core-sdk.StreamManager.CreateMessageStreamRequest.html new file mode 100644 index 0000000..0102bc9 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.CreateMessageStreamRequest.html @@ -0,0 +1,799 @@ + + + + + JSDoc: Class: CreateMessageStreamRequest + + + + + + + + + + +
+ +

Class: CreateMessageStreamRequest

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~CreateMessageStreamRequest(requestId, definition)

+ +
(Internal Only) Request object for creating a message stream
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new CreateMessageStreamRequest(requestId, definition)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
definition + + +aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

definition

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

definition

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withDefinition(value) → {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.CreateMessageStreamRequest + + +
+
+ + + + + + + + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.CreateMessageStreamRequest + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse.html b/docs/aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse.html new file mode 100644 index 0000000..1ae8e62 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse.html @@ -0,0 +1,1095 @@ + + + + + JSDoc: Class: CreateMessageStreamResponse + + + + + + + + + + +
+ +

Class: CreateMessageStreamResponse

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~CreateMessageStreamResponse(requestId, status, errorMessage)

+ +
Internal Only
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new CreateMessageStreamResponse(requestId, status, errorMessage)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
status + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + + + + null + +
errorMessage + + +String + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withErrorMessage(value) → {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse + + +
+
+ + + + + + + + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse + + +
+
+ + + + + + + + + + + + + +

withStatus(value) → {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamRequest.html b/docs/aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamRequest.html new file mode 100644 index 0000000..5109414 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamRequest.html @@ -0,0 +1,799 @@ + + + + + JSDoc: Class: DeleteMessageStreamRequest + + + + + + + + + + +
+ +

Class: DeleteMessageStreamRequest

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~DeleteMessageStreamRequest(requestId, name)

+ +
(Internal Only) Request object for deleting a message stream
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new DeleteMessageStreamRequest(requestId, name)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
name + + +String + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

name

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

name

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withName(value) → {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamRequest + + +
+
+ + + + + + + + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamRequest + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse.html b/docs/aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse.html new file mode 100644 index 0000000..e1f745a --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse.html @@ -0,0 +1,1095 @@ + + + + + JSDoc: Class: DeleteMessageStreamResponse + + + + + + + + + + +
+ +

Class: DeleteMessageStreamResponse

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~DeleteMessageStreamResponse(requestId, status, errorMessage)

+ +
Internal Only
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new DeleteMessageStreamResponse(requestId, status, errorMessage)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
status + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + + + + null + +
errorMessage + + +String + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withErrorMessage(value) → {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse + + +
+
+ + + + + + + + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse + + +
+
+ + + + + + + + + + + + + +

withStatus(value) → {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamRequest.html b/docs/aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamRequest.html new file mode 100644 index 0000000..336266f --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamRequest.html @@ -0,0 +1,799 @@ + + + + + JSDoc: Class: DescribeMessageStreamRequest + + + + + + + + + + +
+ +

Class: DescribeMessageStreamRequest

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~DescribeMessageStreamRequest(requestId, name)

+ +
(Internal Only) Request object for describing a message stream
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new DescribeMessageStreamRequest(requestId, name)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
name + + +String + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

name

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

name

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withName(value) → {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamRequest + + +
+
+ + + + + + + + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamRequest + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse.html b/docs/aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse.html new file mode 100644 index 0000000..7ea3231 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse.html @@ -0,0 +1,1391 @@ + + + + + JSDoc: Class: DescribeMessageStreamResponse + + + + + + + + + + +
+ +

Class: DescribeMessageStreamResponse

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~DescribeMessageStreamResponse(requestId, status, errorMessage, messageStreamInfo)

+ +
(Internal Only) Response object for describing a message stream
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new DescribeMessageStreamResponse(requestId, status, errorMessage, messageStreamInfo)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
status + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + + + + null + +
errorMessage + + +String + + + + + + null + +
messageStreamInfo + + +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

messageStreamInfo

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

messageStreamInfo

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withErrorMessage(value) → {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse + + +
+
+ + + + + + + + + + + + + +

withMessageStreamInfo(value) → {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse + + +
+
+ + + + + + + + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse + + +
+
+ + + + + + + + + + + + + +

withStatus(value) → {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.ExportDefinition.html b/docs/aws-greengrass-core-sdk.StreamManager.ExportDefinition.html new file mode 100644 index 0000000..94c5b19 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.ExportDefinition.html @@ -0,0 +1,1107 @@ + + + + + JSDoc: Class: ExportDefinition + + + + + + + + + + +
+ +

Class: ExportDefinition

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~ExportDefinition(http, iotAnalytics, kinesis)

+ +
Defines how and where the stream is uploaded
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new ExportDefinition(http, iotAnalytics, kinesis)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
http + + +Array.<aws-greengrass-core-sdk.StreamManager.HTTPConfig> + + + + + + null + + Defines how the stream is uploaded to an HTTP endpoint
iotAnalytics + + +Array.<aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig> + + + + + + null + + Defines how the stream is uploaded to IoT Analytics
kinesis + + +Array.<aws-greengrass-core-sdk.StreamManager.KinesisConfig> + + + + + + null + + Defines how the stream is uploaded to Kinesis
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

http

+ + + + +
+ Defines how the stream is uploaded to an HTTP endpoint +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

http

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

iotAnalytics

+ + + + +
+ Defines how the stream is uploaded to IoT Analytics +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

iotAnalytics

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

kinesis

+ + + + +
+ Defines how the stream is uploaded to Kinesis +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

kinesis

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withHttp(value) → {aws-greengrass-core-sdk.StreamManager.ExportDefinition}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Array.<aws-greengrass-core-sdk.StreamManager.HTTPConfig> + + + + Defines how the stream is uploaded to an HTTP endpoint
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ExportDefinition + + +
+
+ + + + + + + + + + + + + +

withIotAnalytics(value) → {aws-greengrass-core-sdk.StreamManager.ExportDefinition}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Array.<aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig> + + + + Defines how the stream is uploaded to IoT Analytics
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ExportDefinition + + +
+
+ + + + + + + + + + + + + +

withKinesis(value) → {aws-greengrass-core-sdk.StreamManager.ExportDefinition}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Array.<aws-greengrass-core-sdk.StreamManager.KinesisConfig> + + + + Defines how the stream is uploaded to Kinesis
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ExportDefinition + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.HTTPConfig.html b/docs/aws-greengrass-core-sdk.StreamManager.HTTPConfig.html new file mode 100644 index 0000000..0bab041 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.HTTPConfig.html @@ -0,0 +1,1724 @@ + + + + + JSDoc: Class: HTTPConfig + + + + + + + + + + +
+ +

Class: HTTPConfig

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~HTTPConfig(identifier, uri, batchSize, batchIntervalMillis, priority)

+ +
This export destination is not supported! The interface may change at any time without notice and should not be relied on for any production use. + There are no guarantees around its correctness. + This configures an HTTP endpoint which sends a POST request to the provided URI. Each request contains a single message in the body of the request.
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new HTTPConfig(identifier, uri, batchSize, batchIntervalMillis, priority)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
identifier + + +String + + + + + + null + + A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
uri + + +String + + + + + + null + + URL for HTTP endpoint which should receive the POST requests for export.
batchSize + + +Number + + + + + + null + + The maximum size of a batch to send to the destination. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum batch size is 1 and the maximum is 500.
batchIntervalMillis + + +Number + + + + + + null + + The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
priority + + +Number + + + + + + null + + Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

batchIntervalMillis

+ + + + +
+ The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

batchIntervalMillis

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

batchSize

+ + + + +
+ The maximum size of a batch to send to the destination. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum batch size is 1 and the maximum is 500. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

batchSize

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

identifier

+ + + + +
+ A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

identifier

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

priority

+ + + + +
+ Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

priority

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

uri

+ + + + +
+ URL for HTTP endpoint which should receive the POST requests for export. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

uri

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withBatchIntervalMillis(value) → {aws-greengrass-core-sdk.StreamManager.HTTPConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.HTTPConfig + + +
+
+ + + + + + + + + + + + + +

withBatchSize(value) → {aws-greengrass-core-sdk.StreamManager.HTTPConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The maximum size of a batch to send to the destination. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum batch size is 1 and the maximum is 500.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.HTTPConfig + + +
+
+ + + + + + + + + + + + + +

withIdentifier(value) → {aws-greengrass-core-sdk.StreamManager.HTTPConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + + A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.HTTPConfig + + +
+
+ + + + + + + + + + + + + +

withPriority(value) → {aws-greengrass-core-sdk.StreamManager.HTTPConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.HTTPConfig + + +
+
+ + + + + + + + + + + + + +

withUri(value) → {aws-greengrass-core-sdk.StreamManager.HTTPConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + + URL for HTTP endpoint which should receive the POST requests for export.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.HTTPConfig + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig.html b/docs/aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig.html new file mode 100644 index 0000000..02941c3 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig.html @@ -0,0 +1,2025 @@ + + + + + JSDoc: Class: IoTAnalyticsConfig + + + + + + + + + + +
+ +

Class: IoTAnalyticsConfig

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~IoTAnalyticsConfig(identifier, iotChannel, iotMsgIdPrefix, batchSize, batchIntervalMillis, priority)

+ +
Configuration object for IoT Analytics export destination.
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new IoTAnalyticsConfig(identifier, iotChannel, iotMsgIdPrefix, batchSize, batchIntervalMillis, priority)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
identifier + + +String + + + + + + null + + A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
iotChannel + + +String + + + + + + null + + The name of the IoT Analytics Channel that this exporter should upload to
iotMsgIdPrefix + + +String + + + + + + null + + A string prefixed to each unique message id. After this prefix, StreamManager may append more data to make the message ID unique. + This prefix must be less than 32 characters.
batchSize + + +Number + + + + + + null + + The maximum size of a batch to send to IoT Analytics. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 100.
batchIntervalMillis + + +Number + + + + + + null + + The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
priority + + +Number + + + + + + null + + Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

batchIntervalMillis

+ + + + +
+ The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

batchIntervalMillis

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

batchSize

+ + + + +
+ The maximum size of a batch to send to IoT Analytics. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 100. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

batchSize

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

identifier

+ + + + +
+ A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

identifier

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

iotChannel

+ + + + +
+ The name of the IoT Analytics Channel that this exporter should upload to +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

iotChannel

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

iotMsgIdPrefix

+ + + + +
+ A string prefixed to each unique message id. After this prefix, StreamManager may append more data to make the message ID unique. + This prefix must be less than 32 characters. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

iotMsgIdPrefix

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

priority

+ + + + +
+ Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

priority

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withBatchIntervalMillis(value) → {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig + + +
+
+ + + + + + + + + + + + + +

withBatchSize(value) → {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The maximum size of a batch to send to IoT Analytics. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 100.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig + + +
+
+ + + + + + + + + + + + + +

withIdentifier(value) → {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + + A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig + + +
+
+ + + + + + + + + + + + + +

withIotChannel(value) → {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + + The name of the IoT Analytics Channel that this exporter should upload to
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig + + +
+
+ + + + + + + + + + + + + +

withIotMsgIdPrefix(value) → {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + + A string prefixed to each unique message id. After this prefix, StreamManager may append more data to make the message ID unique. + This prefix must be less than 32 characters.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig + + +
+
+ + + + + + + + + + + + + +

withPriority(value) → {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.KinesisConfig.html b/docs/aws-greengrass-core-sdk.StreamManager.KinesisConfig.html new file mode 100644 index 0000000..8aa65c7 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.KinesisConfig.html @@ -0,0 +1,1722 @@ + + + + + JSDoc: Class: KinesisConfig + + + + + + + + + + +
+ +

Class: KinesisConfig

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~KinesisConfig(identifier, kinesisStreamName, batchSize, batchIntervalMillis, priority)

+ +
Configuration object for Kinesis data streams export destination.
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new KinesisConfig(identifier, kinesisStreamName, batchSize, batchIntervalMillis, priority)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
identifier + + +String + + + + + + null + + A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
kinesisStreamName + + +String + + + + + + null + + The name of the Kinesis data stream that this exporter should upload to
batchSize + + +Number + + + + + + null + + The maximum size of a batch to send to Kinesis. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 500.
batchIntervalMillis + + +Number + + + + + + null + + The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
priority + + +Number + + + + + + null + + Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

batchIntervalMillis

+ + + + +
+ The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

batchIntervalMillis

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

batchSize

+ + + + +
+ The maximum size of a batch to send to Kinesis. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 500. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

batchSize

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

identifier

+ + + + +
+ A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

identifier

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

kinesisStreamName

+ + + + +
+ The name of the Kinesis data stream that this exporter should upload to +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

kinesisStreamName

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

priority

+ + + + +
+ Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

priority

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withBatchIntervalMillis(value) → {aws-greengrass-core-sdk.StreamManager.KinesisConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.KinesisConfig + + +
+
+ + + + + + + + + + + + + +

withBatchSize(value) → {aws-greengrass-core-sdk.StreamManager.KinesisConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The maximum size of a batch to send to Kinesis. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1. + If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. + The batch size must be between 1 and 500.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.KinesisConfig + + +
+
+ + + + + + + + + + + + + +

withIdentifier(value) → {aws-greengrass-core-sdk.StreamManager.KinesisConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + + A unique identifier to identify this individual upload stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.KinesisConfig + + +
+
+ + + + + + + + + + + + + +

withKinesisStreamName(value) → {aws-greengrass-core-sdk.StreamManager.KinesisConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + + The name of the Kinesis data stream that this exporter should upload to
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.KinesisConfig + + +
+
+ + + + + + + + + + + + + +

withPriority(value) → {aws-greengrass-core-sdk.StreamManager.KinesisConfig}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.KinesisConfig + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.ListStreamsRequest.html b/docs/aws-greengrass-core-sdk.StreamManager.ListStreamsRequest.html new file mode 100644 index 0000000..ec994bd --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.ListStreamsRequest.html @@ -0,0 +1,503 @@ + + + + + JSDoc: Class: ListStreamsRequest + + + + + + + + + + +
+ +

Class: ListStreamsRequest

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~ListStreamsRequest(requestId)

+ +
(Internal Only) Request object to list all available streams. There are no options.
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new ListStreamsRequest(requestId)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.ListStreamsRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ListStreamsRequest + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.ListStreamsResponse.html b/docs/aws-greengrass-core-sdk.StreamManager.ListStreamsResponse.html new file mode 100644 index 0000000..4234da3 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.ListStreamsResponse.html @@ -0,0 +1,1391 @@ + + + + + JSDoc: Class: ListStreamsResponse + + + + + + + + + + +
+ +

Class: ListStreamsResponse

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~ListStreamsResponse(requestId, status, errorMessage, streams)

+ +
Internal Only
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new ListStreamsResponse(requestId, status, errorMessage, streams)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
status + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + + + + null + +
errorMessage + + +String + + + + + + null + +
streams + + +Array.<String> + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

streams

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

streams

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withErrorMessage(value) → {aws-greengrass-core-sdk.StreamManager.ListStreamsResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ListStreamsResponse + + +
+
+ + + + + + + + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.ListStreamsResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ListStreamsResponse + + +
+
+ + + + + + + + + + + + + +

withStatus(value) → {aws-greengrass-core-sdk.StreamManager.ListStreamsResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ListStreamsResponse + + +
+
+ + + + + + + + + + + + + +

withStreams(value) → {aws-greengrass-core-sdk.StreamManager.ListStreamsResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Array.<String> + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ListStreamsResponse + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.Message.html b/docs/aws-greengrass-core-sdk.StreamManager.Message.html new file mode 100644 index 0000000..f9c857c --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.Message.html @@ -0,0 +1,1407 @@ + + + + + JSDoc: Class: Message + + + + + + + + + + +
+ +

Class: Message

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~Message(streamName, sequenceNumber, ingestTime, payload)

+ +
Message object containing metadata and the user's payload
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new Message(streamName, sequenceNumber, ingestTime, payload)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
streamName + + +String + + + + + + null + + The name of the stream which this message is in.
sequenceNumber + + +Number + + + + + + null + + The sequence number of this message within the stream.
ingestTime + + +Number + + + + + + null + + The time that the message was ingested to Stream Manager. Data is Unix epoch time in milliseconds.
payload + + +Buffer + + + + + + null + + The binary message data.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

ingestTime

+ + + + +
+ The time that the message was ingested to Stream Manager. Data is Unix epoch time in milliseconds. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

ingestTime

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

payload

+ + + + +
+ The binary message data. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

payload

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

sequenceNumber

+ + + + +
+ The sequence number of this message within the stream. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

sequenceNumber

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

streamName

+ + + + +
+ The name of the stream which this message is in. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

streamName

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withIngestTime(value) → {aws-greengrass-core-sdk.StreamManager.Message}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The time that the message was ingested to Stream Manager. Data is Unix epoch time in milliseconds.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.Message + + +
+
+ + + + + + + + + + + + + +

withPayload(value) → {aws-greengrass-core-sdk.StreamManager.Message}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Buffer + + + + The binary message data.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.Message + + +
+
+ + + + + + + + + + + + + +

withSequenceNumber(value) → {aws-greengrass-core-sdk.StreamManager.Message}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The sequence number of this message within the stream.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.Message + + +
+
+ + + + + + + + + + + + + +

withStreamName(value) → {aws-greengrass-core-sdk.StreamManager.Message}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + + The name of the stream which this message is in.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.Message + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.MessageFrame.html b/docs/aws-greengrass-core-sdk.StreamManager.MessageFrame.html new file mode 100644 index 0000000..dac15b3 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.MessageFrame.html @@ -0,0 +1,799 @@ + + + + + JSDoc: Class: MessageFrame + + + + + + + + + + +
+ +

Class: MessageFrame

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~MessageFrame(operation, payload)

+ +
Internal Only
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new MessageFrame(operation, payload)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
operation + + +aws-greengrass-core-sdk.StreamManager.Operation + + + + + + null + +
payload + + +Buffer + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

operation

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

operation

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

payload

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

payload

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withOperation(value) → {aws-greengrass-core-sdk.StreamManager.MessageFrame}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.Operation + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageFrame + + +
+
+ + + + + + + + + + + + + +

withPayload(value) → {aws-greengrass-core-sdk.StreamManager.MessageFrame}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Buffer + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageFrame + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition.html b/docs/aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition.html new file mode 100644 index 0000000..100d875 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition.html @@ -0,0 +1,2628 @@ + + + + + JSDoc: Class: MessageStreamDefinition + + + + + + + + + + +
+ +

Class: MessageStreamDefinition

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~MessageStreamDefinition(name, maxSize, streamSegmentSize, timeToLiveMillis, strategyOnFull, persistence, flushOnWrite, exportDefinition)

+ +
Object defining a message stream used in the CreateMessageStream API.
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new MessageStreamDefinition(name, maxSize, streamSegmentSize, timeToLiveMillis, strategyOnFull, persistence, flushOnWrite, exportDefinition)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
name + + +String + + + + + + null + + The unique name of the stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
maxSize + + +Number + + + + + + 268435456 + + The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB.
streamSegmentSize + + +Number + + + + + + 16777216 + + The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB. + Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted.
timeToLiveMillis + + +Number + + + + + + null + + Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
strategyOnFull + + +aws-greengrass-core-sdk.StreamManager.StrategyOnFull + + + + + + null + + What to do when the maximum size of the stream is reached. + RejectNewData: any append message request after the stream is full will be rejected with an exception. + OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message.
persistence + + +aws-greengrass-core-sdk.StreamManager.Persistence + + + + + + null + + Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. + Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk.
flushOnWrite + + +Boolean + + + + + + null + + This only applies when Persistence is set to File mode. + Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false.
exportDefinition + + +aws-greengrass-core-sdk.StreamManager.ExportDefinition + + + + + + null + + Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

exportDefinition

+ + + + +
+ Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

exportDefinition

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

flushOnWrite

+ + + + +
+ This only applies when Persistence is set to File mode. + Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

flushOnWrite

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

maxSize

+ + + + +
+ The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

maxSize

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

name

+ + + + +
+ The unique name of the stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

name

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

persistence

+ + + + +
+ Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. + Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

persistence

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

strategyOnFull

+ + + + +
+ What to do when the maximum size of the stream is reached. + RejectNewData: any append message request after the stream is full will be rejected with an exception. + OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

strategyOnFull

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

streamSegmentSize

+ + + + +
+ The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB. + Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

streamSegmentSize

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

timeToLiveMillis

+ + + + +
+ Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

timeToLiveMillis

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withExportDefinition(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.ExportDefinition + + + + Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition + + +
+
+ + + + + + + + + + + + + +

withFlushOnWrite(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Boolean + + + + This only applies when Persistence is set to File mode. + Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition + + +
+
+ + + + + + + + + + + + + +

withMaxSize(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition + + +
+
+ + + + + + + + + + + + + +

withName(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + + The unique name of the stream. + Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition + + +
+
+ + + + + + + + + + + + + +

withPersistence(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.Persistence + + + + Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. + Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition + + +
+
+ + + + + + + + + + + + + +

withStrategyOnFull(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.StrategyOnFull + + + + What to do when the maximum size of the stream is reached. + RejectNewData: any append message request after the stream is full will be rejected with an exception. + OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition + + +
+
+ + + + + + + + + + + + + +

withStreamSegmentSize(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB. + Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition + + +
+
+ + + + + + + + + + + + + +

withTimeToLiveMillis(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires. + The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.MessageStreamInfo-MessageStreamInfo._exportStatuses.html b/docs/aws-greengrass-core-sdk.StreamManager.MessageStreamInfo-MessageStreamInfo._exportStatuses.html new file mode 100644 index 0000000..0532b7c --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.MessageStreamInfo-MessageStreamInfo._exportStatuses.html @@ -0,0 +1,310 @@ + + + + + JSDoc: Class: _exportStatuses + + + + + + + + + + +
+ +

Class: _exportStatuses

+ + + + + + +
+ +
+ +

_exportStatuses(exportConfigIdentifier, lastExportedSequenceNumber, lastExportTime, errorMessage)

+ + +
+ +
+
+ + + + + + +

new _exportStatuses(exportConfigIdentifier, lastExportedSequenceNumber, lastExportTime, errorMessage)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
exportConfigIdentifier + + +String + + + + + + null + + The unique export identifier.
lastExportedSequenceNumber + + +Number + + + + + + null + + The sequence number of the last message which was successfully exported.
lastExportTime + + +Number + + + + + + null + + The last time an export was attempted. Data is Unix epoch time in milliseconds.
errorMessage + + +String + + + + + + null + + Error message from the last export attempt if it failed.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.MessageStreamInfo-MessageStreamInfo._storageStatus.html b/docs/aws-greengrass-core-sdk.StreamManager.MessageStreamInfo-MessageStreamInfo._storageStatus.html new file mode 100644 index 0000000..d6b0f56 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.MessageStreamInfo-MessageStreamInfo._storageStatus.html @@ -0,0 +1,281 @@ + + + + + JSDoc: Class: _storageStatus + + + + + + + + + + +
+ +

Class: _storageStatus

+ + + + + + +
+ +
+ +

_storageStatus(oldestSequenceNumber, newestSequenceNumber, totalBytes)

+ + +
+ +
+
+ + + + + + +

new _storageStatus(oldestSequenceNumber, newestSequenceNumber, totalBytes)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
oldestSequenceNumber + + +Number + + + + + + null + + The sequence number of the first message which is still accessible in the stream.
newestSequenceNumber + + +Number + + + + + + null + + The sequence number of the last appended message.
totalBytes + + +Number + + + + + + null + + The current total size of the stream in bytes.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.MessageStreamInfo.html b/docs/aws-greengrass-core-sdk.StreamManager.MessageStreamInfo.html new file mode 100644 index 0000000..126f6c1 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.MessageStreamInfo.html @@ -0,0 +1,2996 @@ + + + + + JSDoc: Class: MessageStreamInfo + + + + + + + + + + +
+ +

Class: MessageStreamInfo

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~MessageStreamInfo(definition, storageStatus, exportStatuses)

+ +
Message stream information including its definition, storage status and export status
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new MessageStreamInfo(definition, storageStatus, exportStatuses)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
definition + + +aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition + + + + + + null + +
storageStatus + + +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus + + + + + + null + + Stream status including oldest/newest sequence number and total bytes
exportStatuses + + +Array.<aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses> + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

(static) _exportStatuses#errorMessage

+ + + + +
+ Error message from the last export attempt if it failed. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) _exportStatuses#errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) _exportStatuses#exportConfigIdentifier

+ + + + +
+ The unique export identifier. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) _exportStatuses#exportConfigIdentifier

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) _exportStatuses#lastExportedSequenceNumber

+ + + + +
+ The sequence number of the last message which was successfully exported. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) _exportStatuses#lastExportedSequenceNumber

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) _exportStatuses#lastExportTime

+ + + + +
+ The last time an export was attempted. Data is Unix epoch time in milliseconds. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) _exportStatuses#lastExportTime

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) _storageStatus#newestSequenceNumber

+ + + + +
+ The sequence number of the last appended message. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) _storageStatus#newestSequenceNumber

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) _storageStatus#oldestSequenceNumber

+ + + + +
+ The sequence number of the first message which is still accessible in the stream. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) _storageStatus#oldestSequenceNumber

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) _storageStatus#totalBytes

+ + + + +
+ The current total size of the stream in bytes. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(static) _storageStatus#totalBytes

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

definition

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

definition

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

exportStatuses

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

exportStatuses

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

storageStatus

+ + + + +
+ Stream status including oldest/newest sequence number and total bytes +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

storageStatus

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

(static) _exportStatuses#withErrorMessage(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + + Error message from the last export attempt if it failed.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses + + +
+
+ + + + + + + + + + + + + +

(static) _exportStatuses#withExportConfigIdentifier(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + + The unique export identifier.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses + + +
+
+ + + + + + + + + + + + + +

(static) _exportStatuses#withLastExportedSequenceNumber(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The sequence number of the last message which was successfully exported.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses + + +
+
+ + + + + + + + + + + + + +

(static) _exportStatuses#withLastExportTime(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The last time an export was attempted. Data is Unix epoch time in milliseconds.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses + + +
+
+ + + + + + + + + + + + + +

(static) _storageStatus#withNewestSequenceNumber(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The sequence number of the last appended message.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus + + +
+
+ + + + + + + + + + + + + +

(static) _storageStatus#withOldestSequenceNumber(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The sequence number of the first message which is still accessible in the stream.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus + + +
+
+ + + + + + + + + + + + + +

(static) _storageStatus#withTotalBytes(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The current total size of the stream in bytes.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus + + +
+
+ + + + + + + + + + + + + +

withDefinition(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo + + +
+
+ + + + + + + + + + + + + +

withExportStatuses(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Array.<aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses> + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo + + +
+
+ + + + + + + + + + + + + +

withStorageStatus(value) → {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus + + + + Stream status including oldest/newest sequence number and total bytes
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.MessageStreamInfo + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.Operation.html b/docs/aws-greengrass-core-sdk.StreamManager.Operation.html new file mode 100644 index 0000000..79fbde0 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.Operation.html @@ -0,0 +1,1195 @@ + + + + + JSDoc: Class: Operation + + + + + + + + + + +
+ +

Class: Operation

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~Operation()

+ +
Internal Only
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new Operation()

+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

(readonly) AppendMessage :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) AppendMessageResponse :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) Connect :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) ConnectResponse :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) CreateMessageStream :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) CreateMessageStreamResponse :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) DeleteMessageStream :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) DeleteMessageStreamResponse :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) DescribeMessageStream :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) DescribeMessageStreamResponse :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) ListStreams :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) ListStreamsResponse :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) ReadMessages :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) ReadMessagesResponse :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) Unknown :aws-greengrass-core-sdk.StreamManager.Operation

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.Persistence.html b/docs/aws-greengrass-core-sdk.StreamManager.Persistence.html new file mode 100644 index 0000000..8502306 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.Persistence.html @@ -0,0 +1,312 @@ + + + + + JSDoc: Class: Persistence + + + + + + + + + + +
+ +

Class: Persistence

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~Persistence()

+ +
Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. + Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk.
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new Persistence()

+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

(readonly) File :aws-greengrass-core-sdk.StreamManager.Persistence

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) Memory :aws-greengrass-core-sdk.StreamManager.Persistence

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions.html b/docs/aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions.html new file mode 100644 index 0000000..8e45025 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions.html @@ -0,0 +1,1422 @@ + + + + + JSDoc: Class: ReadMessagesOptions + + + + + + + + + + +
+ +

Class: ReadMessagesOptions

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~ReadMessagesOptions(desiredStartSequenceNumber, minMessageCount, maxMessageCount, readTimeoutMillis)

+ +
Options for the ReadMessages API. All fields are optional.
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new ReadMessagesOptions(desiredStartSequenceNumber, minMessageCount, maxMessageCount, readTimeoutMillis)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
desiredStartSequenceNumber + + +Number + + + + + + null + + The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum.
minMessageCount + + +Number + + + + + + 1 + + The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown. + The minimum values is 1 and the maximum value is 2147483647.
maxMessageCount + + +Number + + + + + + null + + The maximum number of messages that will be returned. + The minimum values is the value of the minimum message count and the maximum value is 2147483647.
readTimeoutMillis + + +Number + + + + + + 0 + + The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages. + If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown. + If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached. + The maximum value is the value of the client timeout.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

desiredStartSequenceNumber

+ + + + +
+ The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

desiredStartSequenceNumber

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

maxMessageCount

+ + + + +
+ The maximum number of messages that will be returned. + The minimum values is the value of the minimum message count and the maximum value is 2147483647. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

maxMessageCount

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

minMessageCount

+ + + + +
+ The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown. + The minimum values is 1 and the maximum value is 2147483647. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

minMessageCount

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

readTimeoutMillis

+ + + + +
+ The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages. + If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown. + If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached. + The maximum value is the value of the client timeout. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

readTimeoutMillis

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withDesiredStartSequenceNumber(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions + + +
+
+ + + + + + + + + + + + + +

withMaxMessageCount(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The maximum number of messages that will be returned. + The minimum values is the value of the minimum message count and the maximum value is 2147483647.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions + + +
+
+ + + + + + + + + + + + + +

withMinMessageCount(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown. + The minimum values is 1 and the maximum value is 2147483647.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions + + +
+
+ + + + + + + + + + + + + +

withReadTimeoutMillis(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Number + + + + The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages. + If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown. + If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached. + The maximum value is the value of the client timeout.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest.html b/docs/aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest.html new file mode 100644 index 0000000..a8eb002 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest.html @@ -0,0 +1,1095 @@ + + + + + JSDoc: Class: ReadMessagesRequest + + + + + + + + + + +
+ +

Class: ReadMessagesRequest

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~ReadMessagesRequest(requestId, streamName, readMessagesOptions)

+ +
(Internal Only) Request object for reading from a message stream. readMessagesOptions is optional.
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new ReadMessagesRequest(requestId, streamName, readMessagesOptions)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
streamName + + +String + + + + + + null + +
readMessagesOptions + + +aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

readMessagesOptions

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

readMessagesOptions

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

streamName

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

streamName

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withReadMessagesOptions(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest + + +
+
+ + + + + + + + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest + + +
+
+ + + + + + + + + + + + + +

withStreamName(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse.html b/docs/aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse.html new file mode 100644 index 0000000..b3a470c --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse.html @@ -0,0 +1,1391 @@ + + + + + JSDoc: Class: ReadMessagesResponse + + + + + + + + + + +
+ +

Class: ReadMessagesResponse

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~ReadMessagesResponse(requestId, messages, status, errorMessage)

+ +
Internal Only
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new ReadMessagesResponse(requestId, messages, status, errorMessage)

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDefaultDescription
requestId + + +String + + + + + + null + +
messages + + +Array.<aws-greengrass-core-sdk.StreamManager.Message> + + + + + + null + +
status + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + + + + null + +
errorMessage + + +String + + + + + + null + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

errorMessage

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

messages

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

messages

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

requestId

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

status

+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + +

Methods

+ + + + + + + +

withErrorMessage(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse + + +
+
+ + + + + + + + + + + + + +

withMessages(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +Array.<aws-greengrass-core-sdk.StreamManager.Message> + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse + + +
+
+ + + + + + + + + + + + + +

withRequestId(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +String + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse + + +
+
+ + + + + + + + + + + + + +

withStatus(value) → {aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse}

+ + + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + +aws-greengrass-core-sdk.StreamManager.ResponseStatusCode + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.ResponseStatusCode.html b/docs/aws-greengrass-core-sdk.StreamManager.ResponseStatusCode.html new file mode 100644 index 0000000..0a03c7d --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.ResponseStatusCode.html @@ -0,0 +1,1279 @@ + + + + + JSDoc: Class: ResponseStatusCode + + + + + + + + + + +
+ +

Class: ResponseStatusCode

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~ResponseStatusCode()

+ +
(Internal Only) Enum defining possible response status codes from StreamManager server. + Success: Request succeeded. + UnknownFailure: Encountered unknown StreamManager server failure. + Unauthorized: Client is not authorized to perform this request. + InvalidRequest: Client request is invalid. + RequestPayloadTooLarge: Request payload is too large. + ResourceNotFound: The requested resource does not exist. + ServerTimeout: Server took too long and timed out. + ResponsePayloadTooLarge: Server response exceeded the max allowed response payload size by the protocol. + UnsupportedConnectVersion: Server does not support the Connect version presented by the Client. + UnexpectedOperation: Operation presented was not expected by the Server. + UnsupportedProtocolVersion: Protocol version presented by the Client is not compatible with the Server. + InvalidProtocolVersion: Protocol version presented by the Client is not valid. + FailedToConnect: Client failed to connect to the Server. + NotEnoughMessages: There is not enough messages to return. + MessageStoreReadError: Read messages encountered an error. + OutOfMemoryError: Server ran out of memory.
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new ResponseStatusCode()

+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

(readonly) FailedToConnect :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) InvalidProtocolVersion :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) InvalidRequest :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) MessageStoreReadError :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) NotEnoughMessages :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) OutOfMemoryError :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) RequestPayloadTooLarge :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) ResourceNotFound :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) ResponsePayloadTooLarge :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) ServerTimeout :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) Success :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) Unauthorized :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) UnexpectedOperation :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) UnknownFailure :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) UnsupportedConnectVersion :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) UnsupportedProtocolVersion :aws-greengrass-core-sdk.StreamManager.ResponseStatusCode

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.StrategyOnFull.html b/docs/aws-greengrass-core-sdk.StreamManager.StrategyOnFull.html new file mode 100644 index 0000000..716c144 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.StrategyOnFull.html @@ -0,0 +1,314 @@ + + + + + JSDoc: Class: StrategyOnFull + + + + + + + + + + +
+ +

Class: StrategyOnFull

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~StrategyOnFull()

+ +
StrategyOnFull is used in the MessageStreamDefinition when creating a stream. + It defines the behavior when the stream has reached the maximum size. + RejectNewData: any append message request after the stream is full will be rejected with an exception. + OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message.
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new StrategyOnFull()

+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Members

+ + + +

(readonly) OverwriteOldestData :aws-greengrass-core-sdk.StreamManager.StrategyOnFull

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + +

(readonly) RejectNewData :aws-greengrass-core-sdk.StreamManager.StrategyOnFull

+ + + + + + +
Type:
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.StreamManagerClient.html b/docs/aws-greengrass-core-sdk.StreamManager.StreamManagerClient.html new file mode 100644 index 0000000..4153078 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.StreamManagerClient.html @@ -0,0 +1,1783 @@ + + + + + JSDoc: Class: StreamManagerClient + + + + + + + + + + +
+ +

Class: StreamManagerClient

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager~StreamManagerClient(optsnullable)

+ +
Stream manager client
+ + +
+ +
+
+ + + + +

Constructor

+ + + +

new StreamManagerClient(optsnullable)

+ + + + + + +
+ Constructs a new Stream Manager client. Once connected, onConnectCb will be called and +the client can then be used. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
opts + + +Object + + + + + + + + <nullable>
+ + + +
All these options are optional. +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
port + + +Number + + + + + + + + + +
host + + +String + + + + + + + + + +
onConnectCb + + +function + + + + + + + + <nullable>
+ + + +
Optional callback to be called once the client has connected.
onErrorCb + + +function + + + + + + + + <nullable>
+ + + +
Optional, but highly suggested callback to be called when a connection error occurs.
logger + + +Logger + + + + + + + + <nullable>
+ + + +
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
Example
+ +

StreamManager Usage

+ +
const { StreamManagerClient } = require('aws-greengrass-core-sdk/stream-manager');
+const client = new StreamManagerClient();
+c.onConnected(async () => {
+    // Do work with the client (c) here.
+});
+ + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

(async) appendMessage(streamName, data) → {Promise.<Number>}

+ + + + + + +
+ Append a message into the specified message stream. Returns the sequence number of the message +if it was successfully appended. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
streamName + + +string + + + + The name of the stream to append to.
data + + +Buffer + + + + Buffer containing the data to be written.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<Number> + + +
+
+ + + + + + + + + + + + + +

close()

+ + + + + + +
+ Close the connection +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

(async) createMessageStream(definition) → {Promise.<void>}

+ + + + + + +
+ Create a message stream with a given definition. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
definition + + +aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<void> + + +
+
+ + + + + + + + + + + + + +

(async) deleteMessageStream(streamName) → {Promise.<void>}

+ + + + + + +
+ Deletes a message stream based on its name. Nothing is returned if the request succeeds. +An error will be thrown if the request fails. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
streamName + + +string + + + + The name of the stream to be deleted.
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<void> + + +
+
+ + + + + + + + + + + + + +

(async) describeMessageStream(streamName) → {Promise.<aws-greengrass-core-sdk.StreamManager.MessageStreamInfo>}

+ + + + + + +
+ Describe a message stream to get metadata including the stream's definition, +size, and exporter statuses. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
streamName + + +string + + + + The name of the stream to describe
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<aws-greengrass-core-sdk.StreamManager.MessageStreamInfo> + + +
+
+ + + + + + + + + + + + + +

(async) listStreams() → {Promise.<Array.<String>>}

+ + + + + + +
+ List the streams in StreamManager. Returns a list of their names. +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<Array.<String>> + + +
+
+ + + + + + + + + + + + + +

onConnected(f)

+ + + + + + +
+ Add a callback for when the client connects. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
f + + +function + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

onError(f)

+ + + + + + +
+ Add a callback for when an error occurs. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
f + + +function + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

(async) readMessages(streamName, optionsnullable) → {Promise.<Array.<aws-greengrass-core-sdk.StreamManager.Message>>}

+ + + + + + +
+ Read message(s) from a chosen stream with options. If no options are specified it will try to read +1 message from the stream. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
streamName + + +string + + + + + + + + + + + + The name of the stream to read from.
options + + +aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions + + + + + + + + <nullable>
+ + + +
+ + null + + Options used when reading from the stream of type aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions. + Defaults are: +
    +
  • desiredStartSequenceNumber: 0
  • +
  • minMessageCount: 1
  • +
  • maxMessageCount: 1
  • +
  • readTimeoutMillis: 0
    // Where 0 here represents that the server will immediately return the messages
    +// or an exception if there were not enough messages available.
  • +
+

+ If desiredStartSequenceNumber is specified in the options and is less + than the current beginning of the stream, returned messages will start + at the beginning of the stream and not necessarily the desiredStartSequenceNumber. +

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+ List of one or more messages. +
+ + + +
+
+ Type +
+
+ +Promise.<Array.<aws-greengrass-core-sdk.StreamManager.Message>> + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.StreamManager.html b/docs/aws-greengrass-core-sdk.StreamManager.html new file mode 100644 index 0000000..c23c902 --- /dev/null +++ b/docs/aws-greengrass-core-sdk.StreamManager.html @@ -0,0 +1,219 @@ + + + + + JSDoc: Namespace: StreamManager + + + + + + + + + + +
+ +

Namespace: StreamManager

+ + + + + + +
+ +
+ +

+ aws-greengrass-core-sdk.StreamManager

+ + +
+ +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + +

Classes

+ +
+
AppendMessageRequest
+
+ +
AppendMessageResponse
+
+ +
ConnectRequest
+
+ +
ConnectResponse
+
+ +
CreateMessageStreamRequest
+
+ +
CreateMessageStreamResponse
+
+ +
DeleteMessageStreamRequest
+
+ +
DeleteMessageStreamResponse
+
+ +
DescribeMessageStreamRequest
+
+ +
DescribeMessageStreamResponse
+
+ +
ExportDefinition
+
+ +
HTTPConfig
+
+ +
IoTAnalyticsConfig
+
+ +
KinesisConfig
+
+ +
ListStreamsRequest
+
+ +
ListStreamsResponse
+
+ +
Message
+
+ +
MessageFrame
+
+ +
MessageStreamDefinition
+
+ +
MessageStreamInfo
+
+ +
Operation
+
+ +
Persistence
+
+ +
ReadMessagesOptions
+
+ +
ReadMessagesRequest
+
+ +
ReadMessagesResponse
+
+ +
ResponseStatusCode
+
+ +
StrategyOnFull
+
+ +
StreamManagerClient
+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/aws-greengrass-core-sdk.html b/docs/aws-greengrass-core-sdk.html new file mode 100644 index 0000000..fa4a38d --- /dev/null +++ b/docs/aws-greengrass-core-sdk.html @@ -0,0 +1,150 @@ + + + + + JSDoc: Namespace: aws-greengrass-core-sdk + + + + + + + + + + +
+ +

Namespace: aws-greengrass-core-sdk

+ + + + + + +
+ +
+ +

aws-greengrass-core-sdk

+ + +
+ +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + +

Classes

+ +
+
IotData
+
+ +
Lambda
+
+ +
SecretsManager
+
+
+ + + + + + + +

Namespaces

+ +
+
StreamManager
+
+
+ + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/class_list.html b/docs/class_list.html deleted file mode 100644 index 56c493e..0000000 --- a/docs/class_list.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - Class List - - - - -
-
-

Class List

- - - -
- - -
- - - diff --git a/docs/css/common.css b/docs/css/common.css deleted file mode 100644 index 1e3fc91..0000000 --- a/docs/css/common.css +++ /dev/null @@ -1,6 +0,0 @@ -#full_list li.expander { color: #038; } -.service_list { list-style: none; padding: 0; margin: 0; font-size: 1.1em; clear: both; } -.service_list li { border-bottom: 1px solid #ccc; padding-bottom: 5px; margin-bottom: 7px; width: 40%; float: left; margin-right: 7px; } -#listing .service_list li small { font-size: 0.9em; } -.clear { clear: both; } -#capabilities-banner { margin-bottom: 12px; font-weight: bold; padding: 12px; } diff --git a/docs/css/full_list.css b/docs/css/full_list.css deleted file mode 100644 index fa35982..0000000 --- a/docs/css/full_list.css +++ /dev/null @@ -1,58 +0,0 @@ -body { - margin: 0; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; - height: 101%; - overflow-x: hidden; - background: #fafafa; -} - -h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } -.clear { clear: both; } -.fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; } -#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } -#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } -#full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; } -#full_list ul { padding: 0; } -#full_list li { padding: 0; margin: 0; list-style: none; } -#full_list li .item { padding: 5px 5px 5px 12px; } -#noresults { padding: 7px 12px; background: #fff; } -#content.insearch #noresults { margin-left: 7px; } -li.collapsed ul { display: none; } -li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } -li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } -li { color: #888; cursor: pointer; } -li.deprecated { text-decoration: line-through; font-style: italic; } -li.odd { background: #f0f0f0; } -li.even { background: #fafafa; } -.item:hover { background: #ddd; } -li small:before { content: "("; } -li small:after { content: ")"; } -li small.search_info { display: none; } -a, a:visited { text-decoration: none; color: #05a; } -li.clicked > .item { background: #05a; color: #ccc; } -li.clicked > .item a, li.clicked > .item a:visited { color: #eee; } -li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; } -li.collapsed.clicked a.toggle { background-position: top right; } -#search input { border: 1px solid #bbb; border-radius: 3px; } -#full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; } -#full_list_nav a, #nav a:visited { color: #358; } -#full_list_nav a:hover { background: transparent; color: #5af; } -#full_list_nav span:after { content: ' | '; } -#full_list_nav span:last-child:after { content: ''; } - -#content h1 { margin-top: 0; } -li { white-space: nowrap; cursor: normal; } -li small { display: block; font-size: 0.8em; } -li small:before { content: ""; } -li small:after { content: ""; } -li small.search_info { display: none; } -#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } -#content.insearch #search { background-position: center right; } -#search input { width: 110px; } - -#full_list.insearch ul { display: block; } -#full_list.insearch .item { display: none; } -#full_list.insearch .found { display: block; padding-left: 11px !important; } -#full_list.insearch li a.toggle { display: none; } -#full_list.insearch li small.search_info { display: block; } diff --git a/docs/css/highlight.github.css b/docs/css/highlight.github.css deleted file mode 100644 index e534e87..0000000 --- a/docs/css/highlight.github.css +++ /dev/null @@ -1,127 +0,0 @@ -/* - -github.com style (c) Vasily Polovnyov - -*/ - -pre code { - display: block; padding: 0.5em; - color: #333; - /*background: #f8f8ff*/ -} - -pre .comment, -pre .template_comment, -pre .diff .header, -pre .javadoc { - color: #998; - font-style: italic -} - -pre .keyword, -pre .css .rule .keyword, -pre .winutils, -pre .javascript .title, -pre .nginx .title, -pre .subst, -pre .request, -pre .status { - color: #333; - font-weight: bold -} - -pre .number, -pre .hexcolor, -pre .ruby .constant { - color: #099; -} - -pre .string, -pre .tag .value, -pre .phpdoc, -pre .tex .formula { - color: #d14 -} - -pre .title, -pre .id { - color: #900; - font-weight: bold -} - -pre .javascript .title, -pre .lisp .title, -pre .clojure .title, -pre .subst { - font-weight: normal -} - -pre .class .title, -pre .haskell .type, -pre .vhdl .literal, -pre .tex .command { - color: #458; - font-weight: bold -} - -pre .tag, -pre .tag .title, -pre .rules .property, -pre .django .tag .keyword { - color: #000080; - font-weight: normal -} - -pre .attribute, -pre .variable, -pre .lisp .body { - color: #008080 -} - -pre .regexp { - color: #009926 -} - -pre .class { - color: #458; - font-weight: bold -} - -pre .symbol, -pre .ruby .symbol .string, -pre .lisp .keyword, -pre .tex .special, -pre .prompt { - color: #990073 -} - -pre .built_in, -pre .lisp .title, -pre .clojure .built_in { - color: #0086b3 -} - -pre .preprocessor, -pre .pi, -pre .doctype, -pre .shebang, -pre .cdata { - color: #999; - font-weight: bold -} - -pre .deletion { - background: #fdd -} - -pre .addition { - background: #dfd -} - -pre .diff .change { - background: #0086b3 -} - -pre .chunk { - color: #aaa -} diff --git a/docs/css/style.css b/docs/css/style.css deleted file mode 100644 index 2f32085..0000000 --- a/docs/css/style.css +++ /dev/null @@ -1,484 +0,0 @@ -html { - width: 100%; - height: 100%; -} -body { - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; - width: 100%; - margin: 0; - padding: 0; - display: flex; - display: -webkit-flex; - display: -ms-flexbox; -} - -#nav { - position: relative; - width: 100%; - height: 100%; - border: 0; - border-right: 1px dotted #eee; - overflow: auto; -} -.nav_wrap { - margin: 0; - padding: 0; - width: 20%; - height: 100%; - position: relative; - display: flex; - display: -webkit-flex; - display: -ms-flexbox; - flex-shrink: 0; - -webkit-flex-shrink: 0; - -ms-flex: 1 0; -} -#resizer { - position: absolute; - right: -5px; - top: 0; - width: 10px; - height: 100%; - cursor: col-resize; - z-index: 9999; -} -#main { - flex: 5 1; - -webkit-flex: 5 1; - -ms-flex: 5 1; - outline: none; - position: relative; - background: #fff; - padding: 1.2em; - padding-top: 0.2em; -} - -@media (max-width: 920px) { - .nav_wrap { display: none; } -} - -@media (min-width: 920px) { - body { height: 100%; overflow: hidden; } - #main { height: 100%; overflow: auto; } - #search { display: none; } - #search_frame { display: none; } -} - -#main img { max-width: 100%; } -h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } -h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } -h1.title { margin-bottom: 10px; } -h1.alphaindex { margin-top: 0; font-size: 22px; } -h2 { - padding: 0; - padding-bottom: 3px; - border-bottom: 1px #aaa solid; - font-size: 1.4em; - margin: 1.8em 0 0.5em; - position: relative; -} -h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; } -h2 small a { - display: block; - height: 20px; - border: 1px solid #aaa; - border-bottom: 0; - border-top-left-radius: 5px; - background: #f8f8f8; - position: relative; - padding: 2px 7px; -} -.clear { clear: both; } -.inline { display: inline; } -.inline p:first-child { display: inline; } -.docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; } -.docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt { - color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em; - border-radius: 4px; -} -.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } -.docstring h1 { font-size: 1.2em; } -.docstring h2 { font-size: 1.1em; } -.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } -.summary_desc .object_link a, .docstring .object_link a { - font-family: monospace; font-size: 1.05em; - color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em; - border-radius: 4px; -} -.rdoc-term { padding-right: 25px; font-weight: bold; } -.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } - -/* style for */ -#filecontents table, .docstring table { border-collapse: collapse; } -#filecontents table th, #filecontents table td, -.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } -#filecontents table tr:nth-child(odd), -.docstring table tr:nth-child(odd) { background: #eee; } -#filecontents table tr:nth-child(even), -.docstring table tr:nth-child(even) { background: #fff; } -#filecontents table th, .docstring table th { background: #fff; } - -/* style for
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
err + + +Error + + + + The error object returned from the request. Set to null if the request is successful.
data + + +Object + + + + The de-serialized data returned from the request. Set to null if a request error occurs. +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
payload + + +Buffer +| + +TypedArray +| + +Blob +| + +String + + + + The state information in JSON format
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

lambdaCallback(err, data)

+ + + + + + +
+ Called when a response from the service is returned. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
err + + +Error + + + + The error object returned from the request. Set to null if the request is successful.
data + + +Object + + + + The de-serialized data returned from the request. Set to null if a request error occurs. +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
StatusCode + + +Integer + + + + The HTTP status code will be in the 200 range for successful request. For the RequestResponse invocation type this status code will be 200. +For the Event invocation type this status code will be 202.
FunctionError + + +String + + + + Indicates whether an error occurred while executing the Lambda function. If an error occurred this field will have one of two values; Handled or Unhandled. +Handled errors are errors that are reported by the function while the Unhandled errors are those detected and reported by AWS Lambda. +Unhandled errors include out of memory errors and function timeouts. For information about how to report an Handled error, +see Programming Model.
Payload + + +Buffer +| + +TypedArray +| + +Blob +| + +String + + + + It is the result returned by the Lambda function. This is present only if the invocation type is RequestResponse. +
In the event of a function error this field contains a message describing the error. For the Handled errors the Lambda function will report this message. For Unhandled errors AWS Lambda reports the message.
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +

Logger

+ + + + + + +
Type:
+
    +
  • + +Object + + +
  • +
+ + + + + +
Properties:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
error + + +function + + + +
info + + +function + + + +
debug + + +function + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + +

secretsManagerCallback(err, data)

+ + + + + + +
+ Called when a response from the service is returned. +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
err + + +Error + + + + The error object returned from the request. Set to null if the request is successful.
data + + +Object + + + + The de-serialized data returned from the request. Set to null if a request error occurs. +
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
ARN + + +String + + + + The ARN of the secret.
Name + + +String + + + + The friendly name of the secret.
VersionId + + +String + + + + The unique identifier of this version of the secret.
SecretBinary + + +Buffer +| + +TypedArray +| + +Blob +| + +String + + + + The decrypted part of the protected secret information that was originally provided as binary data in the form of a byte array. +The response parameter represents the binary data as a base64-encoded string.
SecretString + + +String + + + + The decrypted part of the protected secret information that was originally provided as a string.
VersionStages + + +Array.<String> + + + + Specifies the secret version that you want to retrieve by the staging label attached to the version. +
Staging labels are used to keep track of different versions during the rotation process.
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 430df96..d15983f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,267 +1,204 @@ - - + - - - File: README - - — AWS Greengrass Core SDK for JavaScript - - - - - - - - - - - - - - - - - - - + + JSDoc: Home + + + + + + - - -
- - - - -
- -
-

AWS Greengrass Core SDK for JavaScript

- -

The AWS Greengrass Core SDK for JavaScript allows developers to write JavaScript Lambda functions which will run within Greengrass.

- -

Overview

-

This document provides instructions for preparing your Greengrass Core environment to run Lambda functions written in JavaScript. It also includes examples on how to develop a Lambda function in JavaScript as well as packaging and running an example Hello World file in JavaScript for your Greengrass core. - -

Preparing your Greengrass to run NodeJS Lambda functions

- The environment where Greengrass is running on needs to be able to run NodeJS 8.10 applications. -
    -
  • Install NodeJS 8.10 for your platform. You can download the newest NodeJS from https://nodejs.org/en/download/. -
  • When you untar the package downloaded from NodeJS website, you will find node file under bin directory.
  • -
  • Copy the file to /usr/bin or /usr/local/bin folder.
  • -
  • Rename the file to nodejs8.10
  • -
  • Make sure the file is not a symlink.
  • -
- -

Getting Started - Hello World

-
    -
  • Copy samples/HelloWorld folder to your workspace.
  • -
  • Create a folder node_modules under HelloWorld folder.
  • -
  • Unzip aws-greengrass-core-sdk-js.zip into the folder. It should create a folder HelloWorld/node_modules/aws-greengrass-core-sdk
  • -
  • Zip up the content of HelloWorld folder so that the index.js is on the top of the zip file structure.
  • -
  • Go to AWS Lambda Console.
  • -
  • Create a new function.
  • -
  • Choose the Runtime as Node.js 8.10
  • -
  • Upload the zip file in Lambda function code section.
  • -
  • Handler is index.handler
  • -
  • Choose any role as the role is not used within Greengrass.
  • -
  • After creating the function, publish the Lambda.
  • -
  • Create an Alias and point to the Published version (not $LATEST).
  • -
  • Go to your Greengrass Group and add the Lambda under Lambdas section.
  • -
  • Click on the Lambda and change the Lambda lifecycle to Make this function long-lived and keep it running indefinitely.
  • -
  • - Add a Subscription with the following configuration: -
      -
    • Source: Lambda which you just created and added to the group
    • -
    • Target: IoT Cloud
    • -
    • Topic: hello/world
    • -
    -
  • -
  • Deploy. A message from your Lambda should be published to the topic hello/world in the cloud every 5 seconds. You can check this by going to AWS IoT's Test page and subscribing to topic hello/world.
  • -
- -

Including aws-greengrass-core-sdk with your function

- Unzip the SDK into your node_modules folder of your function. This should create a aws-greengrass-core-sdk folder which includes the SDK. - -

Logging in NodeJS Lambdas

-

Your console.log operation will be logged as INFO. A console.error operation will be logged as ERROR. Currently, our NodeJS SDK only allows you to log at INFO or ERROR level only.

- -

Supported Datatypes

-

From GGC version 1.5, you can send both JSON and binary data as a payload when you invoking other Lambdas or publishing a message using IotData service. In order to make your lambda be able to handle binary payload, you need to configure the lambda in Greengrass console to mark it using binary input payload so that GGC can know how to deal with the data.

- -

Supported Context

-

In Greengrass, you can send a context object in a JSON format to be passed to another Lambda that is being invoked. The context format looks like this: - -{ - custom: { - customData: 'customData', - }, -} - -

- - -

Compatibility

-
-
-

Compatibility

-

As new features are added to AWS Greengrass, previous versions of the Greengrass SDK will be incompatible with newer versions of the AWS Greengrass - core. The following table lists the compatible SDKs for all GGC releases.

- - - - - - - - - - - - - - - - - - - - - - - -
GGC VersionCompatible SDK Versions
1.0.x-1.6.x1.0.x-1.2.x
1.7.x-1.8.x1.0.x-1.3.x
1.9.x1.0.x-1.4.x
1.10.x1.0.x-1.5.x
- -
- -
-

1.5.0 Updates

-

Added support for publish() parameter queueFullPolicy which can be set to 'AllOrError' to enforce that the published message is either delivered to all subscription destinations or delivered to no destinations and returns an error when Greengrass Core's internal work queue is full.

-
- -
-

1.4.0 Updates

-

Added support for Node.js 8.10 Lambda runtime. Lambda functions that use Node.js 8.10 runtime can now run on an AWS IoT Greengrass core. (Existing Lambda functions that use Node.js 6.10 runtime can still run on Greengrass core, but they can’t be updated after 5/30/2019. Please refer to AWS Lambda Runtimes Support Policy.)

-
- -
-

1.3.1 Updates

-

Improved log level granularity.

-
- -
-

1.3.0 Updates

-

SDK supports SecretsManager client.

-
- -
-

1.2.0 Updates

-

SDK and GGC compatibility check takes place in the background.

-
- -
-

1.1.0 Updates

-

Lambda only accepted payload in JSON format. With this update, Invoking or publishing binary payload to a lambda is supported.

-
- -
-

1.0.1 Updates

-

SShadow operations were not receiving responses from the local shadow properly. This has been fixed.

-

Lambda Invoke function's InvocationType's default value was Event. This has been changed to RequestResponse.

-
- -

Getting Help

- - - - -

License

- Apache 2.0 -

-
-
- - - - - - - - - - - - - - -
- - +
+ +

Home

+ + + + + + + + +

+ + + + + + + + + + + + + + + +
+

AWS Greengrass Core SDK for JavaScript

+

The AWS Greengrass Core SDK for JavaScript allows developers to write JavaScript Lambda functions which will run within Greengrass.

+

Overview

+

This document provides instructions for preparing your Greengrass Core environment to run Lambda functions written in JavaScript. It also includes examples on how to develop a Lambda function in JavaScript as well as packaging and running an example Hello World file in JavaScript for your Greengrass core.

+

Preparing your Greengrass to run NodeJS Lambda functions

+

The environment where Greengrass is running on needs to be able to run NodeJS 12.x applications.

+
    +
  • Install NodeJS 12 for your platform. You can download the newest NodeJS from https://nodejs.org/en/download/.
  • +
  • When you untar the package downloaded from NodeJS website, you will find node file under bin directory.
  • +
  • Copy the file to /usr/bin or /usr/local/bin folder.
  • +
  • Rename the file to nodejs12.x
  • +
+

Getting Started - Hello World

+
    +
  • Copy samples/HelloWorld folder to your workspace.
  • +
  • Create a folder node_modules under HelloWorld folder.
  • +
  • Unzip aws-greengrass-core-sdk-js.zip into the folder. It should create a folder HelloWorld/node_modules/aws-greengrass-core-sdk
  • +
  • Use NPM to install the required dependency, cbor. npm i cbor@5.0.1.
  • +
  • Zip up the content of HelloWorld folder so that the index.js is on the top of the zip file structure.
  • +
  • Go to AWS Lambda Console.
  • +
  • Create a new function.
  • +
  • Choose the Runtime as Node.js 12.x
  • +
  • Upload the zip file in Lambda function code section.
  • +
  • Handler is index.handler
  • +
  • Choose any role as the role is not used within Greengrass.
  • +
  • After creating the function, publish the Lambda.
  • +
  • Create an Alias and point to the Published version (not $LATEST).
  • +
  • Go to your Greengrass Group and add the Lambda under Lambdas section.
  • +
  • Click on the Lambda and change the Lambda lifecycle to Make this function long-lived and keep it running indefinitely.
  • +
  • Add a Subscription with the following configuration: +
      +
    • Source: Lambda which you just created and added to the group
    • +
    • Target: IoT Cloud
    • +
    • Topic: hello/world
    • +
    +
  • +
  • Deploy. A message from your Lambda should be published to the topic hello/world in the cloud every 5 seconds. You can check this by going to AWS IoT's Test page and subscribing to topic hello/world.
  • +
+

Including aws-greengrass-core-sdk with your function

+

Unzip the SDK into your node_modules folder of your function. This should create a aws-greengrass-core-sdk folder which includes the SDK.

+

Logging in NodeJS Lambdas

+

Your console.log operation will be logged as INFO. A console.error operation will be logged as ERROR. Currently, our NodeJS SDK only allows you to log at INFO or ERROR level only.

+

Supported Datatypes

+

From GGC version 1.5, you can send both JSON and binary data as a payload when you invoking other Lambdas or publishing a message using IotData service. In order to make your lambda be able to handle binary payload, you need to configure the lambda in Greengrass console to mark it using binary input payload so that GGC can know how to deal with the data.

+

Supported Context

+

In Greengrass, you can send a context object in a JSON format to be passed to another Lambda that is being invoked. The context format looks like this: { custom: { customData: 'customData', }, }

+
+

Compatibility

+

As new features are added to AWS Greengrass, previous versions of the Greengrass SDK will be incompatible with newer versions of the AWS Greengrass core. The following table lists the compatible SDKs for all GGC releases.

+ + + + + + + + + + + + + + + + + + + + + + + +
GGC VersionCompatible SDK Versions
1.0.x-1.6.x1.0.x-1.2.x
1.7.x-1.8.x1.0.x-1.3.x
1.9.x1.0.x-1.4.x
1.10.x1.0.x-1.6.x
+
+
+

1.6.0 Updates

+

Added support for StreamManager, see AWS Docs +for more information.

+

Compatibility

+

StreamManager has adds a new dependency to this package, cbor==5.0.1. +Please make sure to include it in your lambda or else the SDK will not function. +In addition to the new dependency, the 1.6.0 version of this SDK now requires NodeJS version 12 +or greater since NodeJS 6 and 8 are end-of-life. See https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html.

+

StreamManager Usage

+
const {
+    StreamManagerClient
+} = require('aws-greengrass-core-sdk').StreamManager;
+
+const c = new StreamManagerClient({
+    onConnectCb: async () => {
+        try {
+            // Let's start with something simple.
+            // Just print out all the available stream names on the server 
+            console.log(await c.listStreams());
+        } finally {
+            c.close(); // Always close the client when you're done
+        }
+    }
+});
+
+
+
+

1.5.0 Updates

+

Added support for publish() parameter queueFullPolicy which can be set to 'AllOrError' to enforce that the published message is either delivered to all subscription destinations or delivered to no destinations and returns an error when Greengrass Core's internal work queue is full.

+
+
+

1.4.0 Updates

+

Added support for Node.js 8.10 Lambda runtime. Lambda functions that use Node.js 8.10 runtime can now run on an AWS IoT Greengrass core. (Existing Lambda functions that use Node.js 6.10 runtime can still run on Greengrass core, but they can't be updated after 5/30/2019. Please refer to AWS Lambda Runtimes Support Policy.)

+
+
+

1.3.1 Updates

+

Improved log level granularity.

+
+
+

1.3.0 Updates

+

SDK supports SecretsManager client.

+
+
+

1.2.0 Updates

+

SDK and GGC compatibility check takes place in the background.

+
+
+

1.1.0 Updates

+

Lambda only accepted payload in JSON format. With this update, Invoking or publishing binary payload to a lambda is supported.

+
+
+

1.0.1 Updates

+

Shadow operations were not receiving responses from the local shadow properly. This has been fixed.

+

Lambda Invoke function's InvocationType's default value was Event. This has been changed to RequestResponse.

+
+

Getting Help

+ +

License

+

Apache 2.0

+
+ + + + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/docs/index.js.html b/docs/index.js.html new file mode 100644 index 0000000..160909e --- /dev/null +++ b/docs/index.js.html @@ -0,0 +1,84 @@ + + + + + JSDoc: Source: index.js + + + + + + + + + + +
+ +

Source: index.js

+ + + + + + +
+
+
/*
+ * Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ */
+exports.GreengrassInterfaceVersion = '1.5';
+
+/**
+ * @namespace aws-greengrass-core-sdk
+ */
+
+const fail = (name, error) => {
+    console.error(`Unable to load aws-greengrass-core-sdk.${name} due to: `, error);
+};
+
+try {
+    exports.Lambda = require('./lambda');
+} catch (e) {
+    fail('Lambda', e);
+}
+try {
+    exports.IotData = require('./iotdata');
+} catch (e) {
+    fail('IotData', e);
+}
+try {
+    exports.SecretsManager = require('./secretsmanager');
+} catch (e) {
+    fail('SecretsManager', e);
+}
+try {
+    exports.StreamManager = require('./stream-manager');
+} catch (e) {
+    fail('StreamManager', e);
+}
+
+
+
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + diff --git a/docs/iotdata.js.html b/docs/iotdata.js.html new file mode 100644 index 0000000..1cf26dc --- /dev/null +++ b/docs/iotdata.js.html @@ -0,0 +1,283 @@ + + + + + JSDoc: Source: iotdata.js + + + + + + + + + + +
+ +

Source: iotdata.js

+ + + + + + +
+
+
/*
+ * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ */
+
+const { Buffer } = require('buffer');
+
+const GreengrassCommon = require('aws-greengrass-common-js');
+const Lambda = require('./lambda');
+const Util = require('./util');
+
+const { envVars } = GreengrassCommon;
+const { MY_FUNCTION_ARN } = envVars;
+const { SHADOW_FUNCTION_ARN } = envVars;
+const { ROUTER_FUNCTION_ARN } = envVars;
+
+/**
+ * Constructs a service interface object. Each API operation is exposed as a function on service.
+ *
+ * @class
+ * @memberOf aws-greengrass-core-sdk
+ *
+ * @example <caption>Sending a Request Using IotData</caption>
+ * var iotdata = new GG.IotData();
+ * iotdata.getThingShadow(params, function (err, data) {
+ *   if (err) console.log(err, err.stack); // an error occurred
+ *   else     console.log(data);           // successful response
+ * });
+ */
+class IotData {
+    /**
+     * Constructs a service object. This object has one method for each API operation.
+     *
+     * @example <caption>Constructing a IotData object</caption>
+     * var iotdata = new GG.IotData();
+     */
+    constructor() {
+        this.lambda = new Lambda();
+    }
+
+    /**
+     * Called when a response from the service is returned.
+     *
+     * @callback iotDataCallback
+     * @param err {Error} The error object returned from the request. Set to <tt>null</tt> if the request is successful.
+     * @param data {Object} The de-serialized data returned from the request. Set to <tt>null</tt> if a request error occurs.
+     * @param data.payload {Buffer|TypedArray|Blob|String} The state information in JSON format
+     */
+    /**
+     * Gets the thing shadow for the specified thing.
+     *
+     * @param params {Object}
+     * @param params.thingName {String} The name of the thing.
+     * @param callback {iotDataCallback} The callback.
+     *
+     * @example <caption>Calling the getThingShadow operation</caption>
+     * var params = {
+     *   thingName: 'STRING_VALUE' // required
+     * };
+     * iotdata.getThingShadow(params, function(err, data) {
+     *   if (err) console.log(err, err.stack); // an error occurred
+     *   else     console.log(data);           // successful response
+     * });
+     */
+    getThingShadow(params, callback) {
+        const thingName = Util.getParameter(params, 'thingName');
+        if (thingName === undefined) {
+            callback(new Error('"thingName" is a required parameter.'), null);
+            return;
+        }
+
+        const payload = '';
+        this._shadowOperation('get', thingName, payload, callback);
+    }
+
+    /**
+     * Updates the thing shadow for the specified thing.
+     *
+     * @param params {Object}
+     * @param params.thingName {String} The name of the thing.
+     * @param params.payload {String} The state information as a JSON string.
+     * @param callback {iotDataCallback} The callback.
+     *
+     * @example <caption>Calling the updateThingShadow operation</caption>
+     * var params = {
+     *   payload: 'Proper JSON data', // required
+     *   thingName: 'STRING_VALUE' // required
+     * };
+     * iotdata.updateThingShadow(params, function(err, data) {
+     *   if (err) console.log(err, err.stack); // an error occurred
+     *   else     console.log(data);           // successful response
+     * });
+     */
+    updateThingShadow(params, callback) {
+        const thingName = Util.getParameter(params, 'thingName');
+        if (thingName === undefined) {
+            callback(new Error('"thingName" is a required parameter.'), null);
+            return;
+        }
+
+        const payload = Util.getParameter(params, 'payload');
+        if (payload === undefined) {
+            callback(new Error('"payload" is a required parameter.'), null);
+            return;
+        }
+
+        this._shadowOperation('update', thingName, payload, callback);
+    }
+
+    /**
+     * Call shadow lambda to delete the shadow state.
+     *
+     * @param params {Object}
+     * @param params.thingName {String} The name of the thing whose shadow should be deleted.
+     * @param callback {iotDataCallback} The callback.
+     */
+    deleteThingShadow(params, callback) {
+        const thingName = Util.getParameter(params, 'thingName');
+        if (thingName === undefined) {
+            callback(new Error('"thingName" is a required parameter.'), null);
+            return;
+        }
+
+        const payload = '';
+        this._shadowOperation('delete', thingName, payload, callback);
+    }
+
+    /**
+     * Publishes a message within Greengrass.
+     *
+     * @param params {Object}
+     * @param params.topic {String} The name of the MQTT topic.
+     * @param params.payload {Buffer|TypedArray|Blob|String} The payload to be sent.
+     * @param params.queueFullPolicy {'AllOrError'|'BestEffort'} Specify whether to enforce message delivery to all destinations. Options are 'AllOrError' and 'BestEffort'. Defaults to 'BestEffort' when omitted.
+     * @param callback {iotDataCallback} The callback.
+     *
+     * @example <caption>Calling the publish operation</caption>
+     * var params = {
+     *   topic: 'STRING_VALUE', // required
+     *   payload: new Buffer('...') || 'STRING_VALUE',
+     *   queueFullPolicy: 'AllOrError' || 'BestEffort'
+     * };
+     * iotdata.publish(params, function(err, data) {
+     *   if (err) console.log(err, err.stack); // an error occurred
+     *   else     console.log(data);           // successful response
+     * });
+     */
+    publish(params, callback) {
+        const topic = Util.getParameter(params, 'topic');
+        if (topic === undefined) {
+            callback(new Error('"topic" is a required parameter'), null);
+            return;
+        }
+
+        const payload = Util.getParameter(params, 'payload');
+        if (payload === undefined) {
+            callback(new Error('"payload" is a required parameter'), null);
+            return;
+        }
+
+        // this is an optional parameter
+        const queueFullPolicy = Util.getParameter(params, 'queueFullPolicy');
+
+        const context = {
+            custom: {
+                source: MY_FUNCTION_ARN,
+                subject: topic,
+                queueFullPolicy: '',
+            },
+        };
+
+        switch (queueFullPolicy) {
+            case 'BestEffort':
+            case 'AllOrError':
+                context.custom.queueFullPolicy = queueFullPolicy;
+                break;
+            case '':
+            case undefined:
+            case null:
+                break;
+            default:
+                callback(new Error(`queueFullPolicy "${queueFullPolicy}" is not supported`), null);
+                break;
+        }
+
+        const buff = Buffer.from(JSON.stringify(context));
+        const clientContext = buff.toString('base64');
+
+        const invokeParams = {
+            FunctionName: ROUTER_FUNCTION_ARN,
+            InvocationType: 'Event',
+            ClientContext: clientContext,
+            Payload: payload,
+        };
+
+        console.log(`Publishing message on topic "${topic}" with Payload "${payload}"`);
+
+        this.lambda.invoke(invokeParams, (err, data) => {
+            if (err) {
+                callback(err, null); // an error occurred
+            } else {
+                callback(null, data); // successful response
+            }
+        });
+    }
+
+    _shadowOperation(operation, thingName, payload, callback) {
+        const topic = `$aws/things/${thingName}/shadow/${operation}`;
+        const context = {
+            custom: {
+                subject: topic,
+            },
+        };
+
+        const clientContext = Buffer.from(JSON.stringify(context)).toString('base64');
+        const invokeParams = {
+            FunctionName: SHADOW_FUNCTION_ARN,
+            ClientContext: clientContext,
+            Payload: payload,
+        };
+
+        console.log(`Calling shadow service on topic "${topic}" with payload "${payload}"`);
+        this.lambda.invoke(invokeParams, (err, data) => {
+            if (err) {
+                callback(err, null);
+            } else {
+                callback(null, data);
+            }
+        });
+    }
+}
+
+module.exports = IotData;
+
+
+
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
+ + + + + diff --git a/docs/js/app.js b/docs/js/app.js deleted file mode 100644 index c9d6aff..0000000 --- a/docs/js/app.js +++ /dev/null @@ -1,243 +0,0 @@ -(function() { - -var localStorage = {}, sessionStorage = {}; -try { localStorage = window.localStorage; } catch (e) { } -try { sessionStorage = window.sessionStorage; } catch (e) { } - -function createSourceLinks() { - $('.method_details_list .source_code'). - before("[View source]"); - $('.toggleSource').toggle(function() { - $(this).parent().nextAll('.source_code').slideDown(100); - $(this).text("Hide source"); - }, - function() { - $(this).parent().nextAll('.source_code').slideUp(100); - $(this).text("View source"); - }); -} - -function createDefineLinks() { - var tHeight = 0; - $('.defines').after(" more..."); - $('.toggleDefines').toggle(function() { - tHeight = $(this).parent().prev().height(); - $(this).prev().css('display', 'inline'); - $(this).parent().prev().height($(this).parent().height()); - $(this).text("(less)"); - }, - function() { - $(this).prev().hide(); - $(this).parent().prev().height(tHeight); - $(this).text("more..."); - }); -} - -function createFullTreeLinks() { - var tHeight = 0; - $('.inheritanceTree').toggle(function() { - tHeight = $(this).parent().prev().height(); - $(this).parent().toggleClass('showAll'); - $(this).text("(hide)"); - $(this).parent().prev().height($(this).parent().height()); - }, - function() { - $(this).parent().toggleClass('showAll'); - $(this).parent().prev().height(tHeight); - $(this).text("show all"); - }); -} - -function searchFrameButtons() { - $('.full_list_link').click(function() { - toggleSearchFrame(this, $(this).attr('href')); - return false; - }); - window.addEventListener('message', function(e) { - if (e.data === 'navEscape') { - $('#search_frame').slideUp(100); - $('#search a').removeClass('active inactive'); - $(window).focus(); - } - }); - - $(window).resize(function() { - if ($('#search:visible').length === 0) { - $('#search_frame').slideUp(100); - $('#search a').removeClass('active inactive'); - $(window).focus(); - } - }); -} - -function toggleSearchFrame(id, link) { - var frame = $('#search_frame'); - $('#search a').removeClass('active').addClass('inactive'); - if (frame.attr('src') === link && frame.css('display') !== "none") { - frame.slideUp(100); - $('#search a').removeClass('active inactive'); - } - else { - $(id).addClass('active').removeClass('inactive'); - if (frame.attr('src') !== link) frame.attr('src', link); - frame.slideDown(100); - } -} - -function linkSummaries() { - $('.summary_signature').click(function() { - document.location = $(this).find('a').attr('href'); - }); -} - -function summaryToggle() { - $('.summary_toggle').click(function(e) { - e.preventDefault(); - localStorage.summaryCollapsed = $(this).text(); - $('.summary_toggle').each(function() { - $(this).text($(this).text() == "collapse" ? "expand" : "collapse"); - var next = $(this).parent().parent().nextAll('ul.summary').first(); - if (next.hasClass('compact')) { - next.toggle(); - next.nextAll('ul.summary').first().toggle(); - } - else if (next.hasClass('summary')) { - var list = $('
    '); - list.html(next.html()); - list.find('.summary_desc, .note').remove(); - list.find('a').each(function() { - $(this).html($(this).find('strong').html()); - $(this).parent().html($(this)[0].outerHTML); - }); - next.before(list); - next.toggle(); - } - }); - return false; - }); - if (localStorage.summaryCollapsed == "collapse") { - $('.summary_toggle').first().click(); - } else { localStorage.summaryCollapsed = "expand"; } -} - -function generateTOC() { - if ($('#filecontents').length === 0) return; - var _toc = $('
      '); - var show = false; - var toc = _toc; - var counter = 0; - var tags = ['h2', 'h3', 'h4', 'h5', 'h6']; - var i; - if ($('#filecontents h1').length > 1) tags.unshift('h1'); - for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; } - var lastTag = parseInt(tags[0][1], 10); - $(tags.join(', ')).each(function() { - if ($(this).parents('.method_details .docstring').length != 0) return; - if (this.id == "filecontents") return; - show = true; - var thisTag = parseInt(this.tagName[1], 10); - if (this.id.length === 0) { - var proposedId = $(this).attr('toc-id'); - if (typeof(proposedId) != "undefined") this.id = proposedId; - else { - var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_'); - if ($('#' + proposedId).length > 0) { proposedId += counter; counter++; } - this.id = proposedId; - } - } - if (thisTag > lastTag) { - for (i = 0; i < thisTag - lastTag; i++) { - var tmp = $('
        '); toc.append(tmp); toc = tmp; - } - } - if (thisTag < lastTag) { - for (i = 0; i < lastTag - thisTag; i++) toc = toc.parent(); - } - var title = $(this).attr('toc-title'); - if (typeof(title) == "undefined") title = $(this).text(); - toc.append('
      1. ' + title + '
      2. '); - lastTag = thisTag; - }); - if (!show) return; - html = ''; - $('#content').prepend(html); - $('#toc').append(_toc); - $('#toc .hide_toc').toggle(function() { - $('#toc .top').slideUp('fast'); - $('#toc').toggleClass('hidden'); - $('#toc .title small').toggle(); - }, function() { - $('#toc .top').slideDown('fast'); - $('#toc').toggleClass('hidden'); - $('#toc .title small').toggle(); - }); -} - -function navResizeFn(e) { - if (e.which !== 1) { - navResizeFnStop(); - return; - } - - sessionStorage.navWidth = e.pageX.toString(); - $('.nav_wrap').css('width', e.pageX); - $('.nav_wrap').css('-ms-flex', 'inherit'); -} - -function navResizeFnStop() { - $(window).unbind('mousemove', navResizeFn); - window.removeEventListener('message', navMessageFn, false); -} - -function navMessageFn(e) { - if (e.data.action === 'mousemove') navResizeFn(e.data.event); - if (e.data.action === 'mouseup') navResizeFnStop(); -} - -function navResizer() { - $('#resizer').mousedown(function(e) { - e.preventDefault(); - $(window).mousemove(navResizeFn); - window.addEventListener('message', navMessageFn, false); - }); - $(window).mouseup(navResizeFnStop); - - if (sessionStorage.navWidth) { - navResizeFn({which: 1, pageX: parseInt(sessionStorage.navWidth, 10)}); - } -} - -function navExpander() { - var done = false, timer = setTimeout(postMessage, 500); - function postMessage() { - if (done) return; - clearTimeout(timer); - var opts = { action: 'expand', path: pathId }; - document.getElementById('nav').contentWindow.postMessage(opts, '*'); - done = true; - } - - window.addEventListener('message', function(event) { - if (event.data === 'navReady') postMessage(); - return false; - }, false); -} - -function mainFocus() { - $('#main')[0].focus(); -} - -$(document).ready(function() { - navResizer(); - navExpander(); - createSourceLinks(); - createDefineLinks(); - createFullTreeLinks(); - searchFrameButtons(); - linkSummaries(); - summaryToggle(); - generateTOC(); - mainFocus(); -}); - -})(); diff --git a/docs/js/full_list.js b/docs/js/full_list.js deleted file mode 100644 index 139e5b7..0000000 --- a/docs/js/full_list.js +++ /dev/null @@ -1,216 +0,0 @@ -(function() { - -var $clicked = $(null); -var searchTimeout = null; -var searchCache = []; -var caseSensitiveMatch = false; -var ignoreKeyCodeMin = 8; -var ignoreKeyCodeMax = 46; -var commandKey = 91; - -RegExp.escape = function(text) { - return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); -} - -function escapeShortcut() { - $(document).keydown(function(evt) { - if (evt.which == 27) { - window.parent.postMessage('navEscape', '*'); - } - }); -} - -function navResizer() { - $(window).mousemove(function(e) { - window.parent.postMessage({ - action: 'mousemove', event: {pageX: e.pageX, which: e.which} - }, '*'); - }).mouseup(function(e) { - window.parent.postMessage({action: 'mouseup'}, '*'); - }); - window.parent.postMessage("navReady", "*"); -} - -function clearSearchTimeout() { - clearTimeout(searchTimeout); - searchTimeout = null; -} - -function enableLinks() { - // load the target page in the parent window - $('#full_list li').on('click', function(evt) { - $('#full_list li').removeClass('clicked'); - $clicked = $(this); - $clicked.addClass('clicked'); - - if (evt.target.tagName === 'A') return true; - - var elem = $clicked.find('> .item .object_link a')[0]; - var e = evt.originalEvent; - var newEvent = new MouseEvent(evt.originalEvent.type); - newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget); - elem.dispatchEvent(newEvent); - evt.preventDefault(); - evt.stopPropagation(); - return false; - }); -} - -function enableToggles() { - // show/hide nested classes on toggle click - $('#full_list a.toggle').on('click', function(evt) { - evt.stopPropagation(); - evt.preventDefault(); - $(this).parent().parent().toggleClass('collapsed'); - highlight(); - }); -} - -function populateSearchCache() { - $('#full_list li .item').each(function() { - var $node = $(this); - var $link = $node.find('.object_link a'); - if ($link.length > 0) { - searchCache.push({ - node: $node, - link: $link, - name: $link.text(), - fullName: $link.attr('title').split(' ')[0] - }); - } - }); -} - -function enableSearch() { - $('#search input').keyup(function(event) { - if (ignoredKeyPress(event)) return; - if (this.value === "") { - clearSearch(); - } else { - performSearch(this.value); - } - }); - - $('#full_list').after(""); -} - -function ignoredKeyPress(event) { - if ( - (event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) || - (event.keyCode == commandKey) - ) { - return true; - } else { - return false; - } -} - -function clearSearch() { - clearSearchTimeout(); - $('#full_list .found').removeClass('found').each(function() { - var $link = $(this).find('.object_link a'); - $link.text($link.text()); - }); - $('#full_list, #content').removeClass('insearch'); - $clicked.parents().removeClass('collapsed'); - highlight(); -} - -function performSearch(searchString) { - clearSearchTimeout(); - $('#full_list, #content').addClass('insearch'); - $('#noresults').text('').hide(); - partialSearch(searchString, 0); -} - -function partialSearch(searchString, offset) { - var lastRowClass = ''; - var i = null; - for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) { - var item = searchCache[i]; - var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name); - var matchString = buildMatchString(searchString); - var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i"); - if (searchName.match(matchRegexp) == null) { - item.node.removeClass('found'); - item.link.text(item.link.text()); - } - else { - item.node.addClass('found'); - item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1'); - lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2'; - item.link.html(item.name.replace(matchRegexp, "$&")); - } - } - if(i == searchCache.length) { - searchDone(); - } else { - searchTimeout = setTimeout(function() { - partialSearch(searchString, i); - }, 0); - } -} - -function searchDone() { - searchTimeout = null; - highlight(); - if ($('#full_list li:visible').size() === 0) { - $('#noresults').text('No results were found.').hide().fadeIn(); - } else { - $('#noresults').text('').hide(); - } - $('#content').removeClass('insearch'); -} - -function buildMatchString(searchString, event) { - caseSensitiveMatch = searchString.match(/[A-Z]/) != null; - var regexSearchString = RegExp.escape(searchString); - if (caseSensitiveMatch) { - regexSearchString += "|" + - $.map(searchString.split(''), function(e) { return RegExp.escape(e); }). - join('.+?'); - } - return regexSearchString; -} - -function highlight() { - $('#full_list li:visible').each(function(n) { - $(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even'); - }); -} - -/** - * Expands the tree to the target element and its immediate - * children. - */ -function expandTo(path) { - var $target = $(document.getElementById('object_' + path)); - $target.addClass('clicked'); - $target.removeClass('collapsed'); - $target.parentsUntil('#full_list', 'li').removeClass('collapsed'); - if($target[0]) { - window.scrollTo(window.scrollX, $target.offset().top - 250); - highlight(); - } -} - -function windowEvents(event) { - var msg = event.data; - if (msg.action === "expand") { - expandTo(msg.path); - } - return false; -} - -window.addEventListener("message", windowEvents, false); - -$(document).ready(function() { - escapeShortcut(); - navResizer(); - enableLinks(); - enableToggles(); - populateSearchCache(); - enableSearch(); -}); - -})(); diff --git a/docs/js/highlight.pack.js b/docs/js/highlight.pack.js deleted file mode 100644 index 5cf8ae5..0000000 --- a/docs/js/highlight.pack.js +++ /dev/null @@ -1 +0,0 @@ -var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(//gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("")}while(o!=u.node);r.splice(q,1);while(q'+L[0]+""}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return''+r.value+""}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+=""}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"
        ")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.bash=function(a){var g="true false";var e="if then else elif fi for break continue while in do done echo exit return set declare";var c={cN:"variable",b:"\\$[a-zA-Z0-9_#]+"};var b={cN:"variable",b:"\\${([^}]|\\\\})+}"};var h={cN:"string",b:'"',e:'"',i:"\\n",c:[a.BE,c,b],r:0};var d={cN:"string",b:"'",e:"'",c:[{b:"''"}],r:0};var f={cN:"test_condition",b:"",e:"",c:[h,d,c,b],k:{literal:g},r:0};return{k:{keyword:e,literal:g},c:[{cN:"shebang",b:"(#!\\/bin\\/bash)|(#!\\/bin\\/sh)",r:10},c,b,a.HCM,h,d,a.inherit(f,{b:"\\[ ",e:" \\]",r:0}),a.inherit(f,{b:"\\[\\[ ",e:" \\]\\]"})]}}(hljs);hljs.LANGUAGES.diff=function(a){return{c:[{cN:"chunk",b:"^\\@\\@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +\\@\\@$",r:10},{cN:"chunk",b:"^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$",r:10},{cN:"chunk",b:"^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$",r:10},{cN:"header",b:"Index: ",e:"$"},{cN:"header",b:"=====",e:"=====$"},{cN:"header",b:"^\\-\\-\\-",e:"$"},{cN:"header",b:"^\\*{3} ",e:"$"},{cN:"header",b:"^\\+\\+\\+",e:"$"},{cN:"header",b:"\\*{5}",e:"\\*{5}$"},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}}(hljs);hljs.LANGUAGES.javascript=function(a){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,{cN:"regexp",b:"/",e:"/[gim]*",i:"\\n",c:[{b:"\\\\/"}]},{b:"<",e:">;",sL:"xml"}],r:0},{cN:"function",bWK:true,e:"{",k:"function",c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[a.CLCM,a.CBLCLM],i:"[\"'\\(]"}],i:"\\[|%"}]}}(hljs);hljs.LANGUAGES.css=function(a){var b={cN:"function",b:a.IR+"\\(",e:"\\)",c:[a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",eE:true,k:"import page media charset",c:[b,a.ASM,a.QSM,a.NM]},{cN:"tag",b:a.IR,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[b,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"\\#[0-9A-F]+"},{cN:"important",b:"!important"}]}}]}]}]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[b],starts:{e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.http=function(a){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:true,e:"$",c:[{cN:"string",b:" ",e:" ",eB:true,eE:true}]},{cN:"attribute",b:"^\\w",e:": ",eE:true,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:true}}]}}(hljs);hljs.LANGUAGES.sql=function(a){return{cI:true,c:[{cN:"operator",b:"(begin|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant)\\b(?!:)",e:";",eW:true,k:{keyword:"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number",aggregate:"count sum min max avg"},c:[{cN:"string",b:"'",e:"'",c:[a.BE,{b:"''"}],r:0},{cN:"string",b:'"',e:'"',c:[a.BE,{b:'""'}],r:0},{cN:"string",b:"`",e:"`",c:[a.BE]},a.CNM]},a.CBLCLM,{cN:"comment",b:"--",e:"$"}]}}(hljs);hljs.LANGUAGES.ini=function(a){return{cI:true,i:"[^\\s]",c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:true,k:"on off true false yes no",c:[a.QSM,a.NM]}]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs); \ No newline at end of file diff --git a/docs/js/jquery.js b/docs/js/jquery.js deleted file mode 100644 index 198b3ff..0000000 --- a/docs/js/jquery.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
        a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
        "+""+"
        ",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
        t
        ",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
        ",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; -f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

        ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
        ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
        ","
        "],thead:[1,"","
        "],tr:[2,"","
        "],td:[3,"","
        "],col:[2,"","
        "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
        ","
        "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() -{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
        ").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/docs/lambda.js.html b/docs/lambda.js.html new file mode 100644 index 0000000..ecb5e0d --- /dev/null +++ b/docs/lambda.js.html @@ -0,0 +1,242 @@ + + + + + JSDoc: Source: lambda.js + + + + + + + + + + +
        + +

        Source: lambda.js

        + + + + + + +
        +
        +
        /*
        + * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
        + */
        +
        +const IPCClient = require('aws-greengrass-ipc-sdk-js');
        +const GreengrassCommon = require('aws-greengrass-common-js');
        +const { logging } = require('aws-greengrass-common-js');
        +const Util = require('./util');
        +
        +const { AUTH_TOKEN } = GreengrassCommon.envVars;
        +
        +const logger = new logging.LocalWatchLogger();
        +
        +/**
        + * Constructs a service interface object. Each API operation is exposed as a function on service.
        + * @class
        + * @memberOf aws-greengrass-core-sdk
        + */
        +class Lambda {
        +    /**
        +     * Constructs a service object. This object has one method for each API operation.
        +     *
        +     * @example <caption>Constructing a Lambda object</caption>
        +     * var lambda = new GG.Lambda();
        +     */
        +    constructor() {
        +        this.ipc = new IPCClient(AUTH_TOKEN);
        +    }
        +
        +    /**
        +     * Called when a response from the service is returned.
        +     *
        +     * @callback lambdaCallback
        +     * @param err {Error} The error object returned from the request. Set to <tt>null</tt> if the request is successful.
        +     * @param data {Object} The de-serialized data returned from the request. Set to <tt>null</tt> if a request error occurs.
        +     * @param data.StatusCode {Integer} The HTTP status code will be in the 200 range for successful request. For the <tt>RequestResponse</tt> invocation type this status code will be 200.
        +     * For the <tt>Event</tt> invocation type this status code will be 202.
        +     * @param data.FunctionError {String} Indicates whether an error occurred while executing the Lambda function. If an error occurred this field will have one of two values; <tt>Handled</tt> or <tt>Unhandled</tt>.
        +     * <tt>Handled</tt> errors are errors that are reported by the function while the Unhandled errors are those detected and reported by AWS Lambda.
        +     * <tt>Unhandled</tt> errors include out of memory errors and function timeouts. For information about how to report an <tt>Handled</tt> error,
        +     * see <a href="http://docs.aws.amazon.com/lambda/latest/dg/programming-model.html">Programming Model</a>.
        +     * @param data.Payload {Buffer|TypedArray|Blob|String} It is the result returned by the Lambda function. This is present only if the invocation type is <tt>RequestResponse</tt>.
        +     * <br/>In the event of a function error this field contains a message describing the error. For the <tt>Handled</tt> errors the Lambda function will report this message. For <tt>Unhandled</tt> errors AWS Lambda reports the message.
        +     */
        +
        +    /**
        +     * Invokes a specific Lambda function.<br/>
        +     * In Greengrass, version of the Lambda which you would like to invoke needs to be provided.
        +     *
        +     * @param params {Object}
        +     * @param params.FunctionName {String} The Lambda function name. You can specify Amazon Resource Name (ARN) of the function (for example, <tt>arn:aws:lambda:us-west-2:account-id:function:ThumbNail</tt>).
        +     * @param params.InvocationType {String?} By default, the <tt>Invoke</tt> API assumes <tt>RequestResponse</tt> invocation type.
        +     * You can optionally request asynchronous execution by specifying <tt>Event</tt> as the <tt>InvocationType</tt>. Possible values include:
        +     * <ul><li>"Event"</li><li>"RequestResponse"</li></ul>
        +     * @param params.ClientContext {String?} Using the <tt>ClientContext</tt> you can pass client-specific information to the Lambda function you are invoking.
        +     * You can then process the client information in your Lambda function as you choose through the context variable.
        +     * For an example of a <tt>ClientContext</tt> JSON, see the main page or an example folder for an example.
        +     * <br/>The <tt>ClientContext</tt> JSON must be base64-encoded.
        +     * @param params.Payload {Buffer|TypedArray|Blob|String} Payload that you want to provide to your Lambda function as input.
        +     * @param params.Qualifier {String?} You can use this optional parameter to specify a Lambda function version if it was not included in the FunctionName field.
        +     * If you specify a function version, the API uses the qualified function ARN to invoke a specific Lambda function.
        +     * <br/>If you don't provide this parameter, then the API uses the FunctionName field only. If it does not have a version number of the target lambda, the call will fail.
        +     * @param callback {lambdaCallback} The callback.
        +     *
        +     * @example <caption>To invoke a Lambda function</caption>
        +     * //This operation invokes a Lambda function
        +     *
        +     * var params = {
        +     *   ClientContext: "MyApp",
        +     *   FunctionName: "MyFunction",
        +     *   InvocationType: "Event",
        +     *   Payload: <json | binary>,
        +     *   Qualifier: "1"
        +     * };
        +     * lambda.invoke(params, function(err, data) {
        +     *   if (err) console.log(err, err.stack); // an error occurred
        +     *   else     console.log(data);           // successful response
        +     * });
        +     *
        +     * @example <caption>Calling the invoke operation</caption>
        +     * var params = {
        +     *   FunctionName: 'STRING_VALUE', // required
        +     *   ClientContext: 'STRING_VALUE',
        +     *   InvocationType: Event | RequestResponse,
        +     *   Payload: <json | binary>,
        +     *   Qualifier: 'STRING_VALUE'
        +     * };
        +     * lambda.invoke(params, function(err, data) {
        +     *   if (err) console.log(err, err.stack); // an error occurred
        +     *   else     console.log(data);           // successful response
        +     * });
        +     */
        +    invoke(params, callback) {
        +        const functionName = Util.getParameter(params, 'FunctionName');
        +        if (functionName === undefined) {
        +            callback(new Error('"FunctionName" is a required parameter'), null);
        +            return;
        +        }
        +
        +        let arnFields;
        +        try {
        +            arnFields = new GreengrassCommon.FunctionArnFields(functionName);
        +        } catch (e) {
        +            callback(new Error(`FunctionName is malformed: ${e}`), null);
        +            return;
        +        }
        +
        +        let invocationType;
        +        if (params.InvocationType === undefined || params.InvocationType === null) {
        +            invocationType = 'RequestResponse';
        +        } else {
        +            invocationType = params.InvocationType;
        +        }
        +
        +        if (invocationType !== 'Event' && invocationType !== 'RequestResponse') {
        +            callback(new Error(`InvocationType '${invocationType}' is incorrect, should be 'Event' or 'RequestResponse'`), null);
        +            return;
        +        }
        +
        +        const clientContext = params.ClientContext ? params.ClientContext : '';
        +        const payload = params.Payload;
        +        const qualifier = params.Qualifier;
        +
        +        if (!Util.isValidQualifier(qualifier)) {
        +            callback(new Error(`Qualifier '${qualifier}' is incorrect`), null);
        +            return;
        +        }
        +
        +        const qualifierInternal = arnFields.qualifier;
        +
        +        // generate the right full function arn with qualifier
        +        if (qualifierInternal && qualifier && qualifierInternal !== qualifier) {
        +            callback(new Error(`Qualifier '${qualifier}' does not match the version in FunctionName`), null);
        +            return;
        +        }
        +
        +        const finalQualifier = qualifierInternal === undefined || qualifierInternal == null ? qualifier : qualifierInternal;
        +
        +        let functionArn;
        +        if (typeof GreengrassCommon.buildFunctionArn === 'function') {
        +            // GGC v1.9.0 or newer
        +            functionArn = GreengrassCommon.buildFunctionArn(
        +                arnFields.unqualifiedArn,
        +                finalQualifier,
        +            );
        +        } else {
        +            // older version of GGC
        +            throw new Error('Function buildFunctionArn not found. buildFunctionArn is introduced in GGC v1.9.0. '
        +                    + 'Please check your GGC version.');
        +        }
        +
        +        // verify client context is base64 encoded
        +        if (Object.prototype.hasOwnProperty.call(params, 'ClientContext')) {
        +            const cxt = params.ClientContext;
        +            if (!Util.isValidContext(cxt)) {
        +                callback(new Error('Client Context is invalid'), null);
        +                return;
        +            }
        +        }
        +
        +        logger.debug(`Invoking local lambda ${functionArn} with payload ${payload} and client context ${clientContext}`);
        +
        +        this.ipc.postWork(functionArn, payload, clientContext, invocationType, (postWorkErr, invocationId) => {
        +            if (postWorkErr) {
        +                logger.error(`Failed to invoke function due to ${postWorkErr}`);
        +                callback(postWorkErr, null);
        +                return;
        +            }
        +
        +            if (invocationType === 'RequestResponse') {
        +                this.ipc.getWorkResult(functionArn, invocationId, (getWorkResultErr, body, functionErr, statusCode) => {
        +                    if (getWorkResultErr) {
        +                        logger.error(`Failed to get work result due to ${getWorkResultErr}`);
        +                        callback(getWorkResultErr, null);
        +                        return;
        +                    }
        +                    const data = {
        +                        FunctionError: functionErr,
        +                        StatusCode: statusCode,
        +                        Payload: body,
        +                    };
        +                    callback(null, data);
        +                });
        +            } else {
        +                callback(null, invocationId);
        +            }
        +        });
        +    }
        +}
        +
        +module.exports = Lambda;
        +
        +
        +
        + + + + +
        + + + +
        + +
        + Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
        + + + + + diff --git a/docs/scripts/linenumber.js b/docs/scripts/linenumber.js new file mode 100644 index 0000000..4354785 --- /dev/null +++ b/docs/scripts/linenumber.js @@ -0,0 +1,25 @@ +/*global document */ +(() => { + const source = document.getElementsByClassName('prettyprint source linenums'); + let i = 0; + let lineNumber = 0; + let lineId; + let lines; + let totalLines; + let anchorHash; + + if (source && source[0]) { + anchorHash = document.location.hash.substring(1); + lines = source[0].getElementsByTagName('li'); + totalLines = lines.length; + + for (; i < totalLines; i++) { + lineNumber++; + lineId = `line${lineNumber}`; + lines[i].id = lineId; + if (lineId === anchorHash) { + lines[i].className += ' selected'; + } + } + } +})(); diff --git a/docs/scripts/prettify/Apache-License-2.0.txt b/docs/scripts/prettify/Apache-License-2.0.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/docs/scripts/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/docs/scripts/prettify/lang-css.js b/docs/scripts/prettify/lang-css.js new file mode 100644 index 0000000..041e1f5 --- /dev/null +++ b/docs/scripts/prettify/lang-css.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", +/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/docs/scripts/prettify/prettify.js b/docs/scripts/prettify/prettify.js new file mode 100644 index 0000000..eef5ad7 --- /dev/null +++ b/docs/scripts/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p + + + + JSDoc: Source: secretsmanager.js + + + + + + + + + + +
        + +

        Source: secretsmanager.js

        + + + + + + +
        +
        +
        /*
        + * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
        + */
        +const { Buffer } = require('buffer');
        +
        +const GreengrassCommon = require('aws-greengrass-common-js');
        +const Lambda = require('./lambda');
        +const Util = require('./util');
        +
        +const KEY_SECRET_ID = 'SecretId';
        +const KEY_VERSION_ID = 'VersionId';
        +const KEY_VERSION_STAGE = 'VersionStage';
        +const KEY_SECRET_ARN = 'ARN';
        +const KEY_SECRET_NAME = 'Name';
        +const KEY_CREATED_DATE = 'CreatedDate';
        +
        +const { envVars } = GreengrassCommon;
        +const { SECRETS_MANAGER_FUNCTION_ARN } = envVars;
        +
        +/**
        + * Constructs a service interface object. Each API operation is exposed as a function on service.
        + * @class
        + * @memberOf aws-greengrass-core-sdk
        + */
        +class SecretsManager {
        +    /**
        +     * Constructs a service object. This object has one method for each API operation.
        +     *
        +     * @example <caption>Constructing a SecretsManager object</caption>
        +     * var secretsmanager = new GG.SecretsManager();
        +     */
        +    constructor() {
        +        this.lambda = new Lambda();
        +    }
        +
        +    /**
        +     * Called when a response from the service is returned.
        +     *
        +     * @callback secretsManagerCallback
        +     * @param err {Error} The error object returned from the request. Set to <tt>null</tt> if the request is successful.
        +     * @param data {Object} The de-serialized data returned from the request. Set to <tt>null</tt> if a request error occurs.
        +     * @param data.ARN {String} The ARN of the secret.
        +     * @param data.Name {String} The friendly name of the secret.
        +     * @param data.VersionId {String} The unique identifier of this version of the secret.
        +     * @param data.SecretBinary {Buffer|TypedArray|Blob|String} The decrypted part of the protected secret information that was originally provided as binary data in the form of a byte array.
        +     * The response parameter represents the binary data as a base64-encoded string.
        +     * @param data.SecretString {String} The decrypted part of the protected secret information that was originally provided as a string.
        +     * @param data.VersionStages {String[]} Specifies the secret version that you want to retrieve by the staging label attached to the version.
        +     * <br/>Staging labels are used to keep track of different versions during the rotation process.
        +     */
        +
        +    /**
        +     * Retrieves a specific local secret value.
        +     *
        +     * @param params {Object}
        +     * @param params.SecretId {String} Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.
        +     * @param params.VersionStage {String} Specifies the secret version that you want to retrieve by the staging label attached to the version.
        +     * <br/>Staging labels are used to keep track of different versions during the rotation process.
        +     * @param callback {secretsManagerCallback} The callback.
        +     *
        +     * @example <caption>Retrieving a local secret value</caption>
        +     * // This operation retrieves a local secret value
        +     *
        +     * var params = {
        +     *   SecretId: "STRING_VALUE",
        +     *   VersionStage: "STRING_VALUE"
        +     * };
        +     * secretsmanager.getSecretValue(params, function(err, data) {
        +     *   if (err) console.log(err, err.stack); // an error occurred
        +     *   else     console.log(data);           // successful response
        +     * });
        +     */
        +    getSecretValue(params, callback) {
        +        const secretId = Util.getParameter(params, KEY_SECRET_ID);
        +        const versionId = Util.getParameter(params, KEY_VERSION_ID);
        +        const versionStage = Util.getParameter(params, KEY_VERSION_STAGE);
        +
        +        if (secretId === undefined) {
        +            callback(new Error(`"${KEY_SECRET_ID}" is a required parameter`), null);
        +            return;
        +        }
        +        // TODO: Remove this once we support query by VersionId
        +        if (versionId !== undefined) {
        +            callback(new Error('Query by VersionId is not yet supported'), null);
        +            return;
        +        }
        +        if (versionId !== undefined && versionStage !== undefined) {
        +            callback(new Error('VersionId and VersionStage cannot both be specified at the same time'), null);
        +            return;
        +        }
        +
        +        const getSecretValueRequestBytes = SecretsManager._generateGetSecretValueRequestBytes(secretId, versionId, versionStage);
        +
        +        const invokeParams = {
        +            FunctionName: SECRETS_MANAGER_FUNCTION_ARN,
        +            Payload: getSecretValueRequestBytes,
        +        };
        +
        +        console.log(`Getting secret value from secrets manager: ${getSecretValueRequestBytes}`);
        +
        +        this.lambda.invoke(invokeParams, (err, data) => {
        +            if (err) {
        +                callback(err, null); // an error occurred
        +            } else if (SecretsManager._is200Response(data.Payload)) {
        +                callback(null, data.Payload); // successful response
        +            } else {
        +                callback(new Error(JSON.stringify(data.Payload)), null); // error response
        +            }
        +        });
        +    }
        +
        +    static _generateGetSecretValueRequestBytes(secretId, versionId, versionStage) {
        +        const request = {
        +            SecretId: secretId,
        +        };
        +
        +        if (versionStage !== undefined) {
        +            request.VersionStage = versionStage;
        +        }
        +
        +        if (versionId !== undefined) {
        +            request.VersionId = versionId;
        +        }
        +
        +        return Buffer.from(JSON.stringify(request));
        +    }
        +
        +    static _is200Response(payload) {
        +        const hasSecretArn = this._stringContains(payload, KEY_SECRET_ARN);
        +        const hasSecretName = this._stringContains(payload, KEY_SECRET_NAME);
        +        const hasVersionId = this._stringContains(payload, KEY_VERSION_ID);
        +        const hasCreatedDate = this._stringContains(payload, KEY_CREATED_DATE);
        +
        +        return hasSecretArn && hasSecretName && hasVersionId && hasCreatedDate;
        +    }
        +
        +    static _stringContains(src, target) {
        +        return src.indexOf(target) > -1;
        +    }
        +}
        +
        +module.exports = SecretsManager;
        +
        +
        +
        + + + + +
        + + + +
        + +
        + Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
        + + + + + diff --git a/docs/stream-manager_client.js.html b/docs/stream-manager_client.js.html new file mode 100644 index 0000000..44f7fe6 --- /dev/null +++ b/docs/stream-manager_client.js.html @@ -0,0 +1,571 @@ + + + + + JSDoc: Source: stream-manager/client.js + + + + + + + + + + +
        + +

        Source: stream-manager/client.js

        + + + + + + +
        +
        +
        'use strict';
        +
        +/* eslint-disable no-restricted-syntax */
        +/*
        + * Copyright (c) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
        + */
        +
        +const cbor = require('cbor');
        +const net = require('net');
        +const smData = require('aws-greengrass-core-sdk/stream-manager/data');
        +const exceptions = require('./exceptions');
        +const util = require('./util');
        +
        +// Consts
        +const PROTOCOL_VERSION = '1.0.0';
        +const SDK_VERSION = '1.0.0';
        +const CONNECT_VERSION = 1;
        +
        +const removeFromArray = (arr, f) => {
        +    arr.indexOf(f) !== -1 && arr.splice(arr.indexOf(f), 1);
        +};
        +
        +/**
        + * Stream manager client
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + *
        + * @example <caption>StreamManager Usage</caption>
        + * const { StreamManagerClient } = require('aws-greengrass-core-sdk/stream-manager');
        + * const client = new StreamManagerClient();
        + * c.onConnected(async () => {
        + *     // Do work with the client (c) here.
        + * });
        + */
        +class StreamManagerClient {
        +    #closed = false;
        +
        +    /**
        +     * @type {module:net.Socket}
        +     */
        +    #socket = null;
        +
        +    #authToken = null;
        +
        +    #connected = false;
        +
        +    /**
        +     * @typedef Logger
        +     * @type {Object}
        +     * @property {function(...*)} error
        +     * @property {function(...*)} info
        +     * @property {function(...*)} debug
        +     */
        +
        +    /**
        +     * @type {?Logger}
        +     */
        +    #logger = null;
        +
        +    #requestMap = {};
        +
        +    connectCallbacks = [];
        +
        +    errorCallbacks = [];
        +
        +    #defaultParams = {
        +        port: null,
        +        host: '127.0.0.1',
        +        onConnectCb: null,
        +        onErrorCb: null,
        +        logger: {
        +            error: console.error,
        +            debug: console.debug,
        +            info: console.info,
        +        },
        +    };
        +
        +    /**
        +     * Constructs a new Stream Manager client. Once connected, <tt>onConnectCb</tt> will be called and
        +     * the client can then be used.
        +     *
        +     * @param {Object?} opts All these options are optional.
        +     * @param {Number} opts.port
        +     * @param {String} opts.host
        +     * @param {Function?} opts.onConnectCb Optional callback to be called once the client has connected.
        +     * @param {Function(Error)?} opts.onErrorCb Optional, but highly suggested callback to be called when a connection error occurs.
        +     * @param {Logger?} opts.logger
        +     */
        +    constructor(opts) {
        +        let {
        +            // eslint-disable-next-line prefer-const
        +            port, host, onConnectCb, onErrorCb, logger,
        +        } = {
        +            // Apply defaults
        +            ...this.#defaultParams,
        +            // Then possibly override them with what the user set
        +            ...opts,
        +        };
        +
        +        if (port === null) {
        +            port = parseInt(process.env.STREAM_MANAGER_SERVER_PORT || 8088, 10);
        +        }
        +        this.#logger = logger;
        +        this.port = port;
        +        this.host = host;
        +        this.#authToken = process.env.AWS_CONTAINER_AUTHORIZATION_TOKEN || null;
        +
        +        if (typeof onConnectCb === 'function') {
        +            this.onConnected(onConnectCb);
        +        }
        +        if (typeof onErrorCb === 'function') {
        +            this.onError(onErrorCb);
        +        }
        +
        +        this.__connect();
        +    }
        +
        +    async __connect() {
        +        try {
        +            await new Promise((resolve, reject) => {
        +                if (this.#closed) {
        +                    return reject(new exceptions.StreamManagerException('Client is closed and cannot be reopened'));
        +                }
        +                if (this.#connected) {
        +                    return resolve();
        +                }
        +
        +                const newSock = net.createConnection({
        +                    port: this.port,
        +                    host: this.host,
        +                    // Set high water mark so that we can read 1 full packet (1GB) at a time instead of needing to
        +                    // try to read multiple times and combine the results. The HWM adjusts how much the socket will
        +                    // buffer when reading.
        +                    readableHighWaterMark: util.MAX_PACKET_SIZE,
        +                }, async () => {
        +                    try {
        +                        // Connection started
        +                        this.#logger.debug(`Opening connection to ${this.host}:${this.port}`);
        +                        this.#connected = false;
        +
        +                        const request = new smData.ConnectRequest()
        +                            .withProtocolVersion(PROTOCOL_VERSION)
        +                            .withSdkVersion(SDK_VERSION)
        +                            .withAuthToken(this.#authToken)
        +                            .withRequestId(util.uuidv4());
        +
        +                        // Write the connect version
        +                        newSock.write(util.intToBuffer(CONNECT_VERSION, 1));
        +
        +                        // Write request to socket
        +                        const frame = new smData.MessageFrame(smData.Operation.Connect, cbor.encode(request.asMap()));
        +                        const byteFrame = util.encodeFrame(frame);
        +                        newSock.write(byteFrame.header);
        +                        newSock.write(byteFrame.payload);
        +
        +                        await this.__read(newSock);
        +                        // Only now that we're connected should we set/replace the socket
        +                        this.#socket = newSock;
        +                        resolve();
        +                    } catch (errors) {
        +                        reject(errors);
        +                    }
        +                });
        +
        +                newSock.on('error', (e) => {
        +                    this.#logger.error(e);
        +                    this.errorCallbacks.forEach((f) => f(e));
        +                    newSock.end();
        +
        +                    if (!this.#connected) {
        +                        reject(e);
        +                    }
        +                });
        +
        +                newSock.on('end', () => {
        +                    this.#logger.info('Socket is ending');
        +                });
        +
        +                newSock.on('close', () => {
        +                    newSock.destroy();
        +                    this.#connected = false;
        +                });
        +            });
        +
        +            // Set us to be in connected mode
        +            this.#connected = true;
        +            this.#logger.info('Successfully connected');
        +            this.connectCallbacks.forEach((f) => {
        +                try {
        +                    f();
        +                } finally {
        +                    // After calling the connect callback remove it so we don't call it multiple times.
        +                    // A client should only connect once.
        +                    removeFromArray(this.connectCallbacks, f);
        +                }
        +            });
        +        } catch (e) {
        +            this.#logger.error(e);
        +            this.errorCallbacks.forEach((f) => f(e));
        +            throw e;
        +        }
        +    }
        +
        +    __readSocket(n, socket, resolve = null, reject = null) {
        +        if (resolve && reject) {
        +            if (this.#closed) {
        +                reject();
        +            }
        +
        +            const r = socket.read(n);
        +            if (r === null) {
        +                socket.once('readable', () => {
        +                    this.__readSocket(n, socket, resolve, reject);
        +                });
        +                return;
        +            }
        +            resolve(r);
        +            return;
        +        }
        +
        +        return new Promise((res, rej) => {
        +            if (this.#closed) {
        +                rej();
        +            }
        +            this.__readSocket(n, socket, res, rej);
        +        });
        +    }
        +
        +    async __read(socket = this.#socket) {
        +        if (this.#connected) {
        +            const frame = await this.__readMessageFrame(socket);
        +            this.__handleReadResponse(cbor.decodeFirstSync(frame.payload), frame);
        +        } else {
        +            // Read connect version
        +            const connectResponseVersion = util.intFromBuffer(await this.__readSocket(1, socket));
        +            if (connectResponseVersion !== CONNECT_VERSION) {
        +                this.#logger.error('Unexpected response from the server, Connect version:', connectResponseVersion);
        +                throw new exceptions.ConnectFailedException('Failed to establish connection with the server');
        +            }
        +
        +            // Read connect response
        +            let response = await this.__readMessageFrame(socket);
        +
        +            if (response.operation === smData.Operation.ConnectResponse) {
        +                const payload = cbor.decodeFirstSync(response.payload);
        +                response = smData.ConnectResponse.fromMap(payload);
        +                this.#logger.debug('Received ConnectResponse from server:', response);
        +            } else {
        +                this.#logger.error('Received data with unexpected operation', response.operation);
        +                throw new exceptions.ConnectFailedException('Failed to establish connection with the server');
        +            }
        +
        +            if (response.status !== smData.ResponseStatusCode.Success) {
        +                this.#logger.error('Received ConnectResponse with unexpected status', response.status);
        +                throw new exceptions.ConnectFailedException('Failed to establish connection with the server');
        +            }
        +        }
        +
        +        // Put ourselves back in the event loop to handle the next messages
        +        setImmediate(async () => {
        +            try {
        +                await this.__read();
        +            } catch (e) {
        +                // Only bubble up the errors when we're actually connected and not closed
        +                if (this.#connected && !this.#closed) {
        +                    this.errorCallbacks.forEach((f) => f(e));
        +                }
        +            }
        +        });
        +    }
        +
        +    async __readMessageFrame(socket) {
        +        const length = util.intFromBuffer(await this.__readSocket(4, socket));
        +        const operation = util.intFromBuffer(await this.__readSocket(1, socket));
        +
        +        let op = smData.Operation.fromMap(operation);
        +        if (typeof op === 'undefined') {
        +            this.#logger.error('Found unknown operation', operation);
        +            op = smData.Operation.Unknown;
        +        }
        +
        +        return new smData.MessageFrame(op, await this.__readSocket(length - 1, socket));
        +    }
        +
        +    __handleReadResponse(data, frame) {
        +        if (frame.operation === smData.Operation.ReadMessagesResponse) {
        +            const response = smData.ReadMessagesResponse.fromMap(data);
        +            this.#logger.debug('Received ReadMessagesResponse from server');
        +            this.#requestMap[response.requestId](response);
        +        } else if (frame.operation === smData.Operation.CreateMessageStreamResponse) {
        +            const response = smData.CreateMessageStreamResponse.fromMap(data);
        +            this.#logger.debug('Received CreateMessageStreamResponse from server', frame);
        +            this.#requestMap[response.requestId](response);
        +        } else if (frame.operation === smData.Operation.DeleteMessageStreamResponse) {
        +            const response = smData.DeleteMessageStreamResponse.fromMap(data);
        +            this.#logger.debug('Received DeleteMessageStreamResponse from server', frame);
        +            this.#requestMap[response.requestId](response);
        +        } else if (frame.operation === smData.Operation.AppendMessageResponse) {
        +            const response = smData.AppendMessageResponse.fromMap(data);
        +            this.#logger.debug('Received AppendMessageResponse from server', frame);
        +            this.#requestMap[response.requestId](response);
        +        } else if (frame.operation === smData.Operation.ListStreamsResponse) {
        +            const response = smData.ListStreamsResponse.fromMap(data);
        +            this.#logger.debug('Received ListStreamsResponse from server', frame);
        +            this.#requestMap[response.requestId](response);
        +        } else if (frame.operation === smData.Operation.DescribeMessageStreamResponse) {
        +            const response = smData.DescribeMessageStreamResponse.fromMap(data);
        +            this.#logger.debug('Received DescribeMessageStreamResponse from server', frame);
        +            this.#requestMap[response.requestId](response);
        +        } else if (frame.operation === smData.Operation.Unknown) {
        +            this.#logger.error('Received response with unknown operation from server', frame);
        +            try {
        +                const { requestId } = cbor.decodeFirstSync(frame.payload);
        +                this.#requestMap[requestId](frame);
        +            } catch {
        +                // We tried our best to figure out the request id, but it failed.
        +                // We already logged the unknown smData.Operation, so there's nothing
        +                // else we can do at this point
        +            }
        +        } else {
        +            this.#logger.error('Received data with unhandled operation', frame.operation);
        +        }
        +    }
        +
        +    async _sendAndReceive(operation, data) {
        +        if (this.#closed) {
        +            throw new exceptions.StreamManagerException('Client is closed and cannot be reopened');
        +        }
        +
        +        if (data.requestId === null) {
        +            // eslint-disable-next-line no-param-reassign
        +            data.requestId = util.uuidv4();
        +        }
        +
        +        const validation = util.isInvalid(data);
        +        if (validation) {
        +            throw new exceptions.ValidationException(validation);
        +        }
        +
        +        // If we're not connected, immediately try to reconnect
        +        if (!this.#connected) {
        +            await this.__connect();
        +        }
        +
        +        const promise = new Promise(((resolve, reject) => {
        +            this.#requestMap[data.requestId] = (result) => {
        +                // Drop async queue from request map
        +                delete this.#requestMap[data.requestId];
        +                if (result instanceof smData.MessageFrame && result.operation === smData.Operation.Unknown) {
        +                    reject(new exceptions.ClientException('Received response with unknown operation from server'));
        +                }
        +
        +                resolve(result);
        +            };
        +        }));
        +
        +        // Write request to socket
        +        const frame = new smData.MessageFrame(operation, cbor.encode(data.asMap()));
        +        const byteFrame = util.encodeFrame(frame);
        +        this.#socket.write(byteFrame.header);
        +        this.#socket.write(byteFrame.payload);
        +
        +        return promise;
        +    }
        +
        +    static __validateReadMessagesOptions(options) {
        +        if (options !== null) {
        +            if (!(options instanceof smData.ReadMessagesOptions)) {
        +                throw new exceptions.ValidationException('options argument to read_messages must be a ReadMessageOptions object');
        +            }
        +            const validation = util.isInvalid(options);
        +            if (validation) {
        +                throw new exceptions.ValidationException(validation);
        +            }
        +
        +            if (
        +                options.minMessageCount !== null
        +                && options.maxMessageCount !== null
        +                && options.minMessageCount > options.maxMessageCount
        +            ) {
        +                throw new exceptions.ValidationException('minMessageCount must be less than or equal to maxMessageCount');
        +            }
        +        }
        +    }
        +
        +    /**
        +     * Append a message into the specified message stream. Returns the sequence number of the message
        +     * if it was successfully appended.
        +     *
        +     * @param streamName {string} The name of the stream to append to.
        +     * @param data {Buffer} Buffer containing the data to be written.
        +     * @returns {Promise<Number>}
        +     */
        +    async appendMessage(streamName, data) {
        +        const request = new smData.AppendMessageRequest().withName(streamName).withPayload(data);
        +        const result = await this._sendAndReceive(smData.Operation.AppendMessage, request);
        +        util.throwOnErrorResponse(result);
        +        return result.sequenceNumber;
        +    }
        +
        +    /**
        +     * Create a message stream with a given definition.
        +     *
        +     * @param definition {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}
        +     * @returns {Promise<void>}
        +     */
        +    async createMessageStream(definition) {
        +        if (!(definition instanceof smData.MessageStreamDefinition)) {
        +            throw new exceptions.ValidationException('definition argument to create_stream must be a MessageStreamDefinition object');
        +        }
        +        const request = new smData.CreateMessageStreamRequest().withDefinition(definition);
        +        const result = await this._sendAndReceive(smData.Operation.CreateMessageStream, request);
        +        util.throwOnErrorResponse(result);
        +    }
        +
        +    /**
        +     * Deletes a message stream based on its name. Nothing is returned if the request succeeds.
        +     * An error will be thrown if the request fails.
        +     *
        +     * @param streamName {string} The name of the stream to be deleted.
        +     * @returns {Promise<void>}
        +     */
        +    async deleteMessageStream(streamName) {
        +        const request = new smData.DeleteMessageStreamRequest().withName(streamName);
        +        const result = await this._sendAndReceive(smData.Operation.DeleteMessageStream, request);
        +        util.throwOnErrorResponse(result);
        +    }
        +
        +    /**
        +     * Read message(s) from a chosen stream with options. If no options are specified it will try to read
        +     * 1 message from the stream.
        +     *
        +     * @param streamName {string} The name of the stream to read from.
        +     * @param options {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions?} Options used when reading from the stream of type {@linkcode aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}.
        +     *     Defaults are:
        +     * <ul>
        +     *     <li>desiredStartSequenceNumber: 0</li>
        +     *     <li>minMessageCount: 1</li>
        +     *     <li>maxMessageCount: 1</li>
        +     *     <li>readTimeoutMillis: 0 <pre>// Where 0 here represents that the server will immediately return the messages
        +     * // or an exception if there were not enough messages available.</pre></li>
        +     * </ul>
        +     * <p>
        +     *     If desiredStartSequenceNumber is specified in the options and is less
        +     *     than the current beginning of the stream, returned messages will start
        +     *     at the beginning of the stream and not necessarily the desiredStartSequenceNumber.
        +     * </p>
        +     * @returns {Promise<aws-greengrass-core-sdk.StreamManager.Message[]>} List of one or more messages.
        +     */
        +    async readMessages(streamName, options = null) {
        +        StreamManagerClient.__validateReadMessagesOptions(options);
        +        const request = new smData.ReadMessagesRequest().withStreamName(streamName).withReadMessagesOptions(options);
        +        const result = await this._sendAndReceive(smData.Operation.ReadMessages, request);
        +        util.throwOnErrorResponse(result);
        +        return result.messages;
        +    }
        +
        +    /**
        +     * List the streams in StreamManager. Returns a list of their names.
        +     *
        +     * @returns {Promise<String[]>}
        +     */
        +    async listStreams() {
        +        const request = new smData.ListStreamsRequest();
        +        const result = await this._sendAndReceive(smData.Operation.ListStreams, request);
        +        util.throwOnErrorResponse(result);
        +        return result.streams;
        +    }
        +
        +    /**
        +     * Describe a message stream to get metadata including the stream's definition,
        +     * size, and exporter statuses.
        +     *
        +     * @param streamName {string} The name of the stream to describe
        +     * @returns {Promise<aws-greengrass-core-sdk.StreamManager.MessageStreamInfo>}
        +     */
        +    async describeMessageStream(streamName) {
        +        const request = new smData.DescribeMessageStreamRequest().withName(streamName);
        +        const result = await this._sendAndReceive(smData.Operation.DescribeMessageStream, request);
        +        util.throwOnErrorResponse(result);
        +        return result.messageStreamInfo;
        +    }
        +
        +    /**
        +     * Add a callback for when the client connects.
        +     * @param f {function}
        +     */
        +    onConnected(f) {
        +        if (this.#connected) {
        +            f();
        +        } else {
        +            this.connectCallbacks.push(f);
        +        }
        +    }
        +
        +    /**
        +     * Add a callback for when an error occurs.
        +     * @param f {function}
        +     */
        +    onError(f) {
        +        this.errorCallbacks.push(f);
        +    }
        +
        +    /**
        +     * Close the connection
        +     */
        +    close() {
        +        if (this.#socket) {
        +            this.#socket.end();
        +        }
        +        this.#closed = true;
        +    }
        +}
        +
        +module.exports = {
        +    ...smData,
        +    StreamManagerClient: StreamManagerClient,
        +    ...exceptions,
        +};
        +
        +
        +
        + + + + +
        + + + +
        + +
        + Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
        + + + + + diff --git a/docs/stream-manager_data_index.js.html b/docs/stream-manager_data_index.js.html new file mode 100644 index 0000000..6069a1a --- /dev/null +++ b/docs/stream-manager_data_index.js.html @@ -0,0 +1,6244 @@ + + + + + JSDoc: Source: stream-manager/data/index.js + + + + + + + + + + +
        + +

        Source: stream-manager/data/index.js

        + + + + + + +
        +
        +
        /**
        + * StrategyOnFull is used in the MessageStreamDefinition when creating a stream.
        +   It defines the behavior when the stream has reached the maximum size.
        +   RejectNewData: any append message request after the stream is full will be rejected with an exception.
        +   OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message.
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class StrategyOnFull {
        +
        +    #value = null;
        +    constructor(value = null) {
        +        if (!(value in Object.values(StrategyOnFull.options))) {
        +            throw new Error("Value must be one of the enumerated options");
        +        }
        +        this.#value = value;
        +    }
        +
        +    static fromMap(d) {
        +        return StrategyOnFull[StrategyOnFull.optionsFlipped[d]];
        +    }
        +
        +    asMap() {
        +        return this.#value;
        +    }
        +};
        +Object.defineProperty(StrategyOnFull, "options", {
        +    value: {
        +        RejectNewData: 0,
        +        OverwriteOldestData: 1,
        +    }
        +});
        +Object.defineProperty(StrategyOnFull, "optionsFlipped", {
        +    value: {
        +        0: "RejectNewData",
        +        1: "OverwriteOldestData",
        +    }
        +});
        +
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.StrategyOnFull} RejectNewData
        + * @memberOf aws-greengrass-core-sdk.StreamManager.StrategyOnFull#
        + * @readonly
        + */
        +Object.defineProperty(StrategyOnFull, "RejectNewData", {
        +    value: new StrategyOnFull(0)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.StrategyOnFull} OverwriteOldestData
        + * @memberOf aws-greengrass-core-sdk.StreamManager.StrategyOnFull#
        + * @readonly
        + */
        +Object.defineProperty(StrategyOnFull, "OverwriteOldestData", {
        +    value: new StrategyOnFull(1)
        +});
        +
        +/**
        + * Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts.
        +   Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk.
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class Persistence {
        +
        +    #value = null;
        +    constructor(value = null) {
        +        if (!(value in Object.values(Persistence.options))) {
        +            throw new Error("Value must be one of the enumerated options");
        +        }
        +        this.#value = value;
        +    }
        +
        +    static fromMap(d) {
        +        return Persistence[Persistence.optionsFlipped[d]];
        +    }
        +
        +    asMap() {
        +        return this.#value;
        +    }
        +};
        +Object.defineProperty(Persistence, "options", {
        +    value: {
        +        File: 0,
        +        Memory: 1,
        +    }
        +});
        +Object.defineProperty(Persistence, "optionsFlipped", {
        +    value: {
        +        0: "File",
        +        1: "Memory",
        +    }
        +});
        +
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Persistence} File
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Persistence#
        + * @readonly
        + */
        +Object.defineProperty(Persistence, "File", {
        +    value: new Persistence(0)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Persistence} Memory
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Persistence#
        + * @readonly
        + */
        +Object.defineProperty(Persistence, "Memory", {
        +    value: new Persistence(1)
        +});
        +
        +/**
        + * (Internal Only) Request object to connect to the service
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class ConnectRequest {
        +    #__requestId = null;
        +    #__protocolVersion = null;
        +    #__sdkVersion = null;
        +    #__authToken = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     * @param protocolVersion {String} 
        +     * @param sdkVersion {String} 
        +     * @param authToken {String} 
        +     */
        +    constructor(
        +        requestId = null,
        +        protocolVersion = null,
        +        sdkVersion = null,
        +        authToken = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        if (protocolVersion !== null && !(typeof protocolVersion === "string")) {
        +            throw new Error("protocolVersion must be String");
        +        }
        +
        +        if (sdkVersion !== null && !(typeof sdkVersion === "string")) {
        +            throw new Error("sdkVersion must be String");
        +        }
        +
        +        if (authToken !== null && !(typeof authToken === "string")) {
        +            throw new Error("authToken must be String");
        +        }
        +
        +        this.#__requestId = requestId;
        +        this.#__protocolVersion = protocolVersion;
        +        this.#__sdkVersion = sdkVersion;
        +        this.#__authToken = authToken;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ConnectRequest}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get protocolVersion() {
        +        return this.#__protocolVersion;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set protocolVersion(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("protocolVersion must be String");
        +        }
        +
        +        this.#__protocolVersion = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ConnectRequest}
        +     */
        +    withProtocolVersion(value) {
        +        this.protocolVersion = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get sdkVersion() {
        +        return this.#__sdkVersion;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set sdkVersion(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("sdkVersion must be String");
        +        }
        +
        +        this.#__sdkVersion = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ConnectRequest}
        +     */
        +    withSdkVersion(value) {
        +        this.sdkVersion = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get authToken() {
        +        return this.#__authToken;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set authToken(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("authToken must be String");
        +        }
        +
        +        this.#__authToken = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ConnectRequest}
        +     */
        +    withAuthToken(value) {
        +        this.authToken = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new ConnectRequest();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        if ("protocolVersion" in d) {
        +            ret.protocolVersion = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["protocolVersion"]) : d["protocolVersion"];
        +        }
        +        if ("sdkVersion" in d) {
        +            ret.sdkVersion = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["sdkVersion"]) : d["sdkVersion"];
        +        }
        +        if ("authToken" in d) {
        +            ret.authToken = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["authToken"]) : d["authToken"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        if (this.protocolVersion !== null) {
        +            d["protocolVersion"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.protocolVersion), "asMap") ? this.protocolVersion.asMap() : this.protocolVersion;
        +        }
        +        if (this.sdkVersion !== null) {
        +            d["sdkVersion"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.sdkVersion), "asMap") ? this.sdkVersion.asMap() : this.sdkVersion;
        +        }
        +        if (this.authToken !== null) {
        +            d["authToken"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.authToken), "asMap") ? this.authToken.asMap() : this.authToken;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(ConnectRequest, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        protocolVersion: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        sdkVersion: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        authToken: {
        +            'type': String,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(ConnectRequest, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(ConnectRequest, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': true,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'protocolVersion': {
        +            'required': true,
        +        },
        +        'sdkVersion': {
        +            'required': false,
        +        },
        +        'authToken': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +/**
        + * (Internal Only) Enum defining possible response status codes from StreamManager server.
        +   Success: Request succeeded.
        +   UnknownFailure: Encountered unknown StreamManager server failure.
        +   Unauthorized: Client is not authorized to perform this request.
        +   InvalidRequest: Client request is invalid.
        +   RequestPayloadTooLarge: Request payload is too large.
        +   ResourceNotFound: The requested resource does not exist.
        +   ServerTimeout: Server took too long and timed out.
        +   ResponsePayloadTooLarge: Server response exceeded the max allowed response payload size by the protocol.
        +   UnsupportedConnectVersion: Server does not support the Connect version presented by the Client.
        +   UnexpectedOperation: Operation presented was not expected by the Server.
        +   UnsupportedProtocolVersion: Protocol version presented by the Client is not compatible with the Server.
        +   InvalidProtocolVersion: Protocol version presented by the Client is not valid.
        +   FailedToConnect: Client failed to connect to the Server.
        +   NotEnoughMessages: There is not enough messages to return.
        +   MessageStoreReadError: Read messages encountered an error.
        +   OutOfMemoryError: Server ran out of memory.
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class ResponseStatusCode {
        +
        +    #value = null;
        +    constructor(value = null) {
        +        if (!(value in Object.values(ResponseStatusCode.options))) {
        +            throw new Error("Value must be one of the enumerated options");
        +        }
        +        this.#value = value;
        +    }
        +
        +    static fromMap(d) {
        +        return ResponseStatusCode[ResponseStatusCode.optionsFlipped[d]];
        +    }
        +
        +    asMap() {
        +        return this.#value;
        +    }
        +};
        +Object.defineProperty(ResponseStatusCode, "options", {
        +    value: {
        +        Success: 0,
        +        UnknownFailure: 1,
        +        Unauthorized: 2,
        +        InvalidRequest: 3,
        +        RequestPayloadTooLarge: 4,
        +        ResourceNotFound: 5,
        +        ServerTimeout: 6,
        +        ResponsePayloadTooLarge: 7,
        +        UnsupportedConnectVersion: 8,
        +        UnexpectedOperation: 9,
        +        UnsupportedProtocolVersion: 10,
        +        InvalidProtocolVersion: 11,
        +        FailedToConnect: 12,
        +        NotEnoughMessages: 13,
        +        MessageStoreReadError: 14,
        +        OutOfMemoryError: 15,
        +    }
        +});
        +Object.defineProperty(ResponseStatusCode, "optionsFlipped", {
        +    value: {
        +        0: "Success",
        +        1: "UnknownFailure",
        +        2: "Unauthorized",
        +        3: "InvalidRequest",
        +        4: "RequestPayloadTooLarge",
        +        5: "ResourceNotFound",
        +        6: "ServerTimeout",
        +        7: "ResponsePayloadTooLarge",
        +        8: "UnsupportedConnectVersion",
        +        9: "UnexpectedOperation",
        +        10: "UnsupportedProtocolVersion",
        +        11: "InvalidProtocolVersion",
        +        12: "FailedToConnect",
        +        13: "NotEnoughMessages",
        +        14: "MessageStoreReadError",
        +        15: "OutOfMemoryError",
        +    }
        +});
        +
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} Success
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "Success", {
        +    value: new ResponseStatusCode(0)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} UnknownFailure
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "UnknownFailure", {
        +    value: new ResponseStatusCode(1)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} Unauthorized
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "Unauthorized", {
        +    value: new ResponseStatusCode(2)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} InvalidRequest
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "InvalidRequest", {
        +    value: new ResponseStatusCode(3)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} RequestPayloadTooLarge
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "RequestPayloadTooLarge", {
        +    value: new ResponseStatusCode(4)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} ResourceNotFound
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "ResourceNotFound", {
        +    value: new ResponseStatusCode(5)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} ServerTimeout
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "ServerTimeout", {
        +    value: new ResponseStatusCode(6)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} ResponsePayloadTooLarge
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "ResponsePayloadTooLarge", {
        +    value: new ResponseStatusCode(7)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} UnsupportedConnectVersion
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "UnsupportedConnectVersion", {
        +    value: new ResponseStatusCode(8)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} UnexpectedOperation
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "UnexpectedOperation", {
        +    value: new ResponseStatusCode(9)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} UnsupportedProtocolVersion
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "UnsupportedProtocolVersion", {
        +    value: new ResponseStatusCode(10)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} InvalidProtocolVersion
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "InvalidProtocolVersion", {
        +    value: new ResponseStatusCode(11)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} FailedToConnect
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "FailedToConnect", {
        +    value: new ResponseStatusCode(12)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} NotEnoughMessages
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "NotEnoughMessages", {
        +    value: new ResponseStatusCode(13)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} MessageStoreReadError
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "MessageStoreReadError", {
        +    value: new ResponseStatusCode(14)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} OutOfMemoryError
        + * @memberOf aws-greengrass-core-sdk.StreamManager.ResponseStatusCode#
        + * @readonly
        + */
        +Object.defineProperty(ResponseStatusCode, "OutOfMemoryError", {
        +    value: new ResponseStatusCode(15)
        +});
        +
        +/**
        + * Internal Only
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class ConnectResponse {
        +    #__requestId = null;
        +    #__status = null;
        +    #__errorMessage = null;
        +    #__protocolVersion = null;
        +    #__supportedProtocolVersions = null;
        +    #__serverVersion = null;
        +    #__clientIdentifier = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @param errorMessage {String} 
        +     * @param protocolVersion {String} 
        +     * @param supportedProtocolVersions {String[]} 
        +     * @param serverVersion {String} 
        +     * @param clientIdentifier {String} 
        +     */
        +    constructor(
        +        requestId = null,
        +        status = null,
        +        errorMessage = null,
        +        protocolVersion = null,
        +        supportedProtocolVersions = null,
        +        serverVersion = null,
        +        clientIdentifier = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        if (status !== null && !(status instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        if (errorMessage !== null && !(typeof errorMessage === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        if (protocolVersion !== null && !(typeof protocolVersion === "string")) {
        +            throw new Error("protocolVersion must be String");
        +        }
        +
        +        if (supportedProtocolVersions !== null && !(supportedProtocolVersions instanceof Array)) {
        +            throw new Error("supportedProtocolVersions must be Array");
        +        }
        +        if (supportedProtocolVersions !== null && !supportedProtocolVersions.every((v) => typeof v === "string")) {
        +            throw new Error("supportedProtocolVersions array values must be String");
        +        }
        +
        +        if (serverVersion !== null && !(typeof serverVersion === "string")) {
        +            throw new Error("serverVersion must be String");
        +        }
        +
        +        if (clientIdentifier !== null && !(typeof clientIdentifier === "string")) {
        +            throw new Error("clientIdentifier must be String");
        +        }
        +
        +        this.#__requestId = requestId;
        +        this.#__status = status;
        +        this.#__errorMessage = errorMessage;
        +        this.#__protocolVersion = protocolVersion;
        +        this.#__supportedProtocolVersions = supportedProtocolVersions;
        +        this.#__serverVersion = serverVersion;
        +        this.#__clientIdentifier = clientIdentifier;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode}
        +     
        +     */
        +    get status() {
        +        return this.#__status;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     */
        +    set status(value) {
        +        if (value !== null && !(value instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        this.#__status = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse}
        +     */
        +    withStatus(value) {
        +        this.status = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get errorMessage() {
        +        return this.#__errorMessage;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set errorMessage(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        this.#__errorMessage = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse}
        +     */
        +    withErrorMessage(value) {
        +        this.errorMessage = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get protocolVersion() {
        +        return this.#__protocolVersion;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set protocolVersion(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("protocolVersion must be String");
        +        }
        +
        +        this.#__protocolVersion = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse}
        +     */
        +    withProtocolVersion(value) {
        +        this.protocolVersion = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String[]}
        +     
        +     */
        +    get supportedProtocolVersions() {
        +        return this.#__supportedProtocolVersions;
        +    }
        +    /**
        +     * @param value {String[]} 
        +     */
        +    set supportedProtocolVersions(value) {
        +        if (value !== null && !(value instanceof Array)) {
        +            throw new Error("supportedProtocolVersions must be Array");
        +        }
        +        if (value !== null && !value.every((v) => typeof v === "string")) {
        +            throw new Error("supportedProtocolVersions array values must be String");
        +        }
        +
        +        this.#__supportedProtocolVersions = value;
        +    }
        +    /**
        +     * @param value {String[]} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse}
        +     */
        +    withSupportedProtocolVersions(value) {
        +        this.supportedProtocolVersions = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get serverVersion() {
        +        return this.#__serverVersion;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set serverVersion(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("serverVersion must be String");
        +        }
        +
        +        this.#__serverVersion = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse}
        +     */
        +    withServerVersion(value) {
        +        this.serverVersion = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get clientIdentifier() {
        +        return this.#__clientIdentifier;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set clientIdentifier(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("clientIdentifier must be String");
        +        }
        +
        +        this.#__clientIdentifier = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ConnectResponse}
        +     */
        +    withClientIdentifier(value) {
        +        this.clientIdentifier = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new ConnectResponse();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        if ("status" in d) {
        +            ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"];
        +        }
        +        if ("errorMessage" in d) {
        +            ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"];
        +        }
        +        if ("protocolVersion" in d) {
        +            ret.protocolVersion = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["protocolVersion"]) : d["protocolVersion"];
        +        }
        +        if ("supportedProtocolVersions" in d) {
        +            ret.supportedProtocolVersions = d["supportedProtocolVersions"].reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(v) : v);
        +                return acc;
        +            }, []);
        +        }
        +        if ("serverVersion" in d) {
        +            ret.serverVersion = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["serverVersion"]) : d["serverVersion"];
        +        }
        +        if ("clientIdentifier" in d) {
        +            ret.clientIdentifier = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["clientIdentifier"]) : d["clientIdentifier"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        if (this.status !== null) {
        +            d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status;
        +        }
        +        if (this.errorMessage !== null) {
        +            d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage;
        +        }
        +        if (this.protocolVersion !== null) {
        +            d["protocolVersion"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.protocolVersion), "asMap") ? this.protocolVersion.asMap() : this.protocolVersion;
        +        }
        +        if (this.supportedProtocolVersions !== null) {
        +            d["supportedProtocolVersions"] = this.supportedProtocolVersions.reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v);
        +                return acc;
        +            }, []);
        +        }
        +        if (this.serverVersion !== null) {
        +            d["serverVersion"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.serverVersion), "asMap") ? this.serverVersion.asMap() : this.serverVersion;
        +        }
        +        if (this.clientIdentifier !== null) {
        +            d["clientIdentifier"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.clientIdentifier), "asMap") ? this.clientIdentifier.asMap() : this.clientIdentifier;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(ConnectResponse, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        status: {
        +            'type': ResponseStatusCode,
        +            'subtype': null
        +        },
        +        errorMessage: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        protocolVersion: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        supportedProtocolVersions: {
        +            'type': Array,
        +            'subtype': String
        +        },
        +        serverVersion: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        clientIdentifier: {
        +            'type': String,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(ConnectResponse, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(ConnectResponse, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': false,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'status': {
        +            'required': true,
        +        },
        +        'errorMessage': {
        +            'required': false,
        +        },
        +        'protocolVersion': {
        +            'required': false,
        +        },
        +        'supportedProtocolVersions': {
        +            'required': false,
        +        },
        +        'serverVersion': {
        +            'required': false,
        +        },
        +        'clientIdentifier': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +/**
        + * Internal Only
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class Operation {
        +
        +    #value = null;
        +    constructor(value = null) {
        +        if (!(value in Object.values(Operation.options))) {
        +            throw new Error("Value must be one of the enumerated options");
        +        }
        +        this.#value = value;
        +    }
        +
        +    static fromMap(d) {
        +        return Operation[Operation.optionsFlipped[d]];
        +    }
        +
        +    asMap() {
        +        return this.#value;
        +    }
        +};
        +Object.defineProperty(Operation, "options", {
        +    value: {
        +        Unknown: 0,
        +        Connect: 1,
        +        CreateMessageStream: 2,
        +        DeleteMessageStream: 3,
        +        AppendMessage: 4,
        +        ReadMessages: 5,
        +        ConnectResponse: 6,
        +        CreateMessageStreamResponse: 7,
        +        DeleteMessageStreamResponse: 8,
        +        AppendMessageResponse: 9,
        +        ReadMessagesResponse: 10,
        +        ListStreams: 11,
        +        ListStreamsResponse: 12,
        +        DescribeMessageStream: 13,
        +        DescribeMessageStreamResponse: 14,
        +    }
        +});
        +Object.defineProperty(Operation, "optionsFlipped", {
        +    value: {
        +        0: "Unknown",
        +        1: "Connect",
        +        2: "CreateMessageStream",
        +        3: "DeleteMessageStream",
        +        4: "AppendMessage",
        +        5: "ReadMessages",
        +        6: "ConnectResponse",
        +        7: "CreateMessageStreamResponse",
        +        8: "DeleteMessageStreamResponse",
        +        9: "AppendMessageResponse",
        +        10: "ReadMessagesResponse",
        +        11: "ListStreams",
        +        12: "ListStreamsResponse",
        +        13: "DescribeMessageStream",
        +        14: "DescribeMessageStreamResponse",
        +    }
        +});
        +
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} Unknown
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "Unknown", {
        +    value: new Operation(0)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} Connect
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "Connect", {
        +    value: new Operation(1)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} CreateMessageStream
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "CreateMessageStream", {
        +    value: new Operation(2)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} DeleteMessageStream
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "DeleteMessageStream", {
        +    value: new Operation(3)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} AppendMessage
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "AppendMessage", {
        +    value: new Operation(4)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} ReadMessages
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "ReadMessages", {
        +    value: new Operation(5)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} ConnectResponse
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "ConnectResponse", {
        +    value: new Operation(6)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} CreateMessageStreamResponse
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "CreateMessageStreamResponse", {
        +    value: new Operation(7)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} DeleteMessageStreamResponse
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "DeleteMessageStreamResponse", {
        +    value: new Operation(8)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} AppendMessageResponse
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "AppendMessageResponse", {
        +    value: new Operation(9)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} ReadMessagesResponse
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "ReadMessagesResponse", {
        +    value: new Operation(10)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} ListStreams
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "ListStreams", {
        +    value: new Operation(11)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} ListStreamsResponse
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "ListStreamsResponse", {
        +    value: new Operation(12)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} DescribeMessageStream
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "DescribeMessageStream", {
        +    value: new Operation(13)
        +});
        +/**
        + * @member {aws-greengrass-core-sdk.StreamManager.Operation} DescribeMessageStreamResponse
        + * @memberOf aws-greengrass-core-sdk.StreamManager.Operation#
        + * @readonly
        + */
        +Object.defineProperty(Operation, "DescribeMessageStreamResponse", {
        +    value: new Operation(14)
        +});
        +
        +/**
        + * Internal Only
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class MessageFrame {
        +    #__operation = null;
        +    #__payload = null;
        +
        +    /**
        +     * @param operation {aws-greengrass-core-sdk.StreamManager.Operation} 
        +     * @param payload {Buffer} 
        +     */
        +    constructor(
        +        operation = null,
        +        payload = null,
        +    ) {
        +        if (operation !== null && !(operation instanceof Operation)) {
        +            throw new Error("operation must be Operation");
        +        }
        +
        +        if (payload !== null && !(payload instanceof Buffer)) {
        +            throw new Error("payload must be Buffer");
        +        }
        +
        +        this.#__operation = operation;
        +        this.#__payload = payload;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.Operation}
        +     
        +     */
        +    get operation() {
        +        return this.#__operation;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.Operation} 
        +     */
        +    set operation(value) {
        +        if (value !== null && !(value instanceof Operation)) {
        +            throw new Error("operation must be Operation");
        +        }
        +
        +        this.#__operation = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.Operation} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageFrame}
        +     */
        +    withOperation(value) {
        +        this.operation = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {Buffer}
        +     
        +     */
        +    get payload() {
        +        return this.#__payload;
        +    }
        +    /**
        +     * @param value {Buffer} 
        +     */
        +    set payload(value) {
        +        if (value !== null && !(value instanceof Buffer)) {
        +            throw new Error("payload must be Buffer");
        +        }
        +
        +        this.#__payload = value;
        +    }
        +    /**
        +     * @param value {Buffer} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageFrame}
        +     */
        +    withPayload(value) {
        +        this.payload = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new MessageFrame();
        +        if ("operation" in d) {
        +            ret.operation = Object.prototype.hasOwnProperty.call(Operation, "fromMap") ? Operation.fromMap(d["operation"]) : d["operation"];
        +        }
        +        if ("payload" in d) {
        +            ret.payload = Object.prototype.hasOwnProperty.call(Buffer, "fromMap") ? Buffer.fromMap(d["payload"]) : d["payload"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.operation !== null) {
        +            d["operation"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.operation), "asMap") ? this.operation.asMap() : this.operation;
        +        }
        +        if (this.payload !== null) {
        +            d["payload"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.payload), "asMap") ? this.payload.asMap() : this.payload;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(MessageFrame, "typesMap", {
        +    value: {
        +        operation: {
        +            'type': Operation,
        +            'subtype': null
        +        },
        +        payload: {
        +            'type': Buffer,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(MessageFrame, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(MessageFrame, "validationsMap", {
        +    value: {
        +        'operation': {
        +            'required': true,
        +        },
        +        'payload': {
        +            'required': true,
        +        },
        +    }
        +});
        +
        +/**
        + * This export destination is not supported! The interface may change at any time without notice and should not be relied on for any production use.
        +   There are no guarantees around its correctness.
        +   This configures an HTTP endpoint which sends a POST request to the provided URI. Each request contains a single message in the body of the request.
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class HTTPConfig {
        +    #__identifier = null;
        +    #__uri = null;
        +    #__batchSize = null;
        +    #__batchIntervalMillis = null;
        +    #__priority = null;
        +
        +    /**
        +     * @param identifier {String} A unique identifier to identify this individual upload stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     * @param uri {String} URL for HTTP endpoint which should receive the POST requests for export.
        +     * @param batchSize {Number} The maximum size of a batch to send to the destination. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum batch size is 1 and the maximum is 500.
        +     * @param batchIntervalMillis {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     * @param priority {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
        +     */
        +    constructor(
        +        identifier = null,
        +        uri = null,
        +        batchSize = null,
        +        batchIntervalMillis = null,
        +        priority = null,
        +    ) {
        +        if (identifier !== null && !(typeof identifier === "string")) {
        +            throw new Error("identifier must be String");
        +        }
        +
        +        if (uri !== null && !(typeof uri === "string")) {
        +            throw new Error("uri must be String");
        +        }
        +
        +        if (batchSize !== null && !(typeof batchSize === "number")) {
        +            throw new Error("batchSize must be Number");
        +        }
        +
        +        if (batchIntervalMillis !== null && !(typeof batchIntervalMillis === "number")) {
        +            throw new Error("batchIntervalMillis must be Number");
        +        }
        +
        +        if (priority !== null && !(typeof priority === "number")) {
        +            throw new Error("priority must be Number");
        +        }
        +
        +        this.#__identifier = identifier;
        +        this.#__uri = uri;
        +        this.#__batchSize = batchSize;
        +        this.#__batchIntervalMillis = batchIntervalMillis;
        +        this.#__priority = priority;
        +    }
        +
        +    /**
        +     * A unique identifier to identify this individual upload stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     * @returns {String}
        +
        +     */
        +    get identifier() {
        +        return this.#__identifier;
        +    }
        +    /**
        +     * @param value {String} A unique identifier to identify this individual upload stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     */
        +    set identifier(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("identifier must be String");
        +        }
        +
        +        this.#__identifier = value;
        +    }
        +    /**
        +     * @param value {String} A unique identifier to identify this individual upload stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.HTTPConfig}
        +     */
        +    withIdentifier(value) {
        +        this.identifier = value;
        +        return this;
        +    }
        +
        +    /**
        +     * URL for HTTP endpoint which should receive the POST requests for export.
        +     * @returns {String}
        +     
        +     */
        +    get uri() {
        +        return this.#__uri;
        +    }
        +    /**
        +     * @param value {String} URL for HTTP endpoint which should receive the POST requests for export.
        +     */
        +    set uri(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("uri must be String");
        +        }
        +
        +        this.#__uri = value;
        +    }
        +    /**
        +     * @param value {String} URL for HTTP endpoint which should receive the POST requests for export.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.HTTPConfig}
        +     */
        +    withUri(value) {
        +        this.uri = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The maximum size of a batch to send to the destination. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum batch size is 1 and the maximum is 500.
        +     * @returns {Number}
        +
        +     */
        +    get batchSize() {
        +        return this.#__batchSize;
        +    }
        +    /**
        +     * @param value {Number} The maximum size of a batch to send to the destination. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum batch size is 1 and the maximum is 500.
        +     */
        +    set batchSize(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("batchSize must be Number");
        +        }
        +
        +        this.#__batchSize = value;
        +    }
        +    /**
        +     * @param value {Number} The maximum size of a batch to send to the destination. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum batch size is 1 and the maximum is 500.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.HTTPConfig}
        +     */
        +    withBatchSize(value) {
        +        this.batchSize = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     * @returns {Number}
        +
        +     */
        +    get batchIntervalMillis() {
        +        return this.#__batchIntervalMillis;
        +    }
        +    /**
        +     * @param value {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     */
        +    set batchIntervalMillis(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("batchIntervalMillis must be Number");
        +        }
        +
        +        this.#__batchIntervalMillis = value;
        +    }
        +    /**
        +     * @param value {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.HTTPConfig}
        +     */
        +    withBatchIntervalMillis(value) {
        +        this.batchIntervalMillis = value;
        +        return this;
        +    }
        +
        +    /**
        +     * Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
        +     * @returns {Number}
        +     
        +     */
        +    get priority() {
        +        return this.#__priority;
        +    }
        +    /**
        +     * @param value {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
        +     */
        +    set priority(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("priority must be Number");
        +        }
        +
        +        this.#__priority = value;
        +    }
        +    /**
        +     * @param value {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.HTTPConfig}
        +     */
        +    withPriority(value) {
        +        this.priority = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new HTTPConfig();
        +        if ("identifier" in d) {
        +            ret.identifier = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["identifier"]) : d["identifier"];
        +        }
        +        if ("uri" in d) {
        +            ret.uri = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["uri"]) : d["uri"];
        +        }
        +        if ("batchSize" in d) {
        +            ret.batchSize = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["batchSize"]) : d["batchSize"];
        +        }
        +        if ("batchIntervalMillis" in d) {
        +            ret.batchIntervalMillis = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["batchIntervalMillis"]) : d["batchIntervalMillis"];
        +        }
        +        if ("priority" in d) {
        +            ret.priority = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["priority"]) : d["priority"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.identifier !== null) {
        +            d["identifier"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.identifier), "asMap") ? this.identifier.asMap() : this.identifier;
        +        }
        +        if (this.uri !== null) {
        +            d["uri"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.uri), "asMap") ? this.uri.asMap() : this.uri;
        +        }
        +        if (this.batchSize !== null) {
        +            d["batchSize"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.batchSize), "asMap") ? this.batchSize.asMap() : this.batchSize;
        +        }
        +        if (this.batchIntervalMillis !== null) {
        +            d["batchIntervalMillis"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.batchIntervalMillis), "asMap") ? this.batchIntervalMillis.asMap() : this.batchIntervalMillis;
        +        }
        +        if (this.priority !== null) {
        +            d["priority"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.priority), "asMap") ? this.priority.asMap() : this.priority;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(HTTPConfig, "typesMap", {
        +    value: {
        +        identifier: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        uri: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        batchSize: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        batchIntervalMillis: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        priority: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(HTTPConfig, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(HTTPConfig, "validationsMap", {
        +    value: {
        +        'identifier': {
        +            'required': true,
        +            'minLength': 1,
        +            'maxLength': 255,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'uri': {
        +            'required': true,
        +            'minLength': 1,
        +        },
        +        'batchSize': {
        +            'required': false,
        +            'maximum': 500,
        +            'minimum': 1,
        +        },
        +        'batchIntervalMillis': {
        +            'required': false,
        +            'maximum': 9223372036854,
        +            'minimum': 60000,
        +        },
        +        'priority': {
        +            'required': false,
        +            'maximum': 10,
        +            'minimum': 1,
        +        },
        +    }
        +});
        +
        +/**
        + * Configuration object for IoT Analytics export destination.
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class IoTAnalyticsConfig {
        +    #__identifier = null;
        +    #__iotChannel = null;
        +    #__iotMsgIdPrefix = null;
        +    #__batchSize = null;
        +    #__batchIntervalMillis = null;
        +    #__priority = null;
        +
        +    /**
        +     * @param identifier {String} A unique identifier to identify this individual upload stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     * @param iotChannel {String} The name of the IoT Analytics Channel that this exporter should upload to
        +     * @param iotMsgIdPrefix {String} A string prefixed to each unique message id. After this prefix, StreamManager may append more data to make the message ID unique.
        +       This prefix must be less than 32 characters.
        +     * @param batchSize {Number} The maximum size of a batch to send to IoT Analytics. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The batch size must be between 1 and 100.
        +     * @param batchIntervalMillis {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     * @param priority {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
        +     */
        +    constructor(
        +        identifier = null,
        +        iotChannel = null,
        +        iotMsgIdPrefix = null,
        +        batchSize = null,
        +        batchIntervalMillis = null,
        +        priority = null,
        +    ) {
        +        if (identifier !== null && !(typeof identifier === "string")) {
        +            throw new Error("identifier must be String");
        +        }
        +
        +        if (iotChannel !== null && !(typeof iotChannel === "string")) {
        +            throw new Error("iotChannel must be String");
        +        }
        +
        +        if (iotMsgIdPrefix !== null && !(typeof iotMsgIdPrefix === "string")) {
        +            throw new Error("iotMsgIdPrefix must be String");
        +        }
        +
        +        if (batchSize !== null && !(typeof batchSize === "number")) {
        +            throw new Error("batchSize must be Number");
        +        }
        +
        +        if (batchIntervalMillis !== null && !(typeof batchIntervalMillis === "number")) {
        +            throw new Error("batchIntervalMillis must be Number");
        +        }
        +
        +        if (priority !== null && !(typeof priority === "number")) {
        +            throw new Error("priority must be Number");
        +        }
        +
        +        this.#__identifier = identifier;
        +        this.#__iotChannel = iotChannel;
        +        this.#__iotMsgIdPrefix = iotMsgIdPrefix;
        +        this.#__batchSize = batchSize;
        +        this.#__batchIntervalMillis = batchIntervalMillis;
        +        this.#__priority = priority;
        +    }
        +
        +    /**
        +     * A unique identifier to identify this individual upload stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     * @returns {String}
        +
        +     */
        +    get identifier() {
        +        return this.#__identifier;
        +    }
        +    /**
        +     * @param value {String} A unique identifier to identify this individual upload stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     */
        +    set identifier(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("identifier must be String");
        +        }
        +
        +        this.#__identifier = value;
        +    }
        +    /**
        +     * @param value {String} A unique identifier to identify this individual upload stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig}
        +     */
        +    withIdentifier(value) {
        +        this.identifier = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The name of the IoT Analytics Channel that this exporter should upload to
        +     * @returns {String}
        +     
        +     */
        +    get iotChannel() {
        +        return this.#__iotChannel;
        +    }
        +    /**
        +     * @param value {String} The name of the IoT Analytics Channel that this exporter should upload to
        +     */
        +    set iotChannel(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("iotChannel must be String");
        +        }
        +
        +        this.#__iotChannel = value;
        +    }
        +    /**
        +     * @param value {String} The name of the IoT Analytics Channel that this exporter should upload to
        +     * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig}
        +     */
        +    withIotChannel(value) {
        +        this.iotChannel = value;
        +        return this;
        +    }
        +
        +    /**
        +     * A string prefixed to each unique message id. After this prefix, StreamManager may append more data to make the message ID unique.
        +       This prefix must be less than 32 characters.
        +     * @returns {String}
        +
        +     */
        +    get iotMsgIdPrefix() {
        +        return this.#__iotMsgIdPrefix;
        +    }
        +    /**
        +     * @param value {String} A string prefixed to each unique message id. After this prefix, StreamManager may append more data to make the message ID unique.
        +       This prefix must be less than 32 characters.
        +     */
        +    set iotMsgIdPrefix(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("iotMsgIdPrefix must be String");
        +        }
        +
        +        this.#__iotMsgIdPrefix = value;
        +    }
        +    /**
        +     * @param value {String} A string prefixed to each unique message id. After this prefix, StreamManager may append more data to make the message ID unique.
        +       This prefix must be less than 32 characters.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig}
        +     */
        +    withIotMsgIdPrefix(value) {
        +        this.iotMsgIdPrefix = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The maximum size of a batch to send to IoT Analytics. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The batch size must be between 1 and 100.
        +     * @returns {Number}
        +
        +     */
        +    get batchSize() {
        +        return this.#__batchSize;
        +    }
        +    /**
        +     * @param value {Number} The maximum size of a batch to send to IoT Analytics. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The batch size must be between 1 and 100.
        +     */
        +    set batchSize(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("batchSize must be Number");
        +        }
        +
        +        this.#__batchSize = value;
        +    }
        +    /**
        +     * @param value {Number} The maximum size of a batch to send to IoT Analytics. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The batch size must be between 1 and 100.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig}
        +     */
        +    withBatchSize(value) {
        +        this.batchSize = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     * @returns {Number}
        +
        +     */
        +    get batchIntervalMillis() {
        +        return this.#__batchIntervalMillis;
        +    }
        +    /**
        +     * @param value {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     */
        +    set batchIntervalMillis(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("batchIntervalMillis must be Number");
        +        }
        +
        +        this.#__batchIntervalMillis = value;
        +    }
        +    /**
        +     * @param value {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig}
        +     */
        +    withBatchIntervalMillis(value) {
        +        this.batchIntervalMillis = value;
        +        return this;
        +    }
        +
        +    /**
        +     * Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
        +     * @returns {Number}
        +     
        +     */
        +    get priority() {
        +        return this.#__priority;
        +    }
        +    /**
        +     * @param value {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
        +     */
        +    set priority(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("priority must be Number");
        +        }
        +
        +        this.#__priority = value;
        +    }
        +    /**
        +     * @param value {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig}
        +     */
        +    withPriority(value) {
        +        this.priority = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new IoTAnalyticsConfig();
        +        if ("identifier" in d) {
        +            ret.identifier = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["identifier"]) : d["identifier"];
        +        }
        +        if ("iotChannel" in d) {
        +            ret.iotChannel = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["iotChannel"]) : d["iotChannel"];
        +        }
        +        if ("iotMsgIdPrefix" in d) {
        +            ret.iotMsgIdPrefix = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["iotMsgIdPrefix"]) : d["iotMsgIdPrefix"];
        +        }
        +        if ("batchSize" in d) {
        +            ret.batchSize = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["batchSize"]) : d["batchSize"];
        +        }
        +        if ("batchIntervalMillis" in d) {
        +            ret.batchIntervalMillis = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["batchIntervalMillis"]) : d["batchIntervalMillis"];
        +        }
        +        if ("priority" in d) {
        +            ret.priority = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["priority"]) : d["priority"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.identifier !== null) {
        +            d["identifier"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.identifier), "asMap") ? this.identifier.asMap() : this.identifier;
        +        }
        +        if (this.iotChannel !== null) {
        +            d["iotChannel"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.iotChannel), "asMap") ? this.iotChannel.asMap() : this.iotChannel;
        +        }
        +        if (this.iotMsgIdPrefix !== null) {
        +            d["iotMsgIdPrefix"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.iotMsgIdPrefix), "asMap") ? this.iotMsgIdPrefix.asMap() : this.iotMsgIdPrefix;
        +        }
        +        if (this.batchSize !== null) {
        +            d["batchSize"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.batchSize), "asMap") ? this.batchSize.asMap() : this.batchSize;
        +        }
        +        if (this.batchIntervalMillis !== null) {
        +            d["batchIntervalMillis"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.batchIntervalMillis), "asMap") ? this.batchIntervalMillis.asMap() : this.batchIntervalMillis;
        +        }
        +        if (this.priority !== null) {
        +            d["priority"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.priority), "asMap") ? this.priority.asMap() : this.priority;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(IoTAnalyticsConfig, "typesMap", {
        +    value: {
        +        identifier: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        iotChannel: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        iotMsgIdPrefix: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        batchSize: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        batchIntervalMillis: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        priority: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(IoTAnalyticsConfig, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(IoTAnalyticsConfig, "validationsMap", {
        +    value: {
        +        'identifier': {
        +            'required': true,
        +            'minLength': 1,
        +            'maxLength': 255,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'iotChannel': {
        +            'required': true,
        +            'minLength': 1,
        +        },
        +        'iotMsgIdPrefix': {
        +            'required': false,
        +            'maxLength': 32,
        +        },
        +        'batchSize': {
        +            'required': false,
        +            'maximum': 100,
        +            'minimum': 1,
        +        },
        +        'batchIntervalMillis': {
        +            'required': false,
        +            'maximum': 9223372036854,
        +            'minimum': 60000,
        +        },
        +        'priority': {
        +            'required': false,
        +            'maximum': 10,
        +            'minimum': 1,
        +        },
        +    }
        +});
        +
        +/**
        + * Configuration object for Kinesis data streams export destination.
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class KinesisConfig {
        +    #__identifier = null;
        +    #__kinesisStreamName = null;
        +    #__batchSize = null;
        +    #__batchIntervalMillis = null;
        +    #__priority = null;
        +
        +    /**
        +     * @param identifier {String} A unique identifier to identify this individual upload stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     * @param kinesisStreamName {String} The name of the Kinesis data stream that this exporter should upload to
        +     * @param batchSize {Number} The maximum size of a batch to send to Kinesis. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The batch size must be between 1 and 500.
        +     * @param batchIntervalMillis {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     * @param priority {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
        +     */
        +    constructor(
        +        identifier = null,
        +        kinesisStreamName = null,
        +        batchSize = null,
        +        batchIntervalMillis = null,
        +        priority = null,
        +    ) {
        +        if (identifier !== null && !(typeof identifier === "string")) {
        +            throw new Error("identifier must be String");
        +        }
        +
        +        if (kinesisStreamName !== null && !(typeof kinesisStreamName === "string")) {
        +            throw new Error("kinesisStreamName must be String");
        +        }
        +
        +        if (batchSize !== null && !(typeof batchSize === "number")) {
        +            throw new Error("batchSize must be Number");
        +        }
        +
        +        if (batchIntervalMillis !== null && !(typeof batchIntervalMillis === "number")) {
        +            throw new Error("batchIntervalMillis must be Number");
        +        }
        +
        +        if (priority !== null && !(typeof priority === "number")) {
        +            throw new Error("priority must be Number");
        +        }
        +
        +        this.#__identifier = identifier;
        +        this.#__kinesisStreamName = kinesisStreamName;
        +        this.#__batchSize = batchSize;
        +        this.#__batchIntervalMillis = batchIntervalMillis;
        +        this.#__priority = priority;
        +    }
        +
        +    /**
        +     * A unique identifier to identify this individual upload stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     * @returns {String}
        +
        +     */
        +    get identifier() {
        +        return this.#__identifier;
        +    }
        +    /**
        +     * @param value {String} A unique identifier to identify this individual upload stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     */
        +    set identifier(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("identifier must be String");
        +        }
        +
        +        this.#__identifier = value;
        +    }
        +    /**
        +     * @param value {String} A unique identifier to identify this individual upload stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.KinesisConfig}
        +     */
        +    withIdentifier(value) {
        +        this.identifier = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The name of the Kinesis data stream that this exporter should upload to
        +     * @returns {String}
        +     
        +     */
        +    get kinesisStreamName() {
        +        return this.#__kinesisStreamName;
        +    }
        +    /**
        +     * @param value {String} The name of the Kinesis data stream that this exporter should upload to
        +     */
        +    set kinesisStreamName(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("kinesisStreamName must be String");
        +        }
        +
        +        this.#__kinesisStreamName = value;
        +    }
        +    /**
        +     * @param value {String} The name of the Kinesis data stream that this exporter should upload to
        +     * @returns {aws-greengrass-core-sdk.StreamManager.KinesisConfig}
        +     */
        +    withKinesisStreamName(value) {
        +        this.kinesisStreamName = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The maximum size of a batch to send to Kinesis. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The batch size must be between 1 and 500.
        +     * @returns {Number}
        +
        +     */
        +    get batchSize() {
        +        return this.#__batchSize;
        +    }
        +    /**
        +     * @param value {Number} The maximum size of a batch to send to Kinesis. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The batch size must be between 1 and 500.
        +     */
        +    set batchSize(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("batchSize must be Number");
        +        }
        +
        +        this.#__batchSize = value;
        +    }
        +    /**
        +     * @param value {Number} The maximum size of a batch to send to Kinesis. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 1.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The batch size must be between 1 and 500.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.KinesisConfig}
        +     */
        +    withBatchSize(value) {
        +        this.batchSize = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     * @returns {Number}
        +
        +     */
        +    get batchIntervalMillis() {
        +        return this.#__batchIntervalMillis;
        +    }
        +    /**
        +     * @param value {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     */
        +    set batchIntervalMillis(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("batchIntervalMillis must be Number");
        +        }
        +
        +        this.#__batchIntervalMillis = value;
        +    }
        +    /**
        +     * @param value {Number} The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately.
        +       If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.KinesisConfig}
        +     */
        +    withBatchIntervalMillis(value) {
        +        this.batchIntervalMillis = value;
        +        return this;
        +    }
        +
        +    /**
        +     * Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
        +     * @returns {Number}
        +     
        +     */
        +    get priority() {
        +        return this.#__priority;
        +    }
        +    /**
        +     * @param value {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
        +     */
        +    set priority(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("priority must be Number");
        +        }
        +
        +        this.#__priority = value;
        +    }
        +    /**
        +     * @param value {Number} Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.KinesisConfig}
        +     */
        +    withPriority(value) {
        +        this.priority = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new KinesisConfig();
        +        if ("identifier" in d) {
        +            ret.identifier = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["identifier"]) : d["identifier"];
        +        }
        +        if ("kinesisStreamName" in d) {
        +            ret.kinesisStreamName = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["kinesisStreamName"]) : d["kinesisStreamName"];
        +        }
        +        if ("batchSize" in d) {
        +            ret.batchSize = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["batchSize"]) : d["batchSize"];
        +        }
        +        if ("batchIntervalMillis" in d) {
        +            ret.batchIntervalMillis = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["batchIntervalMillis"]) : d["batchIntervalMillis"];
        +        }
        +        if ("priority" in d) {
        +            ret.priority = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["priority"]) : d["priority"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.identifier !== null) {
        +            d["identifier"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.identifier), "asMap") ? this.identifier.asMap() : this.identifier;
        +        }
        +        if (this.kinesisStreamName !== null) {
        +            d["kinesisStreamName"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.kinesisStreamName), "asMap") ? this.kinesisStreamName.asMap() : this.kinesisStreamName;
        +        }
        +        if (this.batchSize !== null) {
        +            d["batchSize"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.batchSize), "asMap") ? this.batchSize.asMap() : this.batchSize;
        +        }
        +        if (this.batchIntervalMillis !== null) {
        +            d["batchIntervalMillis"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.batchIntervalMillis), "asMap") ? this.batchIntervalMillis.asMap() : this.batchIntervalMillis;
        +        }
        +        if (this.priority !== null) {
        +            d["priority"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.priority), "asMap") ? this.priority.asMap() : this.priority;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(KinesisConfig, "typesMap", {
        +    value: {
        +        identifier: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        kinesisStreamName: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        batchSize: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        batchIntervalMillis: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        priority: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(KinesisConfig, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(KinesisConfig, "validationsMap", {
        +    value: {
        +        'identifier': {
        +            'required': true,
        +            'minLength': 1,
        +            'maxLength': 255,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'kinesisStreamName': {
        +            'required': true,
        +            'minLength': 1,
        +        },
        +        'batchSize': {
        +            'required': false,
        +            'maximum': 500,
        +            'minimum': 1,
        +        },
        +        'batchIntervalMillis': {
        +            'required': false,
        +            'maximum': 9223372036854,
        +            'minimum': 60000,
        +        },
        +        'priority': {
        +            'required': false,
        +            'maximum': 10,
        +            'minimum': 1,
        +        },
        +    }
        +});
        +
        +/**
        + * Defines how and where the stream is uploaded
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class ExportDefinition {
        +    #__http = null;
        +    #__iotAnalytics = null;
        +    #__kinesis = null;
        +
        +    /**
        +     * @param http {aws-greengrass-core-sdk.StreamManager.HTTPConfig[]} Defines how the stream is uploaded to an HTTP endpoint
        +     * @param iotAnalytics {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig[]} Defines how the stream is uploaded to IoT Analytics
        +     * @param kinesis {aws-greengrass-core-sdk.StreamManager.KinesisConfig[]} Defines how the stream is uploaded to Kinesis
        +     */
        +    constructor(
        +        http = null,
        +        iotAnalytics = null,
        +        kinesis = null,
        +    ) {
        +        if (http !== null && !(http instanceof Array)) {
        +            throw new Error("http must be Array");
        +        }
        +        if (http !== null && !http.every((v) => v instanceof HTTPConfig)) {
        +            throw new Error("http array values must be HTTPConfig");
        +        }
        +
        +        if (iotAnalytics !== null && !(iotAnalytics instanceof Array)) {
        +            throw new Error("iotAnalytics must be Array");
        +        }
        +        if (iotAnalytics !== null && !iotAnalytics.every((v) => v instanceof IoTAnalyticsConfig)) {
        +            throw new Error("iotAnalytics array values must be IoTAnalyticsConfig");
        +        }
        +
        +        if (kinesis !== null && !(kinesis instanceof Array)) {
        +            throw new Error("kinesis must be Array");
        +        }
        +        if (kinesis !== null && !kinesis.every((v) => v instanceof KinesisConfig)) {
        +            throw new Error("kinesis array values must be KinesisConfig");
        +        }
        +
        +        this.#__http = http;
        +        this.#__iotAnalytics = iotAnalytics;
        +        this.#__kinesis = kinesis;
        +    }
        +
        +    /**
        +     * Defines how the stream is uploaded to an HTTP endpoint
        +     * @returns {aws-greengrass-core-sdk.StreamManager.HTTPConfig[]}
        +     
        +     */
        +    get http() {
        +        return this.#__http;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.HTTPConfig[]} Defines how the stream is uploaded to an HTTP endpoint
        +     */
        +    set http(value) {
        +        if (value !== null && !(value instanceof Array)) {
        +            throw new Error("http must be Array");
        +        }
        +        if (value !== null && !value.every((v) => v instanceof HTTPConfig)) {
        +            throw new Error("http array values must be HTTPConfig");
        +        }
        +
        +        this.#__http = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.HTTPConfig[]} Defines how the stream is uploaded to an HTTP endpoint
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ExportDefinition}
        +     */
        +    withHttp(value) {
        +        this.http = value;
        +        return this;
        +    }
        +
        +    /**
        +     * Defines how the stream is uploaded to IoT Analytics
        +     * @returns {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig[]}
        +     
        +     */
        +    get iotAnalytics() {
        +        return this.#__iotAnalytics;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig[]} Defines how the stream is uploaded to IoT Analytics
        +     */
        +    set iotAnalytics(value) {
        +        if (value !== null && !(value instanceof Array)) {
        +            throw new Error("iotAnalytics must be Array");
        +        }
        +        if (value !== null && !value.every((v) => v instanceof IoTAnalyticsConfig)) {
        +            throw new Error("iotAnalytics array values must be IoTAnalyticsConfig");
        +        }
        +
        +        this.#__iotAnalytics = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.IoTAnalyticsConfig[]} Defines how the stream is uploaded to IoT Analytics
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ExportDefinition}
        +     */
        +    withIotAnalytics(value) {
        +        this.iotAnalytics = value;
        +        return this;
        +    }
        +
        +    /**
        +     * Defines how the stream is uploaded to Kinesis
        +     * @returns {aws-greengrass-core-sdk.StreamManager.KinesisConfig[]}
        +     
        +     */
        +    get kinesis() {
        +        return this.#__kinesis;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.KinesisConfig[]} Defines how the stream is uploaded to Kinesis
        +     */
        +    set kinesis(value) {
        +        if (value !== null && !(value instanceof Array)) {
        +            throw new Error("kinesis must be Array");
        +        }
        +        if (value !== null && !value.every((v) => v instanceof KinesisConfig)) {
        +            throw new Error("kinesis array values must be KinesisConfig");
        +        }
        +
        +        this.#__kinesis = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.KinesisConfig[]} Defines how the stream is uploaded to Kinesis
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ExportDefinition}
        +     */
        +    withKinesis(value) {
        +        this.kinesis = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new ExportDefinition();
        +        if ("http" in d) {
        +            ret.http = d["http"].reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(HTTPConfig, "fromMap") ? HTTPConfig.fromMap(v) : v);
        +                return acc;
        +            }, []);
        +        }
        +        if ("iotAnalytics" in d) {
        +            ret.iotAnalytics = d["iotAnalytics"].reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(IoTAnalyticsConfig, "fromMap") ? IoTAnalyticsConfig.fromMap(v) : v);
        +                return acc;
        +            }, []);
        +        }
        +        if ("kinesis" in d) {
        +            ret.kinesis = d["kinesis"].reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(KinesisConfig, "fromMap") ? KinesisConfig.fromMap(v) : v);
        +                return acc;
        +            }, []);
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.http !== null) {
        +            d["http"] = this.http.reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v);
        +                return acc;
        +            }, []);
        +        }
        +        if (this.iotAnalytics !== null) {
        +            d["iotAnalytics"] = this.iotAnalytics.reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v);
        +                return acc;
        +            }, []);
        +        }
        +        if (this.kinesis !== null) {
        +            d["kinesis"] = this.kinesis.reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v);
        +                return acc;
        +            }, []);
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(ExportDefinition, "typesMap", {
        +    value: {
        +        http: {
        +            'type': Array,
        +            'subtype': HTTPConfig
        +        },
        +        iotAnalytics: {
        +            'type': Array,
        +            'subtype': IoTAnalyticsConfig
        +        },
        +        kinesis: {
        +            'type': Array,
        +            'subtype': KinesisConfig
        +        },
        +    }
        +});
        +Object.defineProperty(ExportDefinition, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(ExportDefinition, "validationsMap", {
        +    value: {
        +        'http': {
        +            'required': false,
        +        },
        +        'iotAnalytics': {
        +            'required': false,
        +        },
        +        'kinesis': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +/**
        + * Object defining a message stream used in the CreateMessageStream API.
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class MessageStreamDefinition {
        +    #__name = null;
        +    #__maxSize = null;
        +    #__streamSegmentSize = null;
        +    #__timeToLiveMillis = null;
        +    #__strategyOnFull = null;
        +    #__persistence = null;
        +    #__flushOnWrite = null;
        +    #__exportDefinition = null;
        +
        +    /**
        +     * @param name {String} The unique name of the stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     * @param maxSize {Number} The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB.
        +     * @param streamSegmentSize {Number} The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB.
        +       Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted.
        +     * @param timeToLiveMillis {Number} Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     * @param strategyOnFull {aws-greengrass-core-sdk.StreamManager.StrategyOnFull} What to do when the maximum size of the stream is reached.
        +       RejectNewData: any append message request after the stream is full will be rejected with an exception.
        +       OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message.
        +     * @param persistence {aws-greengrass-core-sdk.StreamManager.Persistence} Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts.
        +       Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk.
        +     * @param flushOnWrite {Boolean} This only applies when Persistence is set to File mode.
        +       Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false.
        +     * @param exportDefinition {aws-greengrass-core-sdk.StreamManager.ExportDefinition} Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail.
        +     */
        +    constructor(
        +        name = null,
        +        maxSize = 268435456,
        +        streamSegmentSize = 16777216,
        +        timeToLiveMillis = null,
        +        strategyOnFull = null,
        +        persistence = null,
        +        flushOnWrite = null,
        +        exportDefinition = null,
        +    ) {
        +        if (name !== null && !(typeof name === "string")) {
        +            throw new Error("name must be String");
        +        }
        +
        +        if (maxSize !== null && !(typeof maxSize === "number")) {
        +            throw new Error("maxSize must be Number");
        +        }
        +
        +        if (streamSegmentSize !== null && !(typeof streamSegmentSize === "number")) {
        +            throw new Error("streamSegmentSize must be Number");
        +        }
        +
        +        if (timeToLiveMillis !== null && !(typeof timeToLiveMillis === "number")) {
        +            throw new Error("timeToLiveMillis must be Number");
        +        }
        +
        +        if (strategyOnFull !== null && !(strategyOnFull instanceof StrategyOnFull)) {
        +            throw new Error("strategyOnFull must be StrategyOnFull");
        +        }
        +
        +        if (persistence !== null && !(persistence instanceof Persistence)) {
        +            throw new Error("persistence must be Persistence");
        +        }
        +
        +        if (flushOnWrite !== null && !(typeof flushOnWrite === "boolean")) {
        +            throw new Error("flushOnWrite must be Boolean");
        +        }
        +
        +        if (exportDefinition !== null && !(exportDefinition instanceof ExportDefinition)) {
        +            throw new Error("exportDefinition must be ExportDefinition");
        +        }
        +
        +        this.#__name = name;
        +        this.#__maxSize = maxSize;
        +        this.#__streamSegmentSize = streamSegmentSize;
        +        this.#__timeToLiveMillis = timeToLiveMillis;
        +        this.#__strategyOnFull = strategyOnFull;
        +        this.#__persistence = persistence;
        +        this.#__flushOnWrite = flushOnWrite;
        +        this.#__exportDefinition = exportDefinition;
        +    }
        +
        +    /**
        +     * The unique name of the stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     * @returns {String}
        +
        +     */
        +    get name() {
        +        return this.#__name;
        +    }
        +    /**
        +     * @param value {String} The unique name of the stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     */
        +    set name(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("name must be String");
        +        }
        +
        +        this.#__name = value;
        +    }
        +    /**
        +     * @param value {String} The unique name of the stream.
        +       Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}
        +     */
        +    withName(value) {
        +        this.name = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB.
        +     * @returns {Number}
        +     
        +     */
        +    get maxSize() {
        +        return this.#__maxSize;
        +    }
        +    /**
        +     * @param value {Number} The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB.
        +     */
        +    set maxSize(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("maxSize must be Number");
        +        }
        +
        +        this.#__maxSize = value;
        +    }
        +    /**
        +     * @param value {Number} The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}
        +     */
        +    withMaxSize(value) {
        +        this.maxSize = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB.
        +       Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted.
        +     * @returns {Number}
        +
        +     */
        +    get streamSegmentSize() {
        +        return this.#__streamSegmentSize;
        +    }
        +    /**
        +     * @param value {Number} The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB.
        +       Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted.
        +     */
        +    set streamSegmentSize(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("streamSegmentSize must be Number");
        +        }
        +
        +        this.#__streamSegmentSize = value;
        +    }
        +    /**
        +     * @param value {Number} The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB.
        +       Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}
        +     */
        +    withStreamSegmentSize(value) {
        +        this.streamSegmentSize = value;
        +        return this;
        +    }
        +
        +    /**
        +     * Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     * @returns {Number}
        +
        +     */
        +    get timeToLiveMillis() {
        +        return this.#__timeToLiveMillis;
        +    }
        +    /**
        +     * @param value {Number} Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     */
        +    set timeToLiveMillis(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("timeToLiveMillis must be Number");
        +        }
        +
        +        this.#__timeToLiveMillis = value;
        +    }
        +    /**
        +     * @param value {Number} Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires.
        +       The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}
        +     */
        +    withTimeToLiveMillis(value) {
        +        this.timeToLiveMillis = value;
        +        return this;
        +    }
        +
        +    /**
        +     * What to do when the maximum size of the stream is reached.
        +       RejectNewData: any append message request after the stream is full will be rejected with an exception.
        +       OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.StrategyOnFull}
        +
        +     */
        +    get strategyOnFull() {
        +        return this.#__strategyOnFull;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.StrategyOnFull} What to do when the maximum size of the stream is reached.
        +       RejectNewData: any append message request after the stream is full will be rejected with an exception.
        +       OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message.
        +     */
        +    set strategyOnFull(value) {
        +        if (value !== null && !(value instanceof StrategyOnFull)) {
        +            throw new Error("strategyOnFull must be StrategyOnFull");
        +        }
        +
        +        this.#__strategyOnFull = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.StrategyOnFull} What to do when the maximum size of the stream is reached.
        +       RejectNewData: any append message request after the stream is full will be rejected with an exception.
        +       OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}
        +     */
        +    withStrategyOnFull(value) {
        +        this.strategyOnFull = value;
        +        return this;
        +    }
        +
        +    /**
        +     * Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts.
        +       Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.Persistence}
        +
        +     */
        +    get persistence() {
        +        return this.#__persistence;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.Persistence} Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts.
        +       Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk.
        +     */
        +    set persistence(value) {
        +        if (value !== null && !(value instanceof Persistence)) {
        +            throw new Error("persistence must be Persistence");
        +        }
        +
        +        this.#__persistence = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.Persistence} Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts.
        +       Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}
        +     */
        +    withPersistence(value) {
        +        this.persistence = value;
        +        return this;
        +    }
        +
        +    /**
        +     * This only applies when Persistence is set to File mode.
        +       Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false.
        +     * @returns {Boolean}
        +
        +     */
        +    get flushOnWrite() {
        +        return this.#__flushOnWrite;
        +    }
        +    /**
        +     * @param value {Boolean} This only applies when Persistence is set to File mode.
        +       Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false.
        +     */
        +    set flushOnWrite(value) {
        +        if (value !== null && !(typeof value === "boolean")) {
        +            throw new Error("flushOnWrite must be Boolean");
        +        }
        +
        +        this.#__flushOnWrite = value;
        +    }
        +    /**
        +     * @param value {Boolean} This only applies when Persistence is set to File mode.
        +       Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}
        +     */
        +    withFlushOnWrite(value) {
        +        this.flushOnWrite = value;
        +        return this;
        +    }
        +
        +    /**
        +     * Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ExportDefinition}
        +     
        +     */
        +    get exportDefinition() {
        +        return this.#__exportDefinition;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ExportDefinition} Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail.
        +     */
        +    set exportDefinition(value) {
        +        if (value !== null && !(value instanceof ExportDefinition)) {
        +            throw new Error("exportDefinition must be ExportDefinition");
        +        }
        +
        +        this.#__exportDefinition = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ExportDefinition} Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}
        +     */
        +    withExportDefinition(value) {
        +        this.exportDefinition = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new MessageStreamDefinition();
        +        if ("name" in d) {
        +            ret.name = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["name"]) : d["name"];
        +        }
        +        if ("maxSize" in d) {
        +            ret.maxSize = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["maxSize"]) : d["maxSize"];
        +        }
        +        if ("streamSegmentSize" in d) {
        +            ret.streamSegmentSize = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["streamSegmentSize"]) : d["streamSegmentSize"];
        +        }
        +        if ("timeToLiveMillis" in d) {
        +            ret.timeToLiveMillis = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["timeToLiveMillis"]) : d["timeToLiveMillis"];
        +        }
        +        if ("strategyOnFull" in d) {
        +            ret.strategyOnFull = Object.prototype.hasOwnProperty.call(StrategyOnFull, "fromMap") ? StrategyOnFull.fromMap(d["strategyOnFull"]) : d["strategyOnFull"];
        +        }
        +        if ("persistence" in d) {
        +            ret.persistence = Object.prototype.hasOwnProperty.call(Persistence, "fromMap") ? Persistence.fromMap(d["persistence"]) : d["persistence"];
        +        }
        +        if ("flushOnWrite" in d) {
        +            ret.flushOnWrite = Object.prototype.hasOwnProperty.call(Boolean, "fromMap") ? Boolean.fromMap(d["flushOnWrite"]) : d["flushOnWrite"];
        +        }
        +        if ("exportDefinition" in d) {
        +            ret.exportDefinition = Object.prototype.hasOwnProperty.call(ExportDefinition, "fromMap") ? ExportDefinition.fromMap(d["exportDefinition"]) : d["exportDefinition"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.name !== null) {
        +            d["name"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.name), "asMap") ? this.name.asMap() : this.name;
        +        }
        +        if (this.maxSize !== null) {
        +            d["maxSize"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.maxSize), "asMap") ? this.maxSize.asMap() : this.maxSize;
        +        }
        +        if (this.streamSegmentSize !== null) {
        +            d["streamSegmentSize"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.streamSegmentSize), "asMap") ? this.streamSegmentSize.asMap() : this.streamSegmentSize;
        +        }
        +        if (this.timeToLiveMillis !== null) {
        +            d["timeToLiveMillis"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.timeToLiveMillis), "asMap") ? this.timeToLiveMillis.asMap() : this.timeToLiveMillis;
        +        }
        +        if (this.strategyOnFull !== null) {
        +            d["strategyOnFull"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.strategyOnFull), "asMap") ? this.strategyOnFull.asMap() : this.strategyOnFull;
        +        }
        +        if (this.persistence !== null) {
        +            d["persistence"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.persistence), "asMap") ? this.persistence.asMap() : this.persistence;
        +        }
        +        if (this.flushOnWrite !== null) {
        +            d["flushOnWrite"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.flushOnWrite), "asMap") ? this.flushOnWrite.asMap() : this.flushOnWrite;
        +        }
        +        if (this.exportDefinition !== null) {
        +            d["exportDefinition"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.exportDefinition), "asMap") ? this.exportDefinition.asMap() : this.exportDefinition;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(MessageStreamDefinition, "typesMap", {
        +    value: {
        +        name: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        maxSize: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        streamSegmentSize: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        timeToLiveMillis: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        strategyOnFull: {
        +            'type': StrategyOnFull,
        +            'subtype': null
        +        },
        +        persistence: {
        +            'type': Persistence,
        +            'subtype': null
        +        },
        +        flushOnWrite: {
        +            'type': Boolean,
        +            'subtype': null
        +        },
        +        exportDefinition: {
        +            'type': ExportDefinition,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(MessageStreamDefinition, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(MessageStreamDefinition, "validationsMap", {
        +    value: {
        +        'name': {
        +            'required': true,
        +            'minLength': 1,
        +            'maxLength': 255,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'maxSize': {
        +            'required': false,
        +            'maximum': 9223372036854775807,
        +            'minimum': 1024,
        +        },
        +        'streamSegmentSize': {
        +            'required': false,
        +            'maximum': 2147483647,
        +            'minimum': 1024,
        +        },
        +        'timeToLiveMillis': {
        +            'required': false,
        +            'maximum': 9223372036854,
        +            'minimum': 60000,
        +        },
        +        'strategyOnFull': {
        +            'required': true,
        +        },
        +        'persistence': {
        +            'required': false,
        +        },
        +        'flushOnWrite': {
        +            'required': false,
        +        },
        +        'exportDefinition': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +/**
        + * Message stream information including its definition, storage status and export status
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class MessageStreamInfo {
        +    #__definition = null;
        +    #__storageStatus = null;
        +    #__exportStatuses = null;
        +
        +    /**
        +     * @param definition {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} 
        +     * @param storageStatus {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus} Stream status including oldest/newest sequence number and total bytes
        +     * @param exportStatuses {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses[]} 
        +     */
        +    constructor(
        +        definition = null,
        +        storageStatus = null,
        +        exportStatuses = null,
        +    ) {
        +        if (definition !== null && !(definition instanceof MessageStreamDefinition)) {
        +            throw new Error("definition must be MessageStreamDefinition");
        +        }
        +
        +        if (storageStatus !== null && !(storageStatus instanceof MessageStreamInfo._storageStatus)) {
        +            throw new Error("storageStatus must be MessageStreamInfo._storageStatus");
        +        }
        +
        +        if (exportStatuses !== null && !(exportStatuses instanceof Array)) {
        +            throw new Error("exportStatuses must be Array");
        +        }
        +        if (exportStatuses !== null && !exportStatuses.every((v) => v instanceof MessageStreamInfo._exportStatuses)) {
        +            throw new Error("exportStatuses array values must be MessageStreamInfo._exportStatuses");
        +        }
        +
        +        this.#__definition = definition;
        +        this.#__storageStatus = storageStatus;
        +        this.#__exportStatuses = exportStatuses;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}
        +     
        +     */
        +    get definition() {
        +        return this.#__definition;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} 
        +     */
        +    set definition(value) {
        +        if (value !== null && !(value instanceof MessageStreamDefinition)) {
        +            throw new Error("definition must be MessageStreamDefinition");
        +        }
        +
        +        this.#__definition = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo}
        +     */
        +    withDefinition(value) {
        +        this.definition = value;
        +        return this;
        +    }
        +
        +    /**
        +     * Stream status including oldest/newest sequence number and total bytes
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus}
        +     
        +     */
        +    get storageStatus() {
        +        return this.#__storageStatus;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus} Stream status including oldest/newest sequence number and total bytes
        +     */
        +    set storageStatus(value) {
        +        if (value !== null && !(value instanceof MessageStreamInfo._storageStatus)) {
        +            throw new Error("storageStatus must be MessageStreamInfo._storageStatus");
        +        }
        +
        +        this.#__storageStatus = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus} Stream status including oldest/newest sequence number and total bytes
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo}
        +     */
        +    withStorageStatus(value) {
        +        this.storageStatus = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses[]}
        +     
        +     */
        +    get exportStatuses() {
        +        return this.#__exportStatuses;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses[]} 
        +     */
        +    set exportStatuses(value) {
        +        if (value !== null && !(value instanceof Array)) {
        +            throw new Error("exportStatuses must be Array");
        +        }
        +        if (value !== null && !value.every((v) => v instanceof MessageStreamInfo._exportStatuses)) {
        +            throw new Error("exportStatuses array values must be MessageStreamInfo._exportStatuses");
        +        }
        +
        +        this.#__exportStatuses = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses[]} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo}
        +     */
        +    withExportStatuses(value) {
        +        this.exportStatuses = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new MessageStreamInfo();
        +        if ("definition" in d) {
        +            ret.definition = Object.prototype.hasOwnProperty.call(MessageStreamDefinition, "fromMap") ? MessageStreamDefinition.fromMap(d["definition"]) : d["definition"];
        +        }
        +        if ("storageStatus" in d) {
        +            ret.storageStatus = Object.prototype.hasOwnProperty.call(MessageStreamInfo._storageStatus, "fromMap") ? MessageStreamInfo._storageStatus.fromMap(d["storageStatus"]) : d["storageStatus"];
        +        }
        +        if ("exportStatuses" in d) {
        +            ret.exportStatuses = d["exportStatuses"].reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(MessageStreamInfo._exportStatuses, "fromMap") ? MessageStreamInfo._exportStatuses.fromMap(v) : v);
        +                return acc;
        +            }, []);
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.definition !== null) {
        +            d["definition"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.definition), "asMap") ? this.definition.asMap() : this.definition;
        +        }
        +        if (this.storageStatus !== null) {
        +            d["storageStatus"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.storageStatus), "asMap") ? this.storageStatus.asMap() : this.storageStatus;
        +        }
        +        if (this.exportStatuses !== null) {
        +            d["exportStatuses"] = this.exportStatuses.reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v);
        +                return acc;
        +            }, []);
        +        }
        +        return d;
        +    }
        +};
        +
        +MessageStreamInfo._storageStatus =
        +    /**
        +     * Stream status including oldest/newest sequence number and total bytes
        +     *
        +     * @class
        +     * @memberOf aws-greengrass-core-sdk.StreamManager
        +     */
        +    class _storageStatus {
        +        #__oldestSequenceNumber = null;
        +        #__newestSequenceNumber = null;
        +        #__totalBytes = null;
        +
        +        /**
        +         * @param oldestSequenceNumber {Number} The sequence number of the first message which is still accessible in the stream.
        +         * @param newestSequenceNumber {Number} The sequence number of the last appended message.
        +         * @param totalBytes {Number} The current total size of the stream in bytes.
        +         */
        +        constructor(
        +            oldestSequenceNumber = null,
        +            newestSequenceNumber = null,
        +            totalBytes = null,
        +        ) {
        +            if (oldestSequenceNumber !== null && !(typeof oldestSequenceNumber === "number")) {
        +                throw new Error("oldestSequenceNumber must be Number");
        +            }
        +
        +            if (newestSequenceNumber !== null && !(typeof newestSequenceNumber === "number")) {
        +                throw new Error("newestSequenceNumber must be Number");
        +            }
        +
        +            if (totalBytes !== null && !(typeof totalBytes === "number")) {
        +                throw new Error("totalBytes must be Number");
        +            }
        +
        +            this.#__oldestSequenceNumber = oldestSequenceNumber;
        +            this.#__newestSequenceNumber = newestSequenceNumber;
        +            this.#__totalBytes = totalBytes;
        +        }
        +
        +        /**
        +         * The sequence number of the first message which is still accessible in the stream.
        +         * @returns {Number}
        +         
        +         */
        +        get oldestSequenceNumber() {
        +            return this.#__oldestSequenceNumber;
        +        }
        +        /**
        +         * @param value {Number} The sequence number of the first message which is still accessible in the stream.
        +         */
        +        set oldestSequenceNumber(value) {
        +            if (value !== null && !(typeof value === "number")) {
        +                throw new Error("oldestSequenceNumber must be Number");
        +            }
        +
        +            this.#__oldestSequenceNumber = value;
        +        }
        +        /**
        +         * @param value {Number} The sequence number of the first message which is still accessible in the stream.
        +         * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus}
        +         */
        +        withOldestSequenceNumber(value) {
        +            this.oldestSequenceNumber = value;
        +            return this;
        +        }
        +
        +        /**
        +         * The sequence number of the last appended message.
        +         * @returns {Number}
        +         
        +         */
        +        get newestSequenceNumber() {
        +            return this.#__newestSequenceNumber;
        +        }
        +        /**
        +         * @param value {Number} The sequence number of the last appended message.
        +         */
        +        set newestSequenceNumber(value) {
        +            if (value !== null && !(typeof value === "number")) {
        +                throw new Error("newestSequenceNumber must be Number");
        +            }
        +
        +            this.#__newestSequenceNumber = value;
        +        }
        +        /**
        +         * @param value {Number} The sequence number of the last appended message.
        +         * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus}
        +         */
        +        withNewestSequenceNumber(value) {
        +            this.newestSequenceNumber = value;
        +            return this;
        +        }
        +
        +        /**
        +         * The current total size of the stream in bytes.
        +         * @returns {Number}
        +         
        +         */
        +        get totalBytes() {
        +            return this.#__totalBytes;
        +        }
        +        /**
        +         * @param value {Number} The current total size of the stream in bytes.
        +         */
        +        set totalBytes(value) {
        +            if (value !== null && !(typeof value === "number")) {
        +                throw new Error("totalBytes must be Number");
        +            }
        +
        +            this.#__totalBytes = value;
        +        }
        +        /**
        +         * @param value {Number} The current total size of the stream in bytes.
        +         * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._storageStatus}
        +         */
        +        withTotalBytes(value) {
        +            this.totalBytes = value;
        +            return this;
        +        }
        +
        +        static fromMap(d) {
        +            const ret = new MessageStreamInfo._storageStatus();
        +            if ("oldestSequenceNumber" in d) {
        +                ret.oldestSequenceNumber = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["oldestSequenceNumber"]) : d["oldestSequenceNumber"];
        +            }
        +            if ("newestSequenceNumber" in d) {
        +                ret.newestSequenceNumber = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["newestSequenceNumber"]) : d["newestSequenceNumber"];
        +            }
        +            if ("totalBytes" in d) {
        +                ret.totalBytes = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["totalBytes"]) : d["totalBytes"];
        +            }
        +            return ret;
        +        }
        +
        +        asMap() {
        +            const d = {};
        +            if (this.oldestSequenceNumber !== null) {
        +                d["oldestSequenceNumber"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.oldestSequenceNumber), "asMap") ? this.oldestSequenceNumber.asMap() : this.oldestSequenceNumber;
        +            }
        +            if (this.newestSequenceNumber !== null) {
        +                d["newestSequenceNumber"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.newestSequenceNumber), "asMap") ? this.newestSequenceNumber.asMap() : this.newestSequenceNumber;
        +            }
        +            if (this.totalBytes !== null) {
        +                d["totalBytes"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.totalBytes), "asMap") ? this.totalBytes.asMap() : this.totalBytes;
        +            }
        +            return d;
        +        }
        +    };
        +
        +Object.defineProperty(MessageStreamInfo._storageStatus, "typesMap", {
        +    value: {
        +        oldestSequenceNumber: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        newestSequenceNumber: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        totalBytes: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(MessageStreamInfo._storageStatus, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(MessageStreamInfo._storageStatus, "validationsMap", {
        +    value: {
        +        'oldestSequenceNumber': {
        +            'required': false,
        +        },
        +        'newestSequenceNumber': {
        +            'required': false,
        +        },
        +        'totalBytes': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +MessageStreamInfo._exportStatuses =
        +    /**
        +     * Export status including the export identifier and the last exported sequence number for that export task
        +     *
        +     * @class
        +     * @memberOf aws-greengrass-core-sdk.StreamManager
        +     */
        +    class _exportStatuses {
        +        #__exportConfigIdentifier = null;
        +        #__lastExportedSequenceNumber = null;
        +        #__lastExportTime = null;
        +        #__errorMessage = null;
        +
        +        /**
        +         * @param exportConfigIdentifier {String} The unique export identifier.
        +         * @param lastExportedSequenceNumber {Number} The sequence number of the last message which was successfully exported.
        +         * @param lastExportTime {Number} The last time an export was attempted. Data is Unix epoch time in milliseconds.
        +         * @param errorMessage {String} Error message from the last export attempt if it failed.
        +         */
        +        constructor(
        +            exportConfigIdentifier = null,
        +            lastExportedSequenceNumber = null,
        +            lastExportTime = null,
        +            errorMessage = null,
        +        ) {
        +            if (exportConfigIdentifier !== null && !(typeof exportConfigIdentifier === "string")) {
        +                throw new Error("exportConfigIdentifier must be String");
        +            }
        +
        +            if (lastExportedSequenceNumber !== null && !(typeof lastExportedSequenceNumber === "number")) {
        +                throw new Error("lastExportedSequenceNumber must be Number");
        +            }
        +
        +            if (lastExportTime !== null && !(typeof lastExportTime === "number")) {
        +                throw new Error("lastExportTime must be Number");
        +            }
        +
        +            if (errorMessage !== null && !(typeof errorMessage === "string")) {
        +                throw new Error("errorMessage must be String");
        +            }
        +
        +            this.#__exportConfigIdentifier = exportConfigIdentifier;
        +            this.#__lastExportedSequenceNumber = lastExportedSequenceNumber;
        +            this.#__lastExportTime = lastExportTime;
        +            this.#__errorMessage = errorMessage;
        +        }
        +
        +        /**
        +         * The unique export identifier.
        +         * @returns {String}
        +         
        +         */
        +        get exportConfigIdentifier() {
        +            return this.#__exportConfigIdentifier;
        +        }
        +        /**
        +         * @param value {String} The unique export identifier.
        +         */
        +        set exportConfigIdentifier(value) {
        +            if (value !== null && !(typeof value === "string")) {
        +                throw new Error("exportConfigIdentifier must be String");
        +            }
        +
        +            this.#__exportConfigIdentifier = value;
        +        }
        +        /**
        +         * @param value {String} The unique export identifier.
        +         * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses}
        +         */
        +        withExportConfigIdentifier(value) {
        +            this.exportConfigIdentifier = value;
        +            return this;
        +        }
        +
        +        /**
        +         * The sequence number of the last message which was successfully exported.
        +         * @returns {Number}
        +         
        +         */
        +        get lastExportedSequenceNumber() {
        +            return this.#__lastExportedSequenceNumber;
        +        }
        +        /**
        +         * @param value {Number} The sequence number of the last message which was successfully exported.
        +         */
        +        set lastExportedSequenceNumber(value) {
        +            if (value !== null && !(typeof value === "number")) {
        +                throw new Error("lastExportedSequenceNumber must be Number");
        +            }
        +
        +            this.#__lastExportedSequenceNumber = value;
        +        }
        +        /**
        +         * @param value {Number} The sequence number of the last message which was successfully exported.
        +         * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses}
        +         */
        +        withLastExportedSequenceNumber(value) {
        +            this.lastExportedSequenceNumber = value;
        +            return this;
        +        }
        +
        +        /**
        +         * The last time an export was attempted. Data is Unix epoch time in milliseconds.
        +         * @returns {Number}
        +         
        +         */
        +        get lastExportTime() {
        +            return this.#__lastExportTime;
        +        }
        +        /**
        +         * @param value {Number} The last time an export was attempted. Data is Unix epoch time in milliseconds.
        +         */
        +        set lastExportTime(value) {
        +            if (value !== null && !(typeof value === "number")) {
        +                throw new Error("lastExportTime must be Number");
        +            }
        +
        +            this.#__lastExportTime = value;
        +        }
        +        /**
        +         * @param value {Number} The last time an export was attempted. Data is Unix epoch time in milliseconds.
        +         * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses}
        +         */
        +        withLastExportTime(value) {
        +            this.lastExportTime = value;
        +            return this;
        +        }
        +
        +        /**
        +         * Error message from the last export attempt if it failed.
        +         * @returns {String}
        +         
        +         */
        +        get errorMessage() {
        +            return this.#__errorMessage;
        +        }
        +        /**
        +         * @param value {String} Error message from the last export attempt if it failed.
        +         */
        +        set errorMessage(value) {
        +            if (value !== null && !(typeof value === "string")) {
        +                throw new Error("errorMessage must be String");
        +            }
        +
        +            this.#__errorMessage = value;
        +        }
        +        /**
        +         * @param value {String} Error message from the last export attempt if it failed.
        +         * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo~MessageStreamInfo._exportStatuses}
        +         */
        +        withErrorMessage(value) {
        +            this.errorMessage = value;
        +            return this;
        +        }
        +
        +        static fromMap(d) {
        +            const ret = new MessageStreamInfo._exportStatuses();
        +            if ("exportConfigIdentifier" in d) {
        +                ret.exportConfigIdentifier = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["exportConfigIdentifier"]) : d["exportConfigIdentifier"];
        +            }
        +            if ("lastExportedSequenceNumber" in d) {
        +                ret.lastExportedSequenceNumber = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["lastExportedSequenceNumber"]) : d["lastExportedSequenceNumber"];
        +            }
        +            if ("lastExportTime" in d) {
        +                ret.lastExportTime = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["lastExportTime"]) : d["lastExportTime"];
        +            }
        +            if ("errorMessage" in d) {
        +                ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"];
        +            }
        +            return ret;
        +        }
        +
        +        asMap() {
        +            const d = {};
        +            if (this.exportConfigIdentifier !== null) {
        +                d["exportConfigIdentifier"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.exportConfigIdentifier), "asMap") ? this.exportConfigIdentifier.asMap() : this.exportConfigIdentifier;
        +            }
        +            if (this.lastExportedSequenceNumber !== null) {
        +                d["lastExportedSequenceNumber"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.lastExportedSequenceNumber), "asMap") ? this.lastExportedSequenceNumber.asMap() : this.lastExportedSequenceNumber;
        +            }
        +            if (this.lastExportTime !== null) {
        +                d["lastExportTime"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.lastExportTime), "asMap") ? this.lastExportTime.asMap() : this.lastExportTime;
        +            }
        +            if (this.errorMessage !== null) {
        +                d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage;
        +            }
        +            return d;
        +        }
        +    };
        +
        +Object.defineProperty(MessageStreamInfo._exportStatuses, "typesMap", {
        +    value: {
        +        exportConfigIdentifier: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        lastExportedSequenceNumber: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        lastExportTime: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        errorMessage: {
        +            'type': String,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(MessageStreamInfo._exportStatuses, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(MessageStreamInfo._exportStatuses, "validationsMap", {
        +    value: {
        +        'exportConfigIdentifier': {
        +            'required': false,
        +        },
        +        'lastExportedSequenceNumber': {
        +            'required': true,
        +        },
        +        'lastExportTime': {
        +            'required': false,
        +        },
        +        'errorMessage': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +Object.defineProperty(MessageStreamInfo, "typesMap", {
        +    value: {
        +        definition: {
        +            'type': MessageStreamDefinition,
        +            'subtype': null
        +        },
        +        storageStatus: {
        +            'type': MessageStreamInfo._storageStatus,
        +            'subtype': null
        +        },
        +        exportStatuses: {
        +            'type': Array,
        +            'subtype': MessageStreamInfo._exportStatuses
        +        },
        +    }
        +});
        +Object.defineProperty(MessageStreamInfo, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(MessageStreamInfo, "validationsMap", {
        +    value: {
        +        'definition': {
        +            'required': true,
        +        },
        +        'storageStatus': {
        +            'required': true,
        +        },
        +        'exportStatuses': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +/**
        + * Message object containing metadata and the user's payload
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class Message {
        +    #__streamName = null;
        +    #__sequenceNumber = null;
        +    #__ingestTime = null;
        +    #__payload = null;
        +
        +    /**
        +     * @param streamName {String} The name of the stream which this message is in.
        +     * @param sequenceNumber {Number} The sequence number of this message within the stream.
        +     * @param ingestTime {Number} The time that the message was ingested to Stream Manager. Data is Unix epoch time in milliseconds.
        +     * @param payload {Buffer} The binary message data.
        +     */
        +    constructor(
        +        streamName = null,
        +        sequenceNumber = null,
        +        ingestTime = null,
        +        payload = null,
        +    ) {
        +        if (streamName !== null && !(typeof streamName === "string")) {
        +            throw new Error("streamName must be String");
        +        }
        +
        +        if (sequenceNumber !== null && !(typeof sequenceNumber === "number")) {
        +            throw new Error("sequenceNumber must be Number");
        +        }
        +
        +        if (ingestTime !== null && !(typeof ingestTime === "number")) {
        +            throw new Error("ingestTime must be Number");
        +        }
        +
        +        if (payload !== null && !(payload instanceof Buffer)) {
        +            throw new Error("payload must be Buffer");
        +        }
        +
        +        this.#__streamName = streamName;
        +        this.#__sequenceNumber = sequenceNumber;
        +        this.#__ingestTime = ingestTime;
        +        this.#__payload = payload;
        +    }
        +
        +    /**
        +     * The name of the stream which this message is in.
        +     * @returns {String}
        +     
        +     */
        +    get streamName() {
        +        return this.#__streamName;
        +    }
        +    /**
        +     * @param value {String} The name of the stream which this message is in.
        +     */
        +    set streamName(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("streamName must be String");
        +        }
        +
        +        this.#__streamName = value;
        +    }
        +    /**
        +     * @param value {String} The name of the stream which this message is in.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.Message}
        +     */
        +    withStreamName(value) {
        +        this.streamName = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The sequence number of this message within the stream.
        +     * @returns {Number}
        +     
        +     */
        +    get sequenceNumber() {
        +        return this.#__sequenceNumber;
        +    }
        +    /**
        +     * @param value {Number} The sequence number of this message within the stream.
        +     */
        +    set sequenceNumber(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("sequenceNumber must be Number");
        +        }
        +
        +        this.#__sequenceNumber = value;
        +    }
        +    /**
        +     * @param value {Number} The sequence number of this message within the stream.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.Message}
        +     */
        +    withSequenceNumber(value) {
        +        this.sequenceNumber = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The time that the message was ingested to Stream Manager. Data is Unix epoch time in milliseconds.
        +     * @returns {Number}
        +     
        +     */
        +    get ingestTime() {
        +        return this.#__ingestTime;
        +    }
        +    /**
        +     * @param value {Number} The time that the message was ingested to Stream Manager. Data is Unix epoch time in milliseconds.
        +     */
        +    set ingestTime(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("ingestTime must be Number");
        +        }
        +
        +        this.#__ingestTime = value;
        +    }
        +    /**
        +     * @param value {Number} The time that the message was ingested to Stream Manager. Data is Unix epoch time in milliseconds.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.Message}
        +     */
        +    withIngestTime(value) {
        +        this.ingestTime = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The binary message data.
        +     * @returns {Buffer}
        +     
        +     */
        +    get payload() {
        +        return this.#__payload;
        +    }
        +    /**
        +     * @param value {Buffer} The binary message data.
        +     */
        +    set payload(value) {
        +        if (value !== null && !(value instanceof Buffer)) {
        +            throw new Error("payload must be Buffer");
        +        }
        +
        +        this.#__payload = value;
        +    }
        +    /**
        +     * @param value {Buffer} The binary message data.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.Message}
        +     */
        +    withPayload(value) {
        +        this.payload = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new Message();
        +        if ("streamName" in d) {
        +            ret.streamName = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["streamName"]) : d["streamName"];
        +        }
        +        if ("sequenceNumber" in d) {
        +            ret.sequenceNumber = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["sequenceNumber"]) : d["sequenceNumber"];
        +        }
        +        if ("ingestTime" in d) {
        +            ret.ingestTime = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["ingestTime"]) : d["ingestTime"];
        +        }
        +        if ("payload" in d) {
        +            ret.payload = Object.prototype.hasOwnProperty.call(Buffer, "fromMap") ? Buffer.fromMap(d["payload"]) : d["payload"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.streamName !== null) {
        +            d["streamName"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.streamName), "asMap") ? this.streamName.asMap() : this.streamName;
        +        }
        +        if (this.sequenceNumber !== null) {
        +            d["sequenceNumber"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.sequenceNumber), "asMap") ? this.sequenceNumber.asMap() : this.sequenceNumber;
        +        }
        +        if (this.ingestTime !== null) {
        +            d["ingestTime"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.ingestTime), "asMap") ? this.ingestTime.asMap() : this.ingestTime;
        +        }
        +        if (this.payload !== null) {
        +            d["payload"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.payload), "asMap") ? this.payload.asMap() : this.payload;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(Message, "typesMap", {
        +    value: {
        +        streamName: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        sequenceNumber: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        ingestTime: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        payload: {
        +            'type': Buffer,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(Message, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(Message, "validationsMap", {
        +    value: {
        +        'streamName': {
        +            'required': true,
        +        },
        +        'sequenceNumber': {
        +            'required': false,
        +        },
        +        'ingestTime': {
        +            'required': false,
        +        },
        +        'payload': {
        +            'required': true,
        +        },
        +    }
        +});
        +
        +/**
        + * Options for the ReadMessages API. All fields are optional.
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class ReadMessagesOptions {
        +    #__desiredStartSequenceNumber = null;
        +    #__minMessageCount = null;
        +    #__maxMessageCount = null;
        +    #__readTimeoutMillis = null;
        +
        +    /**
        +     * @param desiredStartSequenceNumber {Number} The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum.
        +     * @param minMessageCount {Number} The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown.
        +       The minimum values is 1 and the maximum value is 2147483647.
        +     * @param maxMessageCount {Number} The maximum number of messages that will be returned.
        +       The minimum values is the value of the minimum message count and the maximum value is 2147483647.
        +     * @param readTimeoutMillis {Number} The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages.
        +       If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown.
        +       If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached.
        +       The maximum value is the value of the client timeout.
        +     */
        +    constructor(
        +        desiredStartSequenceNumber = null,
        +        minMessageCount = 1,
        +        maxMessageCount = null,
        +        readTimeoutMillis = 0,
        +    ) {
        +        if (desiredStartSequenceNumber !== null && !(typeof desiredStartSequenceNumber === "number")) {
        +            throw new Error("desiredStartSequenceNumber must be Number");
        +        }
        +
        +        if (minMessageCount !== null && !(typeof minMessageCount === "number")) {
        +            throw new Error("minMessageCount must be Number");
        +        }
        +
        +        if (maxMessageCount !== null && !(typeof maxMessageCount === "number")) {
        +            throw new Error("maxMessageCount must be Number");
        +        }
        +
        +        if (readTimeoutMillis !== null && !(typeof readTimeoutMillis === "number")) {
        +            throw new Error("readTimeoutMillis must be Number");
        +        }
        +
        +        this.#__desiredStartSequenceNumber = desiredStartSequenceNumber;
        +        this.#__minMessageCount = minMessageCount;
        +        this.#__maxMessageCount = maxMessageCount;
        +        this.#__readTimeoutMillis = readTimeoutMillis;
        +    }
        +
        +    /**
        +     * The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum.
        +     * @returns {Number}
        +     
        +     */
        +    get desiredStartSequenceNumber() {
        +        return this.#__desiredStartSequenceNumber;
        +    }
        +    /**
        +     * @param value {Number} The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum.
        +     */
        +    set desiredStartSequenceNumber(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("desiredStartSequenceNumber must be Number");
        +        }
        +
        +        this.#__desiredStartSequenceNumber = value;
        +    }
        +    /**
        +     * @param value {Number} The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}
        +     */
        +    withDesiredStartSequenceNumber(value) {
        +        this.desiredStartSequenceNumber = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown.
        +       The minimum values is 1 and the maximum value is 2147483647.
        +     * @returns {Number}
        +
        +     */
        +    get minMessageCount() {
        +        return this.#__minMessageCount;
        +    }
        +    /**
        +     * @param value {Number} The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown.
        +       The minimum values is 1 and the maximum value is 2147483647.
        +     */
        +    set minMessageCount(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("minMessageCount must be Number");
        +        }
        +
        +        this.#__minMessageCount = value;
        +    }
        +    /**
        +     * @param value {Number} The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown.
        +       The minimum values is 1 and the maximum value is 2147483647.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}
        +     */
        +    withMinMessageCount(value) {
        +        this.minMessageCount = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The maximum number of messages that will be returned.
        +       The minimum values is the value of the minimum message count and the maximum value is 2147483647.
        +     * @returns {Number}
        +
        +     */
        +    get maxMessageCount() {
        +        return this.#__maxMessageCount;
        +    }
        +    /**
        +     * @param value {Number} The maximum number of messages that will be returned.
        +       The minimum values is the value of the minimum message count and the maximum value is 2147483647.
        +     */
        +    set maxMessageCount(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("maxMessageCount must be Number");
        +        }
        +
        +        this.#__maxMessageCount = value;
        +    }
        +    /**
        +     * @param value {Number} The maximum number of messages that will be returned.
        +       The minimum values is the value of the minimum message count and the maximum value is 2147483647.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}
        +     */
        +    withMaxMessageCount(value) {
        +        this.maxMessageCount = value;
        +        return this;
        +    }
        +
        +    /**
        +     * The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages.
        +       If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown.
        +       If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached.
        +       The maximum value is the value of the client timeout.
        +     * @returns {Number}
        +
        +     */
        +    get readTimeoutMillis() {
        +        return this.#__readTimeoutMillis;
        +    }
        +    /**
        +     * @param value {Number} The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages.
        +       If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown.
        +       If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached.
        +       The maximum value is the value of the client timeout.
        +     */
        +    set readTimeoutMillis(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("readTimeoutMillis must be Number");
        +        }
        +
        +        this.#__readTimeoutMillis = value;
        +    }
        +    /**
        +     * @param value {Number} The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages.
        +       If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown.
        +       If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached.
        +       The maximum value is the value of the client timeout.
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}
        +     */
        +    withReadTimeoutMillis(value) {
        +        this.readTimeoutMillis = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new ReadMessagesOptions();
        +        if ("desiredStartSequenceNumber" in d) {
        +            ret.desiredStartSequenceNumber = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["desiredStartSequenceNumber"]) : d["desiredStartSequenceNumber"];
        +        }
        +        if ("minMessageCount" in d) {
        +            ret.minMessageCount = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["minMessageCount"]) : d["minMessageCount"];
        +        }
        +        if ("maxMessageCount" in d) {
        +            ret.maxMessageCount = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["maxMessageCount"]) : d["maxMessageCount"];
        +        }
        +        if ("readTimeoutMillis" in d) {
        +            ret.readTimeoutMillis = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["readTimeoutMillis"]) : d["readTimeoutMillis"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.desiredStartSequenceNumber !== null) {
        +            d["desiredStartSequenceNumber"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.desiredStartSequenceNumber), "asMap") ? this.desiredStartSequenceNumber.asMap() : this.desiredStartSequenceNumber;
        +        }
        +        if (this.minMessageCount !== null) {
        +            d["minMessageCount"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.minMessageCount), "asMap") ? this.minMessageCount.asMap() : this.minMessageCount;
        +        }
        +        if (this.maxMessageCount !== null) {
        +            d["maxMessageCount"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.maxMessageCount), "asMap") ? this.maxMessageCount.asMap() : this.maxMessageCount;
        +        }
        +        if (this.readTimeoutMillis !== null) {
        +            d["readTimeoutMillis"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.readTimeoutMillis), "asMap") ? this.readTimeoutMillis.asMap() : this.readTimeoutMillis;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(ReadMessagesOptions, "typesMap", {
        +    value: {
        +        desiredStartSequenceNumber: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        minMessageCount: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        maxMessageCount: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +        readTimeoutMillis: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(ReadMessagesOptions, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(ReadMessagesOptions, "validationsMap", {
        +    value: {
        +        'desiredStartSequenceNumber': {
        +            'required': false,
        +            'maximum': 9223372036854775807,
        +            'minimum': 0,
        +        },
        +        'minMessageCount': {
        +            'required': false,
        +            'maximum': 2147483647,
        +            'minimum': 1,
        +        },
        +        'maxMessageCount': {
        +            'required': false,
        +            'maximum': 2147483647,
        +            'minimum': 1,
        +        },
        +        'readTimeoutMillis': {
        +            'required': false,
        +            'maximum': 9223372036854,
        +            'minimum': 0,
        +        },
        +    }
        +});
        +
        +/**
        + * (Internal Only) Request object for creating a message stream
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class CreateMessageStreamRequest {
        +    #__requestId = null;
        +    #__definition = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     * @param definition {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} 
        +     */
        +    constructor(
        +        requestId = null,
        +        definition = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        if (definition !== null && !(definition instanceof MessageStreamDefinition)) {
        +            throw new Error("definition must be MessageStreamDefinition");
        +        }
        +
        +        this.#__requestId = requestId;
        +        this.#__definition = definition;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamRequest}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition}
        +     
        +     */
        +    get definition() {
        +        return this.#__definition;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} 
        +     */
        +    set definition(value) {
        +        if (value !== null && !(value instanceof MessageStreamDefinition)) {
        +            throw new Error("definition must be MessageStreamDefinition");
        +        }
        +
        +        this.#__definition = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamDefinition} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamRequest}
        +     */
        +    withDefinition(value) {
        +        this.definition = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new CreateMessageStreamRequest();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        if ("definition" in d) {
        +            ret.definition = Object.prototype.hasOwnProperty.call(MessageStreamDefinition, "fromMap") ? MessageStreamDefinition.fromMap(d["definition"]) : d["definition"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        if (this.definition !== null) {
        +            d["definition"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.definition), "asMap") ? this.definition.asMap() : this.definition;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(CreateMessageStreamRequest, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        definition: {
        +            'type': MessageStreamDefinition,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(CreateMessageStreamRequest, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(CreateMessageStreamRequest, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': true,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'definition': {
        +            'required': true,
        +        },
        +    }
        +});
        +
        +/**
        + * Internal Only
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class CreateMessageStreamResponse {
        +    #__requestId = null;
        +    #__status = null;
        +    #__errorMessage = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @param errorMessage {String} 
        +     */
        +    constructor(
        +        requestId = null,
        +        status = null,
        +        errorMessage = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        if (status !== null && !(status instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        if (errorMessage !== null && !(typeof errorMessage === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        this.#__requestId = requestId;
        +        this.#__status = status;
        +        this.#__errorMessage = errorMessage;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode}
        +     
        +     */
        +    get status() {
        +        return this.#__status;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     */
        +    set status(value) {
        +        if (value !== null && !(value instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        this.#__status = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse}
        +     */
        +    withStatus(value) {
        +        this.status = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get errorMessage() {
        +        return this.#__errorMessage;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set errorMessage(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        this.#__errorMessage = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.CreateMessageStreamResponse}
        +     */
        +    withErrorMessage(value) {
        +        this.errorMessage = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new CreateMessageStreamResponse();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        if ("status" in d) {
        +            ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"];
        +        }
        +        if ("errorMessage" in d) {
        +            ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        if (this.status !== null) {
        +            d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status;
        +        }
        +        if (this.errorMessage !== null) {
        +            d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(CreateMessageStreamResponse, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        status: {
        +            'type': ResponseStatusCode,
        +            'subtype': null
        +        },
        +        errorMessage: {
        +            'type': String,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(CreateMessageStreamResponse, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(CreateMessageStreamResponse, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': true,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'status': {
        +            'required': true,
        +        },
        +        'errorMessage': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +/**
        + * (Internal Only) Request object for deleting a message stream
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class DeleteMessageStreamRequest {
        +    #__requestId = null;
        +    #__name = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     * @param name {String} 
        +     */
        +    constructor(
        +        requestId = null,
        +        name = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        if (name !== null && !(typeof name === "string")) {
        +            throw new Error("name must be String");
        +        }
        +
        +        this.#__requestId = requestId;
        +        this.#__name = name;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamRequest}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get name() {
        +        return this.#__name;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set name(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("name must be String");
        +        }
        +
        +        this.#__name = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamRequest}
        +     */
        +    withName(value) {
        +        this.name = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new DeleteMessageStreamRequest();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        if ("name" in d) {
        +            ret.name = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["name"]) : d["name"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        if (this.name !== null) {
        +            d["name"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.name), "asMap") ? this.name.asMap() : this.name;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(DeleteMessageStreamRequest, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        name: {
        +            'type': String,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(DeleteMessageStreamRequest, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(DeleteMessageStreamRequest, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': true,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'name': {
        +            'required': true,
        +            'minLength': 1,
        +            'maxLength': 255,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +    }
        +});
        +
        +/**
        + * Internal Only
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class DeleteMessageStreamResponse {
        +    #__requestId = null;
        +    #__status = null;
        +    #__errorMessage = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @param errorMessage {String} 
        +     */
        +    constructor(
        +        requestId = null,
        +        status = null,
        +        errorMessage = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        if (status !== null && !(status instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        if (errorMessage !== null && !(typeof errorMessage === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        this.#__requestId = requestId;
        +        this.#__status = status;
        +        this.#__errorMessage = errorMessage;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode}
        +     
        +     */
        +    get status() {
        +        return this.#__status;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     */
        +    set status(value) {
        +        if (value !== null && !(value instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        this.#__status = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse}
        +     */
        +    withStatus(value) {
        +        this.status = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get errorMessage() {
        +        return this.#__errorMessage;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set errorMessage(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        this.#__errorMessage = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.DeleteMessageStreamResponse}
        +     */
        +    withErrorMessage(value) {
        +        this.errorMessage = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new DeleteMessageStreamResponse();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        if ("status" in d) {
        +            ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"];
        +        }
        +        if ("errorMessage" in d) {
        +            ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        if (this.status !== null) {
        +            d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status;
        +        }
        +        if (this.errorMessage !== null) {
        +            d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(DeleteMessageStreamResponse, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        status: {
        +            'type': ResponseStatusCode,
        +            'subtype': null
        +        },
        +        errorMessage: {
        +            'type': String,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(DeleteMessageStreamResponse, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(DeleteMessageStreamResponse, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': true,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'status': {
        +            'required': true,
        +        },
        +        'errorMessage': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +/**
        + * (Internal Only) Request object for describing a message stream
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class DescribeMessageStreamRequest {
        +    #__requestId = null;
        +    #__name = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     * @param name {String} 
        +     */
        +    constructor(
        +        requestId = null,
        +        name = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        if (name !== null && !(typeof name === "string")) {
        +            throw new Error("name must be String");
        +        }
        +
        +        this.#__requestId = requestId;
        +        this.#__name = name;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamRequest}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get name() {
        +        return this.#__name;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set name(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("name must be String");
        +        }
        +
        +        this.#__name = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamRequest}
        +     */
        +    withName(value) {
        +        this.name = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new DescribeMessageStreamRequest();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        if ("name" in d) {
        +            ret.name = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["name"]) : d["name"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        if (this.name !== null) {
        +            d["name"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.name), "asMap") ? this.name.asMap() : this.name;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(DescribeMessageStreamRequest, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        name: {
        +            'type': String,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(DescribeMessageStreamRequest, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(DescribeMessageStreamRequest, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': true,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'name': {
        +            'required': true,
        +            'minLength': 1,
        +            'maxLength': 255,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +    }
        +});
        +
        +/**
        + * (Internal Only) Response object for describing a message stream
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class DescribeMessageStreamResponse {
        +    #__requestId = null;
        +    #__status = null;
        +    #__errorMessage = null;
        +    #__messageStreamInfo = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @param errorMessage {String} 
        +     * @param messageStreamInfo {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo} 
        +     */
        +    constructor(
        +        requestId = null,
        +        status = null,
        +        errorMessage = null,
        +        messageStreamInfo = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        if (status !== null && !(status instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        if (errorMessage !== null && !(typeof errorMessage === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        if (messageStreamInfo !== null && !(messageStreamInfo instanceof MessageStreamInfo)) {
        +            throw new Error("messageStreamInfo must be MessageStreamInfo");
        +        }
        +
        +        this.#__requestId = requestId;
        +        this.#__status = status;
        +        this.#__errorMessage = errorMessage;
        +        this.#__messageStreamInfo = messageStreamInfo;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode}
        +     
        +     */
        +    get status() {
        +        return this.#__status;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     */
        +    set status(value) {
        +        if (value !== null && !(value instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        this.#__status = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse}
        +     */
        +    withStatus(value) {
        +        this.status = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get errorMessage() {
        +        return this.#__errorMessage;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set errorMessage(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        this.#__errorMessage = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse}
        +     */
        +    withErrorMessage(value) {
        +        this.errorMessage = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo}
        +     
        +     */
        +    get messageStreamInfo() {
        +        return this.#__messageStreamInfo;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo} 
        +     */
        +    set messageStreamInfo(value) {
        +        if (value !== null && !(value instanceof MessageStreamInfo)) {
        +            throw new Error("messageStreamInfo must be MessageStreamInfo");
        +        }
        +
        +        this.#__messageStreamInfo = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.MessageStreamInfo} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.DescribeMessageStreamResponse}
        +     */
        +    withMessageStreamInfo(value) {
        +        this.messageStreamInfo = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new DescribeMessageStreamResponse();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        if ("status" in d) {
        +            ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"];
        +        }
        +        if ("errorMessage" in d) {
        +            ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"];
        +        }
        +        if ("messageStreamInfo" in d) {
        +            ret.messageStreamInfo = Object.prototype.hasOwnProperty.call(MessageStreamInfo, "fromMap") ? MessageStreamInfo.fromMap(d["messageStreamInfo"]) : d["messageStreamInfo"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        if (this.status !== null) {
        +            d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status;
        +        }
        +        if (this.errorMessage !== null) {
        +            d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage;
        +        }
        +        if (this.messageStreamInfo !== null) {
        +            d["messageStreamInfo"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.messageStreamInfo), "asMap") ? this.messageStreamInfo.asMap() : this.messageStreamInfo;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(DescribeMessageStreamResponse, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        status: {
        +            'type': ResponseStatusCode,
        +            'subtype': null
        +        },
        +        errorMessage: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        messageStreamInfo: {
        +            'type': MessageStreamInfo,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(DescribeMessageStreamResponse, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(DescribeMessageStreamResponse, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': true,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'status': {
        +            'required': true,
        +        },
        +        'errorMessage': {
        +            'required': false,
        +        },
        +        'messageStreamInfo': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +/**
        + * (Intenral Only) Request object for appending to a message stream
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class AppendMessageRequest {
        +    #__requestId = null;
        +    #__name = null;
        +    #__payload = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     * @param name {String} 
        +     * @param payload {Buffer} 
        +     */
        +    constructor(
        +        requestId = null,
        +        name = null,
        +        payload = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        if (name !== null && !(typeof name === "string")) {
        +            throw new Error("name must be String");
        +        }
        +
        +        if (payload !== null && !(payload instanceof Buffer)) {
        +            throw new Error("payload must be Buffer");
        +        }
        +
        +        this.#__requestId = requestId;
        +        this.#__name = name;
        +        this.#__payload = payload;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageRequest}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get name() {
        +        return this.#__name;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set name(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("name must be String");
        +        }
        +
        +        this.#__name = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageRequest}
        +     */
        +    withName(value) {
        +        this.name = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {Buffer}
        +     
        +     */
        +    get payload() {
        +        return this.#__payload;
        +    }
        +    /**
        +     * @param value {Buffer} 
        +     */
        +    set payload(value) {
        +        if (value !== null && !(value instanceof Buffer)) {
        +            throw new Error("payload must be Buffer");
        +        }
        +
        +        this.#__payload = value;
        +    }
        +    /**
        +     * @param value {Buffer} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageRequest}
        +     */
        +    withPayload(value) {
        +        this.payload = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new AppendMessageRequest();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        if ("name" in d) {
        +            ret.name = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["name"]) : d["name"];
        +        }
        +        if ("payload" in d) {
        +            ret.payload = Object.prototype.hasOwnProperty.call(Buffer, "fromMap") ? Buffer.fromMap(d["payload"]) : d["payload"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        if (this.name !== null) {
        +            d["name"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.name), "asMap") ? this.name.asMap() : this.name;
        +        }
        +        if (this.payload !== null) {
        +            d["payload"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.payload), "asMap") ? this.payload.asMap() : this.payload;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(AppendMessageRequest, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        name: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        payload: {
        +            'type': Buffer,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(AppendMessageRequest, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(AppendMessageRequest, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': true,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'name': {
        +            'required': true,
        +            'minLength': 1,
        +            'maxLength': 255,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'payload': {
        +            'required': true,
        +            'minLength': 1,
        +        },
        +    }
        +});
        +
        +/**
        + * Internal Only
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class AppendMessageResponse {
        +    #__requestId = null;
        +    #__status = null;
        +    #__errorMessage = null;
        +    #__sequenceNumber = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @param errorMessage {String} 
        +     * @param sequenceNumber {Number} 
        +     */
        +    constructor(
        +        requestId = null,
        +        status = null,
        +        errorMessage = null,
        +        sequenceNumber = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        if (status !== null && !(status instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        if (errorMessage !== null && !(typeof errorMessage === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        if (sequenceNumber !== null && !(typeof sequenceNumber === "number")) {
        +            throw new Error("sequenceNumber must be Number");
        +        }
        +
        +        this.#__requestId = requestId;
        +        this.#__status = status;
        +        this.#__errorMessage = errorMessage;
        +        this.#__sequenceNumber = sequenceNumber;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageResponse}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode}
        +     
        +     */
        +    get status() {
        +        return this.#__status;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     */
        +    set status(value) {
        +        if (value !== null && !(value instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        this.#__status = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageResponse}
        +     */
        +    withStatus(value) {
        +        this.status = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get errorMessage() {
        +        return this.#__errorMessage;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set errorMessage(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        this.#__errorMessage = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageResponse}
        +     */
        +    withErrorMessage(value) {
        +        this.errorMessage = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {Number}
        +     
        +     */
        +    get sequenceNumber() {
        +        return this.#__sequenceNumber;
        +    }
        +    /**
        +     * @param value {Number} 
        +     */
        +    set sequenceNumber(value) {
        +        if (value !== null && !(typeof value === "number")) {
        +            throw new Error("sequenceNumber must be Number");
        +        }
        +
        +        this.#__sequenceNumber = value;
        +    }
        +    /**
        +     * @param value {Number} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.AppendMessageResponse}
        +     */
        +    withSequenceNumber(value) {
        +        this.sequenceNumber = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new AppendMessageResponse();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        if ("status" in d) {
        +            ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"];
        +        }
        +        if ("errorMessage" in d) {
        +            ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"];
        +        }
        +        if ("sequenceNumber" in d) {
        +            ret.sequenceNumber = Object.prototype.hasOwnProperty.call(Number, "fromMap") ? Number.fromMap(d["sequenceNumber"]) : d["sequenceNumber"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        if (this.status !== null) {
        +            d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status;
        +        }
        +        if (this.errorMessage !== null) {
        +            d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage;
        +        }
        +        if (this.sequenceNumber !== null) {
        +            d["sequenceNumber"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.sequenceNumber), "asMap") ? this.sequenceNumber.asMap() : this.sequenceNumber;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(AppendMessageResponse, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        status: {
        +            'type': ResponseStatusCode,
        +            'subtype': null
        +        },
        +        errorMessage: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        sequenceNumber: {
        +            'type': Number,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(AppendMessageResponse, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(AppendMessageResponse, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': true,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'status': {
        +            'required': true,
        +        },
        +        'errorMessage': {
        +            'required': false,
        +        },
        +        'sequenceNumber': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +/**
        + * (Internal Only) Request object for reading from a message stream. readMessagesOptions is optional.
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class ReadMessagesRequest {
        +    #__requestId = null;
        +    #__streamName = null;
        +    #__readMessagesOptions = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     * @param streamName {String} 
        +     * @param readMessagesOptions {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions} 
        +     */
        +    constructor(
        +        requestId = null,
        +        streamName = null,
        +        readMessagesOptions = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        if (streamName !== null && !(typeof streamName === "string")) {
        +            throw new Error("streamName must be String");
        +        }
        +
        +        if (readMessagesOptions !== null && !(readMessagesOptions instanceof ReadMessagesOptions)) {
        +            throw new Error("readMessagesOptions must be ReadMessagesOptions");
        +        }
        +
        +        this.#__requestId = requestId;
        +        this.#__streamName = streamName;
        +        this.#__readMessagesOptions = readMessagesOptions;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get streamName() {
        +        return this.#__streamName;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set streamName(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("streamName must be String");
        +        }
        +
        +        this.#__streamName = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest}
        +     */
        +    withStreamName(value) {
        +        this.streamName = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions}
        +     
        +     */
        +    get readMessagesOptions() {
        +        return this.#__readMessagesOptions;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions} 
        +     */
        +    set readMessagesOptions(value) {
        +        if (value !== null && !(value instanceof ReadMessagesOptions)) {
        +            throw new Error("readMessagesOptions must be ReadMessagesOptions");
        +        }
        +
        +        this.#__readMessagesOptions = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ReadMessagesOptions} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesRequest}
        +     */
        +    withReadMessagesOptions(value) {
        +        this.readMessagesOptions = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new ReadMessagesRequest();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        if ("streamName" in d) {
        +            ret.streamName = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["streamName"]) : d["streamName"];
        +        }
        +        if ("readMessagesOptions" in d) {
        +            ret.readMessagesOptions = Object.prototype.hasOwnProperty.call(ReadMessagesOptions, "fromMap") ? ReadMessagesOptions.fromMap(d["readMessagesOptions"]) : d["readMessagesOptions"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        if (this.streamName !== null) {
        +            d["streamName"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.streamName), "asMap") ? this.streamName.asMap() : this.streamName;
        +        }
        +        if (this.readMessagesOptions !== null) {
        +            d["readMessagesOptions"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.readMessagesOptions), "asMap") ? this.readMessagesOptions.asMap() : this.readMessagesOptions;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(ReadMessagesRequest, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        streamName: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        readMessagesOptions: {
        +            'type': ReadMessagesOptions,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(ReadMessagesRequest, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(ReadMessagesRequest, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': true,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'streamName': {
        +            'required': true,
        +            'minLength': 1,
        +            'maxLength': 255,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'readMessagesOptions': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +/**
        + * Internal Only
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class ReadMessagesResponse {
        +    #__requestId = null;
        +    #__messages = null;
        +    #__status = null;
        +    #__errorMessage = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     * @param messages {aws-greengrass-core-sdk.StreamManager.Message[]} 
        +     * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @param errorMessage {String} 
        +     */
        +    constructor(
        +        requestId = null,
        +        messages = null,
        +        status = null,
        +        errorMessage = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        if (messages !== null && !(messages instanceof Array)) {
        +            throw new Error("messages must be Array");
        +        }
        +        if (messages !== null && !messages.every((v) => v instanceof Message)) {
        +            throw new Error("messages array values must be Message");
        +        }
        +
        +        if (status !== null && !(status instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        if (errorMessage !== null && !(typeof errorMessage === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        this.#__requestId = requestId;
        +        this.#__messages = messages;
        +        this.#__status = status;
        +        this.#__errorMessage = errorMessage;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.Message[]}
        +     
        +     */
        +    get messages() {
        +        return this.#__messages;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.Message[]} 
        +     */
        +    set messages(value) {
        +        if (value !== null && !(value instanceof Array)) {
        +            throw new Error("messages must be Array");
        +        }
        +        if (value !== null && !value.every((v) => v instanceof Message)) {
        +            throw new Error("messages array values must be Message");
        +        }
        +
        +        this.#__messages = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.Message[]} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse}
        +     */
        +    withMessages(value) {
        +        this.messages = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode}
        +     
        +     */
        +    get status() {
        +        return this.#__status;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     */
        +    set status(value) {
        +        if (value !== null && !(value instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        this.#__status = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse}
        +     */
        +    withStatus(value) {
        +        this.status = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get errorMessage() {
        +        return this.#__errorMessage;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set errorMessage(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        this.#__errorMessage = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ReadMessagesResponse}
        +     */
        +    withErrorMessage(value) {
        +        this.errorMessage = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new ReadMessagesResponse();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        if ("messages" in d) {
        +            ret.messages = d["messages"].reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(Message, "fromMap") ? Message.fromMap(v) : v);
        +                return acc;
        +            }, []);
        +        }
        +        if ("status" in d) {
        +            ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"];
        +        }
        +        if ("errorMessage" in d) {
        +            ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        if (this.messages !== null) {
        +            d["messages"] = this.messages.reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v);
        +                return acc;
        +            }, []);
        +        }
        +        if (this.status !== null) {
        +            d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status;
        +        }
        +        if (this.errorMessage !== null) {
        +            d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(ReadMessagesResponse, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        messages: {
        +            'type': Array,
        +            'subtype': Message
        +        },
        +        status: {
        +            'type': ResponseStatusCode,
        +            'subtype': null
        +        },
        +        errorMessage: {
        +            'type': String,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(ReadMessagesResponse, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(ReadMessagesResponse, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': false,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'messages': {
        +            'required': false,
        +        },
        +        'status': {
        +            'required': false,
        +        },
        +        'errorMessage': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +/**
        + * (Internal Only) Request object to list all available streams. There are no options.
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class ListStreamsRequest {
        +    #__requestId = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     */
        +    constructor(
        +        requestId = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = requestId;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ListStreamsRequest}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new ListStreamsRequest();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(ListStreamsRequest, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +    }
        +});
        +Object.defineProperty(ListStreamsRequest, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(ListStreamsRequest, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': true,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +    }
        +});
        +
        +/**
        + * Internal Only
        + *
        + * @class
        + * @memberOf aws-greengrass-core-sdk.StreamManager
        + */
        +class ListStreamsResponse {
        +    #__requestId = null;
        +    #__status = null;
        +    #__errorMessage = null;
        +    #__streams = null;
        +
        +    /**
        +     * @param requestId {String} 
        +     * @param status {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @param errorMessage {String} 
        +     * @param streams {String[]} 
        +     */
        +    constructor(
        +        requestId = null,
        +        status = null,
        +        errorMessage = null,
        +        streams = null,
        +    ) {
        +        if (requestId !== null && !(typeof requestId === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        if (status !== null && !(status instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        if (errorMessage !== null && !(typeof errorMessage === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        if (streams !== null && !(streams instanceof Array)) {
        +            throw new Error("streams must be Array");
        +        }
        +        if (streams !== null && !streams.every((v) => typeof v === "string")) {
        +            throw new Error("streams array values must be String");
        +        }
        +
        +        this.#__requestId = requestId;
        +        this.#__status = status;
        +        this.#__errorMessage = errorMessage;
        +        this.#__streams = streams;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get requestId() {
        +        return this.#__requestId;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set requestId(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("requestId must be String");
        +        }
        +
        +        this.#__requestId = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ListStreamsResponse}
        +     */
        +    withRequestId(value) {
        +        this.requestId = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode}
        +     
        +     */
        +    get status() {
        +        return this.#__status;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     */
        +    set status(value) {
        +        if (value !== null && !(value instanceof ResponseStatusCode)) {
        +            throw new Error("status must be ResponseStatusCode");
        +        }
        +
        +        this.#__status = value;
        +    }
        +    /**
        +     * @param value {aws-greengrass-core-sdk.StreamManager.ResponseStatusCode} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ListStreamsResponse}
        +     */
        +    withStatus(value) {
        +        this.status = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String}
        +     
        +     */
        +    get errorMessage() {
        +        return this.#__errorMessage;
        +    }
        +    /**
        +     * @param value {String} 
        +     */
        +    set errorMessage(value) {
        +        if (value !== null && !(typeof value === "string")) {
        +            throw new Error("errorMessage must be String");
        +        }
        +
        +        this.#__errorMessage = value;
        +    }
        +    /**
        +     * @param value {String} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ListStreamsResponse}
        +     */
        +    withErrorMessage(value) {
        +        this.errorMessage = value;
        +        return this;
        +    }
        +
        +    /**
        +     * @returns {String[]}
        +     
        +     */
        +    get streams() {
        +        return this.#__streams;
        +    }
        +    /**
        +     * @param value {String[]} 
        +     */
        +    set streams(value) {
        +        if (value !== null && !(value instanceof Array)) {
        +            throw new Error("streams must be Array");
        +        }
        +        if (value !== null && !value.every((v) => typeof v === "string")) {
        +            throw new Error("streams array values must be String");
        +        }
        +
        +        this.#__streams = value;
        +    }
        +    /**
        +     * @param value {String[]} 
        +     * @returns {aws-greengrass-core-sdk.StreamManager.ListStreamsResponse}
        +     */
        +    withStreams(value) {
        +        this.streams = value;
        +        return this;
        +    }
        +
        +    static fromMap(d) {
        +        const ret = new ListStreamsResponse();
        +        if ("requestId" in d) {
        +            ret.requestId = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["requestId"]) : d["requestId"];
        +        }
        +        if ("status" in d) {
        +            ret.status = Object.prototype.hasOwnProperty.call(ResponseStatusCode, "fromMap") ? ResponseStatusCode.fromMap(d["status"]) : d["status"];
        +        }
        +        if ("errorMessage" in d) {
        +            ret.errorMessage = Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(d["errorMessage"]) : d["errorMessage"];
        +        }
        +        if ("streams" in d) {
        +            ret.streams = d["streams"].reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(String, "fromMap") ? String.fromMap(v) : v);
        +                return acc;
        +            }, []);
        +        }
        +        return ret;
        +    }
        +
        +    asMap() {
        +        const d = {};
        +        if (this.requestId !== null) {
        +            d["requestId"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.requestId), "asMap") ? this.requestId.asMap() : this.requestId;
        +        }
        +        if (this.status !== null) {
        +            d["status"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.status), "asMap") ? this.status.asMap() : this.status;
        +        }
        +        if (this.errorMessage !== null) {
        +            d["errorMessage"] = Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.errorMessage), "asMap") ? this.errorMessage.asMap() : this.errorMessage;
        +        }
        +        if (this.streams !== null) {
        +            d["streams"] = this.streams.reduce((acc, v) => {
        +                acc.push(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(v), "asMap") ? v.asMap() : v);
        +                return acc;
        +            }, []);
        +        }
        +        return d;
        +    }
        +};
        +
        +Object.defineProperty(ListStreamsResponse, "typesMap", {
        +    value: {
        +        requestId: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        status: {
        +            'type': ResponseStatusCode,
        +            'subtype': null
        +        },
        +        errorMessage: {
        +            'type': String,
        +            'subtype': null
        +        },
        +        streams: {
        +            'type': Array,
        +            'subtype': String
        +        },
        +    }
        +});
        +Object.defineProperty(ListStreamsResponse, "formatsMap", {
        +    value: {}
        +});
        +Object.defineProperty(ListStreamsResponse, "validationsMap", {
        +    value: {
        +        'requestId': {
        +            'required': true,
        +            'minLength': 1,
        +            'pattern': /^[\w ,.\-_]*$/,
        +        },
        +        'status': {
        +            'required': true,
        +        },
        +        'errorMessage': {
        +            'required': false,
        +        },
        +        'streams': {
        +            'required': false,
        +        },
        +    }
        +});
        +
        +/**
        + * @type {{
        +StrategyOnFull: StrategyOnFull,
        +Persistence: Persistence,
        +ConnectRequest: ConnectRequest,
        +ResponseStatusCode: ResponseStatusCode,
        +ConnectResponse: ConnectResponse,
        +Operation: Operation,
        +MessageFrame: MessageFrame,
        +HTTPConfig: HTTPConfig,
        +IoTAnalyticsConfig: IoTAnalyticsConfig,
        +KinesisConfig: KinesisConfig,
        +ExportDefinition: ExportDefinition,
        +MessageStreamDefinition: MessageStreamDefinition,
        +MessageStreamInfo: MessageStreamInfo,
        +Message: Message,
        +ReadMessagesOptions: ReadMessagesOptions,
        +CreateMessageStreamRequest: CreateMessageStreamRequest,
        +CreateMessageStreamResponse: CreateMessageStreamResponse,
        +DeleteMessageStreamRequest: DeleteMessageStreamRequest,
        +DeleteMessageStreamResponse: DeleteMessageStreamResponse,
        +DescribeMessageStreamRequest: DescribeMessageStreamRequest,
        +DescribeMessageStreamResponse: DescribeMessageStreamResponse,
        +AppendMessageRequest: AppendMessageRequest,
        +AppendMessageResponse: AppendMessageResponse,
        +ReadMessagesRequest: ReadMessagesRequest,
        +ReadMessagesResponse: ReadMessagesResponse,
        +ListStreamsRequest: ListStreamsRequest,
        +ListStreamsResponse: ListStreamsResponse
        +}}
        + */
        +module.exports = {
        +    StrategyOnFull,
        +    Persistence,
        +    ConnectRequest,
        +    ResponseStatusCode,
        +    ConnectResponse,
        +    Operation,
        +    MessageFrame,
        +    HTTPConfig,
        +    IoTAnalyticsConfig,
        +    KinesisConfig,
        +    ExportDefinition,
        +    MessageStreamDefinition,
        +    MessageStreamInfo,
        +    Message,
        +    ReadMessagesOptions,
        +    CreateMessageStreamRequest,
        +    CreateMessageStreamResponse,
        +    DeleteMessageStreamRequest,
        +    DeleteMessageStreamResponse,
        +    DescribeMessageStreamRequest,
        +    DescribeMessageStreamResponse,
        +    AppendMessageRequest,
        +    AppendMessageResponse,
        +    ReadMessagesRequest,
        +    ReadMessagesResponse,
        +    ListStreamsRequest,
        +    ListStreamsResponse,
        +};
        +
        +
        + + + + +
        + + + +
        + +
        + Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
        + + + + + diff --git a/docs/stream-manager_index.js.html b/docs/stream-manager_index.js.html new file mode 100644 index 0000000..c3d6561 --- /dev/null +++ b/docs/stream-manager_index.js.html @@ -0,0 +1,60 @@ + + + + + JSDoc: Source: stream-manager/index.js + + + + + + + + + + +
        + +

        Source: stream-manager/index.js

        + + + + + + +
        +
        +
        /*
        + * Copyright (c) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
        + */
        +
        +/**
        + * @namespace aws-greengrass-core-sdk.StreamManager
        + */
        +
        +module.exports = require('./client');
        +
        +
        +
        + + + + +
        + + + +
        + +
        + Documentation generated by JSDoc 3.6.3 on Thu Jan 16 2020 19:55:23 GMT+0000 (Coordinated Universal Time) +
        + + + + + diff --git a/docs/styles/jsdoc-default.css b/docs/styles/jsdoc-default.css new file mode 100644 index 0000000..7d1729d --- /dev/null +++ b/docs/styles/jsdoc-default.css @@ -0,0 +1,358 @@ +@font-face { + font-family: 'Open Sans'; + font-weight: normal; + font-style: normal; + src: url('../fonts/OpenSans-Regular-webfont.eot'); + src: + local('Open Sans'), + local('OpenSans'), + url('../fonts/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/OpenSans-Regular-webfont.woff') format('woff'), + url('../fonts/OpenSans-Regular-webfont.svg#open_sansregular') format('svg'); +} + +@font-face { + font-family: 'Open Sans Light'; + font-weight: normal; + font-style: normal; + src: url('../fonts/OpenSans-Light-webfont.eot'); + src: + local('Open Sans Light'), + local('OpenSans Light'), + url('../fonts/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/OpenSans-Light-webfont.woff') format('woff'), + url('../fonts/OpenSans-Light-webfont.svg#open_sanslight') format('svg'); +} + +html +{ + overflow: auto; + background-color: #fff; + font-size: 14px; +} + +body +{ + font-family: 'Open Sans', sans-serif; + line-height: 1.5; + color: #4d4e53; + background-color: white; +} + +a, a:visited, a:active { + color: #0095dd; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +header +{ + display: block; + padding: 0px 4px; +} + +tt, code, kbd, samp { + font-family: Consolas, Monaco, 'Andale Mono', monospace; +} + +.class-description { + font-size: 130%; + line-height: 140%; + margin-bottom: 1em; + margin-top: 1em; +} + +.class-description:empty { + margin: 0; +} + +#main { + float: left; + width: 70%; +} + +article dl { + margin-bottom: 40px; +} + +article img { + max-width: 100%; +} + +section +{ + display: block; + background-color: #fff; + padding: 12px 24px; + border-bottom: 1px solid #ccc; + margin-right: 30px; +} + +.variation { + display: none; +} + +.signature-attributes { + font-size: 60%; + color: #aaa; + font-style: italic; + font-weight: lighter; +} + +nav +{ + display: block; + float: right; + margin-top: 28px; + width: 30%; + box-sizing: border-box; + border-left: 1px solid #ccc; + padding-left: 16px; +} + +nav ul { + font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif; + font-size: 100%; + line-height: 17px; + padding: 0; + margin: 0; + list-style-type: none; +} + +nav ul a, nav ul a:visited, nav ul a:active { + font-family: Consolas, Monaco, 'Andale Mono', monospace; + line-height: 18px; + color: #4D4E53; +} + +nav h3 { + margin-top: 12px; +} + +nav li { + margin-top: 6px; +} + +footer { + display: block; + padding: 6px; + margin-top: 12px; + font-style: italic; + font-size: 90%; +} + +h1, h2, h3, h4 { + font-weight: 200; + margin: 0; +} + +h1 +{ + font-family: 'Open Sans Light', sans-serif; + font-size: 48px; + letter-spacing: -2px; + margin: 12px 24px 20px; +} + +h2, h3.subsection-title +{ + font-size: 30px; + font-weight: 700; + letter-spacing: -1px; + margin-bottom: 12px; +} + +h3 +{ + font-size: 24px; + letter-spacing: -0.5px; + margin-bottom: 12px; +} + +h4 +{ + font-size: 18px; + letter-spacing: -0.33px; + margin-bottom: 12px; + color: #4d4e53; +} + +h5, .container-overview .subsection-title +{ + font-size: 120%; + font-weight: bold; + letter-spacing: -0.01em; + margin: 8px 0 3px 0; +} + +h6 +{ + font-size: 100%; + letter-spacing: -0.01em; + margin: 6px 0 3px 0; + font-style: italic; +} + +table +{ + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +td, th +{ + border: 1px solid #ddd; + margin: 0px; + text-align: left; + vertical-align: top; + padding: 4px 6px; + display: table-cell; +} + +thead tr +{ + background-color: #ddd; + font-weight: bold; +} + +th { border-right: 1px solid #aaa; } +tr > th:last-child { border-right: 1px solid #ddd; } + +.ancestors, .attribs { color: #999; } +.ancestors a, .attribs a +{ + color: #999 !important; + text-decoration: none; +} + +.clear +{ + clear: both; +} + +.important +{ + font-weight: bold; + color: #950B02; +} + +.yes-def { + text-indent: -1000px; +} + +.type-signature { + color: #aaa; +} + +.name, .signature { + font-family: Consolas, Monaco, 'Andale Mono', monospace; +} + +.details { margin-top: 14px; border-left: 2px solid #DDD; } +.details dt { width: 120px; float: left; padding-left: 10px; padding-top: 6px; } +.details dd { margin-left: 70px; } +.details ul { margin: 0; } +.details ul { list-style-type: none; } +.details li { margin-left: 30px; padding-top: 6px; } +.details pre.prettyprint { margin: 0 } +.details .object-value { padding-top: 0; } + +.description { + margin-bottom: 1em; + margin-top: 1em; +} + +.code-caption +{ + font-style: italic; + font-size: 107%; + margin: 0; +} + +.source +{ + border: 1px solid #ddd; + width: 80%; + overflow: auto; +} + +.prettyprint.source { + width: inherit; +} + +.source code +{ + font-size: 100%; + line-height: 18px; + display: block; + padding: 4px 12px; + margin: 0; + background-color: #fff; + color: #4D4E53; +} + +.prettyprint code span.line +{ + display: inline-block; +} + +.prettyprint.linenums +{ + padding-left: 70px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.prettyprint.linenums ol +{ + padding-left: 0; +} + +.prettyprint.linenums li +{ + border-left: 3px #ddd solid; +} + +.prettyprint.linenums li.selected, +.prettyprint.linenums li.selected * +{ + background-color: lightyellow; +} + +.prettyprint.linenums li * +{ + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; +} + +.params .name, .props .name, .name code { + color: #4D4E53; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + font-size: 100%; +} + +.params td.description > p:first-child, +.props td.description > p:first-child +{ + margin-top: 0; + padding-top: 0; +} + +.params td.description > p:last-child, +.props td.description > p:last-child +{ + margin-bottom: 0; + padding-bottom: 0; +} + +.disabled { + color: #454545; +} diff --git a/docs/styles/prettify-jsdoc.css b/docs/styles/prettify-jsdoc.css new file mode 100644 index 0000000..5a2526e --- /dev/null +++ b/docs/styles/prettify-jsdoc.css @@ -0,0 +1,111 @@ +/* JSDoc prettify.js theme */ + +/* plain text */ +.pln { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* string content */ +.str { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a keyword */ +.kwd { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a comment */ +.com { + font-weight: normal; + font-style: italic; +} + +/* a type name */ +.typ { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* a literal value */ +.lit { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* punctuation */ +.pun { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* lisp open bracket */ +.opn { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* lisp close bracket */ +.clo { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a markup tag name */ +.tag { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a markup attribute name */ +.atn { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a markup attribute value */ +.atv { + color: #006400; + font-weight: normal; + font-style: normal; +} + +/* a declaration */ +.dec { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* a variable name */ +.var { + color: #000000; + font-weight: normal; + font-style: normal; +} + +/* a function name */ +.fun { + color: #000000; + font-weight: bold; + font-style: normal; +} + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; +} diff --git a/docs/styles/prettify-tomorrow.css b/docs/styles/prettify-tomorrow.css new file mode 100644 index 0000000..b6f92a7 --- /dev/null +++ b/docs/styles/prettify-tomorrow.css @@ -0,0 +1,132 @@ +/* Tomorrow Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* Pretty printing styles. Used with prettify.js. */ +/* SPAN elements with the classes below are added by prettyprint. */ +/* plain text */ +.pln { + color: #4d4d4c; } + +@media screen { + /* string content */ + .str { + color: #718c00; } + + /* a keyword */ + .kwd { + color: #8959a8; } + + /* a comment */ + .com { + color: #8e908c; } + + /* a type name */ + .typ { + color: #4271ae; } + + /* a literal value */ + .lit { + color: #f5871f; } + + /* punctuation */ + .pun { + color: #4d4d4c; } + + /* lisp open bracket */ + .opn { + color: #4d4d4c; } + + /* lisp close bracket */ + .clo { + color: #4d4d4c; } + + /* a markup tag name */ + .tag { + color: #c82829; } + + /* a markup attribute name */ + .atn { + color: #f5871f; } + + /* a markup attribute value */ + .atv { + color: #3e999f; } + + /* a declaration */ + .dec { + color: #f5871f; } + + /* a variable name */ + .var { + color: #c82829; } + + /* a function name */ + .fun { + color: #4271ae; } } +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { + color: #060; } + + .kwd { + color: #006; + font-weight: bold; } + + .com { + color: #600; + font-style: italic; } + + .typ { + color: #404; + font-weight: bold; } + + .lit { + color: #044; } + + .pun, .opn, .clo { + color: #440; } + + .tag { + color: #006; + font-weight: bold; } + + .atn { + color: #404; } + + .atv { + color: #060; } } +/* Style */ +/* +pre.prettyprint { + background: white; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + font-size: 12px; + line-height: 1.5; + border: 1px solid #ccc; + padding: 10px; } +*/ + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; } + +/* IE indents via margin-left */ +li.L0, +li.L1, +li.L2, +li.L3, +li.L4, +li.L5, +li.L6, +li.L7, +li.L8, +li.L9 { + /* */ } + +/* Alternate shading for lines */ +li.L1, +li.L3, +li.L5, +li.L7, +li.L9 { + /* */ } diff --git a/greengrassExamples/StreamManagerKinesis/index.js b/greengrassExamples/StreamManagerKinesis/index.js new file mode 100644 index 0000000..1cde336 --- /dev/null +++ b/greengrassExamples/StreamManagerKinesis/index.js @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + */ + +/* + * This example will create a Greengrass StreamManager stream called "SomeStream". + * It will then start writing data into that stream and StreamManager will + * automatically export the written data to a Kinesis Data Stream called "MyKinesisStream". + * This example will run forever, until the program is killed. + * + * The size of the StreamManager stream on disk will not exceed the default (which is 256 MB). + * Any data appended after the stream reaches the size limit, will continue to be appended, and + * StreamManager will delete the oldest data until the total stream size is back under 256MB. + * The Kinesis Data Stream in the cloud has no such bound, so all the data from this script + * will be uploaded to Kinesis and you will be charged for that usage. + */ + +const { + StreamManagerClient, ReadMessagesOptions, ExportDefinition, + KinesisConfig, MessageStreamDefinition, StrategyOnFull, + ResourceNotFoundException, +} = require('aws-greengrass-core-sdk').StreamManager; + +const STREAM_NAME = 'SomeStream'; +const KINESIS_STREAM_NAME = 'MyKinesisStream'; + +const c = new StreamManagerClient(); +c.onConnected(async () => { + // Try deleting the stream (if it exists) so that we have a fresh start + try { + await c.deleteMessageStream(STREAM_NAME); + } catch (e) { + // Rethrow the error if it wasn't the expected error + if (!(e instanceof ResourceNotFoundException)) { + throw e; + } + } + + try { + const exports = new ExportDefinition() + .withKinesis([new KinesisConfig() + .withIdentifier(`KinesisExport${STREAM_NAME}`) + .withKinesisStreamName(KINESIS_STREAM_NAME)]); + + await c.createMessageStream( + new MessageStreamDefinition() + .withName(STREAM_NAME) + .withStrategyOnFull(StrategyOnFull.OverwriteOldestData) + .withExportDefinition(exports), + ); + + // Append 2 messages and print their sequence numbers + console.log(`Successfully appended message to stream with sequence number ${await c.appendMessage(STREAM_NAME, Buffer.from('ABCDEFGHIJKLMNO', 'utf-8'))}`); + console.log(`Successfully appended message to stream with sequence number ${await c.appendMessage(STREAM_NAME, Buffer.from('PQRSTUVWXYZ', 'uft-8'))}`); + + // Try reading the 2 messages we just appended and print them out + console.log(`Successfully read 2 messages: ${ + await c.readMessages(STREAM_NAME, + new ReadMessagesOptions() + .withMinMessageCount(2) + .withReadTimeoutMillis(1000))}`); + + console.log('Now going to start writing random integers between 0 and 255 to the stream'); + + // Now start putting in random data between 0 and 255 to emulate device sensor input + const interval = setInterval(async () => { + try { + console.log('Appending new random integer to stream'); + const buf = Buffer.alloc(1); + buf.writeUInt8(Math.floor(Math.random() * 255), 0); + await c.appendMessage(STREAM_NAME, buf); + } finally { + clearInterval(interval); + c.close(); + } + }, 1000); + } finally { + c.close(); + } +}); + +// Dummy handler because this example should run as a pinned lambda +module.exports.handler = function handler() { + return ''; +}; diff --git a/README.md b/readme.md similarity index 74% rename from README.md rename to readme.md index 68d73f6..087c75d 100644 --- a/README.md +++ b/readme.md @@ -1,8 +1,4 @@ -
        - -
        - -# AWS Greengrass Core SDK for JavaScript +## AWS Greengrass Core SDK for JavaScript The **AWS Greengrass Core SDK for JavaScript** allows developers to write JavaScript Lambda functions which will run within Greengrass. @@ -12,22 +8,23 @@ This document provides instructions for preparing your Greengrass Core environme ## Preparing your Greengrass to run NodeJS Lambda functions -The environment where Greengrass is running on needs to be able to run NodeJS 8.10 applications. +The environment where Greengrass is running on needs to be able to run NodeJS 12.x applications. -* Install NodeJS 8.10 for your platform. You can download the newest NodeJS from [https://nodejs.org/en/download/](https://nodejs.org/en/download/). +* Install NodeJS 12 for your platform. You can download the newest NodeJS from [https://nodejs.org/en/download/](https://nodejs.org/en/download/). * When you untar the package downloaded from NodeJS website, you will find `node` file under `bin` directory. * Copy the file to _**/usr/bin**_ or _**/usr/local/bin**_ folder. -* Rename the file to _**nodejs8.10**_ +* Rename the file to _**nodejs12.x**_ ## Getting Started - Hello World * Copy `samples/HelloWorld` folder to your workspace. * Create a folder `node_modules` under `HelloWorld` folder. * Unzip aws-greengrass-core-sdk-js.zip into the folder. It should create a folder HelloWorld/node_modules/aws-greengrass-core-sdk +* Use NPM to install the required dependency, cbor. `npm i cbor@5.0.1`. * Zip up the content of HelloWorld folder so that the index.js is on the top of the zip file structure. * Go to AWS Lambda Console. * Create a new function. -* Choose the Runtime as `Node.js 8.10` +* Choose the Runtime as `Node.js 12.x` * Upload the zip file in _Lambda function code_ section. * Handler is _index.handler_ * Choose any role as the role is not used within Greengrass. @@ -57,10 +54,6 @@ From GGC version 1.5, you can send both JSON and binary data as a payload when y In Greengrass, you can send a context object in a JSON format to be passed to another Lambda that is being invoked. The context format looks like this: `{ custom: { customData: 'customData', }, }` -## Compatibility - -
        -
        ## Compatibility[¶](#compatibility "Permalink to this headline") @@ -108,7 +101,7 @@ As new features are added to AWS Greengrass, previous versions of the Greengrass
        - + @@ -118,6 +111,42 @@ As new features are added to AWS Greengrass, previous versions of the Greengrass +
        + +## 1.6.0 Updates[¶](#1.6.0updates "Permalink to this headline") + +Added support for StreamManager, see [AWS Docs](https://docs.aws.amazon.com/greengrass/latest/developerguide/stream-manager.html) +for more information. + +### Compatibility + +StreamManager has adds a new dependency to this package, `cbor==5.0.1`. +Please make sure to include it in your lambda or else the SDK will not function. +In addition to the new dependency, the 1.6.0 version of this SDK now requires NodeJS version 12 +or greater since NodeJS 6 and 8 are end-of-life. See [https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html](https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html). + +### StreamManager Usage + +```javascript +const { + StreamManagerClient +} = require('aws-greengrass-core-sdk').StreamManager; + +const c = new StreamManagerClient({ + onConnectCb: async () => { + try { + // Let's start with something simple. + // Just print out all the available stream names on the server + console.log(await c.listStreams()); + } finally { + c.close(); // Always close the client when you're done + } + } +}); +``` + +
        +
        ## 1.5.0 Updates[¶](#1.5.0updates "Permalink to this headline") @@ -130,7 +159,7 @@ Added support for publish() parameter queueFullPolicy which can be set to 'AllOr ## 1.4.0 Updates[¶](#1.4.0updates "Permalink to this headline") -Added support for Node.js 8.10 Lambda runtime. Lambda functions that use Node.js 8.10 runtime can now run on an AWS IoT Greengrass core. (Existing Lambda functions that use Node.js 6.10 runtime can still run on Greengrass core, but they can’t be updated after 5/30/2019\. Please refer to [AWS Lambda Runtimes Support Policy](https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html).) +Added support for Node.js 8.10 Lambda runtime. Lambda functions that use Node.js 8.10 runtime can now run on an AWS IoT Greengrass core. (Existing Lambda functions that use Node.js 6.10 runtime can still run on Greengrass core, but they can't be updated after 5/30/2019. Please refer to [AWS Lambda Runtimes Support Policy](https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html).)
        @@ -170,7 +199,7 @@ Lambda only accepted payload in JSON format. With this update, Invoking or publi ## 1.0.1 Updates[¶](#1.0.1updates "Permalink to this headline") -SShadow operations were not receiving responses from the local shadow properly. This has been fixed. +Shadow operations were not receiving responses from the local shadow properly. This has been fixed. Lambda Invoke function's InvocationType's default value was Event. This has been changed to RequestResponse. @@ -182,7 +211,4 @@ Lambda Invoke function's InvocationType's default value was Event. This has been ## License -Apache 2.0 - - - +Apache 2.0
        1.10.x1.0.x-1.5.x1.0.x-1.6.x