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

import Foundation
import Get
import URLQueryEncoder

extension Paths.Clips {
    public var alignedClipSiblings: AlignedClipSiblings {
        AlignedClipSiblings(path: path + "/aligned_clip_siblings")
    }

    public struct AlignedClipSiblings {
        /// Path: `/api/clips/aligned_clip_siblings`
        public let path: String

        /// Get Aligned Clip Siblings
        ///
        /// Find all clips owned by the current user that have matching ClipAlignment data to the given clip.
        /// Returns an empty list if no ClipAlignment exists for the given clip.
        public func get(parameters: GetParameters) -> Request<GenAPI.AlignedClipsResponseSchema> {
            Request(path: path, method: "GET", query: parameters.asQuery, id: "studio_api_clips_api_get_aligned_clip_siblings")
        }

        public struct GetParameters {
            public var clipId: String
            public var excludeSelf: Bool?
            public var windowSeconds: Double?

            public init(clipId: String, excludeSelf: Bool? = nil, windowSeconds: Double? = nil) {
                self.clipId = clipId
                self.excludeSelf = excludeSelf
                self.windowSeconds = windowSeconds
            }

            public var asQuery: [(String, String?)] {
                let encoder = URLQueryEncoder()
                encoder.encode(clipId, forKey: "clip_id")
                encoder.encode(excludeSelf, forKey: "exclude_self")
                encoder.encode(windowSeconds, forKey: "window_seconds")
                return encoder.items
            }
        }
    }
}
