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 com.google.gson.annotations.SerializedName;
23 import org.apache.commons.lang3.builder.ToStringBuilder;
25 public class PropertyDelta {
27 @SerializedName("action")
28 protected DeltaAction action;
30 @SerializedName("value")
31 protected Object value;
33 @SerializedName("old-value")
34 private Object oldValue;
37 public PropertyDelta(DeltaAction action, Object value) {
42 public PropertyDelta(DeltaAction action, Object value, Object oldValue) {
44 this.oldValue = oldValue;
47 public DeltaAction getAction() {
51 public void setAction(DeltaAction action) {
55 public Object getValue() {
59 public void setValue(Object value) {
63 public Object getOldValue() {
67 public void setOldValue(Object oldValue) {
68 this.oldValue = oldValue;
72 public String toString() {
73 return new ToStringBuilder(this)
74 .append("action", action)
75 .append("value", value)
76 .append("oldValue", oldValue)