// Code generated by protoc-gen-go.
// source: chunkdata.proto
// DO NOT EDIT!

/*
Package safebrowsing is a generated protocol buffer package.

It is generated from these files:
	chunkdata.proto

It has these top-level messages:
	ChunkData
*/
package safebrowsing

import proto "github.com/letsencrypt/boulder/Godeps/_workspace/src/github.com/golang/protobuf/proto"
import math "math"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf

// The chunk type is either an add or sub chunk.
type ChunkData_ChunkType int32

const (
	ChunkData_ADD ChunkData_ChunkType = 0
	ChunkData_SUB ChunkData_ChunkType = 1
)

var ChunkData_ChunkType_name = map[int32]string{
	0: "ADD",
	1: "SUB",
}
var ChunkData_ChunkType_value = map[string]int32{
	"ADD": 0,
	"SUB": 1,
}

func (x ChunkData_ChunkType) Enum() *ChunkData_ChunkType {
	p := new(ChunkData_ChunkType)
	*p = x
	return p
}
func (x ChunkData_ChunkType) String() string {
	return proto.EnumName(ChunkData_ChunkType_name, int32(x))
}
func (x *ChunkData_ChunkType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(ChunkData_ChunkType_value, data, "ChunkData_ChunkType")
	if err != nil {
		return err
	}
	*x = ChunkData_ChunkType(value)
	return nil
}

// Prefix type which currently is either 4B or 32B.  The default is set
// to the prefix length, so it doesn't have to be set at all for most
// chunks.
type ChunkData_PrefixType int32

const (
	ChunkData_PREFIX_4B ChunkData_PrefixType = 0
	ChunkData_FULL_32B  ChunkData_PrefixType = 1
)

var ChunkData_PrefixType_name = map[int32]string{
	0: "PREFIX_4B",
	1: "FULL_32B",
}
var ChunkData_PrefixType_value = map[string]int32{
	"PREFIX_4B": 0,
	"FULL_32B":  1,
}

func (x ChunkData_PrefixType) Enum() *ChunkData_PrefixType {
	p := new(ChunkData_PrefixType)
	*p = x
	return p
}
func (x ChunkData_PrefixType) String() string {
	return proto.EnumName(ChunkData_PrefixType_name, int32(x))
}
func (x *ChunkData_PrefixType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(ChunkData_PrefixType_value, data, "ChunkData_PrefixType")
	if err != nil {
		return err
	}
	*x = ChunkData_PrefixType(value)
	return nil
}

// Chunk data encoding format for the shavar-proto list format.
type ChunkData struct {
	ChunkNumber *int32                `protobuf:"varint,1,req,name=chunk_number" json:"chunk_number,omitempty"`
	ChunkType   *ChunkData_ChunkType  `protobuf:"varint,2,opt,name=chunk_type,enum=safebrowsing.ChunkData_ChunkType,def=0" json:"chunk_type,omitempty"`
	PrefixType  *ChunkData_PrefixType `protobuf:"varint,3,opt,name=prefix_type,enum=safebrowsing.ChunkData_PrefixType,def=0" json:"prefix_type,omitempty"`
	// Stores all SHA256 add or sub prefixes or full-length hashes. The number
	// of hashes can be inferred from the length of the hashes string and the
	// prefix type above.
	Hashes []byte `protobuf:"bytes,4,opt,name=hashes" json:"hashes,omitempty"`
	// Sub chunks also encode one add chunk number for every hash stored above.
	AddNumbers       []int32 `protobuf:"varint,5,rep,packed,name=add_numbers" json:"add_numbers,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (m *ChunkData) Reset()         { *m = ChunkData{} }
func (m *ChunkData) String() string { return proto.CompactTextString(m) }
func (*ChunkData) ProtoMessage()    {}

const Default_ChunkData_ChunkType ChunkData_ChunkType = ChunkData_ADD
const Default_ChunkData_PrefixType ChunkData_PrefixType = ChunkData_PREFIX_4B

func (m *ChunkData) GetChunkNumber() int32 {
	if m != nil && m.ChunkNumber != nil {
		return *m.ChunkNumber
	}
	return 0
}

func (m *ChunkData) GetChunkType() ChunkData_ChunkType {
	if m != nil && m.ChunkType != nil {
		return *m.ChunkType
	}
	return Default_ChunkData_ChunkType
}

func (m *ChunkData) GetPrefixType() ChunkData_PrefixType {
	if m != nil && m.PrefixType != nil {
		return *m.PrefixType
	}
	return Default_ChunkData_PrefixType
}

func (m *ChunkData) GetHashes() []byte {
	if m != nil {
		return m.Hashes
	}
	return nil
}

func (m *ChunkData) GetAddNumbers() []int32 {
	if m != nil {
		return m.AddNumbers
	}
	return nil
}

func init() {
	proto.RegisterEnum("safebrowsing.ChunkData_ChunkType", ChunkData_ChunkType_name, ChunkData_ChunkType_value)
	proto.RegisterEnum("safebrowsing.ChunkData_PrefixType", ChunkData_PrefixType_name, ChunkData_PrefixType_value)
}
