Files
swift-sdk/Sources/Hanzo/Models/PagesDeploymentConfig.swift
zeekay 0c2f028a8c Generate the Swift client, which this copy did not carry
The forge tree held the package scaffolding and none of the generated sources —
2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply
absent, so anything depending on this copy had a package that compiled to
nothing usable.

Generated from the current API document rather than reconciled with the other
copy: a client is a function of the spec, so regenerating answers "which history
wins" without anyone having to choose. .spec-lock records which document, so the
next reader can tell.
2026-08-23 10:04:41 -07:00

56 lines
2.7 KiB
Swift

//
// PagesDeploymentConfig.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct PagesDeploymentConfig: Sendable, Codable, ParameterConvertible, Hashable {
/** CompatibilityDate pins which Workers runtime behaviour the functions run under, as a date (\"2024-01-01\"). It is a pin, not a version: the runtime keeps that date's semantics for code deployed against it. */
public var compatibilityDate: String?
/** CompatibilityFlags turn individual runtime behaviours on or off ahead of, or behind, the date above (\"nodejs_compat\"). */
public var compatibilityFlags: [String]?
/** D1Databases binds D1 databases in, keyed by binding name. */
public var d1Databases: [String: PagesD1Binding]?
/** EnvVars are the environment variables the functions see, KEYED BY VARIABLE NAME. The key is the name; the value carries the value and whether it is a secret. */
public var envVars: [String: PagesEnvVar]?
/** KVNamespaces binds KV namespaces into the functions, KEYED BY THE BINDING NAME the code reads (`env.SESSIONS`). Same shape for the two below. */
public var kvNamespaces: [String: PagesKVBinding]?
/** R2Buckets binds R2 buckets in, keyed by binding name. */
public var r2Buckets: [String: PagesR2Binding]?
public init(compatibilityDate: String? = nil, compatibilityFlags: [String]? = nil, d1Databases: [String: PagesD1Binding]? = nil, envVars: [String: PagesEnvVar]? = nil, kvNamespaces: [String: PagesKVBinding]? = nil, r2Buckets: [String: PagesR2Binding]? = nil) {
self.compatibilityDate = compatibilityDate
self.compatibilityFlags = compatibilityFlags
self.d1Databases = d1Databases
self.envVars = envVars
self.kvNamespaces = kvNamespaces
self.r2Buckets = r2Buckets
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case compatibilityDate = "compatibility_date"
case compatibilityFlags = "compatibility_flags"
case d1Databases = "d1_databases"
case envVars = "env_vars"
case kvNamespaces = "kv_namespaces"
case r2Buckets = "r2_buckets"
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(compatibilityDate, forKey: .compatibilityDate)
try container.encodeIfPresent(compatibilityFlags, forKey: .compatibilityFlags)
try container.encodeIfPresent(d1Databases, forKey: .d1Databases)
try container.encodeIfPresent(envVars, forKey: .envVars)
try container.encodeIfPresent(kvNamespaces, forKey: .kvNamespaces)
try container.encodeIfPresent(r2Buckets, forKey: .r2Buckets)
}
}