2023-04-23 13:16:22 +00:00
|
|
|
/// This model is a concrete genetic definition that represents the following models: ``AmiiboSeries``, ``AmiiboType``, ``Character`` and ``GameSeries``.
|
2023-04-18 18:37:08 +00:00
|
|
|
public struct KeyName {
|
2023-04-23 13:16:22 +00:00
|
|
|
|
|
|
|
// MARK: Properties
|
|
|
|
|
|
|
|
/// The key of the model.
|
2023-04-18 18:37:08 +00:00
|
|
|
public let key: String
|
2023-04-23 13:16:22 +00:00
|
|
|
|
|
|
|
/// The name of the model.
|
|
|
|
public let name: String
|
2023-04-18 18:37:08 +00:00
|
|
|
|
2023-04-23 13:16:22 +00:00
|
|
|
}
|
2023-04-18 18:37:08 +00:00
|
|
|
|
|
|
|
// MARK: - Type aliases
|
|
|
|
|
2023-04-23 13:16:22 +00:00
|
|
|
/// This model represents the series an amiibo belongs to.
|
2023-04-18 18:37:08 +00:00
|
|
|
public typealias AmiiboSeries = KeyName
|
2023-04-23 13:16:22 +00:00
|
|
|
|
|
|
|
/// This model represents the type an amiibo belongs to.
|
|
|
|
public typealias AmiiboType = KeyName
|
|
|
|
|
|
|
|
/// This model represents the character an amiibo is associated to.
|
2023-04-18 18:37:08 +00:00
|
|
|
public typealias Character = KeyName
|
2023-04-23 13:16:22 +00:00
|
|
|
|
|
|
|
/// This model represents the games series an amiibo is associated to.
|
|
|
|
public typealias GameSeries = KeyName
|
|
|
|
|
|
|
|
// MARK: - Decodable
|
|
|
|
|
|
|
|
extension KeyName: Decodable {}
|