[VOL-3869] Changes ONOS BW profile representation
to reflect IETF representation
* Addition of GIR
* Addition of PIR/PBS

Change-Id: Id97fd9cb85ee018ced73836ead8be4d653e0e55f
diff --git a/api/src/main/java/org/opencord/sadis/BandwidthProfileInformation.java b/api/src/main/java/org/opencord/sadis/BandwidthProfileInformation.java
index ccdf3fa..0ad0ad4 100644
--- a/api/src/main/java/org/opencord/sadis/BandwidthProfileInformation.java
+++ b/api/src/main/java/org/opencord/sadis/BandwidthProfileInformation.java
@@ -20,10 +20,16 @@
 import java.util.Objects;
 
 /**
- * Represents bandwidth profile details such as PIR, CIR, AIR values.
+ * Represents bandwidth profile details such as PIR, CIR, GIR values.
  */
 public class BandwidthProfileInformation extends BaseInformation {
 
+    @JsonProperty(value = "pir")
+    long peakInformationRate;
+
+    @JsonProperty(value = "pbs")
+    Long peakBurstSize;
+
     @JsonProperty(value = "cir")
     long committedInformationRate;
 
@@ -36,12 +42,33 @@
     @JsonProperty(value = "ebs")
     Long exceededBurstSize;
 
+    // Deprecated in VOLTHA 2.8 (sadis 5.4.0)
+    // Will be removed in 2.9, use GIR instead
     @JsonProperty(value = "air")
     long assuredInformationRate;
 
-    //note that: the burst size of assured bandwidth will be always 0
+    @JsonProperty(value = "gir")
+    long guaranteedInformationRate;
+
+    //note that: the burst size of guaranteed bandwidth will be always 0
     //the rate information must be in Kbps and burst must be in Kbits
 
+    public final long peakInformationRate() {
+        return this.peakInformationRate;
+    }
+
+    public final void setPeakInformationRate(final long peakInformationRate) {
+        this.peakInformationRate = peakInformationRate;
+    }
+
+    public final Long peakBurstSize() {
+        return this.peakBurstSize;
+    }
+
+    public final void setPeakBurstSize(final Long peakBurstSize) {
+        this.peakBurstSize = peakBurstSize;
+    }
+
     public final long committedInformationRate() {
         return this.committedInformationRate;
     }
@@ -74,14 +101,26 @@
         this.exceededBurstSize = exceededBurstSize;
     }
 
+    // Deprecated in VOLTHA 2.8 (sadis 5.4.0)
+    // Will be removed in 2.9, use guaranteedInformationRate instead.
     public final long assuredInformationRate() {
         return this.assuredInformationRate;
     }
 
+    // Deprecated in VOLTHA 2.8 (sadis 5.4.0)
+    // Will be removed in 2.9, use guaranteedInformationRate instead.
     public final void setAssuredInformationRate(final long assuredInformationRate) {
         this.assuredInformationRate = assuredInformationRate;
     }
 
+    public final long guaranteedInformationRate() {
+        return this.guaranteedInformationRate;
+    }
+
+    public final void setGuaranteedInformationRate(final long guaranteedInformationRate) {
+        this.guaranteedInformationRate = guaranteedInformationRate;
+    }
+
     @Override
     public boolean equals(Object o) {
         if (this == o) {
@@ -91,9 +130,12 @@
             return false;
         }
         BandwidthProfileInformation that = (BandwidthProfileInformation) o;
-        return committedInformationRate == that.committedInformationRate &&
+        return peakInformationRate == that.peakInformationRate &&
+                committedInformationRate == that.committedInformationRate &&
                 exceededInformationRate == that.exceededInformationRate &&
                 assuredInformationRate == that.assuredInformationRate &&
+                guaranteedInformationRate == that.guaranteedInformationRate &&
+                Objects.equals(peakBurstSize, that.peakBurstSize) &&
                 Objects.equals(committedBurstSize, that.committedBurstSize) &&
                 Objects.equals(exceededBurstSize, that.exceededBurstSize);
     }
@@ -101,19 +143,22 @@
     @Override
     public int hashCode() {
 
-        return Objects.hash(committedInformationRate, committedBurstSize, exceededInformationRate, exceededBurstSize,
-                assuredInformationRate);
+        return Objects.hash(peakInformationRate, peakBurstSize, committedInformationRate, committedBurstSize,
+                exceededInformationRate, exceededBurstSize, assuredInformationRate, guaranteedInformationRate);
     }
 
     @Override
     public String toString() {
         final StringBuilder sb = new StringBuilder("BandwidthProfileInformation{");
         sb.append("id=").append(id);
+        sb.append(", peakInformationRate=").append(peakInformationRate);
+        sb.append(", peakBurstSize=").append(peakBurstSize);
         sb.append(", committedInformationRate=").append(committedInformationRate);
         sb.append(", committedBurstSize=").append(committedBurstSize);
         sb.append(", exceededInformationRate=").append(exceededInformationRate);
         sb.append(", exceededBurstSize=").append(exceededBurstSize);
         sb.append(", assuredInformationRate=").append(assuredInformationRate);
+        sb.append(", guaranteedInformationRate=").append(guaranteedInformationRate);
         sb.append('}');
         return sb.toString();
     }