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

import Foundation
import Get
import URLQueryEncoder

extension Paths.Video.Hooks {
    public func hookId(_ hookId: String) -> WithHookId {
        WithHookId(path: "\(path)/\(hookId)")
    }

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

        /// Get Video Hook
        public func get(bustCache: Bool? = nil) -> Request<GenAPI.VideoHookSchema> {
            Request(path: path, method: "GET", query: makeGetQuery(bustCache), id: "studio_api_video_hooks_api_get_video_hook")
        }

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