AAI-2279 coverage of schema-service/aai-schema-gen
[aai/schema-service.git] / aai-schema-gen / src / main / java / org / onap / aai / schemagen / swagger / Definition.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  
21 package org.onap.aai.schemagen.swagger;
22
23 import java.util.List;
24
25 public class Definition {
26
27     private String definitionName;
28
29     private String definitionDescription;
30
31     private List<Property> propertyList;
32
33     private List<Property> schemaPropertyList;
34
35     private List<Property> regularPropertyList;
36
37     private boolean hasDescription;
38
39     public String getDefinitionName() {
40         return definitionName;
41     }
42
43     public void setDefinitionName(String definitionName) {
44         this.definitionName = definitionName;
45     }
46
47     public List<Property> getPropertyList() {
48         return propertyList;
49     }
50
51     public void setPropertyList(List<Property> propertyList) {
52         this.propertyList = propertyList;
53     }
54
55     public String getDefinitionDescription() {
56         return definitionDescription;
57     }
58
59     public void setDefinitionDescription(String definitionDescription) {
60         this.definitionDescription = definitionDescription;
61     }
62
63     @Override
64     public String toString() {
65         return "Definition{" + "definitionName='" + getDefinitionName() + '\''
66             + ", definitionDescription='" + getDefinitionDescription() + '\'' + ", propertyList="
67             + getPropertyList() + '}';
68     }
69
70     public boolean isHasDescription() {
71         return hasDescription;
72     }
73
74     public void setHasDescription(boolean hasDescription) {
75         this.hasDescription = hasDescription;
76     }
77
78     public List<Property> getSchemaPropertyList() {
79         return schemaPropertyList;
80     }
81
82     public void setSchemaPropertyList(List<Property> schemaPropertyList) {
83         this.schemaPropertyList = schemaPropertyList;
84     }
85
86     public List<Property> getRegularPropertyList() {
87         return regularPropertyList;
88     }
89
90     public void setRegularPropertyList(List<Property> regularPropertyList) {
91         this.regularPropertyList = regularPropertyList;
92     }
93
94     public static class Property {
95
96         private String propertyName;
97
98         private String propertyDescription;
99
100         private boolean hasPropertyDescription;
101
102         private String propertyType;
103
104         private boolean hasType;
105
106         private String propertyReference;
107
108         private String propertyReferenceObjectName;
109
110         private boolean isRequired;
111
112         private boolean hasPropertyReference;
113
114         public Property() {
115         }
116
117         public String getPropertyName() {
118             return propertyName;
119         }
120
121         public void setPropertyName(String propertyName) {
122             this.propertyName = propertyName;
123         }
124
125         public String getPropertyType() {
126             return propertyType;
127         }
128
129         public void setPropertyType(String propertyType) {
130             this.propertyType = propertyType;
131         }
132
133         public String getPropertyReference() {
134             return propertyReference;
135         }
136
137         public void setPropertyReference(String propertyReference) {
138             this.propertyReference = propertyReference;
139         }
140
141         @Override
142         public String toString() {
143             return "Property{" + "propertyName='" + getPropertyName() + '\'' + ", propertyType='"
144                 + getPropertyType() + '\'' + ", propertyReference='" + getPropertyReference() + '\''
145                 + '}';
146         }
147
148         public boolean isHasType() {
149             return hasType;
150         }
151
152         public void setHasType(boolean hasType) {
153             this.hasType = hasType;
154         }
155
156         public boolean isRequired() {
157             return isRequired;
158         }
159
160         public void setRequired(boolean required) {
161             isRequired = required;
162         }
163
164         public boolean isHasPropertyReference() {
165             return hasPropertyReference;
166         }
167
168         public void setHasPropertyReference(boolean hasPropertyReference) {
169             this.hasPropertyReference = hasPropertyReference;
170         }
171
172         public String getPropertyReferenceObjectName() {
173             return propertyReferenceObjectName;
174         }
175
176         public void setPropertyReferenceObjectName(String propertyReferenceObjectName) {
177             this.propertyReferenceObjectName = propertyReferenceObjectName;
178         }
179
180         public String getPropertyDescription() {
181             return propertyDescription;
182         }
183
184         public void setPropertyDescription(String propertyDescription) {
185             this.propertyDescription = propertyDescription;
186         }
187
188         public boolean isHasPropertyDescription() {
189             return hasPropertyDescription;
190         }
191
192         public void setHasPropertyDescription(boolean hasPropertyDescription) {
193             this.hasPropertyDescription = hasPropertyDescription;
194         }
195     }
196 }