mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
49 lines
1.4 KiB
Swift
49 lines
1.4 KiB
Swift
//
|
|
// SubRecipe.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
#if canImport(AnyCodable)
|
|
import AnyCodable
|
|
#endif
|
|
|
|
public struct SubRecipe: Codable, JSONEncodable, Hashable {
|
|
|
|
public var description: String?
|
|
public var name: String
|
|
public var path: String
|
|
public var sequentialWhenRepeated: Bool?
|
|
public var values: [String: String]?
|
|
|
|
public init(description: String? = nil, name: String, path: String, sequentialWhenRepeated: Bool? = nil, values: [String: String]? = nil) {
|
|
self.description = description
|
|
self.name = name
|
|
self.path = path
|
|
self.sequentialWhenRepeated = sequentialWhenRepeated
|
|
self.values = values
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case description
|
|
case name
|
|
case path
|
|
case sequentialWhenRepeated = "sequential_when_repeated"
|
|
case values
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(description, forKey: .description)
|
|
try container.encode(name, forKey: .name)
|
|
try container.encode(path, forKey: .path)
|
|
try container.encodeIfPresent(sequentialWhenRepeated, forKey: .sequentialWhenRepeated)
|
|
try container.encodeIfPresent(values, forKey: .values)
|
|
}
|
|
}
|
|
|