{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-iotfleetwise-campaign.json",
  "title": "AWSIoTFleetWiseCampaignProperties",
  "description": "Definition of AWS::IoTFleetWise::Campaign Resource Type. Source:- No source definition found, add manually please",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-iotfleetwise-campaign.json",
    "sourceSha256": "0bf87f68cf111507abb168fbcd59ac6c3ed12100bd0d2039b1d7cfbe2d0d0b9f"
  },
  "type": "object",
  "properties": {
    "Action": {
      "$ref": "#/$defs/UpdateCampaignAction"
    },
    "Compression": {
      "$ref": "#/$defs/Compression"
    },
    "Description": {
      "oneOf": [
        {
          "minLength": 1,
          "pattern": "^[^\\u0000-\\u001F\\u007F]+$",
          "type": "string",
          "maxLength": 2048
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "Priority": {
      "type": "integer",
      "minimum": 0,
      "default": 0
    },
    "SignalsToCollect": {
      "minItems": 0,
      "maxItems": 1000,
      "insertionOrder": false,
      "type": "array",
      "items": {
        "$ref": "#/$defs/SignalInformation"
      }
    },
    "DataDestinationConfigs": {
      "minItems": 1,
      "maxItems": 1,
      "insertionOrder": false,
      "type": "array",
      "items": {
        "$ref": "#/$defs/DataDestinationConfig"
      }
    },
    "StartTime": {
      "oneOf": [
        {
          "format": "date-time",
          "type": "string",
          "default": "0"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "Name": {
      "oneOf": [
        {
          "minLength": 1,
          "pattern": "^[a-zA-Z0-9\\-_:]+$",
          "type": "string",
          "maxLength": 100
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "ExpiryTime": {
      "oneOf": [
        {
          "format": "date-time",
          "type": "string",
          "default": "253402214400"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "SpoolingMode": {
      "$ref": "#/$defs/SpoolingMode"
    },
    "SignalCatalogArn": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "PostTriggerCollectionDuration": {
      "maximum": 4294967295,
      "type": "number",
      "minimum": 0,
      "default": 0
    },
    "DataExtraDimensions": {
      "minItems": 0,
      "maxItems": 5,
      "insertionOrder": false,
      "type": "array",
      "items": {
        "minLength": 1,
        "pattern": "^[a-zA-Z0-9_.]+$",
        "type": "string",
        "maxLength": 150
      }
    },
    "DiagnosticsMode": {
      "$ref": "#/$defs/DiagnosticsMode"
    },
    "TargetArn": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "CollectionScheme": {
      "$ref": "#/$defs/CollectionScheme"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "insertionOrder": false,
      "uniqueItems": true,
      "maxItems": 50,
      "minItems": 0
    }
  },
  "typeName": "AWS::IoTFleetWise::Campaign",
  "required": [
    "Name",
    "Action",
    "CollectionScheme",
    "SignalCatalogArn",
    "TargetArn"
  ],
  "additionalProperties": false,
  "primaryIdentifier": [
    "/properties/Name"
  ],
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": true,
    "tagProperty": "/properties/Tags"
  },
  "readOnlyProperties": [
    "/properties/Arn",
    "/properties/Status",
    "/properties/CreationTime",
    "/properties/LastModificationTime"
  ],
  "writeOnlyProperties": [
    "/properties/Action"
  ],
  "createOnlyProperties": [
    "/properties/Name",
    "/properties/TargetArn",
    "/properties/SignalCatalogArn",
    "/properties/PostTriggerCollectionDuration",
    "/properties/DiagnosticsMode",
    "/properties/SpoolingMode",
    "/properties/CollectionScheme",
    "/properties/Priority",
    "/properties/Compression",
    "/properties/StartTime",
    "/properties/ExpiryTime"
  ],
  "$defs": {
    "Compression": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "OFF",
            "SNAPPY"
          ],
          "default": "OFF"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSIoTFleetWiseCampaignCompressionDefinition"
    },
    "DataDestinationConfig": {
      "oneOf": [
        {
          "required": [
            "S3Config"
          ],
          "type": "object",
          "title": "S3Config",
          "properties": {
            "S3Config": {
              "$ref": "#/$defs/S3Config"
            }
          },
          "additionalProperties": false
        },
        {
          "required": [
            "TimestreamConfig"
          ],
          "type": "object",
          "title": "TimestreamConfig",
          "properties": {
            "TimestreamConfig": {
              "$ref": "#/$defs/TimestreamConfig"
            }
          },
          "additionalProperties": false
        }
      ],
      "title": "AWSIoTFleetWiseCampaignDataDestinationConfigDefinition"
    },
    "S3Config": {
      "title": "AWSIoTFleetWiseCampaignS3ConfigDefinition",
      "type": "object",
      "properties": {
        "BucketArn": {
          "oneOf": [
            {
              "maxLength": 100,
              "type": "string",
              "pattern": "^arn:(aws[a-zA-Z0-9-]*):s3:::.+$",
              "minLength": 16
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "DataFormat": {
          "$ref": "#/$defs/DataFormat"
        },
        "StorageCompressionFormat": {
          "$ref": "#/$defs/StorageCompressionFormat"
        },
        "Prefix": {
          "oneOf": [
            {
              "maxLength": 512,
              "type": "string",
              "pattern": "^[a-zA-Z0-9-_:./!*'()]+$",
              "minLength": 1
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "BucketArn"
      ],
      "additionalProperties": false
    },
    "TimestreamConfig": {
      "title": "AWSIoTFleetWiseCampaignTimestreamConfigDefinition",
      "type": "object",
      "properties": {
        "TimestreamTableArn": {
          "oneOf": [
            {
              "maxLength": 2048,
              "type": "string",
              "pattern": "^arn:(aws[a-zA-Z0-9-]*):timestream:[a-zA-Z0-9-]+:[0-9]{12}:database\\/[a-zA-Z0-9_.-]+\\/table\\/[a-zA-Z0-9_.-]+$",
              "minLength": 20
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "ExecutionRoleArn": {
          "oneOf": [
            {
              "maxLength": 2048,
              "type": "string",
              "pattern": "^arn:(aws[a-zA-Z0-9-]*):iam::(\\d{12})?:(role((\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F))[\\w+=,.@-]+)$",
              "minLength": 20
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "TimestreamTableArn",
        "ExecutionRoleArn"
      ],
      "additionalProperties": false
    },
    "UpdateCampaignAction": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "APPROVE",
            "SUSPEND",
            "RESUME",
            "UPDATE"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSIoTFleetWiseCampaignUpdateCampaignActionDefinition"
    },
    "CampaignStatus": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "CREATING",
            "WAITING_FOR_APPROVAL",
            "RUNNING",
            "SUSPENDED"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSIoTFleetWiseCampaignCampaignStatusDefinition"
    },
    "DiagnosticsMode": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "OFF",
            "SEND_ACTIVE_DTCS"
          ],
          "default": "OFF"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSIoTFleetWiseCampaignDiagnosticsModeDefinition"
    },
    "SignalInformation": {
      "title": "AWSIoTFleetWiseCampaignSignalInformationDefinition",
      "type": "object",
      "properties": {
        "MaxSampleCount": {
          "maximum": 4294967295,
          "type": "number",
          "minimum": 1
        },
        "Name": {
          "oneOf": [
            {
              "minLength": 1,
              "pattern": "^[\\w|*|-]+(\\.[\\w|*|-]+)*$",
              "type": "string",
              "maxLength": 150
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "MinimumSamplingIntervalMs": {
          "maximum": 4294967295,
          "type": "number",
          "minimum": 0
        }
      },
      "required": [
        "Name"
      ],
      "additionalProperties": false
    },
    "TimeBasedCollectionScheme": {
      "title": "AWSIoTFleetWiseCampaignTimeBasedCollectionSchemeDefinition",
      "type": "object",
      "properties": {
        "PeriodMs": {
          "maximum": 60000,
          "type": "number",
          "minimum": 10000
        }
      },
      "required": [
        "PeriodMs"
      ],
      "additionalProperties": false
    },
    "SpoolingMode": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "OFF",
            "TO_DISK"
          ],
          "default": "OFF"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSIoTFleetWiseCampaignSpoolingModeDefinition"
    },
    "TriggerMode": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "ALWAYS",
            "RISING_EDGE"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSIoTFleetWiseCampaignTriggerModeDefinition"
    },
    "DataFormat": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "JSON",
            "PARQUET"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSIoTFleetWiseCampaignDataFormatDefinition"
    },
    "StorageCompressionFormat": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "NONE",
            "GZIP"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSIoTFleetWiseCampaignStorageCompressionFormatDefinition"
    },
    "CollectionScheme": {
      "oneOf": [
        {
          "required": [
            "TimeBasedCollectionScheme"
          ],
          "type": "object",
          "title": "TimeBasedCollectionScheme",
          "properties": {
            "TimeBasedCollectionScheme": {
              "$ref": "#/$defs/TimeBasedCollectionScheme"
            }
          },
          "additionalProperties": false
        },
        {
          "required": [
            "ConditionBasedCollectionScheme"
          ],
          "type": "object",
          "title": "ConditionBasedCollectionScheme",
          "properties": {
            "ConditionBasedCollectionScheme": {
              "$ref": "#/$defs/ConditionBasedCollectionScheme"
            }
          },
          "additionalProperties": false
        }
      ],
      "title": "AWSIoTFleetWiseCampaignCollectionSchemeDefinition"
    },
    "ConditionBasedCollectionScheme": {
      "title": "AWSIoTFleetWiseCampaignConditionBasedCollectionSchemeDefinition",
      "type": "object",
      "properties": {
        "MinimumTriggerIntervalMs": {
          "maximum": 4294967295,
          "type": "number",
          "minimum": 0
        },
        "Expression": {
          "oneOf": [
            {
              "minLength": 1,
              "type": "string",
              "maxLength": 2048
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "TriggerMode": {
          "$ref": "#/$defs/TriggerMode"
        },
        "ConditionLanguageVersion": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "Expression"
      ],
      "additionalProperties": false
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 128,
              "minLength": 1
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 256,
              "minLength": 0
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "title": "AWSIoTFleetWiseCampaignTagDefinition",
      "additionalProperties": false
    }
  }
}
