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

package coprocess

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

type Object struct {
	HookType HookType           `protobuf:"varint,1,opt,name=hook_type,json=hookType,enum=coprocess.HookType" json:"hook_type,omitempty"`
	HookName string             `protobuf:"bytes,2,opt,name=hook_name,json=hookName" json:"hook_name,omitempty"`
	Request  *MiniRequestObject `protobuf:"bytes,3,opt,name=request" json:"request,omitempty"`
	Session  *SessionState      `protobuf:"bytes,4,opt,name=session" json:"session,omitempty"`
	Metadata map[string]string  `protobuf:"bytes,5,rep,name=metadata" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	Spec     map[string]string  `protobuf:"bytes,6,rep,name=spec" json:"spec,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}

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

func (m *Object) GetHookType() HookType {
	if m != nil {
		return m.HookType
	}
	return HookType_Unknown
}

func (m *Object) GetHookName() string {
	if m != nil {
		return m.HookName
	}
	return ""
}

func (m *Object) GetRequest() *MiniRequestObject {
	if m != nil {
		return m.Request
	}
	return nil
}

func (m *Object) GetSession() *SessionState {
	if m != nil {
		return m.Session
	}
	return nil
}

func (m *Object) GetMetadata() map[string]string {
	if m != nil {
		return m.Metadata
	}
	return nil
}

func (m *Object) GetSpec() map[string]string {
	if m != nil {
		return m.Spec
	}
	return nil
}

type Event struct {
	Payload string `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
}

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

func (m *Event) GetPayload() string {
	if m != nil {
		return m.Payload
	}
	return ""
}

type EventReply struct {
}

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

func init() {
	proto.RegisterType((*Object)(nil), "coprocess.Object")
	proto.RegisterType((*Event)(nil), "coprocess.Event")
	proto.RegisterType((*EventReply)(nil), "coprocess.EventReply")
}

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

type DispatcherClient interface {
	Dispatch(ctx context.Context, in *Object, opts ...grpc.CallOption) (*Object, error)
	DispatchEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*EventReply, error)
}

type dispatcherClient struct {
	cc *grpc.ClientConn
}

func NewDispatcherClient(cc *grpc.ClientConn) DispatcherClient {
	return &dispatcherClient{cc}
}

func (c *dispatcherClient) Dispatch(ctx context.Context, in *Object, opts ...grpc.CallOption) (*Object, error) {
	out := new(Object)
	err := grpc.Invoke(ctx, "/coprocess.Dispatcher/Dispatch", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dispatcherClient) DispatchEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*EventReply, error) {
	out := new(EventReply)
	err := grpc.Invoke(ctx, "/coprocess.Dispatcher/DispatchEvent", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for Dispatcher service

type DispatcherServer interface {
	Dispatch(context.Context, *Object) (*Object, error)
	DispatchEvent(context.Context, *Event) (*EventReply, error)
}

func RegisterDispatcherServer(s *grpc.Server, srv DispatcherServer) {
	s.RegisterService(&_Dispatcher_serviceDesc, srv)
}

func _Dispatcher_Dispatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Object)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DispatcherServer).Dispatch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/coprocess.Dispatcher/Dispatch",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DispatcherServer).Dispatch(ctx, req.(*Object))
	}
	return interceptor(ctx, in, info, handler)
}

func _Dispatcher_DispatchEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Event)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DispatcherServer).DispatchEvent(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/coprocess.Dispatcher/DispatchEvent",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DispatcherServer).DispatchEvent(ctx, req.(*Event))
	}
	return interceptor(ctx, in, info, handler)
}

var _Dispatcher_serviceDesc = grpc.ServiceDesc{
	ServiceName: "coprocess.Dispatcher",
	HandlerType: (*DispatcherServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Dispatch",
			Handler:    _Dispatcher_Dispatch_Handler,
		},
		{
			MethodName: "DispatchEvent",
			Handler:    _Dispatcher_DispatchEvent_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "coprocess_object.proto",
}

func init() { proto.RegisterFile("coprocess_object.proto", fileDescriptor2) }

var fileDescriptor2 = []byte{
	// 383 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x92, 0x4f, 0xcf, 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