{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-deadline-cloud/json-schema/amazon-deadline-cloud-search-tasks-request-schema.json",
  "title": "SearchTasksRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-deadline-cloud-search-api-openapi.yml#/components/schemas/SearchTasksRequest",
  "type": "object",
  "properties": {
    "farmId": {
      "type": "string",
      "description": "The farm ID of the task."
    },
    "filterExpressions": {
      "$ref": "#/$defs/SearchGroupedFilterExpressions"
    },
    "sortExpressions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SearchSortExpression"
      },
      "description": "The search terms for a resource."
    },
    "itemOffset": {
      "type": "integer",
      "description": "The offset for the search results."
    },
    "pageSize": {
      "type": "integer",
      "description": "Specifies the number of results to return."
    },
    "queueIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The queue IDs to include in the search."
    },
    "jobId": {
      "type": "string",
      "description": "The job ID for the task search."
    }
  },
  "required": [
    "farmId",
    "itemOffset",
    "queueIds"
  ],
  "$defs": {
    "DateTimeFilterExpression": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the date-time field to filter on."
        },
        "operator": {
          "type": "string",
          "enum": [
            "EQUAL",
            "NOT_EQUAL",
            "GREATER_THAN_EQUAL_TO",
            "GREATER_THAN",
            "LESS_THAN_EQUAL_TO",
            "LESS_THAN",
            "ANY_EQUALS",
            "ALL_NOT_EQUALS"
          ],
          "description": "The type of comparison to use to filter the results."
        },
        "dateTime": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time."
        }
      },
      "required": [
        "name",
        "operator",
        "dateTime"
      ]
    },
    "FieldSortExpression": {
      "type": "object",
      "properties": {
        "sortOrder": {
          "type": "string",
          "enum": [
            "ASCENDING",
            "DESCENDING"
          ],
          "description": "The sort order for the field."
        },
        "name": {
          "type": "string",
          "description": "The name of the field."
        }
      },
      "required": [
        "sortOrder",
        "name"
      ]
    },
    "ParameterFilterExpression": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the parameter to filter on."
        },
        "operator": {
          "type": "string",
          "enum": [
            "EQUAL",
            "NOT_EQUAL",
            "GREATER_THAN_EQUAL_TO",
            "GREATER_THAN",
            "LESS_THAN_EQUAL_TO",
            "LESS_THAN",
            "ANY_EQUALS",
            "ALL_NOT_EQUALS"
          ],
          "description": "The type of comparison to use to filter results."
        },
        "value": {
          "type": "string",
          "description": "The parameter's value."
        }
      },
      "required": [
        "name",
        "operator",
        "value"
      ]
    },
    "ParameterSortExpression": {
      "type": "object",
      "properties": {
        "sortOrder": {
          "type": "string",
          "enum": [
            "ASCENDING",
            "DESCENDING"
          ],
          "description": "The sort order for the parameter."
        },
        "name": {
          "type": "string",
          "description": "The parameter name to sort by."
        }
      },
      "required": [
        "sortOrder",
        "name"
      ]
    },
    "SearchFilterExpression": {
      "type": "object",
      "properties": {
        "dateTimeFilter": {
          "$ref": "#/$defs/DateTimeFilterExpression"
        },
        "parameterFilter": {
          "$ref": "#/$defs/ParameterFilterExpression"
        },
        "searchTermFilter": {
          "$ref": "#/$defs/SearchTermFilterExpression"
        },
        "stringFilter": {
          "$ref": "#/$defs/StringFilterExpression"
        },
        "stringListFilter": {
          "$ref": "#/$defs/StringListFilterExpression"
        },
        "groupFilter": {
          "$ref": "#/$defs/SearchGroupedFilterExpressions"
        }
      },
      "description": "Exactly one member is set."
    },
    "SearchGroupedFilterExpressions": {
      "type": "object",
      "properties": {
        "filters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SearchFilterExpression"
          },
          "description": "The filters to use for the search."
        },
        "operator": {
          "type": "string",
          "enum": [
            "AND",
            "OR"
          ],
          "description": "The operators to include in the search."
        }
      },
      "required": [
        "filters",
        "operator"
      ]
    },
    "SearchSortExpression": {
      "type": "object",
      "properties": {
        "userJobsFirst": {
          "$ref": "#/$defs/UserJobsFirst"
        },
        "fieldSort": {
          "$ref": "#/$defs/FieldSortExpression"
        },
        "parameterSort": {
          "$ref": "#/$defs/ParameterSortExpression"
        }
      },
      "description": "Exactly one member is set."
    },
    "SearchTermFilterExpression": {
      "type": "object",
      "properties": {
        "searchTerm": {
          "type": "string",
          "description": "The term to search for."
        },
        "matchType": {
          "type": "string",
          "enum": [
            "FUZZY_MATCH",
            "CONTAINS"
          ],
          "description": "Specifies how Deadline Cloud matches your search term in the results. If you don't specify a matchType the default is FUZZY_MATCH. FUZZY_MATCH - Matches if a portion of the search term is found in the result. CONTAINS - Matches if the exact search term is contained in the result."
        }
      },
      "required": [
        "searchTerm"
      ]
    },
    "StringFilterExpression": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The field name to search."
        },
        "operator": {
          "type": "string",
          "enum": [
            "EQUAL",
            "NOT_EQUAL",
            "GREATER_THAN_EQUAL_TO",
            "GREATER_THAN",
            "LESS_THAN_EQUAL_TO",
            "LESS_THAN",
            "ANY_EQUALS",
            "ALL_NOT_EQUALS"
          ],
          "description": "The type of comparison to use for this search."
        },
        "value": {
          "type": "string",
          "description": "The string to search for."
        }
      },
      "required": [
        "name",
        "operator",
        "value"
      ]
    },
    "StringListFilterExpression": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The field name to search."
        },
        "operator": {
          "type": "string",
          "enum": [
            "EQUAL",
            "NOT_EQUAL",
            "GREATER_THAN_EQUAL_TO",
            "GREATER_THAN",
            "LESS_THAN_EQUAL_TO",
            "LESS_THAN",
            "ANY_EQUALS",
            "ALL_NOT_EQUALS"
          ],
          "description": "The type of comparison to use for this search."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of string values to search for."
        }
      },
      "required": [
        "name",
        "operator",
        "values"
      ]
    },
    "UserJobsFirst": {
      "type": "object",
      "properties": {
        "userIdentityId": {
          "type": "string",
          "description": "The user's ID."
        }
      },
      "required": [
        "userIdentityId"
      ]
    }
  }
}