{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-customerprofiles-calculatedattributedefinition.json",
  "title": "AWSCustomerProfilesCalculatedAttributeDefinitionProperties",
  "description": "A calculated attribute definition for Customer Profiles. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-customer-profiles>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-customerprofiles-calculatedattributedefinition.json",
    "sourceSha256": "2ca958c9d363e8a37b1d44419ce3be5fe7c9ae85ae8ba70009b2cd5a04d14f85"
  },
  "type": "object",
  "properties": {
    "DomainName": {
      "$ref": "#/$defs/DomainName"
    },
    "CalculatedAttributeName": {
      "$ref": "#/$defs/CalculatedAttributeName"
    },
    "DisplayName": {
      "$ref": "#/$defs/DisplayName"
    },
    "Description": {
      "$ref": "#/$defs/Description"
    },
    "AttributeDetails": {
      "$ref": "#/$defs/AttributeDetails"
    },
    "Conditions": {
      "$ref": "#/$defs/Conditions"
    },
    "Statistic": {
      "$ref": "#/$defs/Statistic"
    },
    "Tags": {
      "$ref": "#/$defs/Tags"
    }
  },
  "typeName": "AWS::CustomerProfiles::CalculatedAttributeDefinition",
  "primaryIdentifier": [
    "/properties/DomainName",
    "/properties/CalculatedAttributeName"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-customer-profiles",
  "additionalProperties": false,
  "readOnlyProperties": [
    "/properties/CreatedAt",
    "/properties/LastUpdatedAt"
  ],
  "$defs": {
    "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.",
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionDomainNameDefinition"
    },
    "CalculatedAttributeName": {
      "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 unique name of the calculated attribute.",
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionCalculatedAttributeNameDefinition"
    },
    "DisplayName": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z_][a-zA-Z_0-9-\\s]*$",
          "minLength": 1,
          "maxLength": 255
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The display name of the calculated attribute.",
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionDisplayNameDefinition"
    },
    "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": "The description of the calculated attribute.",
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionDescriptionDefinition"
    },
    "AttributeName": {
      "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 name of an attribute defined in a profile object type.",
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionAttributeNameDefinition"
    },
    "AttributeItem": {
      "description": "The details of a single attribute item specified in the mathematical expression.",
      "type": "object",
      "properties": {
        "Name": {
          "$ref": "#/$defs/AttributeName"
        }
      },
      "required": [
        "Name"
      ],
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionAttributeItemDefinition",
      "additionalProperties": false
    },
    "AttributeList": {
      "description": "A list of attribute items specified in the mathematical expression.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/AttributeItem"
      },
      "insertionOrder": false,
      "uniqueItems": true,
      "minItems": 1,
      "maxItems": 2,
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionAttributeListDefinition"
    },
    "Expression": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Mathematical expression that is performed on attribute items provided in the attribute list. Each element in the expression should follow the structure of \"{ObjectTypeName.AttributeName}\".",
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionExpressionDefinition"
    },
    "AttributeDetails": {
      "description": "Mathematical expression and a list of attribute items specified in that expression.",
      "type": "object",
      "properties": {
        "Attributes": {
          "$ref": "#/$defs/AttributeList"
        },
        "Expression": {
          "$ref": "#/$defs/Expression"
        }
      },
      "required": [
        "Attributes",
        "Expression"
      ],
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionAttributeDetailsDefinition",
      "additionalProperties": false
    },
    "RangeUnit": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "DAYS"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The unit of time.",
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionRangeUnitDefinition"
    },
    "RangeValue": {
      "description": "The amount of time of the specified unit.",
      "type": "integer",
      "minimum": 1,
      "maximum": 366,
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionRangeValueDefinition"
    },
    "Range": {
      "description": "The relative time period over which data is included in the aggregation.",
      "type": "object",
      "properties": {
        "Value": {
          "$ref": "#/$defs/RangeValue"
        },
        "Unit": {
          "$ref": "#/$defs/RangeUnit"
        }
      },
      "required": [
        "Value",
        "Unit"
      ],
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionRangeDefinition",
      "additionalProperties": false
    },
    "ObjectCount": {
      "description": "The number of profile objects used for the calculated attribute.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionObjectCountDefinition"
    },
    "ThresholdValue": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The value of the threshold.",
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionThresholdValueDefinition"
    },
    "ThresholdOperator": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "EQUAL_TO",
            "GREATER_THAN",
            "LESS_THAN",
            "NOT_EQUAL_TO"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The operator of the threshold.",
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionThresholdOperatorDefinition"
    },
    "Threshold": {
      "description": "The threshold for the calculated attribute.",
      "type": "object",
      "properties": {
        "Value": {
          "$ref": "#/$defs/ThresholdValue"
        },
        "Operator": {
          "$ref": "#/$defs/ThresholdOperator"
        }
      },
      "required": [
        "Value",
        "Operator"
      ],
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionThresholdDefinition",
      "additionalProperties": false
    },
    "Conditions": {
      "description": "The conditions including range, object count, and threshold for the calculated attribute.",
      "type": "object",
      "properties": {
        "Range": {
          "$ref": "#/$defs/Range"
        },
        "ObjectCount": {
          "$ref": "#/$defs/ObjectCount"
        },
        "Threshold": {
          "$ref": "#/$defs/Threshold"
        }
      },
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionConditionsDefinition",
      "additionalProperties": false
    },
    "Statistic": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "FIRST_OCCURRENCE",
            "LAST_OCCURRENCE",
            "COUNT",
            "SUM",
            "MINIMUM",
            "MAXIMUM",
            "AVERAGE",
            "MAX_OCCURRENCE"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The aggregation operation to perform for the calculated attribute.",
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionStatisticDefinition"
    },
    "Tag": {
      "description": "A key-value pair to associate with a resource.",
      "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"
            }
          ],
          "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -."
        },
        "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"
            }
          ],
          "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -."
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionTagDefinition",
      "additionalProperties": false
    },
    "Tags": {
      "description": "An array of key-value pairs to apply to this resource.",
      "type": "array",
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "minItems": 0,
      "maxItems": 50,
      "title": "AWSCustomerProfilesCalculatedAttributeDefinitionTagsDefinition"
    }
  },
  "required": [
    "DomainName",
    "CalculatedAttributeName",
    "AttributeDetails",
    "Statistic"
  ],
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": true,
    "tagProperty": "/properties/Tags"
  },
  "createOnlyProperties": [
    "/properties/DomainName",
    "/properties/CalculatedAttributeName"
  ]
}
