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

/*
Package notes is a generated protocol buffer package.

It is generated from these files:
	notes_service.proto

It has these top-level messages:
	Note
	AddNoteRequest
	GetNotesRequest
	GetNotesResponse
	DeleteNoteRequest
*/
package notes

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 Note struct {
	Id     int64  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Body   string `protobuf:"bytes,2,opt,name=body" json:"body,omitempty"`
	Author string `protobuf:"bytes,3,opt,name=author" json:"author,omitempty"`
}

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

func (m *Note) GetId() int64 {
	if m != nil {
		return m.Id
	}
	return 0
}

func (m *Note) GetBody() string {
	if m != nil {
		return m.Body
	}
	return ""
}

func (m *Note) GetAuthor() string {
	if m != nil {
		return m.Author
	}
	return ""
}

type AddNoteRequest struct {
	Body   string `protobuf:"bytes,1,opt,name=body" json:"body,omitempty"`
	Author string `protobuf:"bytes,2,opt,name=author" json:"author,omitempty"`
}

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

func (m *AddNoteRequest) GetBody() string {
	if m != nil {
		return m.Body
	}
	return ""
}

func (m *AddNoteRequest) GetAuthor() string {
	if m != nil {
		return m.Author
	}
	return ""
}

type GetNotesRequest struct {
}

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

type GetNotesResponse struct {
	Notes []*Note `protobuf:"bytes,1,rep,name=notes" json:"notes,omitempty"`
}

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

func (m *GetNotesResponse) GetNotes() []*Note {
	if m != nil {
		return m.Notes
	}
	return nil
}

type DeleteNoteRequest struct {
	Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}

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

func (m *DeleteNoteRequest) GetId() int64 {
	if m != nil {
		return m.Id
	}
	return 0
}

func init() {
	proto.RegisterType((*Note)(nil), "notes.Note")
	proto.RegisterType((*AddNoteRequest)(nil), "notes.AddNoteRequest")
	proto.RegisterType((*GetNotesRequest)(nil), "notes.GetNotesRequest")
	proto.RegisterType((*GetNotesResponse)(nil), "notes.GetNotesResponse")
	proto.RegisterType((*DeleteNoteRequest)(nil), "notes.DeleteNoteRequest")
}

// 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 NoteService service

type NoteServiceClient interface {
	AddNote(ctx context.Context, in *AddNoteRequest, opts ...grpc.CallOption) (*Note, error)
	GetNotes(ctx context.Context, in *GetNotesRequest, opts ...grpc.CallOption) (*GetNotesResponse, error)
	DeleteNote(ctx context.Context, in *DeleteNoteRequest, opts ...grpc.CallOption) (*Note, error)
}

type noteServiceClient struct {
	cc *grpc.ClientConn
}

func NewNoteServiceClient(cc *grpc.ClientConn) NoteServiceClient {
	return &noteServiceClient{cc}
}

func (c *noteServiceClient) AddNote(ctx context.Context, in *AddNoteRequest, opts ...grpc.CallOption) (*Note, error) {
	out := new(Note)
	err := grpc.Invoke(ctx, "/notes.NoteService/AddNote", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *noteServiceClient) GetNotes(ctx context.Context, in *GetNotesRequest, opts ...grpc.CallOption) (*GetNotesResponse, error) {
	out := new(GetNotesResponse)
	err := grpc.Invoke(ctx, "/notes.NoteService/GetNotes", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *noteServiceClient) DeleteNote(ctx context.Context, in *DeleteNoteRequest, opts ...grpc.CallOption) (*Note, error) {
	out := new(Note)
	err := grpc.Invoke(ctx, "/notes.NoteService/DeleteNote", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for NoteService service

type NoteServiceServer interface {
	AddNote(context.Context, *AddNoteRequest) (*Note, error)
	GetNotes(context.Context, *GetNotesRequest) (*GetNotesResponse, error)
	DeleteNote(context.Context, *DeleteNoteRequest) (*Note, error)
}

func RegisterNoteServiceServer(s *grpc.Server, srv NoteServiceServer) {
	s.RegisterService(&_NoteService_serviceDesc, srv)
}

func _NoteService_AddNote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddNoteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NoteServiceServer).AddNote(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/notes.NoteService/AddNote",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NoteServiceServer).AddNote(ctx, req.(*AddNoteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NoteService_GetNotes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetNotesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NoteServiceServer).GetNotes(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/notes.NoteService/GetNotes",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NoteServiceServer).GetNotes(ctx, req.(*GetNotesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NoteService_DeleteNote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteNoteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NoteServiceServer).DeleteNote(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/notes.NoteService/DeleteNote",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NoteServiceServer).DeleteNote(ctx, req.(*DeleteNoteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _NoteService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "notes.NoteService",
	HandlerType: (*NoteServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddNote",
			Handler:    _NoteService_AddNote_Handler,
		},
		{
			MethodName: "GetNotes",
			Handler:    _NoteService_GetNotes_Handler,
		},
		{
			MethodName: "DeleteNote",
			Handler:    _NoteService_DeleteNote_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "notes_service.proto",
}

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

var fileDescriptor0 = []byte{
	// 255 bytes of a gzipped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