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

import Foundation
import Get
import URLQueryEncoder

extension Paths.Video {
    public var sprite: Sprite {
        Sprite(path: path + "/sprite")
    }

    public struct Sprite {
        /// Path: `/api/video/sprite`
        public let path: String

        /// Get Video Sprite
        public func get(entityId: String? = nil, type: `Type`? = nil) -> Request<GenAPI.VideoSpriteSchema> {
            Request(path: path, method: "GET", query: makeGetQuery(entityId, type), id: "studio_api_video_api_get_video_sprite")
        }

        private func makeGetQuery(_ entityId: String?, _ type: `Type`?) -> [(String, String?)] {
            let encoder = URLQueryEncoder()
            encoder.encode(entityId, forKey: "entity_id")
            encoder.encode(type, forKey: "type")
            return encoder.items
        }

        /// Type
        public struct `Type`: RawRepresentable, Codable, Equatable {
            public let rawValue: String

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

            public static let videoUpload = Self(rawValue: "video_upload")
            public static let sprite = Self(rawValue: "sprite")
        }
    }
}
