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

import Foundation
import Get
import URLQueryEncoder

extension Paths.Gen.WithGenId {
    public var setDisplayTags: SetDisplayTags {
        SetDisplayTags(path: path + "/set_display_tags")
    }

    public struct SetDisplayTags {
        /// Path: `/api/gen/{gen_id}/set_display_tags`
        public let path: String

        /// Set Display Tags
        ///
        /// Set the displayed tags of a GeneratedClip. User must own clip.
        public func post(_ body: GenAPI.DisplayTagsSpec) -> Request<PostResponse> {
            Request(path: path, method: "POST", body: body, id: "studio_api_bots_gen_api_set_display_tags")
        }

        /// Response
        public struct PostResponse: Decodable, Equatable {
            public var generatedClipSchema: GenAPI.GeneratedClipSchema?
            /// Represent an error arising from editing a title.
            public var metadataEditErrorSchema: GenAPI.MetadataEditErrorSchema?

            public init(generatedClipSchema: GenAPI.GeneratedClipSchema? = nil, metadataEditErrorSchema: GenAPI.MetadataEditErrorSchema? = nil) {
                self.generatedClipSchema = generatedClipSchema
                self.metadataEditErrorSchema = metadataEditErrorSchema
            }

            public init(from decoder: Decoder) throws {
                let container = try decoder.singleValueContainer()
                self.generatedClipSchema = try? container.decode(GenAPI.GeneratedClipSchema.self)
                self.metadataEditErrorSchema = try? container.decode(GenAPI.MetadataEditErrorSchema.self)
            }
        }
    }
}
