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;
24 import org.apache.commons.lang3.builder.ToStringBuilder;
26 import java.util.HashMap;
29 public class RelationshipDelta {
31 @SerializedName("action")
32 private DeltaAction action;
34 @SerializedName("in-v-uuid")
35 private String inVUuid;
37 @SerializedName("out-v-uuid")
38 private String outVUuid;
40 @SerializedName("in-v-uri")
41 private String inVUri;
43 @SerializedName("out-v-uri")
44 private String outVUri;
46 @SerializedName("label")
49 @SerializedName("props")
50 private Map<String, Object> props = new HashMap<>();
52 public RelationshipDelta(DeltaAction action, String inVUUID, String outVUUID, String inVUri, String outVUri, String label) {
54 this.inVUuid = inVUUID;
55 this.outVUuid = outVUUID;
57 this.outVUri = outVUri;
61 public DeltaAction getAction() {
65 public void setAction(DeltaAction action) {
69 public String getInVUuid() {
73 public void setInVUuid(String inVUuid) {
74 this.inVUuid = inVUuid;
77 public String getOutVUuid() {
81 public void setOutVUuid(String outVUuid) {
82 this.outVUuid = outVUuid;
85 public String getInVUri() {
89 public void setInVUri(String inVUri) {
93 public String getOutVUri() {
97 public void setOutVUri(String outVUri) {
98 this.outVUri = outVUri;
101 public String getLabel() {
105 public void setLabel(String label) {
109 public Map<String, Object> getProps() {
113 public void setProps(Map<String, Object> props) {
117 public void addProp(String key, String value) {
118 this.props.put(key, value);
122 public String toString() {
123 return new ToStringBuilder(this)
124 .append("action", action)
125 .append("inVUuid", inVUuid)
126 .append("outVUuid", outVUuid)
127 .append("inVUri", inVUri)
128 .append("outVUri", outVUri)
129 .append("label", label)
130 .append("props", props)