-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
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
63 changes: 63 additions & 0 deletions
63
src/main/java/io/github/yvasyliev/deezer/objects/Genre.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package io.github.yvasyliev.deezer.objects; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
import java.net.URL; | ||
|
||
/** | ||
* A genre object. | ||
*/ | ||
@Data | ||
@JsonIgnoreProperties(value = "type", allowGetters = true, ignoreUnknown = true) | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class Genre { | ||
/** | ||
* The editorial's Deezer id. | ||
*/ | ||
@JsonProperty("id") | ||
private Long id; | ||
|
||
/** | ||
* The editorial's name. | ||
*/ | ||
@JsonProperty("name") | ||
private String name; | ||
|
||
/** | ||
* The url of the genre picture. Add 'size' parameter to the url to change size. Can be 'small', 'medium', 'big', 'xl'. | ||
*/ | ||
@JsonProperty("picture") | ||
private Picture picture; | ||
|
||
/** | ||
* The url of the genre picture in size small. | ||
*/ | ||
@JsonProperty("picture_small") | ||
private URL pictureSmall; | ||
|
||
/** | ||
* The url of the genre picture in size medium. | ||
*/ | ||
@JsonProperty("picture_medium") | ||
private URL pictureMedium; | ||
|
||
/** | ||
* The url of the genre picture in size big. | ||
*/ | ||
@JsonProperty("picture_big") | ||
private URL pictureBig; | ||
|
||
/** | ||
* The url of the genre picture in size xl. | ||
*/ | ||
@JsonProperty("picture_xl") | ||
private URL pictureXl; | ||
|
||
@JsonProperty("type") | ||
public ObjectType getType() { | ||
return ObjectType.GENRE; | ||
} | ||
} |
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