2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017-2018 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.aai.util.delta;
23 import java.util.HashMap;
26 import org.apache.commons.lang3.builder.ToStringBuilder;
28 import com.google.gson.annotations.SerializedName;
30 public class RelationshipDelta {
32 @SerializedName("action")
33 private DeltaAction action;
35 @SerializedName("in-v-uuid")
36 private String inVUuid;
38 @SerializedName("out-v-uuid")
39 private String outVUuid;
41 @SerializedName("in-v-uri")
42 private String inVUri;
44 @SerializedName("out-v-uri")
45 private String outVUri;
47 @SerializedName("label")
50 @SerializedName("props")
51 private Map<String, Object> props = new HashMap<>();
53 public RelationshipDelta(DeltaAction action, String inVUUID, String outVUUID, String inVUri, String outVUri, String label) {
55 this.inVUuid = inVUUID;
56 this.outVUuid = outVUUID;
58 this.outVUri = outVUri;
62 public DeltaAction getAction() {
66 public void setAction(DeltaAction action) {
70 public String getInVUuid() {
74 public void setInVUuid(String inVUuid) {
75 this.inVUuid = inVUuid;
78 public String getOutVUuid() {
82 public void setOutVUuid(String outVUuid) {
83 this.outVUuid = outVUuid;
86 public String getInVUri() {
90 public void setInVUri(String inVUri) {
94 public String getOutVUri() {
98 public void setOutVUri(String outVUri) {
99 this.outVUri = outVUri;
102 public String getLabel() {
106 public void setLabel(String label) {
110 public Map<String, Object> getProps() {
114 public void setProps(Map<String, Object> props) {
118 public void addProp(String key, String value) {
119 this.props.put(key, value);
123 public String toString() {
124 return new ToStringBuilder(this)
125 .append("action", action)
126 .append("inVUuid", inVUuid)
127 .append("outVUuid", outVUuid)
128 .append("inVUri", inVUri)
129 .append("outVUri", outVUri)
130 .append("label", label)
131 .append("props", props)