Merge "[AAI] Fix doc config files"
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / util / delta / RelationshipDelta.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
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
10  *
11  *    http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  */
20
21 package org.onap.aai.util.delta;
22
23 import com.google.gson.annotations.SerializedName;
24
25 import java.util.HashMap;
26 import java.util.Map;
27
28 import org.apache.commons.lang3.builder.ToStringBuilder;
29
30 public class RelationshipDelta {
31
32     @SerializedName("action")
33     private DeltaAction action;
34
35     @SerializedName("in-v-uuid")
36     private String inVUuid;
37
38     @SerializedName("out-v-uuid")
39     private String outVUuid;
40
41     @SerializedName("in-v-uri")
42     private String inVUri;
43
44     @SerializedName("out-v-uri")
45     private String outVUri;
46
47     @SerializedName("label")
48     private String label;
49
50     @SerializedName("props")
51     private Map<String, Object> props = new HashMap<>();
52
53     public RelationshipDelta(DeltaAction action, String inVUUID, String outVUUID, String inVUri, String outVUri,
54             String label) {
55         this.action = action;
56         this.inVUuid = inVUUID;
57         this.outVUuid = outVUUID;
58         this.inVUri = inVUri;
59         this.outVUri = outVUri;
60         this.label = label;
61     }
62
63     public DeltaAction getAction() {
64         return action;
65     }
66
67     public void setAction(DeltaAction action) {
68         this.action = action;
69     }
70
71     public String getInVUuid() {
72         return inVUuid;
73     }
74
75     public void setInVUuid(String inVUuid) {
76         this.inVUuid = inVUuid;
77     }
78
79     public String getOutVUuid() {
80         return outVUuid;
81     }
82
83     public void setOutVUuid(String outVUuid) {
84         this.outVUuid = outVUuid;
85     }
86
87     public String getInVUri() {
88         return inVUri;
89     }
90
91     public void setInVUri(String inVUri) {
92         this.inVUri = inVUri;
93     }
94
95     public String getOutVUri() {
96         return outVUri;
97     }
98
99     public void setOutVUri(String outVUri) {
100         this.outVUri = outVUri;
101     }
102
103     public String getLabel() {
104         return label;
105     }
106
107     public void setLabel(String label) {
108         this.label = label;
109     }
110
111     public Map<String, Object> getProps() {
112         return props;
113     }
114
115     public void setProps(Map<String, Object> props) {
116         this.props = props;
117     }
118
119     public void addProp(String key, String value) {
120         this.props.put(key, value);
121     }
122
123     @Override
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();
128     }
129 }