[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / common / openecomp-tosca-datatype / src / main / java / org / openecomp / sdc / tosca / datatypes / model / NodeTemplate.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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.openecomp.sdc.tosca.datatypes.model;
22
23 import org.openecomp.sdc.tosca.services.YamlUtil;
24
25 import java.util.List;
26 import java.util.Map;
27
28
29 public class NodeTemplate implements Template {
30
31   private String type;
32   private String description;
33   private List<String> directives;
34   private Map<String, Object> properties;
35   private Map<String, Object> attributes;
36   private List<Map<String, RequirementAssignment>> requirements;
37   private List<Map<String, CapabilityAssignment>> capabilities;
38   private Map<String, InterfaceDefinition> interfaces;
39   private Map<String, ArtifactDefinition> artifacts;
40   private NodeFilter node_filter;
41   private String copy;
42
43   public String getType() {
44     return type;
45   }
46
47   public void setType(String type) {
48     this.type = type;
49   }
50
51   public String getDescription() {
52     return description;
53   }
54
55   public void setDescription(String description) {
56     this.description = description;
57   }
58
59   public List<String> getDirectives() {
60     return directives;
61   }
62
63   public void setDirectives(List<String> directives) {
64     this.directives = directives;
65   }
66
67   public Map<String, Object> getProperties() {
68     return properties;
69   }
70
71   public void setProperties(Map<String, Object> properties) {
72     this.properties = properties;
73   }
74
75   public Map<String, Object> getAttributes() {
76     return attributes;
77   }
78
79   public void setAttributes(Map<String, Object> attributes) {
80     this.attributes = attributes;
81   }
82
83   public List<Map<String, RequirementAssignment>> getRequirements() {
84     return requirements;
85   }
86
87   public void setRequirements(List<Map<String, RequirementAssignment>> requirements) {
88     this.requirements = requirements;
89   }
90
91   public List<Map<String, CapabilityAssignment>> getCapabilities() {
92     return capabilities;
93   }
94
95   public void setCapabilities(List<Map<String, CapabilityAssignment>> capabilities) {
96     this.capabilities = capabilities;
97   }
98
99   public Map<String, InterfaceDefinition> getInterfaces() {
100     return interfaces;
101   }
102
103   public void setInterfaces(Map<String, InterfaceDefinition> interfaces) {
104     this.interfaces = interfaces;
105   }
106
107   public Map<String, ArtifactDefinition> getArtifacts() {
108     return artifacts;
109   }
110
111   public void setArtifacts(Map<String, ArtifactDefinition> artifacts) {
112     this.artifacts = artifacts;
113   }
114
115   public NodeFilter getNode_filter() {
116     return node_filter;
117   }
118
119   public void setNode_filter(NodeFilter node_filter) {
120     this.node_filter = node_filter;
121   }
122
123   public String getCopy() {
124     return copy;
125   }
126
127   public void setCopy(String copy) {
128     this.copy = copy;
129   }
130
131   @Override
132   public NodeTemplate clone() {
133     YamlUtil yamlUtil = new YamlUtil();
134     NodeTemplate clone = yamlUtil.yamlToObject(yamlUtil.objectToYaml(this), NodeTemplate.class);
135     return clone;
136   }
137 }