NCMP Java API depends on NCM-Rest-API (cyclic) through json properties on Java API
[cps.git] / cps-ncmp-service / src / main / java / org / onap / cps / ncmp / api / models / CmHandle.java
index 0d1c769..88c6f33 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  ============LICENSE_START=======================================================
- *  Copyright (C) 2021 Nordix Foundation
+ *  Copyright (C) 2021-2022 Nordix Foundation
  *  ================================================================================
  *  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.cps.ncmp.api.models;
 
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import java.util.Collections;
 import java.util.Map;
 import lombok.Getter;
+import lombok.NoArgsConstructor;
 import lombok.Setter;
 import org.springframework.validation.annotation.Validated;
 
@@ -31,10 +35,15 @@ import org.springframework.validation.annotation.Validated;
 @Validated
 @Getter
 @Setter
+@NoArgsConstructor
 public class CmHandle {
 
-    private String cmHandle;
+    private String cmHandleID;
 
-    private Map<String, String> cmHandleProperties;
+    @JsonSetter(nulls = Nulls.AS_EMPTY)
+    private Map<String, String> dmiProperties = Collections.emptyMap();
+
+    @JsonSetter(nulls = Nulls.AS_EMPTY)
+    private Map<String, String> publicProperties = Collections.emptyMap();
 
 }