{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aurinko/json-schema/aurinko-event-or-id-schema.json",
  "title": "EventOrId",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aurinko-events-api-openapi.yml#/components/schemas/EventOrId",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "readOnly": true
    },
    "etag": {
      "type": "string",
      "readOnly": true
    },
    "iCalUId": {
      "type": "string",
      "readOnly": true
    },
    "globalId": {
      "type": "string",
      "readOnly": true
    },
    "record": {
      "$ref": "#/$defs/Event"
    },
    "onlineMeetingProvider": {
      "type": "string",
      "description": "Value of provider, for example hangoutsMeet, teamsForBusiness, skypeForBusiness, skypeForConsumer"
    },
    "onlineMeetingDetails": {
      "$ref": "#/$defs/OnlineMeetingDetails"
    }
  },
  "$defs": {
    "Attendee": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "readOnly": true
        },
        "emailAddress": {
          "$ref": "#/$defs/EmailAddress"
        },
        "type": {
          "type": "string",
          "enum": [
            "required",
            "optional",
            "resource"
          ]
        },
        "response": {
          "type": "string",
          "enum": [
            "accepted",
            "tentitive",
            "declined"
          ],
          "readOnly": true
        },
        "comment": {
          "type": "string",
          "readOnly": true
        }
      }
    },
    "DayOfWeek": {
      "type": "string",
      "enum": [
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday",
        "saturday",
        "sunday"
      ]
    },
    "EmailAddress": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "address": {
          "type": "string",
          "format": "email"
        },
        "raw": {
          "type": "string",
          "readOnly": true
        }
      }
    },
    "EmailAttachment": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "readOnly": true
        },
        "mimeType": {
          "type": "string",
          "readOnly": true
        },
        "size": {
          "type": "integer",
          "readOnly": true
        },
        "inline": {
          "type": "boolean",
          "readOnly": true
        },
        "contentId": {
          "type": "string",
          "readOnly": true
        },
        "content": {
          "type": "string",
          "readOnly": true
        },
        "contentLocation": {
          "type": "string",
          "readOnly": true
        }
      }
    },
    "Event": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "readOnly": true
        },
        "etag": {
          "type": "string",
          "readOnly": true
        },
        "calendarId": {
          "type": "string",
          "readOnly": true
        },
        "createdTime": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "lastModifiedTime": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "subject": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "start": {
          "$ref": "#/$defs/EventDateTime"
        },
        "end": {
          "$ref": "#/$defs/EventDateTime"
        },
        "organizer": {
          "$ref": "#/$defs/Organizer",
          "readOnly": true
        },
        "meetingInfo": {
          "$ref": "#/$defs/MeetingInfo"
        },
        "recurrenceType": {
          "type": "string",
          "enum": [
            "single",
            "master",
            "occurrence"
          ],
          "readOnly": true
        },
        "recurrence": {
          "$ref": "#/$defs/Recurrence"
        },
        "occurrenceInfo": {
          "$ref": "#/$defs/OccurrenceInfo",
          "readOnly": true
        },
        "iCalUid": {
          "type": "string",
          "readOnly": true
        },
        "globalId": {
          "type": "string",
          "readOnly": true
        },
        "showAs": {
          "$ref": "#/$defs/ShowAs"
        },
        "sensitivity": {
          "$ref": "#/$defs/Sensitivity"
        },
        "categories": {
          "type": "array",
          "readOnly": true,
          "items": {
            "type": "string"
          }
        },
        "htmlLink": {
          "type": "string",
          "readOnly": true
        },
        "hasAttachments": {
          "type": "boolean",
          "readOnly": true
        },
        "attachments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmailAttachment"
          }
        },
        "omitted": {
          "type": "array",
          "readOnly": true,
          "items": {
            "type": "string",
            "enum": [
              "description",
              "attendees",
              "attachments"
            ]
          }
        }
      }
    },
    "EventDateTime": {
      "type": "object",
      "properties": {
        "dateOnly": {
          "type": "string",
          "format": "date"
        },
        "dateTime": {
          "type": "string",
          "format": "date-time"
        },
        "timezone": {
          "type": "string"
        }
      }
    },
    "MeetingInfo": {
      "type": "object",
      "properties": {
        "canceled": {
          "type": "boolean",
          "readOnly": true
        },
        "attendees": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Attendee"
          }
        },
        "response": {
          "$ref": "#/$defs/MeetingResponseType",
          "readOnly": true
        },
        "attendeePermissions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "inviteOthers",
              "modify",
              "seeOthers"
            ]
          }
        },
        "onlineMeeting": {
          "type": "boolean",
          "description": "Assumes default onlineMeetingProvider ('hangoutsMeet' or 'teamsForBusiness')",
          "writeOnly": true
        },
        "onlineMeetingProvider": {
          "type": "string",
          "description": "Value of provider, for example hangoutsMeet, teamsForBusiness, skypeForBusiness, skypeForConsumer"
        },
        "onlineMeetingDetails": {
          "readOnly": true,
          "$ref": "#/$defs/OnlineMeetingDetails"
        }
      }
    },
    "MeetingResponseType": {
      "type": "string",
      "enum": [
        "noResponse",
        "declined",
        "tentative",
        "accepted"
      ]
    },
    "OccurrenceInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "regular",
            "modified",
            "deleted"
          ]
        },
        "originalStart": {
          "$ref": "#/$defs/EventDateTime"
        },
        "start": {
          "$ref": "#/$defs/EventDateTime"
        },
        "masterId": {
          "type": "string"
        }
      }
    },
    "OnlineMeetingDetails": {
      "type": "object",
      "readOnly": true,
      "properties": {
        "url": {
          "type": "string",
          "readOnly": true
        },
        "phone": {
          "type": "string",
          "readOnly": true
        },
        "pin": {
          "type": "string",
          "readOnly": true
        },
        "regionCode": {
          "type": "string",
          "readOnly": true
        },
        "sip": {
          "type": "string",
          "readOnly": true
        },
        "infoUrl": {
          "type": "string",
          "readOnly": true
        }
      }
    },
    "Organizer": {
      "type": "object",
      "readOnly": true,
      "properties": {
        "id": {
          "type": "string",
          "readOnly": true
        },
        "emailAddress": {
          "$ref": "#/$defs/EmailAddress"
        }
      }
    },
    "Recurrence": {
      "type": "object",
      "properties": {
        "original": {
          "type": "string",
          "enum": [
            "simple",
            "ical"
          ],
          "readOnly": true
        },
        "ical": {
          "type": "object",
          "properties": {
            "rules": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "recurrenceStart": {
              "$ref": "#/$defs/EventDateTime"
            }
          }
        },
        "simple": {
          "type": "object",
          "properties": {
            "pattern": {
              "type": "object",
              "properties": {
                "frequency": {
                  "type": "string",
                  "enum": [
                    "daily",
                    "weekly",
                    "monthly",
                    "monthlyRelative",
                    "yearly",
                    "yearlyRelative"
                  ]
                },
                "interval": {
                  "type": "integer",
                  "default": 1
                },
                "daysOfWeek": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/DayOfWeek"
                  }
                },
                "weekStart": {
                  "type": "string",
                  "enum": [
                    "monday",
                    "sunday"
                  ]
                },
                "dayOfMonth": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 31
                },
                "monthOfYear": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 12
                },
                "instance": {
                  "type": "string",
                  "enum": [
                    "first",
                    "second",
                    "third",
                    "fourth",
                    "last"
                  ]
                }
              }
            },
            "range": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "byDate",
                    "byCount",
                    "unbounded"
                  ]
                },
                "recurrenceStart": {
                  "$ref": "#/$defs/EventDateTime"
                },
                "recurrenceEnd": {
                  "type": "string",
                  "format": "date"
                },
                "count": {
                  "type": "integer",
                  "minimum": 1
                },
                "patternExclusions": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/EventDateTime"
                  },
                  "readOnly": true
                }
              }
            }
          }
        }
      }
    },
    "Sensitivity": {
      "type": "string",
      "enum": [
        "normal",
        "private",
        "personal",
        "confidential"
      ]
    },
    "ShowAs": {
      "type": "string",
      "enum": [
        "free",
        "busy",
        "tentative",
        "outOfOffice",
        "unknown"
      ]
    }
  }
}