1 package com.atlassian.marketplace.client.model;
2
3 import java.net.URI;
4
5 import com.atlassian.fugue.Option;
6 import com.atlassian.marketplace.client.api.VendorId;
7
8
9
10
11
12
13
14 public class AddonReference implements Entity
15 {
16 Links _links;
17 Embedded _embedded;
18 String name;
19 String key;
20
21 @RequiredLink(rel = "self") URI selfUri;
22 @RequiredLink(rel = "alternate") URI alternateUri;
23 @RequiredLink(rel = "vendor") URI vendorUri;
24
25 @Override
26 public Links getLinks()
27 {
28 return _links;
29 }
30
31
32
33
34 public String getName()
35 {
36 return name;
37 }
38
39
40
41
42 public String getKey()
43 {
44 return key;
45 }
46
47 @Override
48 public URI getSelfUri()
49 {
50 return selfUri;
51 }
52
53
54
55
56 public URI getAlternateUri()
57 {
58 return alternateUri;
59 }
60
61
62
63
64 public VendorId getVendorId()
65 {
66 return VendorId.fromUri(vendorUri);
67 }
68
69
70
71
72 public Option<ImageInfo> getImage()
73 {
74 return _embedded.image;
75 }
76
77
78
79
80 public Option<AddonReviewsSummary> getReviews()
81 {
82 return _embedded.reviews;
83 }
84
85 static final class Embedded
86 {
87 Option<ImageInfo> image;
88 Option<AddonReviewsSummary> reviews;
89 }
90 }