2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2019 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.aai.model;
23 import com.fasterxml.jackson.annotation.*;
25 import java.util.HashMap;
26 import java.util.List;
28 import java.util.Objects;
31 @JsonInclude(JsonInclude.Include.NON_NULL)
39 public class VnfResult {
42 @JsonProperty("node-type")
43 public String nodeType;
46 @JsonProperty("properties")
47 public ServiceProperties properties;
48 @JsonProperty("related-to")
49 public List<RelatedTo> relatedTo = null;
51 private Map<String, Object> additionalProperties = new HashMap<>();
54 public void setJsonId(String id) {
58 @JsonProperty("node-type")
59 public void setJsonNodeType(String nodeType) {
60 this.nodeType = nodeType;
64 public void setJsonUrl(String url) {
68 @JsonProperty("properties")
69 public void setJsonProperties(ServiceProperties properties) {
70 this.properties = properties;
73 @JsonProperty("related-to")
74 public void setJsonRelatedTo(List<RelatedTo> relatedTo) {
75 this.relatedTo = relatedTo;
79 public Map<String, Object> getAdditionalProperties() {
80 return this.additionalProperties;
84 public void setJsonAdditionalProperty(String name, Object value) {
85 this.additionalProperties.put(name, value);
89 public boolean equals(Object o) {
90 if (this == o) return true;
91 if (o == null || getClass() != o.getClass()) return false;
92 VnfResult vnfResult = (VnfResult) o;
93 return Objects.equals(id, vnfResult.id) &&
94 Objects.equals(nodeType, vnfResult.nodeType) &&
95 Objects.equals(url, vnfResult.url) &&
96 Objects.equals(properties, vnfResult.properties) &&
97 Objects.equals(relatedTo, vnfResult.relatedTo) &&
98 Objects.equals(additionalProperties, vnfResult.additionalProperties);
102 public int hashCode() {
103 return Objects.hash(id, nodeType, url, properties, relatedTo, additionalProperties);