Interface ChargingRuleDefinition

  • All Superinterfaces:
    Cloneable, DiameterAvp, GroupedAvp

    public interface ChargingRuleDefinition
    extends GroupedAvp
    Defines an interface representing the Charging-Rule-Definition grouped AVP type. From the Diameter Gx Reference Point Protocol Details (3GPP TS 29.212 V10.1.0) specification:
     5.3.4 Charging-Rule-Definition
     
         The Charging-Rule-Definition AVP (AVP code 1003) is of type Grouped, and it defines the PCC rule for a service flow sent by the PCRF to the PCEF. The Charging-Rule-Name AVP uniquely identifies the PCC rule and it is used to reference to a PCC rule in communication between the PCEF and the PCRF within one IP CAN session. The Flow-Information AVP(s) determines the traffic that belongs to the service flow.
         If optional AVP(s) within a Charging-Rule-Definition AVP are omitted, but corresponding information has been provided in previous Gx messages, the previous information remains valid. If Flow-Information AVP(s) are supplied, they replace all previous Flow-Information AVP(s). If Flows AVP(s) are supplied, they replace all previous Flows AVP(s).
         Flows AVP may appear if and only if AF-Charging-Identifier AVP is also present.
         AF-Signalling-Protocol AVP may appear if the PCC Rule applies for IMS signalling.
         Monitoring-Key AVP contains the monitoring key that may apply to the PCC rule.
         Sponsor-Identity AVP contains the information regarding the 3rd party organization (i.e. the sponsor) willing to pay for the operator's charge for connectivity required to deliver a service to the end user. Application-Service-Provider-Identity AVP contains the information regarding the 3rd party organization (i.e. the ASP) delivering service to the end user. Sponsor-Identity AVP and Application-Service-Provider-Identity AVP shall be included if offline charging is applicable for the service data flow.
     
         It has the following ABNF grammar:
     
         Charging-Rule-Definition ::= < AVP Header: 1003 >
                                         { Charging-Rule-Name }
                                         [ Service-Identifier ]
                                         [ Rating-Group ]
                                        *[ Flow-Information ]
                                         [ Flow-Status ]
                                         [ QoS-Information ]
                                         [ Reporting-Level ]
                                         [ Online ]
                                         [ Offline ]
                                         [ Metering-Method ]
                                         [ Precedence ]
                                         [ AF-Charging-Identifier ]
                                        *[ Flows ]
                                         [ Monitoring-Key]
                                         [ AF-Signalling-Protocol ]
                                         [ Sponsor-Identity ]
                                        *[ AVP ]
     
     
    • Method Detail

      • hasChargingRuleName

        boolean hasChargingRuleName()
        Returns true if the Charging-Rule-Name AVP is present in the Charging-Rule-Definition AVP.
      • getChargingRuleName

        byte[] getChargingRuleName()
        Returns the value of the Charging-Rule-Name AVP, of type OctetString.
        Returns:
        the value of the Charging-Rule-Name AVP, or null if it has not been set.
      • setChargingRuleName

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

        void removeChargingRuleName()
        Removes the Charging-Rule-Name AVP from the Charging-Rule-Definition AVP. If the Charging-Rule-Name AVP is not present, this method returns silently.
      • hasServiceIdentifier

        boolean hasServiceIdentifier()
        Returns true if the Service-Identifier AVP is present in the Charging-Rule-Definition AVP.
      • getServiceIdentifier

        long getServiceIdentifier()
        Returns the value of the Service-Identifier AVP, of type Unsigned32. Use hasServiceIdentifier() to check the existence of this AVP.
        Returns:
        the value of the Service-Identifier AVP
        Throws:
        IllegalStateException - if the Service-Identifier AVP has not been set.
      • setServiceIdentifier

        void setServiceIdentifier​(long serviceIdentifier)
        Sets the value of the Service-Identifier AVP, of type Unsigned32.
      • removeServiceIdentifier

        void removeServiceIdentifier()
        Removes the Service-Identifier AVP from the Charging-Rule-Definition AVP. If the Service-Identifier AVP is not present, this method returns silently.
      • hasRatingGroup

        boolean hasRatingGroup()
        Returns true if the Rating-Group AVP is present in the Charging-Rule-Definition AVP.
      • getRatingGroup

        long getRatingGroup()
        Returns the value of the Rating-Group AVP, of type Unsigned32. Use hasRatingGroup() to check the existence of this AVP.
        Returns:
        the value of the Rating-Group AVP
        Throws:
        IllegalStateException - if the Rating-Group AVP has not been set.
      • setRatingGroup

        void setRatingGroup​(long ratingGroup)
        Sets the value of the Rating-Group AVP, of type Unsigned32.
      • removeRatingGroup

        void removeRatingGroup()
        Removes the Rating-Group AVP from the Charging-Rule-Definition AVP. If the Rating-Group AVP is not present, this method returns silently.
      • getFlowInformations

        FlowInformation[] getFlowInformations()
        Returns the set of Flow-Information AVPs. The returned array contains the AVPs in the order they appear in the Charging-Rule-Definition AVP. A return value of null implies that no Flow-Information AVPs have been set. The elements in the given array are FlowInformation objects.
      • setFlowInformation

        void setFlowInformation​(FlowInformation flowInformation)
        Sets a single Flow-Information AVP in the Charging-Rule-Definition AVP, of type Grouped.
        Throws:
        NullPointerException - if flowInformation is null.
      • setFlowInformations

        void setFlowInformations​(FlowInformation[] flowInformations)
        Sets the set of Flow-Information AVPs, with all the values in the given array. The AVPs will be added to the Charging-Rule-Definition 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 getFlowInformations() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if flowInformations is null.
      • removeFlowInformations

        void removeFlowInformations()
        Removes all Flow-Information AVPs from the Charging-Rule-Definition AVP. If no Flow-Information AVPs are present, this method returns silently.
      • hasFlowStatus

        boolean hasFlowStatus()
        Returns true if the Flow-Status AVP is present in the Charging-Rule-Definition AVP.
      • getFlowStatus

        FlowStatus getFlowStatus()
        Returns the value of the Flow-Status AVP, of type Enumerated.
        Returns:
        the value of the Flow-Status AVP, or null if it has not been set.
      • setFlowStatus

        void setFlowStatus​(FlowStatus flowStatus)
        Sets the value of the Flow-Status AVP, of type Enumerated.
        Throws:
        NullPointerException - if flowStatus is null.
      • removeFlowStatus

        void removeFlowStatus()
        Removes the Flow-Status AVP from the Charging-Rule-Definition AVP. If the Flow-Status AVP is not present, this method returns silently.
      • hasQosInformation

        boolean hasQosInformation()
        Returns true if the QoS-Information AVP is present in the Charging-Rule-Definition AVP.
      • getQosInformation

        QosInformation getQosInformation()
        Returns the value of the QoS-Information AVP, of type Grouped.
        Returns:
        the value of the QoS-Information AVP, or null if it has not been set.
      • setQosInformation

        void setQosInformation​(QosInformation qosInformation)
        Sets the value of the QoS-Information AVP, of type Grouped.
        Throws:
        NullPointerException - if qosInformation is null.
      • removeQosInformation

        void removeQosInformation()
        Removes the QoS-Information AVP from the Charging-Rule-Definition AVP. If the QoS-Information AVP is not present, this method returns silently.
      • hasReportingLevel

        boolean hasReportingLevel()
        Returns true if the Reporting-Level AVP is present in the Charging-Rule-Definition AVP.
      • getReportingLevel

        ReportingLevel getReportingLevel()
        Returns the value of the Reporting-Level AVP, of type Enumerated.
        Returns:
        the value of the Reporting-Level AVP, or null if it has not been set.
      • setReportingLevel

        void setReportingLevel​(ReportingLevel reportingLevel)
        Sets the value of the Reporting-Level AVP, of type Enumerated.
        Throws:
        NullPointerException - if reportingLevel is null.
      • removeReportingLevel

        void removeReportingLevel()
        Removes the Reporting-Level AVP from the Charging-Rule-Definition AVP. If the Reporting-Level AVP is not present, this method returns silently.
      • hasOnline

        boolean hasOnline()
        Returns true if the Online AVP is present in the Charging-Rule-Definition AVP.
      • getOnline

        Online getOnline()
        Returns the value of the Online AVP, of type Enumerated.
        Returns:
        the value of the Online AVP, or null if it has not been set.
      • setOnline

        void setOnline​(Online online)
        Sets the value of the Online AVP, of type Enumerated.
        Throws:
        NullPointerException - if online is null.
      • removeOnline

        void removeOnline()
        Removes the Online AVP from the Charging-Rule-Definition AVP. If the Online AVP is not present, this method returns silently.
      • hasOffline

        boolean hasOffline()
        Returns true if the Offline AVP is present in the Charging-Rule-Definition AVP.
      • getOffline

        Offline getOffline()
        Returns the value of the Offline AVP, of type Enumerated.
        Returns:
        the value of the Offline AVP, or null if it has not been set.
      • setOffline

        void setOffline​(Offline offline)
        Sets the value of the Offline AVP, of type Enumerated.
        Throws:
        NullPointerException - if offline is null.
      • removeOffline

        void removeOffline()
        Removes the Offline AVP from the Charging-Rule-Definition AVP. If the Offline AVP is not present, this method returns silently.
      • hasMeteringMethod

        boolean hasMeteringMethod()
        Returns true if the Metering-Method AVP is present in the Charging-Rule-Definition AVP.
      • getMeteringMethod

        MeteringMethod getMeteringMethod()
        Returns the value of the Metering-Method AVP, of type Enumerated.
        Returns:
        the value of the Metering-Method AVP, or null if it has not been set.
      • setMeteringMethod

        void setMeteringMethod​(MeteringMethod meteringMethod)
        Sets the value of the Metering-Method AVP, of type Enumerated.
        Throws:
        NullPointerException - if meteringMethod is null.
      • removeMeteringMethod

        void removeMeteringMethod()
        Removes the Metering-Method AVP from the Charging-Rule-Definition AVP. If the Metering-Method AVP is not present, this method returns silently.
      • hasPrecedence

        boolean hasPrecedence()
        Returns true if the Precedence AVP is present in the Charging-Rule-Definition AVP.
      • getPrecedence

        long getPrecedence()
        Returns the value of the Precedence AVP, of type Unsigned32. Use hasPrecedence() to check the existence of this AVP.
        Returns:
        the value of the Precedence AVP
        Throws:
        IllegalStateException - if the Precedence AVP has not been set.
      • setPrecedence

        void setPrecedence​(long precedence)
        Sets the value of the Precedence AVP, of type Unsigned32.
      • removePrecedence

        void removePrecedence()
        Removes the Precedence AVP from the Charging-Rule-Definition AVP. If the Precedence AVP is not present, this method returns silently.
      • hasAfChargingIdentifier

        boolean hasAfChargingIdentifier()
        Returns true if the AF-Charging-Identifier AVP is present in the Charging-Rule-Definition AVP.
      • getAfChargingIdentifier

        byte[] getAfChargingIdentifier()
        Returns the value of the AF-Charging-Identifier AVP, of type OctetString.
        Returns:
        the value of the AF-Charging-Identifier AVP, or null if it has not been set.
      • setAfChargingIdentifier

        void setAfChargingIdentifier​(byte[] afChargingIdentifier)
        Sets the value of the AF-Charging-Identifier AVP, of type OctetString.
        Throws:
        NullPointerException - if afChargingIdentifier is null.
      • removeAfChargingIdentifier

        void removeAfChargingIdentifier()
        Removes the AF-Charging-Identifier AVP from the Charging-Rule-Definition AVP. If the AF-Charging-Identifier AVP is not present, this method returns silently.
      • getFlowses

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

        void setFlows​(Flows flows)
        Sets a single Flows AVP in the Charging-Rule-Definition AVP, of type Grouped.
        Throws:
        NullPointerException - if flows is null.
      • setFlowses

        void setFlowses​(Flows[] flowses)
        Sets the set of Flows AVPs, with all the values in the given array. The AVPs will be added to the Charging-Rule-Definition 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 getFlowses() is not guaranteed to return the same array instance, e.g. an "==" check would fail.
        Throws:
        NullPointerException - if flowses is null.
      • removeFlowses

        void removeFlowses()
        Removes all Flows AVPs from the Charging-Rule-Definition AVP. If no Flows AVPs are present, this method returns silently.
      • hasMonitoringKey

        boolean hasMonitoringKey()
        Returns true if the Monitoring-Key AVP is present in the Charging-Rule-Definition AVP.
      • getMonitoringKey

        byte[] getMonitoringKey()
        Returns the value of the Monitoring-Key AVP, of type OctetString.
        Returns:
        the value of the Monitoring-Key AVP, or null if it has not been set.
      • setMonitoringKey

        void setMonitoringKey​(byte[] monitoringKey)
        Sets the value of the Monitoring-Key AVP, of type OctetString.
        Throws:
        NullPointerException - if monitoringKey is null.
      • removeMonitoringKey

        void removeMonitoringKey()
        Removes the Monitoring-Key AVP from the Charging-Rule-Definition AVP. If the Monitoring-Key AVP is not present, this method returns silently.
      • hasAfSignallingProtocol

        boolean hasAfSignallingProtocol()
        Returns true if the AF-Signalling-Protocol AVP is present in the Charging-Rule-Definition AVP.
      • getAfSignallingProtocol

        AfSignallingProtocol getAfSignallingProtocol()
        Returns the value of the AF-Signalling-Protocol AVP, of type Enumerated.
        Returns:
        the value of the AF-Signalling-Protocol AVP, or null if it has not been set.
      • setAfSignallingProtocol

        void setAfSignallingProtocol​(AfSignallingProtocol afSignallingProtocol)
        Sets the value of the AF-Signalling-Protocol AVP, of type Enumerated.
        Throws:
        NullPointerException - if afSignallingProtocol is null.
      • removeAfSignallingProtocol

        void removeAfSignallingProtocol()
        Removes the AF-Signalling-Protocol AVP from the Charging-Rule-Definition AVP. If the AF-Signalling-Protocol AVP is not present, this method returns silently.
      • hasSponsorIdentity

        boolean hasSponsorIdentity()
        Returns true if the Sponsor-Identity AVP is present in the Charging-Rule-Definition AVP.
      • getSponsorIdentity

        byte[] getSponsorIdentity()
        Returns the value of the Sponsor-Identity AVP, of type OctetString.
        Returns:
        the value of the Sponsor-Identity AVP, or null if it has not been set.
      • setSponsorIdentity

        void setSponsorIdentity​(byte[] sponsorIdentity)
        Sets the value of the Sponsor-Identity AVP, of type OctetString.
        Throws:
        NullPointerException - if sponsorIdentity is null.
      • removeSponsorIdentity

        void removeSponsorIdentity()
        Removes the Sponsor-Identity AVP from the Charging-Rule-Definition AVP. If the Sponsor-Identity 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-Definition 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-Definition 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-Definition AVP. If no extension AVPs are present, this method returns silently.