{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-connect/json-schema/amazon-connect-update-calculated-attribute-definition-request-schema.json",
  "title": "UpdateCalculatedAttributeDefinitionRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-connect-calculated-attributes-api-openapi.yml#/components/schemas/UpdateCalculatedAttributeDefinitionRequest",
  "type": "object",
  "properties": {
    "DomainName": {
      "type": "string",
      "description": "The unique name of the domain."
    },
    "CalculatedAttributeName": {
      "type": "string",
      "description": "The unique name of the calculated attribute."
    },
    "DisplayName": {
      "type": "string",
      "description": "The display name of the calculated attribute."
    },
    "Description": {
      "type": "string",
      "description": "The description of the calculated attribute."
    },
    "Conditions": {
      "$ref": "#/$defs/Conditions"
    }
  },
  "required": [
    "DomainName",
    "CalculatedAttributeName"
  ],
  "$defs": {
    "Conditions": {
      "type": "object",
      "properties": {
        "Range": {
          "$ref": "#/$defs/ProfileRange"
        },
        "ObjectCount": {
          "type": "integer",
          "description": "The number of profile objects used for the calculated attribute."
        },
        "Threshold": {
          "$ref": "#/$defs/ProfileThreshold"
        }
      }
    },
    "ProfileRange": {
      "type": "object",
      "properties": {
        "Value": {
          "type": "integer",
          "description": "The amount of time of the specified unit."
        },
        "Unit": {
          "type": "string",
          "enum": [
            "DAYS"
          ],
          "description": "The unit of time."
        },
        "ValueRange": {
          "$ref": "#/$defs/ValueRange"
        },
        "TimestampSource": {
          "type": "string",
          "description": "An expression specifying the field in your JSON object from which the date should be parsed. The expression should follow the structure of \\\"{ObjectTypeName.}\\\". E.g. if your object type is MyType and source JSON is {\"generatedAt\": {\"timestamp\": \"1737587945945\"}}, then TimestampSource should be \"{MyType.generatedAt.timestamp}\"."
        },
        "TimestampFormat": {
          "type": "string",
          "description": "The format the timestamp field in your JSON object is specified. This value should be one of EPOCHMILLI (for Unix epoch timestamps with second/millisecond level precision) or ISO_8601 (following ISO_8601 format with second/millisecond level precision, with an optional offset of Z or in the format HH:MM or HHMM.). E.g. if your object type is MyType and source JSON is {\"generatedAt\": {\"timestamp\": \"2001-07-04T12:08:56.235-0700\"}}, then TimestampFormat should be \"ISO_8601\"."
        }
      }
    },
    "ProfileThreshold": {
      "type": "object",
      "properties": {
        "Value": {
          "type": "string",
          "description": "The value of the threshold."
        },
        "Operator": {
          "type": "string",
          "enum": [
            "EQUAL_TO",
            "GREATER_THAN",
            "LESS_THAN",
            "NOT_EQUAL_TO"
          ],
          "description": "The operator of the threshold."
        }
      },
      "required": [
        "Value",
        "Operator"
      ]
    },
    "ValueRange": {
      "type": "object",
      "properties": {
        "Start": {
          "type": "integer",
          "description": "The start time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future."
        },
        "End": {
          "type": "integer",
          "description": "The end time of when to include objects. Use positive numbers to indicate that the starting point is in the past, and negative numbers to indicate it is in the future."
        }
      },
      "required": [
        "Start",
        "End"
      ]
    }
  }
}