package request

type FileManagerFileCreateAttributes struct {
	UploadIntentUUID string  `json:"upload_intent_uuid" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	FolderID         *string `json:"folder_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name             string  `json:"name" validate:"required" example:"policy-final.pdf"`
}

type FileManagerFileUploadIntentAttributes struct {
	Name        string `json:"name" validate:"required" example:"policy-final.pdf"`
	ContentType string `json:"content_type" validate:"required" example:"application/pdf"`
	SizeBytes   int64  `json:"size_bytes" validate:"required,gte=0" example:"1024"`
}

type FileManagerFileUploadIntentData struct {
	Type       string                                `json:"type" validate:"required,oneof=file_manager_file_upload_intent" example:"file_manager_file_upload_intent"`
	Attributes FileManagerFileUploadIntentAttributes `json:"attributes" validate:"required"`
}

type FileManagerFileUploadIntentRequest struct {
	Data FileManagerFileUploadIntentData `json:"data" validate:"required"`
}

type FileManagerFileUploadIntentBulkRequest struct {
	Data []FileManagerFileUploadIntentData `json:"data" validate:"required,min=1"`
}

type FileManagerFileCancelUploadAttributes struct {
	UploadIntentUUID string `json:"upload_intent_uuid" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
}

type FileManagerFileCancelUploadData struct {
	Type       string                                `json:"type" validate:"required,oneof=file_manager_file_cancel_upload" example:"file_manager_file_cancel_upload"`
	Attributes FileManagerFileCancelUploadAttributes `json:"attributes" validate:"required"`
}

type FileManagerFileCancelUploadBulkRequest struct {
	Data []FileManagerFileCancelUploadData `json:"data" validate:"required,min=1"`
}

type FileManagerFileUploadCompleteAttributes struct {
	UploadIntentUUID string `json:"upload_intent_uuid" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
}

type FileManagerFileUploadCompleteData struct {
	Type       string                                  `json:"type" validate:"required,oneof=file_manager_file_upload_complete" example:"file_manager_file_upload_complete"`
	Attributes FileManagerFileUploadCompleteAttributes `json:"attributes" validate:"required"`
}

type FileManagerFileUploadCompleteRequest struct {
	Data FileManagerFileUploadCompleteData `json:"data" validate:"required"`
}

type FileManagerFileCreateData struct {
	Type       string                          `json:"type" validate:"required,oneof=file_manager_file_create file_manager_file" example:"file_manager_file_create"`
	Attributes FileManagerFileCreateAttributes `json:"attributes" validate:"required"`
}

type FileManagerFileCreateRequest struct {
	Data FileManagerFileCreateData `json:"data" validate:"required"`
}

// FileManagerFileCreateFlexibleRequest is used for swagger documentation.
// Runtime accepts:
// - single: {"data": { ...FileManagerFileCreateData }}
// - bulk:   {"data": [ ...FileManagerFileBulkCreateItem ]}
type FileManagerFileCreateFlexibleRequest struct {
	Data interface{} `json:"data"`
}

type FileManagerFileBulkCreateItem struct {
	Type       string                          `json:"type" validate:"required,oneof=file_manager_file_create file_manager_file" example:"file_manager_file_create"`
	Attributes FileManagerFileCreateAttributes `json:"attributes" validate:"required"`
}

type FileManagerFileBulkCreateRequest struct {
	Data []FileManagerFileBulkCreateItem `json:"data" validate:"required,min=1"`
}

type FileManagerFileUserCreateAttributes struct {
	UploadIntentUUID string `json:"upload_intent_uuid" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	UserUUID         string `json:"user_uuid" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name             string `json:"name" validate:"required" example:"profile.jpg"`
}

type FileManagerFileUserBulkCreateItem struct {
	Type       string                              `json:"type" validate:"required,oneof=file_manager_file_create file_manager_file" example:"file_manager_file_create"`
	Attributes FileManagerFileUserCreateAttributes `json:"attributes" validate:"required"`
}

type FileManagerFileUserBulkCreateRequest struct {
	Data []FileManagerFileUserBulkCreateItem `json:"data" validate:"required,min=1"`
}

type FileManagerFileAircraftCreateAttributes struct {
	UploadIntentUUID string `json:"upload_intent_uuid" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	AircraftUUID     string `json:"aircraft_uuid" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name             string `json:"name" validate:"required" example:"aircraft.jpg"`
}

type FileManagerFileAircraftBulkCreateItem struct {
	Type       string                                  `json:"type" validate:"required,oneof=file_manager_file_create file_manager_file" example:"file_manager_file_create"`
	Attributes FileManagerFileAircraftCreateAttributes `json:"attributes" validate:"required"`
}

