{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-graph/json-schema/microsoft-graph-agreement-file-schema.json",
  "title": "AgreementFile",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-graph-agreement-files-api-openapi.yml#/components/schemas/AgreementFile",
  "allOf": [
    {
      "$ref": "#/$defs/AgreementFileProperties"
    },
    {
      "title": "AgreementFile",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "localizations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AgreementFileLocalization"
          },
          "description": "The localized version of the terms of use agreement files attached to the agreement.",
          "x-ms-navigationProperty": true
        },
        "@odata.type": {
          "type": "string"
        }
      }
    }
  ],
  "x-ms-discriminator-value": "#microsoft.graph.agreementFile",
  "$defs": {
    "AgreementFileData": {
      "title": "AgreementFileData",
      "type": "object",
      "properties": {
        "data": {
          "type": [
            "string",
            "null"
          ],
          "description": "Data that represents the terms of use PDF document. Read-only.",
          "format": "base64url"
        },
        "@odata.type": {
          "type": "string"
        }
      }
    },
    "AgreementFileLocalization": {
      "allOf": [
        {
          "$ref": "#/$defs/AgreementFileProperties"
        },
        {
          "title": "AgreementFileLocalization",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "versions": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/AgreementFileVersion"
              },
              "description": "Read-only. Customized versions of the terms of use agreement in the Microsoft Entra tenant.",
              "x-ms-navigationProperty": true
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.agreementFileLocalization"
    },
    "AgreementFileProperties": {
      "allOf": [
        {
          "$ref": "#/$defs/Entity"
        },
        {
          "title": "AgreementFileProperties",
          "type": "object",
          "properties": {
            "createdDateTime": {
              "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$",
              "type": [
                "string",
                "null"
              ],
              "description": "The date time representing when the file was created. Read-only.",
              "format": "date-time"
            },
            "displayName": {
              "type": [
                "string",
                "null"
              ],
              "description": "Localized display name of the policy file of an agreement."
            },
            "fileData": {
              "anyOf": [
                {
                  "$ref": "#/$defs/AgreementFileData"
                },
                {
                  "type": [
                    "object",
                    "null"
                  ]
                }
              ],
              "description": "Data that represents the terms of use PDF document."
            },
            "fileName": {
              "type": [
                "string",
                "null"
              ],
              "description": "Name of the agreement file."
            },
            "isDefault": {
              "type": [
                "boolean",
                "null"
              ],
              "description": "If none of the languages matches the client preference, indicates whether this is the default agreement file."
            },
            "isMajorVersion": {
              "type": [
                "boolean",
                "null"
              ],
              "description": "Indicates whether the agreement file is a major version update."
            },
            "language": {
              "type": [
                "string",
                "null"
              ],
              "description": "The language of the agreement file in the format languagecode2-country/regioncode2."
            },
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ]
    },
    "AgreementFileVersion": {
      "allOf": [
        {
          "$ref": "#/$defs/AgreementFileProperties"
        },
        {
          "title": "AgreementFileVersion",
          "required": [
            "@odata.type"
          ],
          "type": "object",
          "properties": {
            "@odata.type": {
              "type": "string"
            }
          }
        }
      ],
      "x-ms-discriminator-value": "#microsoft.graph.agreementFileVersion"
    },
    "Entity": {
      "title": "Entity",
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier for an entity. Read-only."
        },
        "@odata.type": {
          "type": "string"
        }
      }
    }
  }
}