func (f *SubsequentVolumeQuotaFields) SetULVOLFlag() {
	f.Flags |= 0x02
}
SetULVOLFlag sets ULVOL flag in SubsequentVolumeQuota.
package ie
import (
	"encoding/binary"
	"io"
)
func NewSubsequentVolumeQuota(flags uint8, tvol, uvol, dvol uint64) *IE {
	fields := NewSubsequentVolumeQuotaFields(flags, tvol, uvol, dvol)
	b, err := fields.Marshal()
	if err != nil {
		return nil
	}
	return New(SubsequentVolumeQuota, b)
}
func (i *IE) SubsequentVolumeQuota() (*SubsequentVolumeQuotaFields, error) {
	switch i.Type {
	case SubsequentVolumeQuota:
		fields, err := ParseSubsequentVolumeQuotaFields(i.Payload)
		if err != nil {
			return nil, err
		}
		return fields, nil
	case CreateURR:
		ies, err := i.CreateURR()
		if err != nil {
			return nil, err
		}
		for _, x := range ies {
			if x.Type == SubsequentVolumeQuota {
				return x.SubsequentVolumeQuota()
			}
		}
		return nil, ErrIENotFound
	case UpdateURR:
		ies, err := i.UpdateURR()
		if err != nil {
			return nil, err
		}
		for _, x := range ies {
			if x.Type == SubsequentVolumeQuota {
				return x.SubsequentVolumeQuota()
			}
		}
		return nil, ErrIENotFound
	case AdditionalMonitoringTime:
		ies, err := i.AdditionalMonitoringTime()
		if err != nil {
			return nil, err
		}
		for _, x := range ies {
			if x.Type == SubsequentVolumeQuota {
				return x.SubsequentVolumeQuota()
			}
		}
		return nil, ErrIENotFound
	default:
		return nil, &InvalidTypeError{Type: i.Type}
	}
}
type SubsequentVolumeQuotaFields struct {
	Flags          uint8
	TotalVolume    uint64
	UplinkVolume   uint64
	DownlinkVolume uint64
}
func NewSubsequentVolumeQuotaFields(flags uint8, tvol, uvol, dvol uint64) *SubsequentVolumeQuotaFields {
	f := &SubsequentVolumeQuotaFields{Flags: flags}
	if f.HasTOVOL() {
		f.TotalVolume = tvol
	}
	if f.HasULVOL() {
		f.UplinkVolume = uvol
	}
	if f.HasDLVOL() {
		f.DownlinkVolume = dvol
	}
	return f
}
func (f *SubsequentVolumeQuotaFields) HasDLVOL() bool {
	return has3rdBit(f.Flags)
}
func (f *SubsequentVolumeQuotaFields) SetDLVOLFlag() {
	f.Flags |= 0x04
}
func (f *SubsequentVolumeQuotaFields) HasULVOL() bool {
	return has2ndBit(f.Flags)
}