type FileManagerFileAircraftBulkCreateRequest struct {
	Data []FileManagerFileAircraftBulkCreateItem `json:"data" validate:"required,min=1"`
}

type FileManagerFileBaseCreateAttributes struct {
	UploadIntentUUID string `json:"upload_intent_uuid" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	BaseUUID         string `json:"base_uuid" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name             string `json:"name" validate:"required" example:"base.jpg"`
}

type FileManagerFileBaseBulkCreateItem struct {
	Type       string                              `json:"type" validate:"required,oneof=file_manager_file_create file_manager_file" example:"file_manager_file_create"`
	Attributes FileManagerFileBaseCreateAttributes `json:"attributes" validate:"required"`
}

type FileManagerFileBaseBulkCreateRequest struct {
	Data []FileManagerFileBaseBulkCreateItem `json:"data" validate:"required,min=1"`
}

type FileManagerFileDULCreateAttributes struct {
	UploadIntentUUID string `json:"upload_intent_uuid" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	DULUUID          string `json:"dul_uuid,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name             string `json:"name" validate:"required" example:"dul.jpg"`
}

type FileManagerFileDULBulkCreateItem struct {
	Type       string                             `json:"type" validate:"required,oneof=file_manager_file_create file_manager_file" example:"file_manager_file_create"`
	Attributes FileManagerFileDULCreateAttributes `json:"attributes" validate:"required"`
}

type FileManagerFileDULBulkCreateRequest struct {
	Data []FileManagerFileDULBulkCreateItem `json:"data" validate:"required,min=1"`
}

type FileManagerFileTakeoverCreateAttributes struct {
	UploadIntentUUID string `json:"upload_intent_uuid" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	TakeoverUUID     string `json:"takeover_uuid,omitempty" example:"019e8713-aa19-7fb7-a510-a0332dc69697"`
	Name             string `json:"name" validate:"required" example:"takeover-report.pdf"`
}

type FileManagerFileTakeoverBulkCreateItem struct {
	Type       string                                  `json:"type" validate:"required,oneof=file_manager_file_create file_manager_file" example:"file_manager_file_create"`
	Attributes FileManagerFileTakeoverCreateAttributes `json:"attributes" validate:"required"`
}

type FileManagerFileTakeoverBulkCreateRequest struct {
	Data []FileManagerFileTakeoverBulkCreateItem `json:"data" validate:"required,min=1"`
}

type FileManagerFileTemplateCreateAttributes struct {
	TemplateUUID string `json:"template_uuid" validate:"required" example:"019f0386-0a00-7a4a-a2d8-30afc0e0c3ad"`
	HelicopterID string `json:"helicopter_id" validate:"required" example:"019e8713-aa19-7fb7-a510-a0332dc69697"`
	TakeoverID   string `json:"takeover_id,omitempty" example:"019e8713-aa19-7fb7-a510-a0332dc69697"`
	Name         string `json:"name" validate:"required" example:"collabora-draft.docx"`
}

type FileManagerFileTemplateCreateRequest struct {
	Data struct {
		Type       string                                  `json:"type" validate:"required,oneof=file_manager_file_create_from_template file_manager_file_create"`
		Attributes FileManagerFileTemplateCreateAttributes `json:"attributes" validate:"required"`
	} `json:"data" validate:"required"`
}

type FileManagerFileMissionCreateAttributes struct {
	UploadIntentUUID string `json:"upload_intent_uuid" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	MissionUUID      string `json:"mission_uuid" validate:"required" example:"019d6774-98e8-7fba-9ef4-3795c0da8a13"`
	Name             string `json:"name" validate:"required" example:"mission-brief.pdf"`
}

type FileManagerFileMissionBulkCreateItem struct {
	Type       string                                 `json:"type" validate:"required,oneof=file_manager_file_create file_manager_file" example:"file_manager_file_create"`
	Attributes FileManagerFileMissionCreateAttributes `json:"attributes" validate:"required"`
}

type FileManagerFileMissionBulkCreateRequest struct {
	Data []FileManagerFileMissionBulkCreateItem `json:"data" validate:"required,min=1"`
}

type FileManagerFileUpdateAttributes struct {
	FolderID *string `json:"folder_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name     *string `json:"name,omitempty" example:"policy-v2.pdf"`
}

type FileManagerFileUpdateData struct {
	Type       string                          `json:"type" validate:"required,oneof=file_manager_file_update file_manager_file" example:"file_manager_file_update"`
	ID         string                          `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Attributes FileManagerFileUpdateAttributes `json:"attributes" validate:"required"`
}

type FileManagerFileUpdateRequest struct {
	Data FileManagerFileUpdateData `json:"data" validate:"required"`
}
