{
  "$id": "https://intentschema.org/profiles/com.google.calendar/productivity.calendar.availability.set.v1.json",
  "id": "org.intentschema.productivity.calendar.availability.set.v1@com.google.calendar.v1",
  "pins": "https://intentschema.org/intents/productivity/calendar/availability/set/v1.json",
  "title": "Google Calendar availability set profile",
  "description": "Google Calendar profile for setting working hours / focus / OOO.",
  "constraints": {
    "properties": {
      "target": {
        "properties": {
          "system": {
            "const": "google_calendar"
          }
        },
        "required": [
          "system"
        ]
      },
      "google_calendar": {
        "type": "object",
        "properties": {
          "eventType": {
            "enum": [
              "focusTime",
              "outOfOffice",
              "workingLocation"
            ]
          }
        }
      }
    }
  },
  "api": {
    "method": "POST",
    "path": "/calendar/v3/calendars/{calendarId}/events",
    "scopes": [
      "https://www.googleapis.com/auth/calendar"
    ],
    "docs": "https://developers.google.com/calendar/api/v3/reference/events/insert",
    "params": {
      "object.mode": "eventType (focusTime|outOfOffice|workingLocation)",
      "object.start": "start.dateTime",
      "object.end": "end.dateTime",
      "object.recurrence": "recurrence[]",
      "object.auto_reply": "(OOO auto-reply via Gmail vacation settings, not Calendar API)",
      "google_calendar.eventType": "eventType"
    },
    "base_url": "https://www.googleapis.com"
  }
}
