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

import Foundation

/// DiscoverReq is a schema for the request body of the discover endpoint.
/// The schema is used to get the sections for the mobile/web homepage.
/// You specify the start index and the page size to get the sections.
/// If you need to get a specific section, then you set section_name which is the name of the section.
/// and set start_index to 0 and page_size to 1.
public struct DiscoverReq: Codable, Equatable {
    public var disableShuffle: Bool?
    public var language: String?
    public var page: Int?
    public var pageSize: Int?
    public var platform: Platform?
    public var product: Product?
    public var secondarySectionContent: String?
    public var sectionContent: String?
    public var sectionName: String?
    public var sectionSize: Int?
    public var startIndex: Int?

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

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

        public static let mobile = Self(rawValue: "mobile")
        public static let web = Self(rawValue: "web")
    }

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

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

        public static let archive = Self(rawValue: "archive")
    }

    public init(disableShuffle: Bool? = nil, language: String? = nil, page: Int? = nil, pageSize: Int? = nil, platform: Platform? = nil, product: Product? = nil, secondarySectionContent: String? = nil, sectionContent: String? = nil, sectionName: String? = nil, sectionSize: Int? = nil, startIndex: Int? = nil) {
        self.disableShuffle = disableShuffle
        self.language = language
        self.page = page
        self.pageSize = pageSize
        self.platform = platform
        self.product = product
        self.secondarySectionContent = secondarySectionContent
        self.sectionContent = sectionContent
        self.sectionName = sectionName
        self.sectionSize = sectionSize
        self.startIndex = startIndex
    }
}
