// Generated by Create API
// https://github.com/CreateAPI/CreateAPI

import Foundation

/// Represent an error arising from editing a title.
public struct MetadataEditErrorSchema: Codable, Equatable, Identifiable {
    public var errorType: ErrorType
    public var id: UUID
    public var moderationErrorMessage: String?

    public struct ErrorType: RawRepresentable, Codable, Equatable {
        public let rawValue: String

        public init(rawValue: String) {
            self.rawValue = rawValue
        }

        public static let titleTooLong = Self(rawValue: "title_too_long")
        public static let promptTooLong = Self(rawValue: "prompt_too_long")
        public static let textModerationError = Self(rawValue: "text_moderation_error")
        public static let captionModerationError = Self(rawValue: "caption_moderation_error")
        public static let imageModerationError = Self(rawValue: "image_moderation_error")
        public static let imageUploadError = Self(rawValue: "image_upload_error")
        public static let captionTooLong = Self(rawValue: "caption_too_long")
        public static let videoCoverError = Self(rawValue: "video_cover_error")
        public static let displayTagsModerationError = Self(rawValue: "display_tags_moderation_error")
    }

    public init(errorType: ErrorType, id: UUID, moderationErrorMessage: String? = nil) {
        self.errorType = errorType
        self.id = id
        self.moderationErrorMessage = moderationErrorMessage
    }
}
