{
 "additionalProperties": false,
 "definitions": {
  "AutoEvaluationConfiguration": {
   "additionalProperties": false,
   "properties": {
    "Enabled": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "AutomaticFailConfiguration": {
   "additionalProperties": false,
   "properties": {
    "TargetSection": {
     "pattern": "^[a-zA-Z0-9._-]{1,40}$",
     "type": "string"
    }
   },
   "type": "object"
  },
  "EvaluationFormBaseItem": {
   "additionalProperties": false,
   "properties": {
    "Section": {
     "$ref": "#/definitions/EvaluationFormSection"
    }
   },
   "required": [
    "Section"
   ],
   "type": "object"
  },
  "EvaluationFormItem": {
   "additionalProperties": false,
   "properties": {
    "Question": {
     "$ref": "#/definitions/EvaluationFormQuestion"
    },
    "Section": {
     "$ref": "#/definitions/EvaluationFormSection"
    }
   },
   "type": "object"
  },
  "EvaluationFormItemEnablementCondition": {
   "additionalProperties": false,
   "properties": {
    "Operands": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/EvaluationFormItemEnablementConditionOperand"
     },
     "minItems": 1,
     "type": "array"
    },
    "Operator": {
     "enum": [
      "OR",
      "AND"
     ],
     "type": "string"
    }
   },
   "required": [
    "Operands"
   ],
   "type": "object"
  },
  "EvaluationFormItemEnablementConditionOperand": {
   "additionalProperties": false,
   "properties": {
    "Expression": {
     "$ref": "#/definitions/EvaluationFormItemEnablementExpression"
    }
   },
   "type": "object"
  },
  "EvaluationFormItemEnablementConfiguration": {
   "additionalProperties": false,
   "properties": {
    "Action": {
     "enum": [
      "DISABLE",
      "ENABLE"
     ],
     "type": "string"
    },
    "Condition": {
     "$ref": "#/definitions/EvaluationFormItemEnablementCondition"
    },
    "DefaultAction": {
     "enum": [
      "DISABLE",
      "ENABLE"
     ],
     "type": "string"
    }
   },
   "required": [
    "Condition",
    "Action"
   ],
   "type": "object"
  },
  "EvaluationFormItemEnablementExpression": {
   "additionalProperties": false,
   "properties": {
    "Comparator": {
     "enum": [
      "IN",
      "NOT_IN",
      "ALL_IN",
      "EXACT"
     ],
     "type": "string"
    },
    "Source": {
     "$ref": "#/definitions/EvaluationFormItemEnablementSource"
    },
    "Values": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/EvaluationFormItemEnablementSourceValue"
     },
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "Source",
    "Values",
    "Comparator"
   ],
   "type": "object"
  },
  "EvaluationFormItemEnablementSource": {
   "additionalProperties": false,
   "properties": {
    "RefId": {
     "$ref": "#/definitions/RefId"
    },
    "Type": {
     "enum": [
      "QUESTION_REF_ID"
     ],
     "type": "string"
    }
   },
   "required": [
    "Type"
   ],
   "type": "object"
  },
  "EvaluationFormItemEnablementSourceValue": {
   "additionalProperties": false,
   "properties": {
    "RefId": {
     "$ref": "#/definitions/RefId"
    },
    "Type": {
     "enum": [
      "OPTION_REF_ID"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "EvaluationFormLanguageConfiguration": {
   "additionalProperties": false,
   "properties": {
    "FormLanguage": {
     "enum": [
      "de-DE",
      "en-US",
      "es-ES",
      "fr-FR",
      "it-IT",
      "pt-BR"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "EvaluationFormMultiSelectQuestionAutomation": {
   "additionalProperties": false,
   "properties": {
    "AnswerSource": {
     "$ref": "#/definitions/EvaluationFormQuestionAutomationAnswerSource"
    },
    "DefaultOptionRefIds": {
     "$ref": "#/definitions/ReferenceIdList"
    },
    "Options": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/EvaluationFormMultiSelectQuestionAutomationOption"
     },
     "maxItems": 20,
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "Options"
   ],
   "type": "object"
  },
  "EvaluationFormMultiSelectQuestionAutomationOption": {
   "additionalProperties": false,
   "properties": {
    "RuleCategory": {
     "$ref": "#/definitions/MultiSelectQuestionRuleCategoryAutomation"
    }
   },
   "required": [
    "RuleCategory"
   ],
   "type": "object"
  },
  "EvaluationFormMultiSelectQuestionOption": {
   "additionalProperties": false,
   "properties": {
    "RefId": {
     "$ref": "#/definitions/RefId"
    },
    "Text": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "RefId",
    "Text"
   ],
   "type": "object"
  },
  "EvaluationFormMultiSelectQuestionProperties": {
   "additionalProperties": false,
   "properties": {
    "Automation": {
     "$ref": "#/definitions/EvaluationFormMultiSelectQuestionAutomation"
    },
    "DisplayAs": {
     "enum": [
      "DROPDOWN",
      "CHECKBOX"
     ],
     "type": "string"
    },
    "Options": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/EvaluationFormMultiSelectQuestionOption"
     },
     "maxItems": 256,
     "minItems": 2,
     "type": "array"
    }
   },
   "required": [
    "Options"
   ],
   "type": "object"
  },
  "EvaluationFormNumericQuestionAutomation": {
   "additionalProperties": false,
   "properties": {
    "AnswerSource": {
     "$ref": "#/definitions/EvaluationFormQuestionAutomationAnswerSource"
    },
    "PropertyValue": {
     "$ref": "#/definitions/NumericQuestionPropertyValueAutomation"
    }
   },
   "type": "object"
  },
  "EvaluationFormNumericQuestionOption": {
   "additionalProperties": false,
   "properties": {
    "AutomaticFail": {
     "type": "boolean"
    },
    "AutomaticFailConfiguration": {
     "$ref": "#/definitions/AutomaticFailConfiguration"
    },
    "MaxValue": {
     "type": "integer"
    },
    "MinValue": {
     "type": "integer"
    },
    "Score": {
     "$ref": "#/definitions/Score"
    }
   },
   "required": [
    "MinValue",
    "MaxValue"
   ],
   "type": "object"
  },
  "EvaluationFormNumericQuestionProperties": {
   "additionalProperties": false,
   "properties": {
    "Automation": {
     "$ref": "#/definitions/EvaluationFormNumericQuestionAutomation"
    },
    "MaxValue": {
     "type": "integer"
    },
    "MinValue": {
     "type": "integer"
    },
    "Options": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/EvaluationFormNumericQuestionOption"
     },
     "maxItems": 10,
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "MinValue",
    "MaxValue"
   ],
   "type": "object"
  },
  "EvaluationFormQuestion": {
   "additionalProperties": false,
   "properties": {
    "Enablement": {
     "$ref": "#/definitions/EvaluationFormItemEnablementConfiguration"
    },
    "Instructions": {
     "maxLength": 1024,
     "type": "string"
    },
    "NotApplicableEnabled": {
     "type": "boolean"
    },
    "QuestionType": {
     "enum": [
      "NUMERIC",
      "SINGLESELECT",
      "TEXT",
      "MULTISELECT",
      "DATETIME"
     ],
     "type": "string"
    },
    "QuestionTypeProperties": {
     "$ref": "#/definitions/EvaluationFormQuestionTypeProperties"
    },
    "RefId": {
     "$ref": "#/definitions/RefId"
    },
    "Title": {
     "maxLength": 350,
     "minLength": 1,
     "type": "string"
    },
    "Weight": {
     "$ref": "#/definitions/Weight"
    }
   },
   "required": [
    "RefId",
    "Title",
    "QuestionType"
   ],
   "type": "object"
  },
  "EvaluationFormQuestionAutomationAnswerSource": {
   "additionalProperties": false,
   "properties": {
    "SourceType": {
     "enum": [
      "CONTACT_LENS_DATA",
      "GEN_AI"
     ],
     "type": "string"
    }
   },
   "required": [
    "SourceType"
   ],
   "type": "object"
  },
  "EvaluationFormQuestionTypeProperties": {
   "additionalProperties": false,
   "properties": {
    "MultiSelect": {
     "$ref": "#/definitions/EvaluationFormMultiSelectQuestionProperties"
    },
    "Numeric": {
     "$ref": "#/definitions/EvaluationFormNumericQuestionProperties"
    },
    "SingleSelect": {
     "$ref": "#/definitions/EvaluationFormSingleSelectQuestionProperties"
    },
    "Text": {
     "$ref": "#/definitions/EvaluationFormTextQuestionProperties"
    }
   },
   "type": "object"
  },
  "EvaluationFormSection": {
   "additionalProperties": false,
   "properties": {
    "Instructions": {
     "maxLength": 1024,
     "type": "string"
    },
    "Items": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/EvaluationFormItem"
     },
     "maxItems": 200,
     "minItems": 1,
     "type": "array"
    },
    "RefId": {
     "$ref": "#/definitions/RefId"
    },
    "Title": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Weight": {
     "$ref": "#/definitions/Weight"
    }
   },
   "required": [
    "RefId",
    "Title"
   ],
   "type": "object"
  },
  "EvaluationFormSingleSelectQuestionAutomation": {
   "additionalProperties": false,
   "properties": {
    "AnswerSource": {
     "$ref": "#/definitions/EvaluationFormQuestionAutomationAnswerSource"
    },
    "DefaultOptionRefId": {
     "$ref": "#/definitions/RefId"
    },
    "Options": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/EvaluationFormSingleSelectQuestionAutomationOption"
     },
     "maxItems": 20,
     "minItems": 1,
     "type": "array"
    }
   },
   "required": [
    "Options"
   ],
   "type": "object"
  },
  "EvaluationFormSingleSelectQuestionAutomationOption": {
   "additionalProperties": false,
   "properties": {
    "RuleCategory": {
     "$ref": "#/definitions/SingleSelectQuestionRuleCategoryAutomation"
    }
   },
   "required": [
    "RuleCategory"
   ],
   "type": "object"
  },
  "EvaluationFormSingleSelectQuestionOption": {
   "additionalProperties": false,
   "properties": {
    "AutomaticFail": {
     "type": "boolean"
    },
    "AutomaticFailConfiguration": {
     "$ref": "#/definitions/AutomaticFailConfiguration"
    },
    "RefId": {
     "$ref": "#/definitions/RefId"
    },
    "Score": {
     "$ref": "#/definitions/Score"
    },
    "Text": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "RefId",
    "Text"
   ],
   "type": "object"
  },
  "EvaluationFormSingleSelectQuestionProperties": {
   "additionalProperties": false,
   "properties": {
    "Automation": {
     "$ref": "#/definitions/EvaluationFormSingleSelectQuestionAutomation"
    },
    "DisplayAs": {
     "enum": [
      "DROPDOWN",
      "RADIO"
     ],
     "type": "string"
    },
    "Options": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/EvaluationFormSingleSelectQuestionOption"
     },
     "maxItems": 256,
     "minItems": 2,
     "type": "array"
    }
   },
   "required": [
    "Options"
   ],
   "type": "object"
  },
  "EvaluationFormTargetConfiguration": {
   "additionalProperties": false,
   "properties": {
    "ContactInteractionType": {
     "enum": [
      "AGENT",
      "AUTOMATED"
     ],
     "type": "string"
    }
   },
   "required": [
    "ContactInteractionType"
   ],
   "type": "object"
  },
  "EvaluationFormTextQuestionAutomation": {
   "additionalProperties": false,
   "properties": {
    "AnswerSource": {
     "$ref": "#/definitions/EvaluationFormQuestionAutomationAnswerSource"
    }
   },
   "type": "object"
  },
  "EvaluationFormTextQuestionProperties": {
   "additionalProperties": false,
   "properties": {
    "Automation": {
     "$ref": "#/definitions/EvaluationFormTextQuestionAutomation"
    }
   },
   "type": "object"
  },
  "MultiSelectQuestionRuleCategoryAutomation": {
   "additionalProperties": false,
   "properties": {
    "Category": {
     "maxLength": 50,
     "minLength": 1,
     "type": "string"
    },
    "Condition": {
     "enum": [
      "PRESENT",
      "NOT_PRESENT"
     ],
     "type": "string"
    },
    "OptionRefIds": {
     "$ref": "#/definitions/ReferenceIdList"
    }
   },
   "required": [
    "Category",
    "Condition",
    "OptionRefIds"
   ],
   "type": "object"
  },
  "NumericQuestionPropertyValueAutomation": {
   "additionalProperties": false,
   "properties": {
    "Label": {
     "enum": [
      "OVERALL_CUSTOMER_SENTIMENT_SCORE",
      "OVERALL_AGENT_SENTIMENT_SCORE",
      "NON_TALK_TIME",
      "NON_TALK_TIME_PERCENTAGE",
      "NUMBER_OF_INTERRUPTIONS",
      "CONTACT_DURATION",
      "AGENT_INTERACTION_DURATION",
      "CUSTOMER_HOLD_TIME",
      "LONGEST_HOLD_DURATION",
      "NUMBER_OF_HOLDS",
      "AGENT_INTERACTION_AND_HOLD_DURATION",
      "CUSTOMER_SENTIMENT_SCORE_WITHOUT_AGENT",
      "CUSTOMER_SENTIMENT_SCORE_WITH_AGENT"
     ],
     "type": "string"
    }
   },
   "required": [
    "Label"
   ],
   "type": "object"
  },
  "RefId": {
   "pattern": "^[a-zA-Z0-9._-]{1,40}$",
   "type": "string"
  },
  "ReferenceIdList": {
   "items": {
    "$ref": "#/definitions/RefId"
   },
   "type": "array"
  },
  "Score": {
   "maximum": 10,
   "minimum": 0,
   "type": "integer"
  },
  "ScoringStrategy": {
   "additionalProperties": false,
   "properties": {
    "Mode": {
     "enum": [
      "QUESTION_ONLY",
      "SECTION_ONLY"
     ],
     "type": "string"
    },
    "Status": {
     "enum": [
      "ENABLED",
      "DISABLED"
     ],
     "type": "string"
    }
   },
   "required": [
    "Mode",
    "Status"
   ],
   "type": "object"
  },
  "SingleSelectQuestionRuleCategoryAutomation": {
   "additionalProperties": false,
   "properties": {
    "Category": {
     "maxLength": 50,
     "minLength": 1,
     "type": "string"
    },
    "Condition": {
     "enum": [
      "PRESENT",
      "NOT_PRESENT"
     ],
     "type": "string"
    },
    "OptionRefId": {
     "$ref": "#/definitions/RefId"
    }
   },
   "required": [
    "Category",
    "Condition",
    "OptionRefId"
   ],
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$",
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  },
  "Weight": {
   "maximum": 100,
   "minimum": 0,
   "type": "number"
  }
 },
 "primaryIdentifier": [
  "/properties/EvaluationFormArn"
 ],
 "properties": {
  "AutoEvaluationConfiguration": {
   "$ref": "#/definitions/AutoEvaluationConfiguration"
  },
  "Description": {
   "maxLength": 1024,
   "type": "string"
  },
  "EvaluationFormArn": {
   "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*/evaluation-form/[-a-zA-Z0-9]*$",
   "type": "string"
  },
  "InstanceArn": {
   "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*$",
   "type": "string"
  },
  "Items": {
   "insertionOrder": true,
   "items": {
    "$ref": "#/definitions/EvaluationFormBaseItem"
   },
   "maxItems": 200,
   "minItems": 1,
   "type": "array"
  },
  "LanguageConfiguration": {
   "$ref": "#/definitions/EvaluationFormLanguageConfiguration"
  },
  "ScoringStrategy": {
   "$ref": "#/definitions/ScoringStrategy"
  },
  "Status": {
   "default": "DRAFT",
   "enum": [
    "DRAFT",
    "ACTIVE"
   ],
   "type": "string"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 50,
   "type": "array",
   "uniqueItems": true
  },
  "TargetConfiguration": {
   "$ref": "#/definitions/EvaluationFormTargetConfiguration"
  },
  "Title": {
   "maxLength": 128,
   "minLength": 1,
   "type": "string"
  }
 },
 "readOnlyProperties": [
  "/properties/EvaluationFormArn"
 ],
 "required": [
  "Title",
  "InstanceArn",
  "Items",
  "Status"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-connect",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": false,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::Connect::EvaluationForm"
}
