{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-customerprofiles-objecttype.json",
  "title": "AWSCustomerProfilesObjectTypeProperties",
  "description": "An ObjectType resource of Amazon Connect Customer Profiles. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-customer-profiles.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-customerprofiles-objecttype.json",
    "sourceSha256": "8344a24e40a78984e31b3d77e3f5eb3b1b4faa6914051ea536aa0ef6199227f5"
  },
  "type": "object",
  "properties": {
    "DomainName": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_-]+$",
          "minLength": 1,
          "maxLength": 64
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The unique name of the domain."
    },
    "ObjectTypeName": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z_][a-zA-Z_0-9-]*$",
          "minLength": 1,
          "maxLength": 255
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name of the profile object type."
    },
    "AllowProfileCreation": {
      "description": "Indicates whether a profile should be created when data is received.",
      "type": "boolean"
    },
    "Description": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1000
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Description of the profile object type."
    },
    "EncryptionKey": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 0,
          "maxLength": 255
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The default encryption key"
    },
    "ExpirationDays": {
      "description": "The default number of days until the data within the domain expires.",
      "type": "integer",
      "minimum": 1,
      "maximum": 1098
    },
    "Fields": {
      "description": "A list of the name and ObjectType field.",
      "type": "array",
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/FieldMap"
      }
    },
    "Keys": {
      "description": "A list of unique keys that can be used to map data to the profile.",
      "type": "array",
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/KeyMap"
      }
    },
    "Tags": {
      "description": "The tags (keys and values) associated with the integration.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "minItems": 0,
      "maxItems": 50
    },
    "TemplateId": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_-]+$",
          "minLength": 1,
          "maxLength": 64
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A unique identifier for the object template."
    }
  },
  "typeName": "AWS::CustomerProfiles::ObjectType",
  "primaryIdentifier": [
    "/properties/DomainName",
    "/properties/ObjectTypeName"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-customer-profiles.git",
  "additionalProperties": false,
  "readOnlyProperties": [
    "/properties/LastUpdatedAt",
    "/properties/CreatedAt"
  ],
  "$defs": {
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$",
              "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": "AWSCustomerProfilesObjectTypeTagDefinition",
      "required": [
        "Key",
        "Value"
      ],
      "additionalProperties": false
    },
    "FieldMap": {
      "type": "object",
      "properties": {
        "Name": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]+$",
              "minLength": 1,
              "maxLength": 64
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "ObjectTypeField": {
          "$ref": "#/$defs/ObjectTypeField"
        }
      },
      "title": "AWSCustomerProfilesObjectTypeFieldMapDefinition",
      "additionalProperties": false
    },
    "ObjectTypeField": {
      "description": "Represents a field in a ProfileObjectType.",
      "type": "object",
      "properties": {
        "Source": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A field of a ProfileObject. For example: _source.FirstName, where \"_source\" is a ProfileObjectType of a Zendesk user and \"FirstName\" is a field in that ObjectType."
        },
        "Target": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The location of the data in the standard ProfileObject model. For example: _profile.Address.PostalCode."
        },
        "ContentType": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "STRING",
                "NUMBER",
                "PHONE_NUMBER",
                "EMAIL_ADDRESS",
                "NAME"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The content type of the field. Used for determining equality when searching."
        }
      },
      "title": "AWSCustomerProfilesObjectTypeObjectTypeFieldDefinition",
      "additionalProperties": false
    },
    "KeyMap": {
      "type": "object",
      "properties": {
        "Name": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]+$",
              "minLength": 1,
              "maxLength": 64
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "ObjectTypeKeyList": {
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/ObjectTypeKey"
          }
        }
      },
      "title": "AWSCustomerProfilesObjectTypeKeyMapDefinition",
      "additionalProperties": false
    },
    "ObjectTypeKey": {
      "description": "An object that defines the Key element of a ProfileObject. A Key is a special element that can be used to search for a customer profile.",
      "type": "object",
      "properties": {
        "FieldNames": {
          "description": "The reference for the key name of the fields map. ",
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]+$",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "StandardIdentifiers": {
          "description": "The types of keys that a ProfileObject can have. Each ProfileObject can have only 1 UNIQUE key but multiple PROFILE keys. PROFILE means that this key can be used to tie an object to a PROFILE. UNIQUE means that it can be used to uniquely identify an object. If a key a is marked as SECONDARY, it will be used to search for profiles after all other PROFILE keys have been searched. A LOOKUP_ONLY key is only used to match a profile but is not persisted to be used for searching of the profile. A NEW_ONLY key is only used if the profile does not already exist before the object is ingested, otherwise it is only used for matching objects to profiles.",
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "PROFILE",
              "UNIQUE",
              "SECONDARY",
              "LOOKUP_ONLY",
              "NEW_ONLY"
            ]
          }
        }
      },
      "title": "AWSCustomerProfilesObjectTypeObjectTypeKeyDefinition",
      "additionalProperties": false
    }
  },
  "required": [
    "DomainName"
  ],
  "createOnlyProperties": [
    "/properties/DomainName",
    "/properties/ObjectTypeName"
  ]
}
