mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
53 lines
1.5 KiB
Swift
53 lines
1.5 KiB
Swift
//
|
|
// CreateRecipeRequest.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
#if canImport(AnyCodable)
|
|
import AnyCodable
|
|
#endif
|
|
|
|
public struct CreateRecipeRequest: Codable, JSONEncodable, Hashable {
|
|
|
|
public var activities: [String]?
|
|
public var author: AuthorRequest?
|
|
public var description: String
|
|
public var messages: [Message]
|
|
public var sessionId: String
|
|
public var title: String
|
|
|
|
public init(activities: [String]? = nil, author: AuthorRequest? = nil, description: String, messages: [Message], sessionId: String, title: String) {
|
|
self.activities = activities
|
|
self.author = author
|
|
self.description = description
|
|
self.messages = messages
|
|
self.sessionId = sessionId
|
|
self.title = title
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case activities
|
|
case author
|
|
case description
|
|
case messages
|
|
case sessionId = "session_id"
|
|
case title
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(activities, forKey: .activities)
|
|
try container.encodeIfPresent(author, forKey: .author)
|
|
try container.encode(description, forKey: .description)
|
|
try container.encode(messages, forKey: .messages)
|
|
try container.encode(sessionId, forKey: .sessionId)
|
|
try container.encode(title, forKey: .title)
|
|
}
|
|
}
|
|
|