1 package com.atlassian.plugins.rest.doclet.generators.schema.beans.attachment;
2
3 import org.codehaus.jackson.annotate.JsonAutoDetect;
4 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
5 import org.codehaus.jackson.annotate.JsonProperty;
6 import org.joda.time.ReadableInstant;
7
8 import javax.annotation.concurrent.Immutable;
9 import java.net.URI;
10
11
12
13
14
15
16 @JsonIgnoreProperties(ignoreUnknown = true)
17 @JsonAutoDetect
18 @Immutable
19 public class AttachmentViewJsonDto {
20 @JsonProperty
21 private final long id;
22
23 @JsonProperty
24 private final boolean latest;
25
26 @JsonProperty
27 private final boolean deletable;
28
29 @JsonProperty
30 private final boolean expandable;
31
32 @JsonProperty
33 private final URI thumbnailUrl;
34
35 @JsonProperty
36 private final int thumbnailWidth;
37
38 @JsonProperty
39 private final int thumbnailHeight;
40
41 @JsonProperty
42 private final URI attachmentUrl;
43
44 @JsonProperty
45 private final String authorDisplayName;
46
47 @JsonProperty
48 private final String authorKey;
49
50 @JsonProperty
51 private final String fileSize;
52
53 @JsonProperty
54 private final String fileName;
55
56 @JsonProperty
57 private final String mimeType;
58
59 @JsonProperty
60 private final ReadableInstant createdIso8601;
61
62 @JsonProperty
63 private final String createdDateTime;
64
65 AttachmentViewJsonDto(
66 final long id,
67 final boolean latest,
68 final boolean deletable,
69 final boolean expandable,
70 final URI thumbnailUrl,
71 final int thumbnailWidth,
72 final int thumbnailHeight,
73 final URI attachmentUrl,
74 final String authorDisplayName,
75 final String authorKey,
76 final String fileSize,
77 final String fileName,
78 final String mimeType,
79 final ReadableInstant createdIso8601,
80 final String createdDateTime) {
81 this.id = id;
82 this.thumbnailUrl = thumbnailUrl;
83 this.authorDisplayName = authorDisplayName;
84 this.fileName = fileName;
85 this.mimeType = mimeType;
86 this.latest = latest;
87 this.deletable = deletable;
88 this.expandable = expandable;
89 this.thumbnailWidth = thumbnailWidth;
90 this.thumbnailHeight = thumbnailHeight;
91 this.attachmentUrl = attachmentUrl;
92 this.authorKey = authorKey;
93 this.fileSize = fileSize;
94 this.createdIso8601 = createdIso8601;
95 this.createdDateTime = createdDateTime;
96 }
97
98 public long getId() {
99 return id;
100 }
101
102 public boolean isLatest() {
103 return latest;
104 }
105
106 public boolean isDeletable() {
107 return deletable;
108 }
109
110 public boolean isExpandable() {
111 return expandable;
112 }
113
114 public URI getThumbnailUrl() {
115 return thumbnailUrl;
116 }
117
118 public int getThumbnailWidth() {
119 return thumbnailWidth;
120 }
121
122 public int getThumbnailHeight() {
123 return thumbnailHeight;
124 }
125
126 public URI getAttachmentUrl() {
127 return attachmentUrl;
128 }
129
130 public String getAuthorDisplayName() {
131 return authorDisplayName;
132 }
133
134 public String getAuthorKey() {
135 return authorKey;
136 }
137
138 public String getFileSize() {
139 return fileSize;
140 }
141
142 public String getFileName() {
143 return fileName;
144 }
145
146 public String getMimeType() {
147 return mimeType;
148 }
149
150 public ReadableInstant getCreatedIso8601() {
151 return createdIso8601;
152 }
153
154 public String getCreatedDateTime() {
155 return createdDateTime;
156 }
157 }