2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.vid.asdc.beans.tosca;
23 import com.fasterxml.jackson.annotation.JsonInclude;
24 import org.onap.sdc.toscaparser.api.Property;
26 import java.util.ArrayList;
27 import java.util.List;
29 // TODO: Auto-generated Javadoc
35 public Input(org.onap.sdc.toscaparser.api.parameters.Input input, List<Property> properties){
36 this.type = input.getType();
37 this.description = input.getDescription();
38 this._default = input.getDefault();
39 this.inputProperties = new InputProperties(properties);
40 this.fromInputName = input.getName();
46 /** The description. */
47 private String description;
50 private Object _default;
52 /** The entry schema. */
53 private Input entry_schema;
55 private InputProperties inputProperties;
57 private String fromInputName;
59 /** The constraints */
60 private List<org.onap.sdc.toscaparser.api.elements.constraints.Constraint> constraints;
62 /** The required field. If not set, the default is true */
63 private boolean required = true;
65 /** Details the inputs template */
66 private String templateName;
67 private String templateUUID;
68 private String templateInvariantUUID;
69 private String templateCustomizationUUID;
72 * Instantiates a new input.
75 constraints = new ArrayList<>();
83 public String getType() {
90 * @param type the new type
92 public void setType(String type) {
96 * Gets the required field.
98 * @return the required field
100 public boolean getRequired() {
104 * Sets the required value.
106 * @param required the new required value
108 public void setRequired(boolean required) {
109 this.required = required;
112 * Gets the description.
114 * @return the description
116 public String getDescription() {
121 * Sets the description.
123 * @param description the new description
125 public void setDescription(String description) {
126 this.description = description;
132 * @return the default
134 public Object getDefault() {
141 * @param _default the new default
143 public void setDefault(Object _default) {
144 this._default = _default;
148 * Gets the entry schema.
150 * @return the entry schema
152 public Input getentry_schema() {
156 * Sets the entry schema.
159 public void setentry_schema(Input s) {
160 this.entry_schema = s;
163 public InputProperties getInputProperties() {
164 return inputProperties;
167 @JsonInclude(JsonInclude.Include.NON_NULL)
168 public String getFromInputName() {
169 return fromInputName;
172 public void setInputProperties(InputProperties inputProperties) {
173 this.inputProperties = inputProperties;
176 * Sets the constraints.
178 * @param c the new constraints
180 public void setConstraints(List<org.onap.sdc.toscaparser.api.elements.constraints.Constraint> c) {
181 this.constraints = c;
184 * Gets the constraints
186 * @return the constraints
188 public List<org.onap.sdc.toscaparser.api.elements.constraints.Constraint> getConstraints() {
193 * @see java.lang.Object#toString()
196 public String toString() {
197 return "type=" + type + ",description=" + description + ",default=" + _default;
200 public String getTemplateName() {
204 public void setTemplateName(String templateName) {
205 this.templateName = templateName;
208 public String getTemplateUUID() {
212 public void setTemplateUUID(String templateUUID) {
213 this.templateUUID = templateUUID;
216 public String getTemplateInvariantUUID() {
217 return templateInvariantUUID;
220 public void setTemplateInvariantUUID(String templateInvariantUUID) {
221 this.templateInvariantUUID = templateInvariantUUID;
224 public String getTemplateCustomizationUUID() {
225 return templateCustomizationUUID;
228 public void setTemplateCustomizationUUID(String templateCustomizationUUID) {
229 this.templateCustomizationUUID = templateCustomizationUUID;