Created
September 16, 2022 09:09
-
-
Save emndeniz/68dbfc8c6d3e25649bc0eb3c758e56b8 to your computer and use it in GitHub Desktop.
CountryResponseModel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
// MARK: - CountryResponseModelElement | |
struct CountryResponseModelElement: Codable { | |
let name: Name? | |
let tld: [String]? | |
let cca2, ccn3, cca3, cioc: String? | |
let independent: Bool? | |
let status: String? | |
let unMember: Bool? | |
let currencies: Currency? | |
let idd: Idd? | |
let capital, altSpellings: [String]? | |
let region, subregion: String? | |
let languages: Languages? | |
let translations: [String: Translation]? | |
let latlng: [Int]? | |
let landlocked: Bool? | |
let borders: [String]? | |
let area: Int? | |
let demonyms: Demonyms? | |
let flag: String? | |
let maps: Maps? | |
let population: Int? | |
let gini: Gini? | |
let car: Car? | |
let timezones, continents: [String]? | |
let flags, coatOfArms: CoatOfArms? | |
let startOfWeek: String? | |
let capitalInfo: CapitalInfo? | |
let postalCode: PostalCode? | |
} | |
// MARK: - CapitalInfo | |
struct CapitalInfo: Codable { | |
let latlng: [Double]? | |
} | |
// MARK: - Car | |
struct Car: Codable { | |
let signs: [String]? | |
let side: String? | |
} | |
// MARK: - CoatOfArms | |
struct CoatOfArms: Codable { | |
let png: String? | |
let svg: String? | |
} | |
// MARK: - Currencies | |
struct Currency: Codable { | |
let gbp: Gbp? | |
enum CodingKeys: String, CodingKey { | |
case gbp = "GBP" | |
} | |
} | |
// MARK: - Gbp | |
struct Gbp: Codable { | |
let name, symbol: String? | |
} | |
// MARK: - Demonyms | |
struct Demonyms: Codable { | |
let eng, fra: Eng? | |
} | |
// MARK: - Eng | |
struct Eng: Codable { | |
let f, m: String? | |
} | |
// MARK: - Gini | |
struct Gini: Codable { | |
let the2017: Double? | |
enum CodingKeys: String, CodingKey { | |
case the2017 = "2017" | |
} | |
} | |
// MARK: - Idd | |
struct Idd: Codable { | |
let root: String? | |
let suffixes: [String]? | |
} | |
// MARK: - Languages | |
struct Languages: Codable { | |
let eng: String? | |
} | |
// MARK: - Maps | |
struct Maps: Codable { | |
let googleMaps, openStreetMaps: String? | |
} | |
// MARK: - Name | |
struct Name: Codable { | |
let common, official: String? | |
let nativeName: NativeName? | |
} | |
// MARK: - NativeName | |
struct NativeName: Codable { | |
let eng: Translation? | |
} | |
// MARK: - Translation | |
struct Translation: Codable { | |
let official, common: String? | |
} | |
// MARK: - PostalCode | |
struct PostalCode: Codable { | |
let format, regex: String? | |
} | |
typealias CountryResponseModel = [CountryResponseModelElement] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment