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

import Foundation

public struct APIErrorSchema: Codable, Equatable {
    public var detail: String?
    public var errorType: ErrorType?

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

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

        public static let rateLimit = Self(rawValue: "rate_limit")
        public static let forbidden = Self(rawValue: "forbidden")
        public static let songNotFound = Self(rawValue: "song_not_found")
        public static let commentTooLong = Self(rawValue: "comment_too_long")
        public static let commentDuplicate = Self(rawValue: "comment_duplicate")
        public static let commentNoPermission = Self(rawValue: "comment_no_permission")
        public static let commentsDisabled = Self(rawValue: "comments_disabled")
        public static let commentModerated = Self(rawValue: "comment_moderated")
        public static let commentNotFound = Self(rawValue: "comment_not_found")
        public static let entityNotFound = Self(rawValue: "entity_not_found")
        public static let profilesMalformedBirthDate = Self(rawValue: "profiles_malformed_birth_date")
        public static let profilesInvalidSecondaryEmail = Self(rawValue: "profiles_invalid_secondary_email")
    }

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