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 com.google.gson.annotations.SerializedName;
25 import java.util.HashMap;
28 import org.apache.commons.lang3.builder.ToStringBuilder;
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,
56 this.inVUuid = inVUUID;
57 this.outVUuid = outVUUID;
59 this.outVUri = outVUri;
63 public DeltaAction getAction() {
67 public void setAction(DeltaAction action) {
71 public String getInVUuid() {
75 public void setInVUuid(String inVUuid) {
76 this.inVUuid = inVUuid;
79 public String getOutVUuid() {
83 public void setOutVUuid(String outVUuid) {
84 this.outVUuid = outVUuid;
87 public String getInVUri() {
91 public void setInVUri(String inVUri) {
95 public String getOutVUri() {
99 public void setOutVUri(String outVUri) {
100 this.outVUri = outVUri;
103 public String getLabel() {
107 public void setLabel(String label) {
111 public Map<String, Object> getProps() {
115 public void setProps(Map<String, Object> props) {
119 public void addProp(String key, String value) {
120 this.props.put(key, value);
124 public String toString() {
125 return new ToStringBuilder(this).append("action", action).append("inVUuid", inVUuid)
126 .append("outVUuid", outVUuid).append("inVUri", inVUri).append("outVUri", outVUri).append("label", label)
127 .append("props", props).toString();