{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-personalize-solution.json",
  "title": "AWSPersonalizeSolutionProperties",
  "description": "Resource schema for AWS::Personalize::Solution.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-personalize>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-personalize-solution.json",
    "sourceSha256": "19d3ba6a52df1b005d5a8504645e2b8bda006e94dc0616bd22d9857bdec2a5f5"
  },
  "type": "object",
  "properties": {
    "Name": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 63,
          "pattern": "^[a-zA-Z0-9][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 for the solution"
    },
    "EventType": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 256
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "When your have multiple event types (using an EVENT_TYPE schema field), this parameter specifies which event type (for example, 'click' or 'like') is used for training the model. If you do not provide an eventType, Amazon Personalize will use all interactions for training with equal weight regardless of type."
    },
    "DatasetGroupArn": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 256,
          "pattern": "arn:([a-z0-9-]+):personalize:.*:.*:.+"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ARN of the dataset group that provides the training data."
    },
    "PerformAutoML": {
      "description": "Whether to perform automated machine learning (AutoML). The default is false. For this case, you must specify recipeArn.",
      "type": "boolean"
    },
    "PerformHPO": {
      "description": "Whether to perform hyperparameter optimization (HPO) on the specified or selected recipe. The default is false. When performing AutoML, this parameter is always true and you should not set it to false.",
      "type": "boolean"
    },
    "RecipeArn": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 256,
          "pattern": "arn:([a-z0-9-]+):personalize:.*:.*:.+"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ARN of the recipe to use for model training. Only specified when performAutoML is false."
    },
    "SolutionConfig": {
      "$ref": "#/$defs/SolutionConfig"
    }
  },
  "typeName": "AWS::Personalize::Solution",
  "primaryIdentifier": [
    "/properties/SolutionArn"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-personalize",
  "additionalProperties": false,
  "readOnlyProperties": [
    "/properties/SolutionArn"
  ],
  "$defs": {
    "SolutionArn": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 256,
          "pattern": "arn:([a-z0-9-]+):personalize:.*:.*:.+"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ARN of the solution",
      "title": "AWSPersonalizeSolutionSolutionArnDefinition"
    },
    "CategoricalHyperParameterRange": {
      "description": "Provides the name and values of a Categorical hyperparameter.",
      "type": "object",
      "properties": {
        "Name": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the hyperparameter."
        },
        "Values": {
          "description": "A list of the categories for the hyperparameter.",
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 1000
          },
          "maxItems": 100,
          "insertionOrder": true
        }
      },
      "title": "AWSPersonalizeSolutionCategoricalHyperParameterRangeDefinition",
      "additionalProperties": false
    },
    "ContinuousHyperParameterRange": {
      "description": "Provides the name and range of a continuous hyperparameter.",
      "type": "object",
      "properties": {
        "Name": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the hyperparameter."
        },
        "MinValue": {
          "description": "The minimum allowable value for the hyperparameter.",
          "type": "number",
          "minimum": -1000000
        },
        "MaxValue": {
          "description": "The maximum allowable value for the hyperparameter.",
          "type": "number",
          "minimum": -1000000
        }
      },
      "title": "AWSPersonalizeSolutionContinuousHyperParameterRangeDefinition",
      "additionalProperties": false
    },
    "IntegerHyperParameterRange": {
      "description": "Provides the name and range of an integer-valued hyperparameter.",
      "type": "object",
      "properties": {
        "Name": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the hyperparameter."
        },
        "MinValue": {
          "description": "The minimum allowable value for the hyperparameter.",
          "type": "integer",
          "minimum": -1000000
        },
        "MaxValue": {
          "description": "The maximum allowable value for the hyperparameter.",
          "type": "integer",
          "maximum": 1000000
        }
      },
      "title": "AWSPersonalizeSolutionIntegerHyperParameterRangeDefinition",
      "additionalProperties": false
    },
    "SolutionConfig": {
      "type": "object",
      "description": "The configuration to use with the solution. When performAutoML is set to true, Amazon Personalize only evaluates the autoMLConfig section of the solution configuration.",
      "properties": {
        "AlgorithmHyperParameters": {
          "description": "Lists the hyperparameter names and ranges.",
          "type": "object",
          "additionalProperties": false,
          "maxProperties": 100,
          "patternProperties": {
            ".{1,}": {
              "type": "string"
            }
          }
        },
        "AutoMLConfig": {
          "description": "The AutoMLConfig object containing a list of recipes to search when AutoML is performed.",
          "type": "object",
          "properties": {
            "MetricName": {
              "oneOf": [
                {
                  "type": "string",
                  "maxLength": 256
                },
                {
                  "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                }
              ],
              "description": "The metric to optimize."
            },
            "RecipeList": {
              "description": "The list of candidate recipes.",
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 256,
                "pattern": "arn:([a-z0-9-]+):personalize:.*:.*:.+"
              },
              "insertionOrder": true,
              "maxItems": 100
            }
          },
          "additionalProperties": false
        },
        "EventValueThreshold": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Only events with a value greater than or equal to this threshold are used for training a model."
        },
        "FeatureTransformationParameters": {
          "description": "Lists the feature transformation parameters.",
          "type": "object",
          "additionalProperties": false,
          "maxProperties": 100,
          "patternProperties": {
            ".{1,}": {
              "type": "string"
            }
          }
        },
        "HpoConfig": {
          "description": "Describes the properties for hyperparameter optimization (HPO)",
          "type": "object",
          "properties": {
            "AlgorithmHyperParameterRanges": {
              "description": "The hyperparameters and their allowable ranges",
              "type": "object",
              "properties": {
                "CategoricalHyperParameterRanges": {
                  "description": "The categorical hyperparameters and their ranges.",
                  "type": "array",
                  "maxItems": 100,
                  "items": {
                    "$ref": "#/$defs/CategoricalHyperParameterRange"
                  },
                  "insertionOrder": true
                },
                "ContinuousHyperParameterRanges": {
                  "description": "The continuous hyperparameters and their ranges.",
                  "type": "array",
                  "maxItems": 100,
                  "items": {
                    "$ref": "#/$defs/ContinuousHyperParameterRange"
                  },
                  "insertionOrder": true
                },
                "IntegerHyperParameterRanges": {
                  "description": "The integer hyperparameters and their ranges.",
                  "type": "array",
                  "maxItems": 100,
                  "items": {
                    "$ref": "#/$defs/IntegerHyperParameterRange"
                  },
                  "insertionOrder": true
                }
              },
              "additionalProperties": false
            },
            "HpoObjective": {
              "description": "The metric to optimize during HPO.",
              "type": "object",
              "properties": {
                "MetricName": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 256
                    },
                    {
                      "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                    }
                  ],
                  "description": "The name of the metric"
                },
                "Type": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "Maximize",
                        "Minimize"
                      ]
                    },
                    {
                      "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                    }
                  ],
                  "description": "The type of the metric. Valid values are Maximize and Minimize."
                },
                "MetricRegex": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 256
                    },
                    {
                      "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                    }
                  ],
                  "description": "A regular expression for finding the metric in the training job logs."
                }
              },
              "additionalProperties": false
            },
            "HpoResourceConfig": {
              "description": "Describes the resource configuration for hyperparameter optimization (HPO).",
              "type": "object",
              "properties": {
                "MaxNumberOfTrainingJobs": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 256
                    },
                    {
                      "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                    }
                  ],
                  "description": "The maximum number of training jobs when you create a solution version. The maximum value for maxNumberOfTrainingJobs is 40."
                },
                "MaxParallelTrainingJobs": {
                  "oneOf": [
                    {
                      "type": "string",
                      "maxLength": 256
                    },
                    {
                      "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                    }
                  ],
                  "description": "The maximum number of parallel training jobs when you create a solution version. The maximum value for maxParallelTrainingJobs is 10."
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        }
      },
      "title": "AWSPersonalizeSolutionSolutionConfigDefinition",
      "additionalProperties": false
    }
  },
  "required": [
    "Name",
    "DatasetGroupArn"
  ],
  "createOnlyProperties": [
    "/properties/Name",
    "/properties/EventType",
    "/properties/DatasetGroupArn",
    "/properties/PerformAutoML",
    "/properties/PerformHPO",
    "/properties/RecipeArn",
    "/properties/SolutionConfig"
  ],
  "taggable": false
}
