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

/*
Package todo is a generated protocol buffer package.

It is generated from these files:
	todo.proto

It has these top-level messages:
	Task
	TaskList
	Text
	Void
*/
package todo

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

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

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

type Task struct {
	Text string `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"`
	Done bool   `protobuf:"varint,2,opt,name=done" json:"done,omitempty"`
}

func (m *Task) Reset()                    { *m = Task{} }
func (m *Task) String() string            { return proto.CompactTextString(m) }
func (*Task) ProtoMessage()               {}
func (*Task) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }

func (m *Task) GetText() string {
	if m != nil {
		return m.Text
	}
	return ""
}

func (m *Task) GetDone() bool {
	if m != nil {
		return m.Done
	}
	return false
}

type TaskList struct {
	Tasks []*Task `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"`
}

func (m *TaskList) Reset()                    { *m = TaskList{} }
func (m *TaskList) String() string            { return proto.CompactTextString(m) }
func (*TaskList) ProtoMessage()               {}
func (*TaskList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }

func (m *TaskList) GetTasks() []*Task {
	if m != nil {
		return m.Tasks
	}
	return nil
}

type Text struct {
	Text string `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"`
}

func (m *Text) Reset()                    { *m = Text{} }
func (m *Text) String() string            { return proto.CompactTextString(m) }
func (*Text) ProtoMessage()               {}
func (*Text) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }

func (m *Text) GetText() string {
	if m != nil {
		return m.Text
	}
	return ""
}

type Void struct {
}

func (m *Void) Reset()                    { *m = Void{} }
func (m *Void) String() string            { return proto.CompactTextString(m) }
func (*Void) ProtoMessage()               {}
func (*Void) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }

func init() {
	proto.RegisterType((*Task)(nil), "todo.Task")
	proto.RegisterType((*TaskList)(nil), "todo.TaskList")
	proto.RegisterType((*Text)(nil), "todo.Text")
	proto.RegisterType((*Void)(nil), "todo.Void")
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// Client API for Tasks service

type TasksClient interface {
	List(ctx context.Context, in *Void, opts ...grpc.CallOption) (*TaskList, error)
	Add(ctx context.Context, in *Text, opts ...grpc.CallOption) (*Task, error)
}

type tasksClient struct {
	cc *grpc.ClientConn
}

func NewTasksClient(cc *grpc.ClientConn) TasksClient {
	return &tasksClient{cc}
}

func (c *tasksClient) List(ctx context.Context, in *Void, opts ...grpc.CallOption) (*TaskList, error) {
	out := new(TaskList)
	err := grpc.Invoke(ctx, "/todo.Tasks/List", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tasksClient) Add(ctx context.Context, in *Text, opts ...grpc.CallOption) (*Task, error) {
	out := new(Task)
	err := grpc.Invoke(ctx, "/todo.Tasks/Add", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for Tasks service

type TasksServer interface {
	List(context.Context, *Void) (*TaskList, error)
	Add(context.Context, *Text) (*Task, error)
}

func RegisterTasksServer(s *grpc.Server, srv TasksServer) {
	s.RegisterService(&_Tasks_serviceDesc, srv)
}

func _Tasks_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Void)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TasksServer).List(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/todo.Tasks/List",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TasksServer).List(ctx, req.(*Void))
	}
	return interceptor(ctx, in, info, handler)
}

func _Tasks_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Text)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TasksServer).Add(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/todo.Tasks/Add",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TasksServer).Add(ctx, req.(*Text))
	}
	return interceptor(ctx, in, info, handler)
}

var _Tasks_serviceDesc = grpc.ServiceDesc{
	ServiceName: "todo.Tasks",
	HandlerType: (*TasksServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "List",
			Handler:    _Tasks_List_Handler,
		},
		{
			MethodName: "Add",
			Handler:    _Tasks_Add_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "todo.proto",
}

func init() { proto.RegisterFile("todo.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 178 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x8f, 0xb1, 0xaa, 0xc2, 0x40,
	0x10, 0x45, 0xb3, 0x2f, 0x9b, 0x90, 0x77, 0x05, 0x8b, 0xad, 0x42, 0x1a, 0x97, 0xc5, 0x22, 0x85,
	0xa4, 0x88, 0x5f, 0x60, 0x2f, 0x16, 0x21, 0xd8, 0x47, 0x36, 0x45, 0x08, 0x38, 0xe2, 0x4e, 0xe1,
	0xe7, 0xcb, 0xac, 0x11, 0xc5, 0xee, 0x32, 0xe7, 0xce, 0x19, 0x06, 0x60, 0xf2, 0xd4, 0xdc, 0xee,
	0xc4, 0x64, 0xb4, 0x64, 0xd7, 0x40, 0xf7, 0x43, 0x98, 0x8d, 0x81, 0xe6, 0xf1, 0xc1, 0xa5, 0xb2,
	0xaa, 0xfe, 0xef, 0x62, 0x96, 0x99, 0xa7, 0xeb, 0x58, 0xfe, 0x59, 0x55, 0x17, 0x5d, 0xcc, 0x6e,
	0x87, 0x42, 0xfa, 0xc7, 0x29, 0xb0, 0xb1, 0xc8, 0x78, 0x08, 0x73, 0x28, 0x95, 0x4d, 0xeb, 0x55,
	0x8b, 0x26, 0xda, 0x05, 0x77, 0x2f, 0xe0, 0x2a, 0xe8, 0x7e, 0x31, 0xfd, 0xda, 0x5d, 0x0e, 0x7d,
	0xa6, 0xc9, 0xb7, 0x27, 0x64, 0xb2, 0x12, 0xcc, 0x16, 0x3a, 0x6a, 0x17, 0x8f, 0xc0, 0x6a, 0xfd,
	0x71, 0x0a, 0x73, 0x89, 0xd9, 0x20, 0x3d, 0x78, 0xff, 0x2e, 0x89, 0xbd, 0xfa, 0x3a, 0xec, 0x92,
	0x4b, 0x1e, 0xdf, 0xdb, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xad, 0xd6, 0x8c, 0xec, 0x00,
	0x00, 0x00,
}
