Skip to content

Instantly share code, notes, and snippets.

@cortinico
Created October 30, 2019 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cortinico/3e9abc2c74e52117cf800cef7f011876 to your computer and use it in GitHub Desktop.
Save cortinico/3e9abc2c74e52117cf800cef7f011876 to your computer and use it in GitHub Desktop.
Generated Business class from swagger-gradle-codegen
/**
* Represents a specific Business on Yelp
* @property category Optional category of the business
* @property id Unique ID of this Business
* @property name Name of this specific Business
* @property photoUrls Photo URls for this Business
* @property status Status of this Business on Yelp
*/
data class Business (
@Json(name = "id") var id: Long,
@Json(name = "name") var name: String,
@Json(name = "category") var category: Category? = null,
@Json(name = "photoUrls") var photoUrls: List<String>? = null,
@Json(name = "status") var status: Business.StatusEnum? = null
) {
/**
* Status of this Business on Yelp
* Values: OPEN, CLOSED
*/
enum class StatusEnum(val value: String){
@Json(name = "OPEN") OPEN("OPEN"),
@Json(name = "CLOSED") CLOSED("CLOSED")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment