2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 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=========================================================
20 package org.onap.aai.util.delta;
22 import org.apache.commons.lang3.builder.ToStringBuilder;
24 import com.google.gson.annotations.SerializedName;
26 public class PropertyDelta {
28 @SerializedName("action")
29 protected DeltaAction action;
31 @SerializedName("value")
32 protected Object value;
34 @SerializedName("old-value")
35 private Object oldValue;
38 public PropertyDelta(DeltaAction action, Object value) {
43 public PropertyDelta(DeltaAction action, Object value, Object oldValue) {
45 this.oldValue = oldValue;
48 public DeltaAction getAction() {
52 public void setAction(DeltaAction action) {
56 public Object getValue() {
60 public void setValue(Object value) {
64 public Object getOldValue() {
68 public void setOldValue(Object oldValue) {
69 this.oldValue = oldValue;
73 public String toString() {
74 return new ToStringBuilder(this)
75 .append("action", action)
76 .append("value", value)
77 .append("oldValue", oldValue)