Interface ChargingRuleReport

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface ChargingRuleReport
    extends GroupedAvp
    Defines an interface representing the Charging-Rule-Report grouped AVP type. From the Diameter Gx Reference Point Protocol Details (3GPP TS 29.212 V10.1.0) specification:
     5.3.18  Charging-Rule-Report
     
         The Charging-Rule-Report AVP (AVP code 1018) is of types Grouped, and it is used to report the status of PCC rules.
         Charging-Rule-Name AVP is a reference for a specific PCC rule at the PCEF that has been successfully installed, modified or removed (for dynamic PCC rules), or activated or deactivated (for predefined PCC rules) because of trigger from the MS. Charging-Rule-Base-Name AVP is a reference for a group of PCC rules predefined at the PCEF that has been successfully activated or deactivated because of trigger from the MS.
         The Charging-Rule-Report AVP can also be used to report the status of the PCC rules which cannot be installed/activated or enforced at the PCEF. In this condition, the Charging-Rule-Name AVP is used to indicate a specific PCC rule which cannot be installed/activated or enforced, and the Charging-Rule-Base-Name AVP is used to indicate a group of PCC rules which cannot be activated. The Rule-Failure-Code indicates the reason that the PCC rules cannot be successfully installed/activated or enforced.
         The Charging-Rule-Report AVP can also be used to report the status of the PCC rules for which credit is no longer available or credit has been reallocated after the former out of credit indication. When reporting an out of credit condition, the Final-Unit-Indication AVP indicates the termination action the PCEF applies to the PCC rules as instructed by the OCS.
         If the PCRF performs the bearer binding and the PCRF activates a pre-defined rule the PCEF may include the Bearer-Identifier AVP within the Charging-Rule-Report AVP in order to indicate to the PCRF the IP-CAN bearer affected by the failed PCC rule activation.
     
         It has the following ABNF grammar:
     
         Charging-Rule-Report ::= < AVP Header: 1018 >
                                 *[ Charging-Rule-Name ]
                                 *[ Charging-Rule-Base-Name ]
                                  [ Bearer-Identifier ]
                                  [ PCC-Rule-Status ]
                                  [ Rule-Failure-Code ]
                                  [ Final-Unit-Indication ]
                                 *[ AVP ]
         Multiple instances of Charging-Rule-Report AVPs shall be used in the case it is required to report different PCC-Rule-Status or Rule-Failure-Code values for different groups of rules within the same Diameter command
     
     
    • Method Detail

      • getChargingRuleNames

        byte[][] getChargingRuleNames()
        Returns the set of Charging-Rule-Name AVPs. The returned array contains the AVPs in the order they appear in the Charging-Rule-Report AVP. A return value of null implies that no Charging-Rule-Name AVPs have been set. The elements in the given array are byte[] objects.
      • setChargingRuleName

        void setChargingRuleName​(byte[] chargingRuleName)
        Sets a single Charging-Rule-Name AVP in the Charging-Rule-Report AVP, of type OctetString.
        Throws:
        NullPointerException - if chargingRuleName is null.
      • setChargingRuleNames

        void setChargingRuleNames​(byte[][] chargingRuleNames)
        Sets the set of Charging-Rule-Name AVPs, with all the values in the given array. The AVPs will be added to the Charging-Rule-Report AVP in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getChargingRuleNames() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if chargingRuleNames is null.
      • removeChargingRuleNames

        void removeChargingRuleNames()
        Removes all Charging-Rule-Name AVPs from the Charging-Rule-Report AVP. If no Charging-Rule-Name AVPs are present, this method returns silently.
      • getChargingRuleBaseNames

        String[] getChargingRuleBaseNames()
        Returns the set of Charging-Rule-Base-Name AVPs. The returned array contains the AVPs in the order they appear in the Charging-Rule-Report AVP. A return value of null implies that no Charging-Rule-Base-Name AVPs have been set. The elements in the given array are String objects.
      • setChargingRuleBaseName

        void setChargingRuleBaseName​(String chargingRuleBaseName)
        Sets a single Charging-Rule-Base-Name AVP in the Charging-Rule-Report AVP, of type UTF8String.
        Throws:
        NullPointerException - if chargingRuleBaseName is null.
      • setChargingRuleBaseNames

        void setChargingRuleBaseNames​(String[] chargingRuleBaseNames)
        Sets the set of Charging-Rule-Base-Name AVPs, with all the values in the given array. The AVPs will be added to the Charging-Rule-Report AVP in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getChargingRuleBaseNames() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if chargingRuleBaseNames is null.
      • removeChargingRuleBaseNames

        void removeChargingRuleBaseNames()
        Removes all Charging-Rule-Base-Name AVPs from the Charging-Rule-Report AVP. If no Charging-Rule-Base-Name AVPs are present, this method returns silently.
      • hasBearerIdentifier

        boolean hasBearerIdentifier()
        Returns true if the Bearer-Identifier AVP is present in the Charging-Rule-Report AVP.
      • getBearerIdentifier

        byte[] getBearerIdentifier()
        Returns the value of the Bearer-Identifier AVP, of type OctetString.
        Returns:
        the value of the Bearer-Identifier AVP, or null if it has not been set.
      • setBearerIdentifier

        void setBearerIdentifier​(byte[] bearerIdentifier)
        Sets the value of the Bearer-Identifier AVP, of type OctetString.
        Throws:
        NullPointerException - if bearerIdentifier is null.
      • removeBearerIdentifier

        void removeBearerIdentifier()
        Removes the Bearer-Identifier AVP from the Charging-Rule-Report AVP. If the Bearer-Identifier AVP is not present, this method returns silently.
      • hasPccRuleStatus

        boolean hasPccRuleStatus()
        Returns true if the PCC-Rule-Status AVP is present in the Charging-Rule-Report AVP.
      • getPccRuleStatus

        PccRuleStatus getPccRuleStatus()
        Returns the value of the PCC-Rule-Status AVP, of type Enumerated.
        Returns:
        the value of the PCC-Rule-Status AVP, or null if it has not been set.
      • setPccRuleStatus

        void setPccRuleStatus​(PccRuleStatus pccRuleStatus)
        Sets the value of the PCC-Rule-Status AVP, of type Enumerated.
        Throws:
        NullPointerException - if pccRuleStatus is null.
      • removePccRuleStatus

        void removePccRuleStatus()
        Removes the PCC-Rule-Status AVP from the Charging-Rule-Report AVP. If the PCC-Rule-Status AVP is not present, this method returns silently.
      • hasRuleFailureCode

        boolean hasRuleFailureCode()
        Returns true if the Rule-Failure-Code AVP is present in the Charging-Rule-Report AVP.
      • getRuleFailureCode

        RuleFailureCode getRuleFailureCode()
        Returns the value of the Rule-Failure-Code AVP, of type Enumerated.
        Returns:
        the value of the Rule-Failure-Code AVP, or null if it has not been set.
      • setRuleFailureCode

        void setRuleFailureCode​(RuleFailureCode ruleFailureCode)
        Sets the value of the Rule-Failure-Code AVP, of type Enumerated.
        Throws:
        NullPointerException - if ruleFailureCode is null.
      • removeRuleFailureCode

        void removeRuleFailureCode()
        Removes the Rule-Failure-Code AVP from the Charging-Rule-Report AVP. If the Rule-Failure-Code AVP is not present, this method returns silently.
      • hasFinalUnitIndication

        boolean hasFinalUnitIndication()
        Returns true if the Final-Unit-Indication AVP is present in the Charging-Rule-Report AVP.
      • getFinalUnitIndication

        FinalUnitIndication getFinalUnitIndication()
        Returns the value of the Final-Unit-Indication AVP, of type Grouped.
        Returns:
        the value of the Final-Unit-Indication AVP, or null if it has not been set.
      • setFinalUnitIndication

        void setFinalUnitIndication​(FinalUnitIndication finalUnitIndication)
        Sets the value of the Final-Unit-Indication AVP, of type Grouped.
        Throws:
        NullPointerException - if finalUnitIndication is null.
      • removeFinalUnitIndication

        void removeFinalUnitIndication()
        Removes the Final-Unit-Indication AVP from the Charging-Rule-Report AVP. If the Final-Unit-Indication AVP is not present, this method returns silently.
      • getExtensionAvps

        DiameterAvp[] getExtensionAvps()
        Returns the set of extension AVPs. The returned array contains the extension AVPs in the order they appear in the Charging-Rule-Report AVP. A return value of null implies that no extensions AVPs have been set.
      • setExtensionAvps

        void setExtensionAvps​(DiameterAvp[] avps)
                       throws AvpNotAllowedException
        Sets the set of extension AVPs with all the values in the given array. The AVPs will be added to Charging-Rule-Report AVP in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getExtensionAvps() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        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)
        NullPointerException - if avps is null.
      • removeExtensionAvps

        void removeExtensionAvps()
        Removes all extension AVPs from the Charging-Rule-Report AVP. If no extension AVPs are present, this method returns silently.