github.com/keltia/go-ipfs@v0.3.8-0.20150909044612-210793031c63/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  	Metadata
    14  */
    15  package unixfs_pb
    16  
    17  import proto "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/proto"
    18  import math "math"
    19  
    20  // Reference imports to suppress errors if they are not otherwise used.
    21  var _ = proto.Marshal
    22  var _ = math.Inf
    23  
    24  type Data_DataType int32
    25  
    26  const (
    27  	Data_Raw       Data_DataType = 0
    28  	Data_Directory Data_DataType = 1
    29  	Data_File      Data_DataType = 2
    30  	Data_Metadata  Data_DataType = 3
    31  	Data_Symlink   Data_DataType = 4
    32  )
    33  
    34  var Data_DataType_name = map[int32]string{
    35  	0: "Raw",
    36  	1: "Directory",
    37  	2: "File",
    38  	3: "Metadata",
    39  	4: "Symlink",
    40  }
    41  var Data_DataType_value = map[string]int32{
    42  	"Raw":       0,
    43  	"Directory": 1,
    44  	"File":      2,
    45  	"Metadata":  3,
    46  	"Symlink":   4,
    47  }
    48  
    49  func (x Data_DataType) Enum() *Data_DataType {
    50  	p := new(Data_DataType)
    51  	*p = x
    52  	return p
    53  }
    54  func (x Data_DataType) String() string {
    55  	return proto.EnumName(Data_DataType_name, int32(x))
    56  }
    57  func (x *Data_DataType) UnmarshalJSON(data []byte) error {
    58  	value, err := proto.UnmarshalJSONEnum(Data_DataType_value, data, "Data_DataType")
    59  	if err != nil {
    60  		return err
    61  	}
    62  	*x = Data_DataType(value)
    63  	return nil
    64  }
    65  
    66  type Data struct {
    67  	Type             *Data_DataType `protobuf:"varint,1,req,enum=unixfs.pb.Data_DataType" json:"Type,omitempty"`
    68  	Data             []byte         `protobuf:"bytes,2,opt" json:"Data,omitempty"`
    69  	Filesize         *uint64        `protobuf:"varint,3,opt,name=filesize" json:"filesize,omitempty"`
    70  	Blocksizes       []uint64       `protobuf:"varint,4,rep,name=blocksizes" json:"blocksizes,omitempty"`
    71  	XXX_unrecognized []byte         `json:"-"`
    72  }
    73  
    74  func (m *Data) Reset()         { *m = Data{} }
    75  func (m *Data) String() string { return proto.CompactTextString(m) }
    76  func (*Data) ProtoMessage()    {}
    77  
    78  func (m *Data) GetType() Data_DataType {
    79  	if m != nil && m.Type != nil {
    80  		return *m.Type
    81  	}
    82  	return Data_Raw
    83  }
    84  
    85  func (m *Data) GetData() []byte {
    86  	if m != nil {
    87  		return m.Data
    88  	}
    89  	return nil
    90  }
    91  
    92  func (m *Data) GetFilesize() uint64 {
    93  	if m != nil && m.Filesize != nil {
    94  		return *m.Filesize
    95  	}
    96  	return 0
    97  }
    98  
    99  func (m *Data) GetBlocksizes() []uint64 {
   100  	if m != nil {
   101  		return m.Blocksizes
   102  	}
   103  	return nil
   104  }
   105  
   106  type Metadata struct {
   107  	MimeType         *string `protobuf:"bytes,1,req" json:"MimeType,omitempty"`
   108  	XXX_unrecognized []byte  `json:"-"`
   109  }
   110  
   111  func (m *Metadata) Reset()         { *m = Metadata{} }
   112  func (m *Metadata) String() string { return proto.CompactTextString(m) }
   113  func (*Metadata) ProtoMessage()    {}
   114  
   115  func (m *Metadata) GetMimeType() string {
   116  	if m != nil && m.MimeType != nil {
   117  		return *m.MimeType
   118  	}
   119  	return ""
   120  }
   121  
   122  func init() {
   123  	proto.RegisterEnum("unixfs.pb.Data_DataType", Data_DataType_name, Data_DataType_value)
   124  }