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

import Foundation
import Get
import URLQueryEncoder

extension Paths.Video.Hooks.WithHookId {
    public var download: Download {
        Download(path: path + "/download")
    }

    public struct Download {
        /// Path: `/api/video/hooks/{hook_id}/download`
        public let path: String

        /// Get Hook Download Url
        public func get(forceUpdate: Bool? = nil) -> Request<GenAPI.HookDownloadResponse> {
            Request(path: path, method: "GET", query: makeGetQuery(forceUpdate), id: "studio_api_video_hooks_api_get_hook_download_url")
        }

        private func makeGetQuery(_ forceUpdate: Bool?) -> [(String, String?)] {
            let encoder = URLQueryEncoder()
            encoder.encode(forceUpdate, forKey: "force_update")
            return encoder.items
        }
    }
}
