{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-comprehend-flywheel.json",
  "title": "AWSComprehendFlywheelProperties",
  "description": "The AWS::Comprehend::Flywheel resource creates an Amazon Comprehend Flywheel that enables customer to train their model.. Source:- No source definition found, add manually please",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-comprehend-flywheel.json",
    "sourceSha256": "93b3c7796e7cabbbf4bd910e03d382ecddabd87d5c9ef98a04bf55183f423041"
  },
  "type": "object",
  "properties": {
    "ActiveModelArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?",
          "maxLength": 256
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "DataAccessRoleArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+",
          "minLength": 20,
          "maxLength": 2048
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "DataLakeS3Uri": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?",
          "maxLength": 512
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "DataSecurityConfig": {
      "$ref": "#/$defs/DataSecurityConfig"
    },
    "FlywheelName": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$",
          "minLength": 1,
          "maxLength": 63
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "ModelType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "DOCUMENT_CLASSIFIER",
            "ENTITY_RECOGNIZER"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "insertionOrder": false,
      "uniqueItems": true
    },
    "TaskConfig": {
      "$ref": "#/$defs/TaskConfig"
    }
  },
  "typeName": "AWS::Comprehend::Flywheel",
  "additionalProperties": false,
  "$defs": {
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "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"
            }
          ]
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "title": "AWSComprehendFlywheelTagDefinition",
      "required": [
        "Key",
        "Value"
      ],
      "additionalProperties": false
    },
    "TaskConfig": {
      "type": "object",
      "properties": {
        "LanguageCode": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "en",
                "es",
                "fr",
                "it",
                "de",
                "pt"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "DocumentClassificationConfig": {
          "$ref": "#/$defs/DocumentClassificationConfig"
        },
        "EntityRecognitionConfig": {
          "$ref": "#/$defs/EntityRecognitionConfig"
        }
      },
      "required": [
        "LanguageCode"
      ],
      "title": "AWSComprehendFlywheelTaskConfigDefinition",
      "additionalProperties": false
    },
    "DataSecurityConfig": {
      "type": "object",
      "properties": {
        "ModelKmsKeyId": {
          "$ref": "#/$defs/KmsKeyId"
        },
        "VolumeKmsKeyId": {
          "$ref": "#/$defs/KmsKeyId"
        },
        "DataLakeKmsKeyId": {
          "$ref": "#/$defs/KmsKeyId"
        },
        "VpcConfig": {
          "$ref": "#/$defs/VpcConfig"
        }
      },
      "required": [],
      "title": "AWSComprehendFlywheelDataSecurityConfigDefinition",
      "additionalProperties": false
    },
    "VpcConfig": {
      "type": "object",
      "properties": {
        "SecurityGroupIds": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "[-0-9a-zA-Z]+",
            "minLength": 1,
            "maxLength": 32
          },
          "insertionOrder": false,
          "uniqueItems": true,
          "minItems": 1,
          "maxItems": 5
        },
        "Subnets": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "[-0-9a-zA-Z]+",
            "minLength": 1,
            "maxLength": 32
          },
          "insertionOrder": false,
          "uniqueItems": true,
          "minItems": 1,
          "maxItems": 16
        }
      },
      "required": [
        "SecurityGroupIds",
        "Subnets"
      ],
      "title": "AWSComprehendFlywheelVpcConfigDefinition",
      "additionalProperties": false
    },
    "KmsKeyId": {
      "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"
        }
      ],
      "title": "AWSComprehendFlywheelKmsKeyIdDefinition"
    },
    "EntityTypesListItem": {
      "type": "object",
      "properties": {
        "Type": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^(?![^\\n\\r\\t,]*\\\\n|\\\\r|\\\\t)[^\\n\\r\\t,]+$",
              "minLength": 1,
              "maxLength": 64
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "title": "AWSComprehendFlywheelEntityTypesListItemDefinition",
      "required": [
        "Type"
      ],
      "additionalProperties": false
    },
    "EntityRecognitionConfig": {
      "type": "object",
      "properties": {
        "EntityTypes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EntityTypesListItem"
          },
          "insertionOrder": false,
          "uniqueItems": true,
          "minItems": 1,
          "maxItems": 25
        }
      },
      "title": "AWSComprehendFlywheelEntityRecognitionConfigDefinition",
      "additionalProperties": false
    },
    "DocumentClassificationConfig": {
      "type": "object",
      "properties": {
        "Mode": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "MULTI_CLASS",
                "MULTI_LABEL"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Labels": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 5000
          },
          "insertionOrder": false,
          "uniqueItems": true,
          "maxItems": 1000
        }
      },
      "title": "AWSComprehendFlywheelDocumentClassificationConfigDefinition",
      "required": [
        "Mode"
      ],
      "additionalProperties": false
    }
  },
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": true,
    "tagProperty": "/properties/Tags"
  },
  "required": [
    "FlywheelName",
    "DataAccessRoleArn",
    "DataLakeS3Uri"
  ],
  "primaryIdentifier": [
    "/properties/Arn"
  ],
  "createOnlyProperties": [
    "/properties/FlywheelName",
    "/properties/ModelType",
    "/properties/DataLakeS3Uri",
    "/properties/TaskConfig"
  ],
  "readOnlyProperties": [
    "/properties/Arn"
  ]
}
