1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.linecorp.centraldogma.server.internal.admin.dto;
18
19 import javax.annotation.Nullable;
20
21 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
22 import com.google.common.base.MoreObjects;
23
24 @JsonIgnoreProperties(ignoreUnknown = true)
25 public class EntryDto {
26
27 @Nullable
28 private String revision;
29 @Nullable
30 private String path;
31 @Nullable
32 private String type;
33 @Nullable
34 private String content;
35
36 @Nullable
37 public String getRevision() {
38 return revision;
39 }
40
41 public void setRevision(@Nullable String revision) {
42 this.revision = revision;
43 }
44
45 @Nullable
46 public String getPath() {
47 return path;
48 }
49
50 public void setPath(@Nullable String path) {
51 this.path = path;
52 }
53
54 @Nullable
55 public String getName() {
56 if (path == null) {
57 return null;
58 } else {
59 return path.substring(path.lastIndexOf('/') + 1);
60 }
61 }
62
63 @Nullable
64 public String getType() {
65 return type;
66 }
67
68 public void setType(@Nullable String type) {
69 this.type = type;
70 }
71
72 @Nullable
73 public String getContent() {
74 return content;
75 }
76
77 public void setContent(@Nullable String content) {
78 this.content = content;
79 }
80
81 @Override
82 public String toString() {
83 return MoreObjects.toStringHelper(this)
84 .add("revision", revision)
85 .add("path", path)
86 .add("type", type)
87 .add("content", content)
88 .toString();
89 }
90 }