Files
goose/api_clients/swift/GooseAPI/Classes/OpenAPIs/Models/MessageContentOneOf1.swift
2025-10-02 20:13:20 -04:00

52 lines
1.4 KiB
Swift

//
// MessageContentOneOf1.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
#if canImport(AnyCodable)
import AnyCodable
#endif
public struct MessageContentOneOf1: Codable, JSONEncodable, Hashable {
public enum ModelType: String, Codable, CaseIterable {
case image = "image"
}
public var meta: [String: AnyCodable]?
public var annotations: EmbeddedResourceAnnotations?
public var data: String
public var mimeType: String
public var type: ModelType
public init(meta: [String: AnyCodable]? = nil, annotations: EmbeddedResourceAnnotations? = nil, data: String, mimeType: String, type: ModelType) {
self.meta = meta
self.annotations = annotations
self.data = data
self.mimeType = mimeType
self.type = type
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case meta = "_meta"
case annotations
case data
case mimeType
case type
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(meta, forKey: .meta)
try container.encodeIfPresent(annotations, forKey: .annotations)
try container.encode(data, forKey: .data)
try container.encode(mimeType, forKey: .mimeType)
try container.encode(type, forKey: .type)
}
}