forked from evanshortiss/quarkus-super-heroes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hero.java
75 lines (58 loc) · 1.33 KB
/
Hero.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package io.quarkus.sample.superheroes.fight.client;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
/**
* POJO representing a Hero response from the Hero service
*/
@Schema(description = "The hero fighting against the villain")
public class Hero {
@NotEmpty
private String name;
@NotNull
private int level;
@NotEmpty
private String picture;
private String powers;
public Hero(String name, int level, String picture, String powers) {
this.name = name;
this.level = level;
this.picture = picture;
this.powers = powers;
}
public Hero() {
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public int getLevel() {
return this.level;
}
public void setLevel(int level) {
this.level = level;
}
public String getPicture() {
return this.picture;
}
public void setPicture(String picture) {
this.picture = picture;
}
public String getPowers() {
return this.powers;
}
public void setPowers(String powers) {
this.powers = powers;
}
@Override
public String toString() {
return "Hero{" +
"name='" + this.name + '\'' +
", level=" + this.level +
", picture='" + this.picture + '\'' +
", powers='" + this.powers + '\'' +
'}';
}
}