1 package com.atlassian.plugins.rest.sample.expansion.entity;
2
3 import com.atlassian.plugins.rest.common.expand.Expandable;
4
5 import static javax.xml.bind.annotation.XmlAccessType.FIELD;
6 import javax.xml.bind.annotation.XmlAccessorType;
7 import javax.xml.bind.annotation.XmlAttribute;
8 import javax.xml.bind.annotation.XmlElement;
9 import javax.xml.bind.annotation.XmlRootElement;
10
11 @XmlRootElement
12 @XmlAccessorType(FIELD)
13 public class Game
14 {
15 @XmlAttribute
16 private String name;
17
18 @XmlElement
19 @Expandable
20 private Players players;
21
22
23 private Game()
24 {
25 }
26
27 public Game(String name)
28 {
29 this.name = name;
30 }
31
32 public void setPlayers(Players players)
33 {
34 this.players = players;
35 }
36
37 public String getName()
38 {
39 return name;
40 }
41
42 public Players getPlayers()
43 {
44 return players;
45 }
46 }