{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/TrashFileRestored",
  "title": "Trashed File (Restored)",
  "type": "object",
  "x-box-resource-id": "trash_file_restored",
  "x-box-tag": "trashed_files",
  "description": "Represents a file restored from the trash.",
  "required": [
    "id",
    "type",
    "sequence_id",
    "sha1",
    "description",
    "size",
    "path_collection",
    "created_at",
    "modified_at",
    "modified_by",
    "owned_by",
    "item_status"
  ],
  "properties": {
    "id": {
      "type": "string",
      "nullable": false,
      "description": "The unique identifier that represent a file.\n\nThe ID for any file can be determined\nby visiting a file in the web application\nand copying the ID from the URL. For example,\nfor the URL `https://*.app.box.com/files/123`\nthe `file_id` is `123`.",
      "example": "123456789"
    },
    "etag": {
      "type": "string",
      "example": "1",
      "nullable": true,
      "description": "The HTTP `etag` of this file. This can be used within some API\nendpoints in the `If-Match` and `If-None-Match` headers to only\nperform changes on the file if (no) changes have happened."
    },
    "type": {
      "type": "string",
      "description": "`file`",
      "example": "file",
      "enum": [
        "file"
      ],
      "nullable": false
    },
    "sequence_id": {
      "allOf": [
        {
          "type": "string",
          "example": "3",
          "nullable": true,
          "description": "A numeric identifier that represents the most recent user event\nthat has been applied to this item.\n\nThis can be used in combination with the `GET /events`-endpoint\nto filter out user events that would have occurred before this\nidentifier was read.\n\nAn example would be where a Box Drive-like application\nwould fetch an item via the API, and then listen to incoming\nuser events for changes to the item. The application would\nignore any user events where the `sequence_id` in the event\nis smaller than or equal to the `sequence_id` in the originally\nfetched resource."
        },
        {
          "nullable": false
        }
      ]
    },
    "name": {
      "type": "string",
      "description": "The name of the file",
      "example": "Contract.pdf"
    },
    "sha1": {
      "type": "string",
      "format": "digest",
      "nullable": false,
      "example": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
      "description": "The SHA1 hash of the file. This can be used to compare the contents\nof a file on Box with a local file."
    },
    "file_version": {
      "allOf": [
        {
          "$ref": "#/components/schemas/FileVersion--Mini"
        },
        {
          "description": "The information about the current version of the file."
        }
      ]
    },
    "description": {
      "type": "string",
      "nullable": false,
      "description": "The optional description of this file",
      "maxLength": 256,
      "example": "Contract for Q1 renewal"
    },
    "size": {
      "type": "integer",
      "nullable": false,
      "description": "The file size in bytes. Be careful parsing this integer as it can\nget very large and cause an integer overflow.",
      "example": 629644
    },
    "path_collection": {
      "allOf": [
        {
          "title": "Path collection",
          "description": "A list of parent folders for an item.",
          "type": "object",
          "required": [
            "total_count",
            "entries"
          ],
          "properties": {
            "total_count": {
              "description": "The number of folders in this list.",
              "example": 1,
              "type": "integer",
              "format": "int64",
              "nullable": false
            },
            "entries": {
              "type": "array",
              "description": "The parent folders for this item",
              "nullable": false,
              "items": {
                "$ref": "#/components/schemas/Folder--Mini"
              }
            }
          }
        },
        {
          "description": "The tree of folders that this file is contained in,\nstarting at the root."
        },
        {
          "nullable": false
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "nullable": false,
      "description": "The date and time when the file was created on Box.",
      "example": "2012-12-12T10:53:43-08:00"
    },
    "modified_at": {
      "type": "string",
      "format": "date-time",
      "nullable": false,
      "description": "The date and time when the file was last updated on Box.",
      "example": "2012-12-12T10:53:43-08:00"
    },
    "trashed_at": {
      "type": "string",
      "nullable": true,
      "description": "The time at which this file was put in the\ntrash - becomes `null` after restore.",
      "example": null
    },
    "purged_at": {
      "type": "string",
      "nullable": true,
      "description": "The time at which this file is expected to be purged\nfrom the trash  - becomes `null` after restore.",
      "example": null
    },
    "content_created_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "description": "The date and time at which this file was originally\ncreated, which might be before it was uploaded to Box.",
      "example": "2012-12-12T10:53:43-08:00"
    },
    "content_modified_at": {
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "description": "The date and time at which this file was last updated,\nwhich might be before it was uploaded to Box.",
      "example": "2012-12-12T10:53:43-08:00"
    },
    "created_by": {
      "allOf": [
        {
          "$ref": "#/components/schemas/User--Mini"
        },
        {
          "description": "The user who created this file"
        }
      ]
    },
    "modified_by": {
      "allOf": [
        {
          "$ref": "#/components/schemas/User--Mini"
        },
        {
          "description": "The user who last modified this file"
        },
        {
          "nullable": false
        }
      ]
    },
    "owned_by": {
      "allOf": [
        {
          "$ref": "#/components/schemas/User--Mini"
        },
        {
          "description": "The user who owns this file"
        },
        {
          "nullable": false
        }
      ]
    },
    "shared_link": {
      "type": "string",
      "description": "The shared link for this file. This will\nbe `null` if a file had been trashed, even though the original shared\nlink does become active again.",
      "nullable": true,
      "example": null
    },
    "parent": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Folder--Mini"
        },
        {
          "description": "The folder that this file is located within."
        },
        {
          "nullable": true
        }
      ]
    },
    "item_status": {
      "type": "string",
      "description": "Defines if this item has been deleted or not.\n\n* `active` when the item has is not in the trash\n* `trashed` when the item has been moved to the trash but not deleted\n* `deleted` when the item has been permanently deleted.",
      "enum": [
        "active",
        "trashed",
        "deleted"
      ],
      "nullable": false,
      "example": "active"
    }
  }
}