{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-connect/json-schema/amazon-connect-update-related-item-response-schema.json",
  "title": "UpdateRelatedItemResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-connect-related-items-api-openapi.yml#/components/schemas/UpdateRelatedItemResponse",
  "type": "object",
  "properties": {
    "relatedItemId": {
      "type": "string",
      "description": "The unique identifier of the updated related item."
    },
    "relatedItemArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the updated related item."
    },
    "type": {
      "type": "string",
      "description": "Type of the updated related item."
    },
    "content": {
      "$ref": "#/$defs/RelatedItemContent"
    },
    "associationTime": {
      "type": "string",
      "format": "date-time",
      "description": "Time at which the related item was associated with the case."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map of key-value pairs that represent tags on a resource. Tags are used to organize, track, or control access for this resource."
    },
    "lastUpdatedUser": {
      "$ref": "#/$defs/UserUnion"
    },
    "createdBy": {
      "$ref": "#/$defs/UserUnion"
    }
  },
  "required": [
    "relatedItemId",
    "relatedItemArn",
    "type",
    "content",
    "associationTime"
  ],
  "$defs": {
    "CasesFieldValue": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of a field."
        },
        "value": {
          "$ref": "#/$defs/CasesFieldValueUnion"
        }
      },
      "required": [
        "id",
        "value"
      ]
    },
    "CasesFieldValueUnion": {
      "type": "object",
      "properties": {
        "stringValue": {
          "type": "string",
          "description": "String value type."
        },
        "doubleValue": {
          "type": "number",
          "description": "Can be either null, or have a Double number value type. Only one value can be provided."
        },
        "booleanValue": {
          "type": "boolean",
          "description": "Can be either null, or have a Boolean value type. Only one value can be provided."
        },
        "emptyValue": {
          "$ref": "#/$defs/EmptyFieldValue"
        },
        "userArnValue": {
          "type": "string",
          "description": "Represents the user that performed the audit."
        }
      },
      "description": "Exactly one member is set."
    },
    "CommentContent": {
      "type": "object",
      "properties": {
        "body": {
          "type": "string",
          "description": "Text in the body of a Comment on a case."
        },
        "contentType": {
          "type": "string",
          "description": "Type of the text in the box of a Comment on a case."
        }
      },
      "required": [
        "body",
        "contentType"
      ]
    },
    "ConnectCaseContent": {
      "type": "object",
      "properties": {
        "caseId": {
          "type": "string",
          "description": "A unique identifier of the case."
        }
      },
      "required": [
        "caseId"
      ]
    },
    "ContactContent": {
      "type": "object",
      "properties": {
        "contactArn": {
          "type": "string",
          "description": "A unique identifier of a contact in Connect Customer."
        },
        "channel": {
          "type": "string",
          "description": "A list of channels to filter on for related items of type Contact."
        },
        "connectedToSystemTime": {
          "type": "string",
          "format": "date-time",
          "description": "The difference between the InitiationTimestamp and the DisconnectTimestamp of the contact."
        }
      },
      "required": [
        "contactArn",
        "channel",
        "connectedToSystemTime"
      ]
    },
    "CustomContent": {
      "type": "object",
      "properties": {
        "fields": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CasesFieldValue"
          },
          "description": "List of field values for the Custom related item."
        }
      },
      "required": [
        "fields"
      ]
    },
    "EmptyFieldValue": {
      "type": "object",
      "properties": {}
    },
    "FileContent": {
      "type": "object",
      "properties": {
        "fileArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of a File in Connect Customer."
        }
      },
      "required": [
        "fileArn"
      ]
    },
    "RelatedItemContent": {
      "type": "object",
      "properties": {
        "contact": {
          "$ref": "#/$defs/ContactContent"
        },
        "comment": {
          "$ref": "#/$defs/CommentContent"
        },
        "file": {
          "$ref": "#/$defs/FileContent"
        },
        "sla": {
          "$ref": "#/$defs/SlaContent"
        },
        "connectCase": {
          "$ref": "#/$defs/ConnectCaseContent"
        },
        "custom": {
          "$ref": "#/$defs/CustomContent"
        }
      },
      "description": "Exactly one member is set."
    },
    "SlaConfiguration": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of an SLA."
        },
        "type": {
          "type": "string",
          "description": "Type of SLA."
        },
        "status": {
          "type": "string",
          "description": "Status of an SLA."
        },
        "fieldId": {
          "type": "string",
          "description": "Unique identifier of a field."
        },
        "targetFieldValues": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CasesFieldValueUnion"
          },
          "description": "Represents a list of target field values for the fieldId specified in SlaConfiguration."
        },
        "targetTime": {
          "type": "string",
          "format": "date-time",
          "description": "Target time by which an SLA should be completed."
        },
        "completionTime": {
          "type": "string",
          "format": "date-time",
          "description": "Time at which an SLA was completed."
        }
      },
      "required": [
        "name",
        "type",
        "status",
        "targetTime"
      ]
    },
    "SlaContent": {
      "type": "object",
      "properties": {
        "slaConfiguration": {
          "$ref": "#/$defs/SlaConfiguration"
        }
      },
      "required": [
        "slaConfiguration"
      ]
    },
    "UserUnion": {
      "type": "object",
      "properties": {
        "userArn": {
          "type": "string",
          "description": "Represents the Connect Customer ARN of the user."
        },
        "customEntity": {
          "type": "string",
          "description": "Any provided entity."
        }
      },
      "description": "Exactly one member is set."
    }
  }
}