func NewColumnPrefixFilter(prefix []byte) *ColumnPrefixFilter {
	return &ColumnPrefixFilter{
		Prefix: prefix,
	}
}
NewColumnPrefixFilter is TODO
package filter
import (
	"errors"
	"github.com/tsuna/gohbase/pb"
	"google.golang.org/protobuf/proto"
)
const filterPath = "org.apache.hadoop.hbase.filter."
type ListOperator int32
func (o ListOperator) isValid() bool {
	return o >= 1 && o <= 2
}
func (o ListOperator) toPB() *pb.FilterList_Operator {
	op := pb.FilterList_Operator(o)
	return &op
}
const (
	MustPassAll ListOperator = 1
	MustPassOne ListOperator = 2
)
type CompareType int32
func (c CompareType) isValid() bool {
	return c >= 0 && c <= 6
}
const (
	Less           CompareType = 0
	LessOrEqual    CompareType = 1
	Equal          CompareType = 2
	NotEqual       CompareType = 3
	GreaterOrEqual CompareType = 4
	Greater        CompareType = 5
	NoOp           CompareType = 6
)
var _ Filter = (*List)(nil)
var _ Filter = (*ColumnCountGetFilter)(nil)
var _ Filter = (*ColumnPaginationFilter)(nil)
var _ Filter = (*ColumnPrefixFilter)(nil)
var _ Filter = (*ColumnRangeFilter)(nil)
var _ Filter = (*CompareFilter)(nil)
var _ Filter = (*DependentColumnFilter)(nil)
var _ Filter = (*FamilyFilter)(nil)
var _ Filter = (*Wrapper)(nil)
var _ Filter = (*FirstKeyOnlyFilter)(nil)
var _ Filter = (*FirstKeyValueMatchingQualifiersFilter)(nil)
var _ Filter = (*FuzzyRowFilter)(nil)
var _ Filter = (*InclusiveStopFilter)(nil)
var _ Filter = (*KeyOnlyFilter)(nil)
var _ Filter = (*MultipleColumnPrefixFilter)(nil)
var _ Filter = (*PageFilter)(nil)
var _ Filter = (*PrefixFilter)(nil)
var _ Filter = (*QualifierFilter)(nil)
var _ Filter = (*RandomRowFilter)(nil)
var _ Filter = (*RowFilter)(nil)
var _ Filter = (*SingleColumnValueFilter)(nil)
var _ Filter = (*SingleColumnValueExcludeFilter)(nil)
var _ Filter = (*SkipFilter)(nil)
var _ Filter = (*TimestampsFilter)(nil)
var _ Filter = (*ValueFilter)(nil)
var _ Filter = (*WhileMatchFilter)(nil)
var _ Filter = (*AllFilter)(nil)
var _ Filter = (*RowRange)(nil)
var _ Filter = (*MultiRowRangeFilter)(nil)
type Filter interface {
	ConstructPBFilter() (*pb.Filter, error)
}
type BytesBytesPair pb.BytesBytesPair
func NewBytesBytesPair(first []byte, second []byte) *BytesBytesPair {
	return &BytesBytesPair{
		First:  first,
		Second: second,
	}
}
type List pb.FilterList
func NewList(operator ListOperator, filters ...Filter) *List {
	f := &List{
		Operator: operator.toPB(),
	}
	f.AddFilters(filters...)
	return f
}
func (f *List) AddFilters(filters ...Filter) {
	for _, filter := range filters {
		fpb, err := filter.ConstructPBFilter()
		if err != nil {
			panic(err)
		}
		f.Filters = append(f.Filters, fpb)
	}
}
func (f *List) ConstructPBFilter() (*pb.Filter, error) {
	if !ListOperator(*f.Operator).isValid() {
		return nil, errors.New("invalid operator specified")
	}
	serializedFilter, err := proto.Marshal((*pb.FilterList)(f))
	if err != nil {
		return nil, err
	}
	filter := &pb.Filter{
		Name:             proto.String(filterPath + "FilterList"),
		SerializedFilter: serializedFilter,
	}
	return filter, nil
}
type ColumnCountGetFilter pb.ColumnCountGetFilter
func NewColumnCountGetFilter(limit int32) *ColumnCountGetFilter {
	return &ColumnCountGetFilter{
		Limit: proto.Int32(limit),
	}
}
func (f *ColumnCountGetFilter) ConstructPBFilter() (*pb.Filter, error) {
	serializedFilter, err := proto.Marshal((*pb.ColumnCountGetFilter)(f))
	if err != nil {
		return nil, err
	}
	filter := &pb.Filter{
		Name:             proto.String(filterPath + "ColumnCountGetFilter"),
		SerializedFilter: serializedFilter,
	}
	return filter, nil
}
type ColumnPaginationFilter pb.ColumnPaginationFilter
func NewColumnPaginationFilter(limit, offset int32, columnOffset []byte) *ColumnPaginationFilter {
	return &ColumnPaginationFilter{
		Limit:        proto.Int32(limit),
		Offset:       proto.Int32(offset),
		ColumnOffset: columnOffset,
	}
}
func (f *ColumnPaginationFilter) ConstructPBFilter() (*pb.Filter, error) {
	serializedFilter, err := proto.Marshal((*pb.ColumnPaginationFilter)(f))
	if err != nil {
		return nil, err
	}
	filter := &pb.Filter{
		Name:             proto.String(filterPath + "ColumnPaginationFilter"),
		SerializedFilter: serializedFilter,
	}
	return filter, nil
}
type ColumnPrefixFilter pb.ColumnPrefixFilter