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.openecomp.mso.cloudify.v3.model;
23 import java.io.Serializable;
24 import java.util.List;
27 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
28 import com.fasterxml.jackson.annotation.JsonProperty;
29 import com.fasterxml.jackson.annotation.JsonRootName;
31 @JsonIgnoreProperties(ignoreUnknown = true)
32 @JsonRootName("node_instance")
33 public class NodeInstance implements Serializable {
35 private static final long serialVersionUID = 1L;
37 @JsonProperty("created_by")
38 private String createdBy;
40 @JsonProperty("deployment_id")
41 private String deploymentId;
43 @JsonProperty("host_id")
44 private String hostId;
49 @JsonProperty("node_id")
50 private String nodeId;
52 @JsonProperty("relationships")
53 private List<Object> relationships = null;
55 @JsonProperty("runtime_properties")
56 private Map<String, Object> runtimeProperties = null;
58 @JsonProperty("scaling_groups")
59 private List<ScalingGroupIdentifier> scalingGroups;
61 @JsonProperty("state")
64 @JsonProperty("tenant_name")
65 private String tenantName;
67 @JsonProperty("version")
68 private String version;
70 public String getCreatedBy() {
74 public void setCreatedBy(String createdBy) {
75 this.createdBy = createdBy;
78 public String getDeploymentId() {
82 public void setDeploymentId(String deploymentId) {
83 this.deploymentId = deploymentId;
86 public String getHostId() {
90 public void setHostId(String hostId) {
94 public String getId() {
98 public void setId(String id) {
102 public String getNodeId() {
106 public void setNodeId(String nodeId) {
107 this.nodeId = nodeId;
110 public List<Object> getRelationships() {
111 return relationships;
114 public void setRelationships(List<Object> relationships) {
115 this.relationships = relationships;
118 public Map<String, Object> getRuntimeProperties() {
119 return runtimeProperties;
122 public void setRuntimeProperties(Map<String, Object> runtimeProperties) {
123 this.runtimeProperties = runtimeProperties;
126 public List<ScalingGroupIdentifier> getScalingGroups() {
127 return scalingGroups;
130 public void setScalingGroups(List<ScalingGroupIdentifier> scalingGroups) {
131 this.scalingGroups = scalingGroups;
134 public String getState() {
138 public void setState(String state) {
142 public String getTenantName() {
146 public void setTenantName(String tenantName) {
147 this.tenantName = tenantName;
150 public String getVersion() {
154 public void setVersion(String version) {
155 this.version = version;
159 * Nested structure representing scaling groups in which this node is a member
161 public static final class ScalingGroupIdentifier
163 @JsonProperty("name")
169 public String getName() {
172 public void setName(String name) {
175 public String getId() {
178 public void setId(String id) {
182 public String toString() {
183 return "Scaling Group{ name=" + name + ", id=" + id + "}";
188 public String toString() {
189 return "Deployment{" +
191 "nodeId='" + nodeId + '\'' +
192 ", createdBy='" + createdBy + '\'' +
193 ", tenantName='" + tenantName + '\'' +
195 ", deploymentId=" + deploymentId +
196 ", hostId='" + hostId + '\'' +
197 ", version='" + version + '\'' +
198 ", relationships=" + relationships +
199 ", runtimeProperties=" + runtimeProperties +
200 ", scalingGroups=" + scalingGroups +
204 // TODO: Need an object structure for Relationships