590284928fcd4f3fbe1e578c9f44b2e815c06482
[vid.git] / vid-app-common / src / main / java / org / onap / vid / asdc / beans / tosca / Input.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
4  * ================================================================================
5  * Copyright (C) 2017 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.vid.asdc.beans.tosca;
22
23 import org.onap.sdc.toscaparser.api.Property;
24
25 import java.util.List;
26 import java.util.ArrayList;
27
28 // TODO: Auto-generated Javadoc
29 /**
30  * The Class Input.
31  */
32 public class Input {
33
34         public Input(org.onap.sdc.toscaparser.api.parameters.Input input, List<Property> properties){
35                 this.type = input.getType();
36                 this.description = input.getDescription();
37                 this._default = input.getDefault();
38                 this.inputProperties = new InputProperties(properties);
39         }
40
41         /** The type. */
42         private String type;
43         
44         /** The description. */
45         private String description;
46         
47         /** The default. */
48         private Object _default;
49         
50         /** The entry schema. */
51         private Input entry_schema;
52
53         private InputProperties inputProperties;
54         
55         /** The constraints */
56         private List<org.onap.sdc.toscaparser.api.elements.constraints.Constraint> constraints;
57         
58         /** The required field. If not set, the default is true */
59         private boolean required = true;
60         
61         /** Details the inputs template */
62         private String templateName;
63         private String templateUUID;
64         private String templateInvariantUUID;
65         private String templateCustomizationUUID;
66         
67         /**
68          * Instantiates a new input.
69          */
70         public Input() {
71                 constraints = new ArrayList<org.onap.sdc.toscaparser.api.elements.constraints.Constraint>();
72         }
73         
74         /**
75          * Gets the type.
76          *
77          * @return the type
78          */
79         public String getType() {
80                 return type;
81         }
82         
83         /**
84          * Sets the type.
85          *
86          * @param type the new type
87          */
88         public void setType(String type) {
89                 this.type = type;
90         }
91         /**
92          * Gets the required field.
93          *
94          * @return the required field
95          */
96         public boolean getRequired() {
97                 return required;
98         }
99         /**
100          * Sets the required value.
101          *
102          * @param required the new required value
103          */
104         public void setRequired(boolean required) {
105                 this.required = required;
106         }
107         /**
108          * Gets the description.
109          *
110          * @return the description
111          */
112         public String getDescription() {
113                 return description;
114         }
115         
116         /**
117          * Sets the description.
118          *
119          * @param description the new description
120          */
121         public void setDescription(String description) {
122                 this.description = description;
123         }
124         
125         /**
126          * Gets the default.
127          *
128          * @return the default
129          */
130         public Object getDefault() {
131                 return _default;
132         }
133         
134         /**
135          * Sets the default.
136          *
137          * @param _default the new default
138          */
139         public void setDefault(Object _default) {
140                 this._default = _default;
141         }
142         
143         /**
144          * Gets the entry schema.
145          *
146          * @return the entry schema
147          */
148         public Input getentry_schema() {
149                 return entry_schema;
150         }
151         /**
152          * Sets the entry schema.
153          *
154          */
155         public void setentry_schema(Input s) {
156                 this.entry_schema = s;
157         }
158
159         public InputProperties getInputProperties() {
160                 return inputProperties;
161         }
162
163         public void setInputProperties(InputProperties inputProperties) {
164                 this.inputProperties = inputProperties;
165         }
166         /**
167          * Sets the constraints.
168          *
169          * @param c the new constraints
170          */
171         public void setConstraints(List<org.onap.sdc.toscaparser.api.elements.constraints.Constraint> c) {
172                 this.constraints = c;
173         }
174         /**
175          * Gets the constraints
176          *
177          * @return the constraints
178          */
179         public List<org.onap.sdc.toscaparser.api.elements.constraints.Constraint> getConstraints() {
180                 return constraints;
181         }
182         
183         /* (non-Javadoc)
184          * @see java.lang.Object#toString()
185          */
186         @Override
187         public String toString() {
188                 return "type=" + type + ",description=" + description + ",default=" + _default;
189         }
190
191     public String getTemplateName() {
192         return templateName;
193     }
194
195     public void setTemplateName(String templateName) {
196         this.templateName = templateName;
197     }
198
199     public String getTemplateUUID() {
200         return templateUUID;
201     }
202
203     public void setTemplateUUID(String templateUUID) {
204         this.templateUUID = templateUUID;
205     }
206
207     public String getTemplateInvariantUUID() {
208         return templateInvariantUUID;
209     }
210
211     public void setTemplateInvariantUUID(String templateInvariantUUID) {
212         this.templateInvariantUUID = templateInvariantUUID;
213     }
214
215     public String getTemplateCustomizationUUID() {
216         return templateCustomizationUUID;
217     }
218
219     public void setTemplateCustomizationUUID(String templateCustomizationUUID) {
220         this.templateCustomizationUUID = templateCustomizationUUID;
221     }
222 }