package org.opentosca.container.api.dto;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class PlacementNodeTemplate {

    @JsonProperty("id")
    private String id;

    @JsonProperty("name")
    private String name;

    @JsonProperty("node_type")
    private String nodeType;

    private List<NodeTemplateInstanceDTO> validNodeTemplateInstances;

    PlacementNodeTemplate() {}

    PlacementNodeTemplate(final String id, final String name, final String nodeType) {
        this.id = id;
        this.name = name;
        this.nodeType = nodeType;
    }

    public void setId(final String id) {
        this.id = id;
    }

    public String getId() {
        return this.id;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

    public void setNodeType(final String nodeType) {
        this.nodeType = nodeType;
    }

    public String getNodeType() {
        return this.nodeType;
    }

    public void setValidNodeTemplateInstances(final List<NodeTemplateInstanceDTO> validNodeTemplateInstances) {
        this.validNodeTemplateInstances = validNodeTemplateInstances;
    }

    public List<NodeTemplateInstanceDTO> getValidNodeTemplateInstances() {
        return this.validNodeTemplateInstances;
    }
}

@@ -59,16 +59,86 @@
 .List;%0A%0A
+import org.opentosca.container.core.next.model.NodeTemplateInstance;%0A%0A
 import c
@@ -191,16 +191,16 @@
 erties;%0A
-
 import c
@@ -244,16 +244,56 @@
 roperty;
+%0Aimport com.google.common.collect.Lists;
 %0A%0A@JsonI
@@ -558,35 +558,32 @@
 TemplateInstance
-DTO
 %3E validNodeTempl
@@ -790,32 +790,96 @@
 ype = nodeType;%0A
+        this.validNodeTemplateInstances = Lists.newArrayList();%0A
     %7D%0A%0A    publi
@@ -1381,19 +1381,16 @@
 Instance
-DTO
 %3E validN
@@ -1482,32 +1482,32 @@
 stances;%0A    %7D%0A%0A
+
     public List%3C
@@ -1530,11 +1530,8 @@
 ance
-DTO
 %3E ge

fix bug of wrong type