mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-07 12:47:45 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.308.1
This commit is contained in:
@@ -12,15 +12,14 @@ extension Operations {
|
||||
public let country: String?
|
||||
public let europeanUnionMember: Bool?
|
||||
public let inPrivacyRestrictedCountry: Bool?
|
||||
@DecimalSerialized
|
||||
public private(set) var postalCode: Double?
|
||||
public let postalCode: String?
|
||||
public let subdivisions: String?
|
||||
public let timeZone: String?
|
||||
|
||||
/// Creates an object with the specified parameters
|
||||
///
|
||||
///
|
||||
public init(city: String? = nil, code: String? = nil, continentCode: String? = nil, coordinates: String? = nil, country: String? = nil, europeanUnionMember: Bool? = nil, inPrivacyRestrictedCountry: Bool? = nil, postalCode: Double? = nil, subdivisions: String? = nil, timeZone: String? = nil) {
|
||||
public init(city: String? = nil, code: String? = nil, continentCode: String? = nil, coordinates: String? = nil, country: String? = nil, europeanUnionMember: Bool? = nil, inPrivacyRestrictedCountry: Bool? = nil, postalCode: String? = nil, subdivisions: String? = nil, timeZone: String? = nil) {
|
||||
self.city = city
|
||||
self.code = code
|
||||
self.continentCode = continentCode
|
||||
@@ -28,7 +27,7 @@ extension Operations {
|
||||
self.country = country
|
||||
self.europeanUnionMember = europeanUnionMember
|
||||
self.inPrivacyRestrictedCountry = inPrivacyRestrictedCountry
|
||||
self._postalCode = DecimalSerialized<Double?>(wrappedValue: postalCode)
|
||||
self.postalCode = postalCode
|
||||
self.subdivisions = subdivisions
|
||||
self.timeZone = timeZone
|
||||
}
|
||||
@@ -48,40 +47,5 @@ extension Operations.Location: Codable {
|
||||
case subdivisions
|
||||
case timeZone = "time_zone"
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
self.city = try container.decodeIfPresent(String.self, forKey: .city)
|
||||
self.code = try container.decodeIfPresent(String.self, forKey: .code)
|
||||
self.continentCode = try container.decodeIfPresent(String.self, forKey: .continentCode)
|
||||
self.coordinates = try container.decodeIfPresent(String.self, forKey: .coordinates)
|
||||
self.country = try container.decodeIfPresent(String.self, forKey: .country)
|
||||
self.europeanUnionMember = try container.decodeIfPresent(Bool.self, forKey: .europeanUnionMember)
|
||||
self.inPrivacyRestrictedCountry = try container.decodeIfPresent(Bool.self, forKey: .inPrivacyRestrictedCountry)
|
||||
self._postalCode = try container.decodeIfPresent(DecimalSerialized<Double?>.self, forKey: .postalCode) ?? DecimalSerialized<Double?>(wrappedValue: nil)
|
||||
self.subdivisions = try container.decodeIfPresent(String.self, forKey: .subdivisions)
|
||||
self.timeZone = try container.decodeIfPresent(String.self, forKey: .timeZone)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encodeIfPresent(self.city, forKey: .city)
|
||||
try container.encodeIfPresent(self.code, forKey: .code)
|
||||
try container.encodeIfPresent(self.continentCode, forKey: .continentCode)
|
||||
try container.encodeIfPresent(self.coordinates, forKey: .coordinates)
|
||||
try container.encodeIfPresent(self.country, forKey: .country)
|
||||
try container.encodeIfPresent(self.europeanUnionMember, forKey: .europeanUnionMember)
|
||||
try container.encodeIfPresent(self.inPrivacyRestrictedCountry, forKey: .inPrivacyRestrictedCountry)
|
||||
if self.postalCode != nil {
|
||||
try container.encode(self._postalCode, forKey: .postalCode)
|
||||
}
|
||||
try container.encodeIfPresent(self.subdivisions, forKey: .subdivisions)
|
||||
try container.encodeIfPresent(self.timeZone, forKey: .timeZone)
|
||||
}
|
||||
}
|
||||
|
||||
extension Operations.Location {
|
||||
var postalCodeWrapper: DecimalSerialized<Double?> {
|
||||
return _postalCode
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user