{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google/json-schema/google-revision-schema.json",
  "title": "Revision",
  "description": "The metadata for a revision to a file. Some resource methods (such as `revisions.update`) require a `revisionId`. Use the `revisions.list` method to retrieve the ID for a revision.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-revisions-api-openapi.yml#/components/schemas/Revision",
  "properties": {
    "exportLinks": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Output only. Links for exporting Docs Editors files to specific formats.",
      "type": "object"
    },
    "id": {
      "description": "Output only. The ID of the revision.",
      "type": "string"
    },
    "keepForever": {
      "description": "Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file. This field is only applicable to files with binary content in Drive.",
      "type": "boolean"
    },
    "kind": {
      "default": "drive#revision",
      "description": "Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#revision\"`.",
      "type": "string"
    },
    "lastModifyingUser": {
      "$ref": "#/$defs/User",
      "description": "Output only. The last user to modify this revision."
    },
    "md5Checksum": {
      "description": "Output only. The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.",
      "type": "string"
    },
    "mimeType": {
      "description": "Output only. The MIME type of the revision.",
      "type": "string"
    },
    "modifiedTime": {
      "description": "The last time the revision was modified (RFC 3339 date-time).",
      "format": "date-time",
      "type": "string"
    },
    "originalFilename": {
      "description": "Output only. The original filename used to create this revision. This is only applicable to files with binary content in Drive.",
      "type": "string"
    },
    "publishAuto": {
      "description": "Whether subsequent revisions will be automatically republished. This is only applicable to Docs Editors files.",
      "type": "boolean"
    },
    "published": {
      "description": "Whether this revision is published. This is only applicable to Docs Editors files.",
      "type": "boolean"
    },
    "publishedLink": {
      "description": "Output only. A link to the published revision. This is only populated for Google Sites files.",
      "type": "string"
    },
    "publishedOutsideDomain": {
      "description": "Whether this revision is published outside the domain. This is only applicable to Docs Editors files.",
      "type": "boolean"
    },
    "size": {
      "description": "Output only. The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.",
      "format": "int64",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "User": {
      "description": "Information about a Drive user.",
      "properties": {
        "displayName": {
          "description": "Output only. A plain text displayable name for this user.",
          "type": "string"
        },
        "emailAddress": {
          "description": "Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.",
          "type": "string"
        },
        "kind": {
          "default": "drive#user",
          "description": "Output only. Identifies what kind of resource this is. Value: the fixed string `\"drive#user\"`.",
          "type": "string"
        },
        "me": {
          "description": "Output only. Whether this user is the requesting user.",
          "type": "boolean"
        },
        "permissionId": {
          "description": "Output only. The user's ID as visible in Permission resources.",
          "type": "string"
        },
        "photoLink": {
          "description": "Output only. A link to the user's profile photo, if available.",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}