47da48dd38f52f084f99516555444ba49711beda
[aai/schema-service.git] / aai-schema-service / src / main / java / org / onap / aai / schemaservice / versions / Version.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *    http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20 package org.onap.aai.schemaservice.versions;
21
22 import com.google.gson.annotations.SerializedName;
23
24 import java.util.List;
25 import java.util.Objects;
26
27 public class Version {
28
29     private List<String> versions;
30
31     @SerializedName("edge-version")
32     private String edgeVersion;
33     @SerializedName("default-version")
34     private String defaultVersion;
35     @SerializedName("depth-version")
36     private String depthVersion;
37     @SerializedName("app-root-version")
38     private String appRootVersion;
39     @SerializedName("related-link-version")
40     private String relatedLinkVersion;
41     @SerializedName("namespace-change-version")
42     private String namespaceChangeVersion;
43
44     public List<String> getVersions() {
45         return versions;
46     }
47
48     public void setVersions(List<String> versions) {
49         this.versions = versions;
50     }
51
52     public String getEdgeVersion() {
53         return edgeVersion;
54     }
55
56     public void setEdgeVersion(String edgeVersion) {
57         this.edgeVersion = edgeVersion;
58     }
59
60     public String getDefaultVersion() {
61         return defaultVersion;
62     }
63
64     public void setDefaultVersion(String defaultVersion) {
65         this.defaultVersion = defaultVersion;
66     }
67
68     public String getDepthVersion() {
69         return depthVersion;
70     }
71
72     public void setDepthVersion(String depthVersion) {
73         this.depthVersion = depthVersion;
74     }
75
76     public String getAppRootVersion() {
77         return appRootVersion;
78     }
79
80     public void setAppRootVersion(String appRootVersion) {
81         this.appRootVersion = appRootVersion;
82     }
83
84     public String getRelatedLinkVersion() {
85         return relatedLinkVersion;
86     }
87
88     public void setRelatedLinkVersion(String relatedLinkVersion) {
89         this.relatedLinkVersion = relatedLinkVersion;
90     }
91
92     public String getNamespaceChangeVersion() {
93         return namespaceChangeVersion;
94     }
95
96     public void setNamespaceChangeVersion(String namespaceChangeVersion) {
97         this.namespaceChangeVersion = namespaceChangeVersion;
98     }
99
100     @Override
101     public boolean equals(Object o) {
102         if (this == o) return true;
103         if (o == null || getClass() != o.getClass()) return false;
104         Version that = (Version) o;
105         return Objects.equals(versions, that.versions) &&
106             Objects.equals(edgeVersion, that.edgeVersion) &&
107             Objects.equals(defaultVersion, that.defaultVersion) &&
108             Objects.equals(depthVersion, that.depthVersion) &&
109             Objects.equals(appRootVersion, that.appRootVersion) &&
110             Objects.equals(relatedLinkVersion, that.relatedLinkVersion) &&
111             Objects.equals(namespaceChangeVersion, that.namespaceChangeVersion);
112     }
113
114     @Override
115     public int hashCode() {
116         return Objects.hash(versions, edgeVersion, defaultVersion, depthVersion, appRootVersion, relatedLinkVersion, namespaceChangeVersion);
117     }
118
119
120     @Override
121     public String toString() {
122         return "Version{" +
123             "versions=" + versions +
124             ", edgeVersion='" + edgeVersion + '\'' +
125             ", defaultVersion='" + defaultVersion + '\'' +
126             ", depthVersion='" + depthVersion + '\'' +
127             ", appRootVersion='" + appRootVersion + '\'' +
128             ", relatedLinkVersion='" + relatedLinkVersion + '\'' +
129             ", namespaceChangeVersion='" + namespaceChangeVersion + '\'' +
130             '}';
131     }
132
133 }