Created
August 5, 2022 17:44
-
-
Save krzdabrowski/6be2d8bb458c8ddac3c5b7479c41636e to your computer and use it in GitHub Desktop.
This file contains 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
@Serializable | |
data class RocketResponse( | |
@SerialName("id") | |
val id: String = "", | |
@SerialName("name") | |
val name: String = "", | |
@SerialName("cost_per_launch") | |
val costPerLaunch: Int = 0, | |
@SerialName("first_flight") | |
val firstFlightDate: String = "", | |
@SerialName("height") | |
val height: Height = Height(), | |
@SerialName("mass") | |
val weight: Weight = Weight(), | |
@SerialName("wikipedia") | |
val wikiUrl: String = "", | |
@SerialName("flickr_images") | |
val imageUrls: List<String> = emptyList() | |
) { | |
@Serializable | |
data class Height( | |
val meters: Double = 0.0, | |
val feet: Double = 0.0 | |
) | |
@Serializable | |
data class Weight( | |
val kg: Int = 0, | |
val lb: Int = 0 | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment