/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property.
+ * Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.models.pdp.concepts;
+import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.onap.policy.models.pdp.enums.PdpState;
/**
- * Class to represent the PDP_STATE_CHANGE message that PAP will send to either PDPGroup/Subgroup or a PDP.
+ * Class to represent the PDP_STATE_CHANGE message that PAP will send to either
+ * PDPGroup/Subgroup or a PDP.
*
* @author Ram Krishna Verma (ram.krishna.verma@est.tech)
*/
@Getter
@Setter
-@ToString
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = true)
public class PdpStateChange extends PdpMessage {
- private String name;
+ /**
+ * System from which the message originated.
+ */
+ private String source;
+
private PdpState state;
- private String pdpGroup;
- private String pdpSubgroup;
/**
* Constructor for instantiating PdpStateChange class with message name.
public PdpStateChange() {
super(PdpMessageType.PDP_STATE_CHANGE);
}
+
+ /**
+ * Constructs the object, making a deep copy.
+ *
+ * @param source source from which to copy
+ */
+ public PdpStateChange(PdpStateChange source) {
+ super(source);
+
+ this.source = source.source;
+ this.state = source.state;
+ }
}