feat: Begins adding climate zone client and location clients.
This commit is contained in:
@@ -1,67 +0,0 @@
|
||||
// TODO: This should be renamed to ClimateZoneType.
|
||||
|
||||
public enum ClimateZone {
|
||||
|
||||
public enum ZoneType: String, CaseIterable, Codable, Equatable, Sendable {
|
||||
// NOTE: Keep in this order.
|
||||
|
||||
case hotHumid
|
||||
case moist
|
||||
case dry
|
||||
case marine
|
||||
|
||||
// FIX: Return ZoneIdentifiers.
|
||||
public var zoneIdentifiers: [String] {
|
||||
switch self {
|
||||
case .dry:
|
||||
return ["2B", "3B", "4B", "5B", "6B", "7B"]
|
||||
case .hotHumid:
|
||||
return ["1A", "2A"]
|
||||
case .marine:
|
||||
return ["3C", "4C"]
|
||||
case .moist:
|
||||
return ["3A", "4A", "5A", "6A", "7A"]
|
||||
}
|
||||
}
|
||||
|
||||
public var cfmPerTon: Int {
|
||||
switch self {
|
||||
case .dry: return 450
|
||||
case .hotHumid: return 350
|
||||
case .marine, .moist: return 400
|
||||
}
|
||||
}
|
||||
|
||||
public var label: String {
|
||||
return "\(self == .hotHumid ? "Hot Humid" : rawValue.capitalized) (\(zoneIdentifiers.joined(separator: ", ")))"
|
||||
}
|
||||
|
||||
/// Represents climate zone identifiers.
|
||||
public enum ZoneIdentifier: String, CaseIterable, Codable, Equatable, Sendable {
|
||||
// A zones (hotHumid)
|
||||
case oneA = "1A"
|
||||
case twoA = "2A"
|
||||
// A zones (moist)
|
||||
case threeA = "3A"
|
||||
case fourA = "4A"
|
||||
case fiveA = "5A"
|
||||
case sixA = "6A"
|
||||
case sevenA = "7A"
|
||||
|
||||
// B zones (dry)
|
||||
case twoB = "2B"
|
||||
case threeB = "3B"
|
||||
case fourB = "4B"
|
||||
case fiveB = "5B"
|
||||
case sixB = "6B"
|
||||
case sevenB = "7B"
|
||||
|
||||
// C zones (marine)
|
||||
case threeC = "3C"
|
||||
case fourC = "4C"
|
||||
|
||||
public var label: String { rawValue }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user