{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/deputy/json-schema/deputy-agreed-hour-batch-update-request-schema.json",
  "title": "AgreedHourBatchUpdateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/deputy-agreed-hour-api-openapi.yml#/components/schemas/AgreedHourBatchUpdateRequest",
  "type": "object",
  "properties": {
    "employeeIds": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int32"
      },
      "description": "One or more numeric employee IDs"
    },
    "agreedHour": {
      "$ref": "#/$defs/v2modelAgreedHour"
    }
  },
  "$defs": {
    "AgreedHourWeekWeekIndex": {
      "type": "string",
      "enum": [
        "UNSPECIFIED",
        "ONE",
        "TWO",
        "THREE",
        "FOUR"
      ],
      "default": "UNSPECIFIED"
    },
    "WorkPeriodChangesReason": {
      "type": "string",
      "enum": [
        "UNDEFINED",
        "REQUESTED_BY_EMPLOYEE",
        "BONA_FIDE",
        "OTHER"
      ],
      "default": "UNDEFINED"
    },
    "WorkPeriodCycle": {
      "type": "string",
      "enum": [
        "WEEKLY",
        "TWO_WEEK",
        "FOUR_WEEK"
      ],
      "default": "WEEKLY"
    },
    "modelAgreedHourDay": {
      "type": "object",
      "properties": {
        "day": {
          "type": "integer",
          "format": "int32",
          "title": ""
        },
        "shifts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/modelAgreedHourShift"
          },
          "title": ""
        }
      }
    },
    "modelAgreedHourDetails": {
      "type": "object",
      "properties": {
        "weeks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/modelAgreedHourWeek"
          },
          "title": ""
        }
      }
    },
    "modelAgreedHourShift": {
      "type": "object",
      "properties": {
        "startTime": {
          "type": "string",
          "title": ""
        },
        "endTime": {
          "type": "string",
          "title": ""
        },
        "breaks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/modelBreakTime"
          },
          "title": ""
        },
        "location": {
          "type": "integer",
          "format": "int32",
          "title": ""
        },
        "area": {
          "type": "integer",
          "format": "int32",
          "title": ""
        },
        "totalHours": {
          "type": "number",
          "format": "float",
          "title": ""
        },
        "changeDetails": {
          "type": "string",
          "readOnly": true
        }
      }
    },
    "modelAgreedHourStatus": {
      "type": "string",
      "enum": [
        "UNKNOWN",
        "PENDING",
        "ACCEPTED",
        "DECLINED",
        "FORCED"
      ],
      "default": "UNKNOWN"
    },
    "modelAgreedHourWeek": {
      "type": "object",
      "properties": {
        "week": {
          "$ref": "#/$defs/AgreedHourWeekWeekIndex",
          "title": " `json:\"week\"`"
        },
        "days": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/modelAgreedHourDay"
          },
          "title": ""
        }
      }
    },
    "modelBreakTime": {
      "type": "object",
      "properties": {
        "breakType": {
          "$ref": "#/$defs/modelBreakTimeBreakType",
          "title": ""
        },
        "breakDuration": {
          "type": "string",
          "description": "e.g. `00:30` for a 30 minute break, `01:05` for a 1 hour 5 minute break.",
          "title": ""
        },
        "startBreakTime": {
          "type": "string",
          "description": "Formatted 24-hour time e.g. `10:00` or `14:30`",
          "title": ""
        },
        "endBreakTime": {
          "type": "string",
          "description": "Formatted 24-hour time e.g. `10:00` or `14:30`",
          "title": ""
        },
        "changeDetails": {
          "type": "string",
          "readOnly": true
        }
      }
    },
    "modelBreakTimeBreakType": {
      "type": "string",
      "enum": [
        "NO_BREAK",
        "MEAL",
        "REST"
      ],
      "default": "NO_BREAK"
    },
    "modelWorkPeriod": {
      "type": "object",
      "properties": {
        "cycle": {
          "$ref": "#/$defs/WorkPeriodCycle",
          "title": ""
        },
        "dayOfWeek": {
          "$ref": "#/$defs/modelWorkPeriodDayOfWeek",
          "title": ""
        },
        "startDate": {
          "type": "string",
          "format": "date-time",
          "description": "Must refer to a day of the week matching `dayOfWeek`, otherwise an error occurs.",
          "title": ""
        },
        "startCycleDate": {
          "type": "string",
          "format": "date-time",
          "title": ""
        },
        "endCycleDate": {
          "type": "string",
          "format": "date-time",
          "title": ""
        },
        "endDate": {
          "type": "string",
          "format": "date-time",
          "title": ""
        },
        "baselineDate": {
          "type": "string",
          "format": "date-time",
          "title": ""
        },
        "baselineComment": {
          "type": "string",
          "title": ""
        },
        "changesReason": {
          "$ref": "#/$defs/WorkPeriodChangesReason",
          "title": ""
        },
        "metadata": {
          "type": "string",
          "title": ""
        }
      },
      "title": "WorkPeriod model"
    },
    "modelWorkPeriodDayOfWeek": {
      "type": "string",
      "enum": [
        "SUNDAY",
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY"
      ],
      "default": "SUNDAY"
    },
    "v2modelAgreedHour": {
      "type": "object",
      "properties": {
        "threshold": {
          "type": "number",
          "format": "float",
          "title": ""
        },
        "applyThreshold": {
          "type": "boolean",
          "title": ""
        },
        "workPeriod": {
          "$ref": "#/$defs/modelWorkPeriod",
          "title": ""
        },
        "details": {
          "$ref": "#/$defs/modelAgreedHourDetails",
          "title": ""
        },
        "workingDaysPerCycle": {
          "type": "number",
          "format": "float",
          "title": ""
        },
        "status": {
          "$ref": "#/$defs/modelAgreedHourStatus",
          "title": ""
        },
        "statusDate": {
          "type": "string",
          "format": "date-time",
          "title": ""
        },
        "statusChangedById": {
          "type": "integer",
          "format": "int32",
          "title": "",
          "readOnly": true
        },
        "comment": {
          "type": "string",
          "title": ""
        },
        "version": {
          "type": "string",
          "title": "",
          "readOnly": true
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "title": "",
          "readOnly": true
        },
        "archivedAt": {
          "type": "string",
          "format": "date-time",
          "title": "",
          "readOnly": true
        },
        "recordId": {
          "type": "string",
          "title": "",
          "readOnly": true
        },
        "creatorEmployeeProfileId": {
          "type": "string",
          "title": "",
          "readOnly": true
        },
        "creatorEmployeeDisplayName": {
          "type": "string",
          "title": "",
          "readOnly": true
        },
        "creatorEmployeeProfilePic": {
          "type": "string",
          "title": "",
          "readOnly": true
        },
        "effectiveDate": {
          "type": "string",
          "title": ""
        }
      }
    }
  }
}