Merge from ECOMP's repository
[vid.git] / vid-app-common / src / main / java / org / onap / vid / asdc / beans / tosca / Input.java
index 9f3ae42..d66591c 100644 (file)
 
 package org.onap.vid.asdc.beans.tosca;
 
-import org.onap.sdc.toscaparser.api.elements.constraints.*;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import org.onap.sdc.toscaparser.api.Property;
 
-import java.util.List;
 import java.util.ArrayList;
+import java.util.List;
 
 // TODO: Auto-generated Javadoc
 /**
@@ -31,6 +32,14 @@ import java.util.ArrayList;
  */
 public class Input {
 
+       public Input(org.onap.sdc.toscaparser.api.parameters.Input input, List<Property> properties){
+               this.type = input.getType();
+               this.description = input.getDescription();
+               this._default = input.getDefault();
+               this.inputProperties = new InputProperties(properties);
+               this.fromInputName = input.getName();
+       }
+
        /** The type. */
        private String type;
        
@@ -42,18 +51,28 @@ public class Input {
        
        /** The entry schema. */
        private Input entry_schema;
-       
+
+       private InputProperties inputProperties;
+
+       private String fromInputName;
+
        /** The constraints */
        private List<org.onap.sdc.toscaparser.api.elements.constraints.Constraint> constraints;
        
        /** The required field. If not set, the default is true */
        private boolean required = true;
        
+       /** Details the inputs template */
+       private String templateName;
+       private String templateUUID;
+       private String templateInvariantUUID;
+       private String templateCustomizationUUID;
+
        /**
         * Instantiates a new input.
         */
        public Input() {
-               constraints = new ArrayList<org.onap.sdc.toscaparser.api.elements.constraints.Constraint>();
+               constraints = new ArrayList<>();
        }
        
        /**
@@ -136,11 +155,23 @@ public class Input {
        /**
         * Sets the entry schema.
         *
-        * @param the entry schema
         */
        public void setentry_schema(Input s) {
                this.entry_schema = s;
        }
+
+       public InputProperties getInputProperties() {
+               return inputProperties;
+       }
+
+       @JsonInclude(JsonInclude.Include.NON_NULL)
+       public String getFromInputName() {
+               return fromInputName;
+       }
+
+       public void setInputProperties(InputProperties inputProperties) {
+               this.inputProperties = inputProperties;
+       }
        /**
         * Sets the constraints.
         *
@@ -165,4 +196,36 @@ public class Input {
        public String toString() {
                return "type=" + type + ",description=" + description + ",default=" + _default;
        }
+
+    public String getTemplateName() {
+        return templateName;
+    }
+
+    public void setTemplateName(String templateName) {
+        this.templateName = templateName;
+    }
+
+    public String getTemplateUUID() {
+        return templateUUID;
+    }
+
+    public void setTemplateUUID(String templateUUID) {
+        this.templateUUID = templateUUID;
+    }
+
+    public String getTemplateInvariantUUID() {
+        return templateInvariantUUID;
+    }
+
+    public void setTemplateInvariantUUID(String templateInvariantUUID) {
+        this.templateInvariantUUID = templateInvariantUUID;
+    }
+
+    public String getTemplateCustomizationUUID() {
+        return templateCustomizationUUID;
+    }
+
+    public void setTemplateCustomizationUUID(String templateCustomizationUUID) {
+        this.templateCustomizationUUID = templateCustomizationUUID;
+    }
 }