Remove params

Remove redundant parameters from Pnf_ready event

Change-Id: I755b632b34cc2a07233c7043bc2ecf16becb877c
Issue-ID: DCAEGEN2-1312
Signed-off-by: Joanna Jeremicz <joanna.jeremicz@nokia.com>
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModel.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModel.java
index 585190c..b519c3a 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModel.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModel.java
@@ -47,21 +47,27 @@
     @SerializedName(value = "ipaddress-v6-oam", alternate = "ipaddress-v6-oam")
     String getIpv6();
 
+    @Nullable
     @SerializedName(value = "serial-number", alternate = "serial-number")
     String getSerialNumber();
 
+    @Nullable
     @SerializedName(value = "equip-vendor", alternate = "equip-vendor")
     String getEquipVendor();
 
+    @Nullable
     @SerializedName(value = "equip-model", alternate = "equip-model")
     String getEquipModel();
 
+    @Nullable
     @SerializedName(value = "equip-type", alternate = "equip-type")
     String getEquipType();
 
+    @Nullable
     @SerializedName(value = "nf-role", alternate = "nf-role")
     String getNfRole();
 
+    @Nullable
     @SerializedName(value = "sw-version", alternate = "sw-version")
     String getSwVersion();
 
diff --git a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilderImpl.java b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilderImpl.java
index fe812a4..8584f01 100644
--- a/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilderImpl.java
+++ b/prh-commons/src/main/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilderImpl.java
@@ -41,13 +41,7 @@
         GsonBuilder gsonBuilder = new GsonBuilder();
         ServiceLoader.load(TypeAdapterFactory.class).forEach(gsonBuilder::registerTypeAdapterFactory);
         Builder builder = ImmutableConsumerDmaapModel.builder()
-            .correlationId(consumerDmaapModel.getCorrelationId())
-            .serialNumber(consumerDmaapModel.getSerialNumber())
-            .equipVendor(consumerDmaapModel.getEquipVendor())
-            .equipModel(consumerDmaapModel.getEquipModel())
-            .equipType(consumerDmaapModel.getEquipType())
-            .nfRole(consumerDmaapModel.getNfRole())
-            .swVersion(consumerDmaapModel.getSwVersion());
+            .correlationId(consumerDmaapModel.getCorrelationId());
 
         JsonObject additionalFields =  consumerDmaapModel.getAdditionalFields();
         if(additionalFields != null && !additionalFields.equals(new JsonObject())) {
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilderTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilderTest.java
index eb6f476..e104f54 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilderTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/PnfReadyJsonBodyBuilderTest.java
@@ -39,25 +39,11 @@
 
         ConsumerDmaapModel model = ImmutableConsumerDmaapModel.builder()
             .correlationId("NOKnhfsadhff")
-            .ipv4("256.22.33.155")
-            .ipv6("200J:0db8:85a3:0000:0000:8a2e:0370:7334")
-            .serialNumber("1234")
-            .equipVendor("NOKIA")
-            .equipModel("3310")
-            .equipType("cell")
-            .nfRole("role")
-            .swVersion("1.2.3")
             .additionalFields(jsonObject)
             .build();
 
         String expectedResult = "{"
             + "\"correlationId\":\"NOKnhfsadhff\","
-            + "\"serial-number\":\"1234\","
-            + "\"equip-vendor\":\"NOKIA\","
-            + "\"equip-model\":\"3310\","
-            + "\"equip-type\":\"cell\","
-            + "\"nf-role\":\"role\","
-            + "\"sw-version\":\"1.2.3\","
             + "\"additionalFields\":{\"attachmentPoint\":\"bla-bla-30-3\",\"cvlan\":\"678\",\"svlan\":\"1005\"}"
             + "}";
 
@@ -69,23 +55,9 @@
 
         ConsumerDmaapModel model = ImmutableConsumerDmaapModel.builder()
             .correlationId("NOKnhfsadhff")
-            .serialNumber("1234")
-            .equipVendor("NOKIA")
-            .equipModel("3310")
-            .equipType("cell")
-            .nfRole("role")
-            .swVersion("1.2.3")
             .build();
 
-        String expectedResult = "{"
-            + "\"correlationId\":\"NOKnhfsadhff\","
-            + "\"serial-number\":\"1234\","
-            + "\"equip-vendor\":\"NOKIA\","
-            + "\"equip-model\":\"3310\","
-            + "\"equip-type\":\"cell\","
-            + "\"nf-role\":\"role\","
-            + "\"sw-version\":\"1.2.3\""
-            + "}";
+        String expectedResult = "{\"correlationId\":\"NOKnhfsadhff\"}";
 
         assertEquals(expectedResult, new PnfReadyJsonBodyBuilderImpl().createJsonBody(model));
     }
@@ -96,26 +68,10 @@
 
         ConsumerDmaapModel model = ImmutableConsumerDmaapModel.builder()
             .correlationId("NOKnhfsadhff")
-            .ipv4("256.22.33.155")
-            .ipv6("200J:0db8:85a3:0000:0000:8a2e:0370:7334")
-            .serialNumber("")
-            .equipVendor("")
-            .equipModel("")
-            .equipType("")
-            .nfRole("")
-            .swVersion("")
             .additionalFields(jsonObject)
             .build();
 
-        String expectedResult = "{"
-            + "\"correlationId\":\"NOKnhfsadhff\","
-            + "\"serial-number\":\"\","
-            + "\"equip-vendor\":\"\","
-            + "\"equip-model\":\"\","
-            + "\"equip-type\":\"\","
-            + "\"nf-role\":\"\","
-            + "\"sw-version\":\"\""
-            + "}";
+        String expectedResult = "{\"correlationId\":\"NOKnhfsadhff\"}";
 
         assertEquals(expectedResult, new PnfReadyJsonBodyBuilderImpl().createJsonBody(model));
     }