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

49 lines
1.2 KiB
Swift

//
// ResourceContents.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
#if canImport(AnyCodable)
import AnyCodable
#endif
public struct ResourceContents: Codable, JSONEncodable, Hashable {
public var meta: [String: AnyCodable]?
public var mimeType: String?
public var text: String
public var uri: String
public var blob: String
public init(meta: [String: AnyCodable]? = nil, mimeType: String? = nil, text: String, uri: String, blob: String) {
self.meta = meta
self.mimeType = mimeType
self.text = text
self.uri = uri
self.blob = blob
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case meta = "_meta"
case mimeType
case text
case uri
case blob
}
// 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(mimeType, forKey: .mimeType)
try container.encode(text, forKey: .text)
try container.encode(uri, forKey: .uri)
try container.encode(blob, forKey: .blob)
}
}