github.com/zignig/go-ipfs@v0.0.0-20141111235910-c9e5fdf55a52/unixfs/pb/unixfs.pb.go (about)

     1  // Code generated by protoc-gen-gogo.
     2  // source: unixfs.proto
     3  // DO NOT EDIT!
     4  
     5  /*
     6  Package unixfs_pb is a generated protocol buffer package.
     7  
     8  It is generated from these files:
     9  	unixfs.proto
    10  
    11  It has these top-level messages:
    12  	Data
    13  */
    14  package unixfs_pb
    15  
    16  import proto "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/gogoprotobuf/proto"
    17  import math "math"
    18  
    19  // Reference imports to suppress errors if they are not otherwise used.
    20  var _ = proto.Marshal
    21  var _ = math.Inf
    22  
    23  type Data_DataType int32
    24  
    25  const (
    26  	Data_Raw       Data_DataType = 0
    27  	Data_Directory Data_DataType = 1
    28  	Data_File      Data_DataType = 2
    29  )
    30  
    31  var Data_DataType_name = map[int32]string{
    32  	0: "Raw",
    33  	1: "Directory",
    34  	2: "File",
    35  }
    36  var Data_DataType_value = map[string]int32{
    37  	"Raw":       0,
    38  	"Directory": 1,
    39  	"File":      2,
    40  }
    41  
    42  func (x Data_DataType) Enum() *Data_DataType {
    43  	p := new(Data_DataType)
    44  	*p = x
    45  	return p
    46  }
    47  func (x Data_DataType) String() string {
    48  	return proto.EnumName(Data_DataType_name, int32(x))
    49  }
    50  func (x *Data_DataType) UnmarshalJSON(data []byte) error {
    51  	value, err := proto.UnmarshalJSONEnum(Data_DataType_value, data, "Data_DataType")
    52  	if err != nil {
    53  		return err
    54  	}
    55  	*x = Data_DataType(value)
    56  	return nil
    57  }
    58  
    59  type Data struct {
    60  	Type             *Data_DataType `protobuf:"varint,1,req,enum=unixfs.pb.Data_DataType" json:"Type,omitempty"`
    61  	Data             []byte         `protobuf:"bytes,2,opt" json:"Data,omitempty"`
    62  	Filesize         *uint64        `protobuf:"varint,3,opt,name=filesize" json:"filesize,omitempty"`
    63  	Blocksizes       []uint64       `protobuf:"varint,4,rep,name=blocksizes" json:"blocksizes,omitempty"`
    64  	XXX_unrecognized []byte         `json:"-"`
    65  }
    66  
    67  func (m *Data) Reset()         { *m = Data{} }
    68  func (m *Data) String() string { return proto.CompactTextString(m) }
    69  func (*Data) ProtoMessage()    {}
    70  
    71  func (m *Data) GetType() Data_DataType {
    72  	if m != nil && m.Type != nil {
    73  		return *m.Type
    74  	}
    75  	return Data_Raw
    76  }
    77  
    78  func (m *Data) GetData() []byte {
    79  	if m != nil {
    80  		return m.Data
    81  	}
    82  	return nil
    83  }
    84  
    85  func (m *Data) GetFilesize() uint64 {
    86  	if m != nil && m.Filesize != nil {
    87  		return *m.Filesize
    88  	}
    89  	return 0
    90  }
    91  
    92  func (m *Data) GetBlocksizes() []uint64 {
    93  	if m != nil {
    94  		return m.Blocksizes
    95  	}
    96  	return nil
    97  }
    98  
    99  func init() {
   100  	proto.RegisterEnum("unixfs.pb.Data_DataType", Data_DataType_name, Data_DataType_value)
   101  }