{
 "additionalProperties": false,
 "definitions": {
  "AfterContactWorkConfig": {
   "additionalProperties": false,
   "properties": {
    "AfterContactWorkTimeLimit": {
     "$ref": "#/definitions/AfterContactWorkTimeLimit"
    }
   },
   "type": "object"
  },
  "AfterContactWorkConfigPerChannel": {
   "additionalProperties": false,
   "properties": {
    "AfterContactWorkConfig": {
     "$ref": "#/definitions/AfterContactWorkConfig"
    },
    "AgentFirstCallbackAfterContactWorkConfig": {
     "$ref": "#/definitions/AfterContactWorkConfig"
    },
    "Channel": {
     "$ref": "#/definitions/Channel"
    }
   },
   "required": [
    "Channel",
    "AfterContactWorkConfig"
   ],
   "type": "object"
  },
  "AfterContactWorkTimeLimit": {
   "minimum": 0,
   "type": "integer"
  },
  "AgentFirstCallbackAutoAccept": {
   "type": "boolean"
  },
  "AttributeName": {
   "maxLength": 64,
   "minLength": 1,
   "type": "string"
  },
  "AttributeValue": {
   "maxLength": 64,
   "minLength": 1,
   "type": "string"
  },
  "AutoAccept": {
   "type": "boolean"
  },
  "AutoAcceptConfig": {
   "additionalProperties": false,
   "properties": {
    "AgentFirstCallbackAutoAccept": {
     "$ref": "#/definitions/AgentFirstCallbackAutoAccept"
    },
    "AutoAccept": {
     "$ref": "#/definitions/AutoAccept"
    },
    "Channel": {
     "$ref": "#/definitions/Channel"
    }
   },
   "required": [
    "Channel",
    "AutoAccept"
   ],
   "type": "object"
  },
  "Channel": {
   "enum": [
    "VOICE",
    "CHAT",
    "TASK",
    "EMAIL"
   ],
   "type": "string"
  },
  "DeskPhoneNumber": {
   "type": "string"
  },
  "Email": {
   "type": "string"
  },
  "FirstName": {
   "maxLength": 255,
   "minLength": 0,
   "type": "string"
  },
  "LastName": {
   "maxLength": 300,
   "minLength": 0,
   "type": "string"
  },
  "Level": {
   "maximum": 5.0,
   "minimum": 1.0,
   "type": "number"
  },
  "Mobile": {
   "pattern": "^\\+[1-9]\\d{1,14}$",
   "type": "string"
  },
  "PersistentConnection": {
   "type": "boolean"
  },
  "PersistentConnectionConfig": {
   "additionalProperties": false,
   "properties": {
    "Channel": {
     "$ref": "#/definitions/Channel"
    },
    "PersistentConnection": {
     "$ref": "#/definitions/PersistentConnection"
    }
   },
   "required": [
    "Channel",
    "PersistentConnection"
   ],
   "type": "object"
  },
  "PhoneNumberConfig": {
   "additionalProperties": false,
   "properties": {
    "Channel": {
     "$ref": "#/definitions/Channel"
    },
    "PhoneNumber": {
     "$ref": "#/definitions/DeskPhoneNumber"
    },
    "PhoneType": {
     "$ref": "#/definitions/PhoneType"
    }
   },
   "required": [
    "Channel",
    "PhoneType"
   ],
   "type": "object"
  },
  "PhoneType": {
   "enum": [
    "SOFT_PHONE",
    "DESK_PHONE"
   ],
   "type": "string"
  },
  "SecondaryEmail": {
   "pattern": "(?=^.{0,265}$)[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}",
   "type": "string"
  },
  "SecurityProfileArn": {
   "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*/security-profile/[-a-zA-Z0-9]*$",
   "type": "string"
  },
  "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"
  },
  "UserIdentityInfo": {
   "additionalProperties": false,
   "properties": {
    "Email": {
     "$ref": "#/definitions/Email"
    },
    "FirstName": {
     "$ref": "#/definitions/FirstName"
    },
    "LastName": {
     "$ref": "#/definitions/LastName"
    },
    "Mobile": {
     "$ref": "#/definitions/Mobile"
    },
    "SecondaryEmail": {
     "$ref": "#/definitions/SecondaryEmail"
    }
   },
   "type": "object"
  },
  "UserPhoneConfig": {
   "additionalProperties": false,
   "properties": {
    "AfterContactWorkTimeLimit": {
     "$ref": "#/definitions/AfterContactWorkTimeLimit"
    },
    "AutoAccept": {
     "$ref": "#/definitions/AutoAccept"
    },
    "DeskPhoneNumber": {
     "$ref": "#/definitions/DeskPhoneNumber"
    },
    "PersistentConnection": {
     "$ref": "#/definitions/PersistentConnection"
    },
    "PhoneType": {
     "$ref": "#/definitions/PhoneType"
    }
   },
   "type": "object"
  },
  "UserProficiency": {
   "additionalProperties": false,
   "properties": {
    "AttributeName": {
     "$ref": "#/definitions/AttributeName"
    },
    "AttributeValue": {
     "$ref": "#/definitions/AttributeValue"
    },
    "Level": {
     "$ref": "#/definitions/Level"
    }
   },
   "required": [
    "AttributeName",
    "AttributeValue",
    "Level"
   ],
   "type": "object"
  },
  "VoiceEnhancementConfig": {
   "additionalProperties": false,
   "properties": {
    "Channel": {
     "$ref": "#/definitions/Channel"
    },
    "VoiceEnhancementMode": {
     "$ref": "#/definitions/VoiceEnhancementMode"
    }
   },
   "required": [
    "Channel",
    "VoiceEnhancementMode"
   ],
   "type": "object"
  },
  "VoiceEnhancementMode": {
   "enum": [
    "NONE",
    "VOICE_ISOLATION",
    "NOISE_SUPPRESSION"
   ],
   "type": "string"
  }
 },
 "primaryIdentifier": [
  "/properties/UserArn"
 ],
 "properties": {
  "AfterContactWorkConfigs": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/AfterContactWorkConfigPerChannel"
   },
   "type": "array"
  },
  "AutoAcceptConfigs": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/AutoAcceptConfig"
   },
   "type": "array"
  },
  "DirectoryUserId": {
   "type": "string"
  },
  "HierarchyGroupArn": {
   "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*/agent-group/[-a-zA-Z0-9]*$",
   "type": "string"
  },
  "IdentityInfo": {
   "$ref": "#/definitions/UserIdentityInfo"
  },
  "InstanceArn": {
   "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*$",
   "type": "string"
  },
  "Password": {
   "pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d\\S]{8,64}$",
   "type": "string"
  },
  "PersistentConnectionConfigs": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/PersistentConnectionConfig"
   },
   "type": "array"
  },
  "PhoneConfig": {
   "$ref": "#/definitions/UserPhoneConfig"
  },
  "PhoneNumberConfigs": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/PhoneNumberConfig"
   },
   "type": "array"
  },
  "RoutingProfileArn": {
   "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*/routing-profile/[-a-zA-Z0-9]*$",
   "type": "string"
  },
  "SecurityProfileArns": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/SecurityProfileArn"
   },
   "maxItems": 10,
   "minItems": 1,
   "type": "array",
   "uniqueItems": true
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 50,
   "type": "array",
   "uniqueItems": true
  },
  "UserArn": {
   "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*/agent/[-a-zA-Z0-9]*$",
   "type": "string"
  },
  "UserProficiencies": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/UserProficiency"
   },
   "type": "array"
  },
  "Username": {
   "maxLength": 64,
   "minLength": 1,
   "pattern": "[a-zA-Z0-9\\_\\-\\.\\@]+",
   "type": "string"
  },
  "VoiceEnhancementConfigs": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/VoiceEnhancementConfig"
   },
   "type": "array"
  }
 },
 "readOnlyProperties": [
  "/properties/UserArn"
 ],
 "required": [
  "InstanceArn",
  "RoutingProfileArn",
  "SecurityProfileArns",
  "Username"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-connect",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::Connect::User",
 "writeOnlyProperties": [
  "/properties/Password"
 ]
}
