{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-ses/json-schema/amazon-ses-get-archive-search-response-schema.json",
  "title": "GetArchiveSearchResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-ses-archive-search-api-openapi.yml#/components/schemas/GetArchiveSearchResponse",
  "type": "object",
  "properties": {
    "ArchiveId": {
      "type": "string",
      "description": "The identifier of the archive the email search was performed in."
    },
    "Filters": {
      "$ref": "#/$defs/ArchiveFilters"
    },
    "FromTimestamp": {
      "type": "string",
      "description": "The start timestamp of the range the searched emails cover."
    },
    "ToTimestamp": {
      "type": "string",
      "description": "The end timestamp of the range the searched emails cover."
    },
    "MaxResults": {
      "type": "integer",
      "description": "The maximum number of search results to return."
    },
    "Status": {
      "$ref": "#/$defs/SearchStatus"
    }
  },
  "$defs": {
    "ArchiveBooleanExpression": {
      "type": "object",
      "properties": {
        "Evaluate": {
          "$ref": "#/$defs/ArchiveBooleanToEvaluate"
        },
        "Operator": {
          "type": "string",
          "enum": [
            "IS_TRUE",
            "IS_FALSE"
          ],
          "description": "The boolean operator to use for evaluation."
        }
      },
      "required": [
        "Evaluate",
        "Operator"
      ]
    },
    "ArchiveBooleanToEvaluate": {
      "type": "object",
      "properties": {
        "Attribute": {
          "type": "string",
          "enum": [
            "HAS_ATTACHMENTS"
          ],
          "description": "The name of the email attribute to evaluate."
        }
      },
      "description": "Exactly one member is set."
    },
    "ArchiveFilterCondition": {
      "type": "object",
      "properties": {
        "StringExpression": {
          "$ref": "#/$defs/ArchiveStringExpression"
        },
        "BooleanExpression": {
          "$ref": "#/$defs/ArchiveBooleanExpression"
        }
      },
      "description": "Exactly one member is set."
    },
    "ArchiveFilters": {
      "type": "object",
      "properties": {
        "Include": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ArchiveFilterCondition"
          },
          "description": "The filter conditions for emails to include."
        },
        "Unless": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ArchiveFilterCondition"
          },
          "description": "The filter conditions for emails to exclude."
        }
      }
    },
    "ArchiveStringExpression": {
      "type": "object",
      "properties": {
        "Evaluate": {
          "$ref": "#/$defs/ArchiveStringToEvaluate"
        },
        "Operator": {
          "type": "string",
          "enum": [
            "CONTAINS"
          ],
          "description": "The operator to use when evaluating the string values."
        },
        "Values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of string values to evaluate the email attribute against."
        }
      },
      "required": [
        "Evaluate",
        "Operator",
        "Values"
      ]
    },
    "ArchiveStringToEvaluate": {
      "type": "object",
      "properties": {
        "Attribute": {
          "type": "string",
          "enum": [
            "TO",
            "FROM",
            "CC",
            "SUBJECT",
            "ENVELOPE_TO",
            "ENVELOPE_FROM"
          ],
          "description": "The name of the email attribute to evaluate."
        }
      },
      "description": "Exactly one member is set."
    },
    "SearchStatus": {
      "type": "object",
      "properties": {
        "SubmissionTimestamp": {
          "type": "string",
          "description": "The timestamp of when the search was submitted."
        },
        "CompletionTimestamp": {
          "type": "string",
          "description": "The timestamp of when the search completed (if finished)."
        },
        "State": {
          "type": "string",
          "enum": [
            "QUEUED",
            "RUNNING",
            "COMPLETED",
            "FAILED",
            "CANCELLED"
          ],
          "description": "The current state of the search job."
        },
        "ErrorMessage": {
          "type": "string",
          "description": "An error message if the search failed."
        }
      }
    }
  }
}