public interface RateElement extends GroupedAvp
7.2.161 Rate-Element AVP The Rate-Element AVP (AVP code 2058) is of type Grouped and holds simple rate element of one dimension. Possible dimensions are the CC-Unit-Type. It has the following ABNF grammar: Rate-Element ::= < AVP Header: 2058 > { CC-Unit-Type } [ Charge-Reason-Code ] [ Unit-Value ] [ Unit-Cost ] [ Unit-Quota-Threshold ]Note:
FLAG_RULE_MAY, FLAG_RULE_MUST, FLAG_RULE_MUSTNOT
Modifier and Type | Method and Description |
---|---|
CcUnitType |
getCcUnitType()
Returns the value of the CC-Unit-Type AVP, of type Enumerated.
|
ChargeReasonCode |
getChargeReasonCode()
Returns the value of the Charge-Reason-Code AVP, of type Enumerated.
|
DiameterAvp[] |
getExtensionAvps()
Returns the set of extension AVPs.
|
UnitCost |
getUnitCost()
Returns the value of the Unit-Cost AVP, of type Grouped.
|
long |
getUnitQuotaThreshold()
Returns the value of the Unit-Quota-Threshold AVP, of type Unsigned32.
|
UnitValue |
getUnitValue()
Returns the value of the Unit-Value AVP, of type Grouped.
|
boolean |
hasCcUnitType()
Returns true if the CC-Unit-Type AVP is present in the Rate-Element AVP.
|
boolean |
hasChargeReasonCode()
Returns true if the Charge-Reason-Code AVP is present in the Rate-Element AVP.
|
boolean |
hasUnitCost()
Returns true if the Unit-Cost AVP is present in the Rate-Element AVP.
|
boolean |
hasUnitQuotaThreshold()
Returns true if the Unit-Quota-Threshold AVP is present in the Rate-Element AVP.
|
boolean |
hasUnitValue()
Returns true if the Unit-Value AVP is present in the Rate-Element AVP.
|
void |
removeCcUnitType()
Removes the CC-Unit-Type AVP from the Rate-Element AVP.
|
void |
removeChargeReasonCode()
Removes the Charge-Reason-Code AVP from the Rate-Element AVP.
|
void |
removeExtensionAvps()
Removes all extension AVPs from the Rate-Element AVP.
|
void |
removeUnitCost()
Removes the Unit-Cost AVP from the Rate-Element AVP.
|
void |
removeUnitQuotaThreshold()
Removes the Unit-Quota-Threshold AVP from the Rate-Element AVP.
|
void |
removeUnitValue()
Removes the Unit-Value AVP from the Rate-Element AVP.
|
void |
setCcUnitType(CcUnitType ccUnitType)
Sets the value of the CC-Unit-Type AVP, of type Enumerated.
|
void |
setChargeReasonCode(ChargeReasonCode chargeReasonCode)
Sets the value of the Charge-Reason-Code AVP, of type Enumerated.
|
void |
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.
|
void |
setUnitCost(UnitCost unitCost)
Sets the value of the Unit-Cost AVP, of type Grouped.
|
void |
setUnitQuotaThreshold(long unitQuotaThreshold)
Sets the value of the Unit-Quota-Threshold AVP, of type Unsigned32.
|
void |
setUnitValue(UnitValue unitValue)
Sets the value of the Unit-Value AVP, of type Grouped.
|
byteArrayValue, clone, doubleValue, floatValue, getCode, getMandatoryRule, getName, getProtectedRule, getType, getVendorID, groupedAvpValue, intValue, longValue, stringValue
boolean hasCcUnitType()
CcUnitType getCcUnitType()
void setCcUnitType(CcUnitType ccUnitType)
java.lang.NullPointerException
- if ccUnitType
is null
.void removeCcUnitType()
boolean hasChargeReasonCode()
ChargeReasonCode getChargeReasonCode()
void setChargeReasonCode(ChargeReasonCode chargeReasonCode)
java.lang.NullPointerException
- if chargeReasonCode
is null
.void removeChargeReasonCode()
boolean hasUnitValue()
UnitValue getUnitValue()
void setUnitValue(UnitValue unitValue)
java.lang.NullPointerException
- if unitValue
is null
.void removeUnitValue()
boolean hasUnitCost()
UnitCost getUnitCost()
void setUnitCost(UnitCost unitCost)
java.lang.NullPointerException
- if unitCost
is null
.void removeUnitCost()
boolean hasUnitQuotaThreshold()
long getUnitQuotaThreshold()
hasUnitQuotaThreshold()
to check the existence of this AVP.java.lang.IllegalStateException
- if the Unit-Quota-Threshold AVP has not been set.void setUnitQuotaThreshold(long unitQuotaThreshold)
void removeUnitQuotaThreshold()
DiameterAvp[] getExtensionAvps()
void setExtensionAvps(DiameterAvp[] avps) throws AvpNotAllowedException
AvpNotAllowedException
- if an AVP is encountered of a type already known to this class
(i.e. an AVP for which get/set methods already appear in this class)java.lang.NullPointerException
- if avps
is null
.void removeExtensionAvps()