mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
37 lines
835 B
Swift
37 lines
835 B
Swift
//
|
|
// CreateRecipeResponse.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
#if canImport(AnyCodable)
|
|
import AnyCodable
|
|
#endif
|
|
|
|
public struct CreateRecipeResponse: Codable, JSONEncodable, Hashable {
|
|
|
|
public var error: String?
|
|
public var recipe: Recipe?
|
|
|
|
public init(error: String? = nil, recipe: Recipe? = nil) {
|
|
self.error = error
|
|
self.recipe = recipe
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case error
|
|
case recipe
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(error, forKey: .error)
|
|
try container.encodeIfPresent(recipe, forKey: .recipe)
|
|
}
|
|
}
|
|
|