aboutsummaryrefslogtreecommitdiffstats
path: root/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/RelationshipData.java
diff options
context:
space:
mode:
Diffstat (limited to 'prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/RelationshipData.java')
-rw-r--r--prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/RelationshipData.java53
1 files changed, 9 insertions, 44 deletions
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/RelationshipData.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/RelationshipData.java
index 8b33b650..4b1670c6 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/RelationshipData.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/RelationshipData.java
@@ -21,64 +21,29 @@
package org.onap.dcaegen2.services.prh.model;
import com.google.gson.annotations.SerializedName;
+import org.immutables.gson.Gson;
+import org.immutables.value.Value;
/**
* RelationshipData
*/
-public class RelationshipData {
- @SerializedName("relationship-key")
- private String relationshipKey = null;
-
- @SerializedName("relationship-value")
- private String relationshipValue = null;
+@Value.Immutable
+@Gson.TypeAdapters(fieldNamingStrategy = true)
+public interface RelationshipData {
/**
* A keyword provided by A&AI to indicate an attribute.
*
* @return relationshipKey
**/
- public String getRelationshipKey() {
- return relationshipKey;
- }
-
- public void setRelationshipKey(String relationshipKey) {
- this.relationshipKey = relationshipKey;
- }
+ @SerializedName("relationship-key")
+ String getRelationshipKey();
/**
* Value of the attribute.
*
* @return relationshipValue
**/
- public String getRelationshipValue() {
- return relationshipValue;
- }
-
- public void setRelationshipValue(String relationshipValue) {
- this.relationshipValue = relationshipValue;
- }
-
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class RelationshipData {\n");
-
- sb.append(" relationshipKey: ").append(toIndentedString(relationshipKey)).append("\n");
- sb.append(" relationshipValue: ").append(toIndentedString(relationshipValue)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(java.lang.Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-
+ @SerializedName("relationship-value")
+ String getRelationshipValue();
} \ No newline at end of file