{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-iotevents-detectormodel.json",
  "title": "AWSIoTEventsDetectorModelProperties",
  "description": "The AWS::IoTEvents::DetectorModel resource creates a detector model. You create a *detector model* (a model of your equipment or process) using *states*. For each state, you define conditional (Boolean) logic that evaluates the incoming inputs to detect significant events. When an event is detected, it can change the state or trigger custom-built or predefined actions using other AWS services. You can define additional events that trigger actions when entering or exiting a state and, optionally, when a condition is met. For more information, see [How to Use AWS IoT Events](https://docs.aws.amazon.com/iotevents/latest/developerguide/how-to-use-iotevents.html) in the *AWS IoT Events Developer Guide*.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-iotevents-detectormodel.json",
    "sourceSha256": "a9f25f01d5c5c5c9ac1f476383aad0efd162f3218561964e0b157ddaeb3131ac"
  },
  "type": "object",
  "properties": {
    "DetectorModelDefinition": {
      "$ref": "#/$defs/DetectorModelDefinition"
    },
    "DetectorModelDescription": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 128
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A brief description of the detector model."
    },
    "DetectorModelName": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[a-zA-Z0-9_-]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name of the detector model."
    },
    "EvaluationMethod": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "BATCH",
            "SERIAL"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Information about the order in which events are evaluated and how actions are executed."
    },
    "Key": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^((`[\\w\\- ]+`)|([\\w\\-]+))(\\.((`[\\w\\- ]+`)|([\\w\\-]+)))*$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The value used to identify a detector instance. When a device or system sends input, a new detector instance with a unique key value is created. AWS IoT Events can continue to route input to its corresponding detector instance based on this identifying information.\n\nThis parameter uses a JSON-path expression to select the attribute-value pair in the message payload that is used for identification. To route the message to the correct detector instance, the device must send a message payload that contains the same attribute-value."
    },
    "RoleArn": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ARN of the role that grants permission to AWS IoT Events to perform its operations."
    },
    "Tags": {
      "type": "array",
      "uniqueItems": false,
      "insertionOrder": false,
      "description": "An array of key-value pairs to apply to this resource.\n\nFor more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::IoTEvents::DetectorModel",
  "taggable": true,
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/DetectorModelName",
    "/properties/Key"
  ],
  "required": [
    "DetectorModelDefinition",
    "RoleArn"
  ],
  "$defs": {
    "DetectorModelDefinition": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelDetectorModelDefinition",
      "description": "Information that defines how a detector operates.",
      "properties": {
        "InitialStateName": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The state that is entered at the creation of each detector (instance)."
        },
        "States": {
          "type": "array",
          "uniqueItems": false,
          "insertionOrder": false,
          "description": "Information about the states of the detector.",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/State"
          }
        }
      },
      "required": [
        "States",
        "InitialStateName"
      ],
      "additionalProperties": false
    },
    "State": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelStateDefinition",
      "description": "Information that defines a state of a detector.",
      "properties": {
        "OnEnter": {
          "$ref": "#/$defs/OnEnter"
        },
        "OnExit": {
          "$ref": "#/$defs/OnExit"
        },
        "OnInput": {
          "$ref": "#/$defs/OnInput"
        },
        "StateName": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the state."
        }
      },
      "required": [
        "StateName"
      ],
      "additionalProperties": false
    },
    "OnEnter": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelOnEnterDefinition",
      "description": "When entering this state, perform these `actions` if the `condition` is `TRUE`.",
      "properties": {
        "Events": {
          "type": "array",
          "uniqueItems": false,
          "insertionOrder": false,
          "description": "Specifies the `actions` that are performed when the state is entered and the `condition` is `TRUE`.",
          "items": {
            "$ref": "#/$defs/Event"
          }
        }
      },
      "additionalProperties": false
    },
    "OnExit": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelOnExitDefinition",
      "description": "When exiting this state, perform these `actions` if the specified `condition` is `TRUE`.",
      "properties": {
        "Events": {
          "type": "array",
          "uniqueItems": false,
          "insertionOrder": false,
          "description": "Specifies the `actions` that are performed when the state is exited and the `condition` is `TRUE`.",
          "items": {
            "$ref": "#/$defs/Event"
          }
        }
      },
      "additionalProperties": false
    },
    "OnInput": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelOnInputDefinition",
      "description": "When an input is received and the `condition` is `TRUE`, perform the specified `actions`.",
      "properties": {
        "Events": {
          "type": "array",
          "uniqueItems": false,
          "insertionOrder": false,
          "description": "Specifies the `actions` performed when the `condition` evaluates to `TRUE`.",
          "items": {
            "$ref": "#/$defs/Event"
          }
        },
        "TransitionEvents": {
          "type": "array",
          "uniqueItems": false,
          "insertionOrder": true,
          "description": "Specifies the `actions` performed, and the next `state` entered, when a `condition` evaluates to `TRUE`.",
          "items": {
            "$ref": "#/$defs/TransitionEvent"
          }
        }
      },
      "additionalProperties": false
    },
    "Event": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelEventDefinition",
      "description": "Specifies the `actions` to be performed when the `condition` evaluates to `TRUE`.",
      "properties": {
        "Actions": {
          "type": "array",
          "uniqueItems": false,
          "insertionOrder": false,
          "description": "The actions to be performed.",
          "items": {
            "$ref": "#/$defs/Action"
          }
        },
        "Condition": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 512
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Boolean expression that, when `TRUE`, causes the `actions` to be performed. If not present, the `actions` are performed (=`TRUE`). If the expression result is not a `Boolean` value, the `actions` are not performed (=`FALSE`)."
        },
        "EventName": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the event."
        }
      },
      "required": [
        "EventName"
      ],
      "additionalProperties": false
    },
    "TransitionEvent": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelTransitionEventDefinition",
      "description": "Specifies the `actions `performed and the next `state` entered when a `condition` evaluates to `TRUE`.",
      "properties": {
        "Actions": {
          "type": "array",
          "description": "The actions to be performed.",
          "uniqueItems": false,
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/Action"
          }
        },
        "Condition": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 512
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A Boolean expression that when `TRUE` causes the `actions` to be performed and the `nextState` to be entered."
        },
        "EventName": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the event."
        },
        "NextState": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The next state to enter."
        }
      },
      "required": [
        "Condition",
        "EventName",
        "NextState"
      ],
      "additionalProperties": false
    },
    "Action": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelActionDefinition",
      "description": "The actions to be performed.",
      "properties": {
        "ClearTimer": {
          "$ref": "#/$defs/ClearTimer"
        },
        "DynamoDB": {
          "$ref": "#/$defs/DynamoDB"
        },
        "DynamoDBv2": {
          "$ref": "#/$defs/DynamoDBv2"
        },
        "Firehose": {
          "$ref": "#/$defs/Firehose"
        },
        "IotEvents": {
          "$ref": "#/$defs/IotEvents"
        },
        "IotSiteWise": {
          "$ref": "#/$defs/IotSiteWise"
        },
        "IotTopicPublish": {
          "$ref": "#/$defs/IotTopicPublish"
        },
        "Lambda": {
          "$ref": "#/$defs/Lambda"
        },
        "ResetTimer": {
          "$ref": "#/$defs/ResetTimer"
        },
        "SetTimer": {
          "$ref": "#/$defs/SetTimer"
        },
        "SetVariable": {
          "$ref": "#/$defs/SetVariable"
        },
        "Sns": {
          "$ref": "#/$defs/Sns"
        },
        "Sqs": {
          "$ref": "#/$defs/Sqs"
        }
      },
      "additionalProperties": false
    },
    "ClearTimer": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelClearTimerDefinition",
      "description": "Information needed to clear the timer.",
      "properties": {
        "TimerName": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "TimerName"
      ],
      "additionalProperties": false
    },
    "DynamoDB": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelDynamoDBDefinition",
      "description": "Writes to the DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the [payload](https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html). One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see [Actions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-event-actions.html) in *AWS IoT Events Developer Guide*.",
      "properties": {
        "HashKeyField": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the hash key (also called the partition key)."
        },
        "HashKeyType": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The data type for the hash key (also called the partition key). You can specify the following values:\n\n* `STRING` - The hash key is a string.\n\n* `NUMBER` - The hash key is a number.\n\nIf you don't specify `hashKeyType`, the default value is `STRING`."
        },
        "HashKeyValue": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value of the hash key (also called the partition key)."
        },
        "Operation": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The type of operation to perform. You can specify the following values:\n\n* `INSERT` - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.\n\n* `UPDATE` - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.\n\n* `DELETE` - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.\n\nIf you don't specify this parameter, AWS IoT Events triggers the `INSERT` operation."
        },
        "Payload": {
          "$ref": "#/$defs/Payload"
        },
        "PayloadField": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the DynamoDB column that receives the action payload.\n\nIf you don't specify this parameter, the name of the DynamoDB column is `payload`."
        },
        "RangeKeyField": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the range key (also called the sort key)."
        },
        "RangeKeyType": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The data type for the range key (also called the sort key), You can specify the following values:\n\n* `STRING` - The range key is a string.\n\n* `NUMBER` - The range key is number.\n\nIf you don't specify `rangeKeyField`, the default value is `STRING`."
        },
        "RangeKeyValue": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value of the range key (also called the sort key)."
        },
        "TableName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the DynamoDB table."
        }
      },
      "required": [
        "HashKeyField",
        "HashKeyValue",
        "TableName"
      ],
      "additionalProperties": false
    },
    "DynamoDBv2": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelDynamoDBv2Definition",
      "description": "Defines an action to write to the Amazon DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the [payload](https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html). A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.\n\nYou can use expressions for parameters that are strings. For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide*.",
      "properties": {
        "Payload": {
          "$ref": "#/$defs/Payload"
        },
        "TableName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the DynamoDB table."
        }
      },
      "required": [
        "TableName"
      ],
      "additionalProperties": false
    },
    "Firehose": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelFirehoseDefinition",
      "description": "Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.",
      "properties": {
        "DeliveryStreamName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the Kinesis Data Firehose delivery stream where the data is written."
        },
        "Payload": {
          "$ref": "#/$defs/Payload"
        },
        "Separator": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "([\\n\\t])|(\\r\\n)|(,)"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: '\\n' (newline), '\\t' (tab), '\\r\\n' (Windows newline), ',' (comma)."
        }
      },
      "required": [
        "DeliveryStreamName"
      ],
      "additionalProperties": false
    },
    "IotEvents": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelIotEventsDefinition",
      "description": "Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.",
      "properties": {
        "InputName": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the AWS IoT Events input where the data is sent."
        },
        "Payload": {
          "$ref": "#/$defs/Payload"
        }
      },
      "required": [
        "InputName"
      ],
      "additionalProperties": false
    },
    "IotSiteWise": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelIotSiteWiseDefinition",
      "description": "Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise.",
      "properties": {
        "AssetId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The ID of the asset that has the specified property. You can specify an expression."
        },
        "EntryId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier. You can also specify an expression."
        },
        "PropertyAlias": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The alias of the asset property. You can also specify an expression."
        },
        "PropertyId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The ID of the asset property. You can specify an expression."
        },
        "PropertyValue": {
          "$ref": "#/$defs/AssetPropertyValue"
        }
      },
      "required": [
        "PropertyValue"
      ],
      "additionalProperties": false
    },
    "IotTopicPublish": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelIotTopicPublishDefinition",
      "description": "Information required to publish the MQTT message through the AWS IoT message broker.",
      "properties": {
        "MqttTopic": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The MQTT topic of the message. You can use a string expression that includes variables (`$variable.<variable-name>`) and input values (`$input.<input-name>.<path-to-datum>`) as the topic string."
        },
        "Payload": {
          "$ref": "#/$defs/Payload"
        }
      },
      "required": [
        "MqttTopic"
      ],
      "additionalProperties": false
    },
    "Lambda": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelLambdaDefinition",
      "properties": {
        "FunctionArn": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The ARN of the Lambda function that is executed."
        },
        "Payload": {
          "$ref": "#/$defs/Payload"
        }
      },
      "required": [
        "FunctionArn"
      ],
      "additionalProperties": false
    },
    "ResetTimer": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelResetTimerDefinition",
      "description": "Information required to reset the timer. The timer is reset to the previously evaluated result of the duration. The duration expression isn't reevaluated when you reset the timer.",
      "properties": {
        "TimerName": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the timer to reset."
        }
      },
      "required": [
        "TimerName"
      ],
      "additionalProperties": false
    },
    "SetTimer": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelSetTimerDefinition",
      "description": "Information needed to set the timer.",
      "properties": {
        "DurationExpression": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The duration of the timer, in seconds. You can use a string expression that includes numbers, variables (`$variable.<variable-name>`), and input values (`$input.<input-name>.<path-to-datum>`) as the duration. The range of the duration is `1-31622400` seconds. To ensure accuracy, the minimum duration is `60` seconds. The evaluated result of the duration is rounded down to the nearest whole number."
        },
        "Seconds": {
          "type": "integer",
          "description": "The number of seconds until the timer expires. The minimum value is `60` seconds to ensure accuracy. The maximum value is `31622400` seconds.",
          "minimum": 60,
          "maximum": 31622400
        },
        "TimerName": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the timer."
        }
      },
      "required": [
        "TimerName"
      ],
      "additionalProperties": false
    },
    "SetVariable": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelSetVariableDefinition",
      "description": "Information about the variable and its new value.",
      "properties": {
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The new value of the variable."
        },
        "VariableName": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the variable."
        }
      },
      "required": [
        "Value",
        "VariableName"
      ],
      "additionalProperties": false
    },
    "Sns": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelSnsDefinition",
      "description": "Information required to publish the Amazon SNS message.",
      "properties": {
        "Payload": {
          "$ref": "#/$defs/Payload"
        },
        "TargetArn": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The ARN of the Amazon SNS target where the message is sent."
        }
      },
      "required": [
        "TargetArn"
      ],
      "additionalProperties": false
    },
    "Sqs": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelSqsDefinition",
      "properties": {
        "Payload": {
          "$ref": "#/$defs/Payload"
        },
        "QueueUrl": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The URL of the SQS queue where the data is written."
        },
        "UseBase64": {
          "type": "boolean",
          "description": "Set this to `TRUE` if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to `FALSE`."
        }
      },
      "required": [
        "QueueUrl"
      ],
      "additionalProperties": false
    },
    "AssetPropertyValue": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelAssetPropertyValueDefinition",
      "description": "A structure that contains value information. For more information, see [AssetPropertyValue](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_AssetPropertyValue.html) in the *AWS IoT SiteWise API Reference*.",
      "properties": {
        "Quality": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The quality of the asset property value. The value must be `GOOD`, `BAD`, or `UNCERTAIN`. You can also specify an expression."
        },
        "Timestamp": {
          "$ref": "#/$defs/AssetPropertyTimestamp"
        },
        "Value": {
          "$ref": "#/$defs/AssetPropertyVariant"
        }
      },
      "required": [
        "Value"
      ],
      "additionalProperties": false
    },
    "AssetPropertyTimestamp": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelAssetPropertyTimestampDefinition",
      "description": "A structure that contains timestamp information. For more information, see [TimeInNanos](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_TimeInNanos.html) in the *AWS IoT SiteWise API Reference*.",
      "properties": {
        "OffsetInNanos": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The timestamp, in seconds, in the Unix epoch format. The valid range is between `1-31556889864403199`. You can also specify an expression."
        },
        "TimeInSeconds": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The nanosecond offset converted from `timeInSeconds`. The valid range is between `0-999999999`. You can also specify an expression."
        }
      },
      "required": [
        "TimeInSeconds"
      ],
      "additionalProperties": false
    },
    "AssetPropertyVariant": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelAssetPropertyVariantDefinition",
      "description": "A structure that contains an asset property value. For more information, see [Variant](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_Variant.html) in the *AWS IoT SiteWise API Reference*.",
      "properties": {
        "BooleanValue": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The asset property value is a Boolean value that must be `TRUE` or `FALSE`. You can also specify an expression. If you use an expression, the evaluated result should be a Boolean value."
        },
        "DoubleValue": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The asset property value is a double. You can also specify an expression. If you use an expression, the evaluated result should be a double."
        },
        "IntegerValue": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The asset property value is an integer. You can also specify an expression. If you use an expression, the evaluated result should be an integer."
        },
        "StringValue": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The asset property value is a string. You can also specify an expression. If you use an expression, the evaluated result should be a string."
        }
      },
      "additionalProperties": false
    },
    "Payload": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelPayloadDefinition",
      "description": "Information needed to configure the payload.\n\nBy default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use `contentExpression`.",
      "properties": {
        "ContentExpression": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The content of the payload. You can use a string expression that includes quoted strings (`'<string>'`), variables (`$variable.<variable-name>`), input values (`$input.<input-name>.<path-to-datum>`), string concatenations, and quoted strings that contain `${}` as the content. The recommended maximum size of a content expression is 1 KB."
        },
        "Type": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value of the payload type can be either `STRING` or `JSON`."
        }
      },
      "required": [
        "ContentExpression",
        "Type"
      ],
      "additionalProperties": false
    },
    "Tag": {
      "type": "object",
      "title": "AWSIoTEventsDetectorModelTagDefinition",
      "description": "Tags to be applied to Input.",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Key of the Tag."
        },
        "Value": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Value of the Tag."
        }
      },
      "required": [
        "Value",
        "Key"
      ],
      "additionalProperties": false
    }
  },
  "primaryIdentifier": [
    "/properties/DetectorModelName"
  ]
}
