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

53 lines
1.6 KiB
Swift

//
// CreateCustomProviderRequest.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
#if canImport(AnyCodable)
import AnyCodable
#endif
public struct CreateCustomProviderRequest: Codable, JSONEncodable, Hashable {
public var apiKey: String
public var apiUrl: String
public var displayName: String
public var models: [String]
public var providerType: String
public var supportsStreaming: Bool?
public init(apiKey: String, apiUrl: String, displayName: String, models: [String], providerType: String, supportsStreaming: Bool? = nil) {
self.apiKey = apiKey
self.apiUrl = apiUrl
self.displayName = displayName
self.models = models
self.providerType = providerType
self.supportsStreaming = supportsStreaming
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case apiKey = "api_key"
case apiUrl = "api_url"
case displayName = "display_name"
case models
case providerType = "provider_type"
case supportsStreaming = "supports_streaming"
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(apiKey, forKey: .apiKey)
try container.encode(apiUrl, forKey: .apiUrl)
try container.encode(displayName, forKey: .displayName)
try container.encode(models, forKey: .models)
try container.encode(providerType, forKey: .providerType)
try container.encodeIfPresent(supportsStreaming, forKey: .supportsStreaming)
}
}