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

package iprep

import (
	context "context"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	empty "github.com/golang/protobuf/ptypes/empty"
	grpc "google.golang.org/grpc"
	math "math"
)

// 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.ProtoPackageIsVersion3 // please upgrade the proto package

type Event struct {
	Ip                   string   `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	Type                 string   `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Details              string   `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"`
	Count                int64    `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (m *Event) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Event.Unmarshal(m, b)
}
func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Event.Marshal(b, m, deterministic)
}
func (m *Event) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Event.Merge(m, src)
}
func (m *Event) XXX_Size() int {
	return xxx_messageInfo_Event.Size(m)
}
func (m *Event) XXX_DiscardUnknown() {
	xxx_messageInfo_Event.DiscardUnknown(m)
}

var xxx_messageInfo_Event proto.InternalMessageInfo

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

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

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

func (m *Event) GetCount() int64 {
	if m != nil {
		return m.Count
	}
	return 0
}

type AggregateIPEntry struct {
	Ip                   string   `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	Count                int64    `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (m *AggregateIPEntry) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_AggregateIPEntry.Unmarshal(m, b)
}
func (m *AggregateIPEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_AggregateIPEntry.Marshal(b, m, deterministic)
}
func (m *AggregateIPEntry) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AggregateIPEntry.Merge(m, src)
}
func (m *AggregateIPEntry) XXX_Size() int {
	return xxx_messageInfo_AggregateIPEntry.Size(m)
}
func (m *AggregateIPEntry) XXX_DiscardUnknown() {
	xxx_messageInfo_AggregateIPEntry.DiscardUnknown(m)
}

var xxx_messageInfo_AggregateIPEntry proto.InternalMessageInfo

func (m *AggregateIPEntry) GetIp() string {
	if m != nil {
		return m.Ip
	}
	return ""
}

func (m *AggregateIPEntry) GetCount() int64 {
	if m != nil {
		return m.Count
	}
	return 0
}

type AggregateTypeEntry struct {
	ByIp                 []*AggregateIPEntry `protobuf:"bytes,1,rep,name=by_ip,json=byIp,proto3" json:"by_ip,omitempty"`
	Type                 string              `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Details              string              `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

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

func (m *AggregateTypeEntry) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_AggregateTypeEntry.Unmarshal(m, b)
}
func (m *AggregateTypeEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_AggregateTypeEntry.Marshal(b, m, deterministic)
}
func (m *AggregateTypeEntry) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AggregateTypeEntry.Merge(m, src)
}
func (m *AggregateTypeEntry) XXX_Size() int {
	return xxx_messageInfo_AggregateTypeEntry.Size(m)
}
func (m *AggregateTypeEntry) XXX_DiscardUnknown() {
	xxx_messageInfo_AggregateTypeEntry.DiscardUnknown(m)
}

var xxx_messageInfo_AggregateTypeEntry proto.InternalMessageInfo

func (m *AggregateTypeEntry) GetByIp() []*AggregateIPEntry {
	if m != nil {
		return m.ByIp
	}
	return nil
}

func (m *AggregateTypeEntry) GetType() string {
	if m != nil {
		return m.Type
	}
	return ""
}

func (m *AggregateTypeEntry) GetDetails() string {
	if m != nil {
		return m.Details
	}
	return ""
}

type Aggregate struct {
	ByType               []*AggregateTypeEntry `protobuf:"bytes,1,rep,name=by_type,json=byType,proto3" json:"by_type,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

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

func (m *Aggregate) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Aggregate.Unmarshal(m, b)
}
func (m *Aggregate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Aggregate.Marshal(b, m, deterministic)
}
func (m *Aggregate) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Aggregate.Merge(m, src)
}
func (m *Aggregate) XXX_Size() int {
	return xxx_messageInfo_Aggregate.Size(m)
}
func (m *Aggregate) XXX_DiscardUnknown() {
	xxx_messageInfo_Aggregate.DiscardUnknown(m)
}

var xxx_messageInfo_Aggregate proto.InternalMessageInfo

func (m *Aggregate) GetByType() []*AggregateTypeEntry {
	if m != nil {
		return m.ByType
	}
	return nil
}

type SubmitRequest struct {
	Events               []*Event     `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	Aggregates           []*Aggregate `protobuf:"bytes,2,rep,name=aggregates,proto3" json:"aggregates,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

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

func (m *SubmitRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_SubmitRequest.Unmarshal(m, b)
}
func (m *SubmitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_SubmitRequest.Marshal(b, m, deterministic)
}
func (m *SubmitRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_SubmitRequest.Merge(m, src)
}
func (m *SubmitRequest) XXX_Size() int {
	return xxx_messageInfo_SubmitRequest.Size(m)
}
func (m *SubmitRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_SubmitRequest.DiscardUnknown(m)
}

var xxx_messageInfo_SubmitRequest proto.InternalMessageInfo

func (m *SubmitRequest) GetEvents() []*Event {
	if m != nil {
		return m.Events
	}
	return nil
}

func (m *SubmitRequest) GetAggregates() []*Aggregate {
	if m != nil {
		return m.Aggregates
	}
	return nil
}

type GetScoreRequest struct {
	Ip                   string   `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *GetScoreRequest) Reset()         { *m = GetScoreRequest{} }
func (m *GetScoreRequest) String() string { return proto.CompactTextString(m) }
func (*GetScoreRequest) ProtoMessage()    {}
func (*GetScoreRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_cda7d01e071c05fe, []int{5}
}

func (m *GetScoreRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_GetScoreRequest.Unmarshal(m, b)
}
func (m *GetScoreRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_GetScoreRequest.Marshal(b, m, deterministic)
}
func (m *GetScoreRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GetScoreRequest.Merge(m, src)
}
func (m *GetScoreRequest) XXX_Size() int {
	return xxx_messageInfo_GetScoreRequest.Size(m)
}
func (m *GetScoreRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_GetScoreRequest.DiscardUnknown(m)
}

var xxx_messageInfo_GetScoreRequest proto.InternalMessageInfo

func (m *GetScoreRequest) GetIp() string {
	if m != nil {
		return m.Ip
	}
	return ""
}

type GetScoreResponse struct {
	Ip                   string   `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	Score                float32  `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *GetScoreResponse) Reset()         { *m = GetScoreResponse{} }
func (m *GetScoreResponse) String() string { return proto.CompactTextString(m) }
func (*GetScoreResponse) ProtoMessage()    {}
func (*GetScoreResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_cda7d01e071c05fe, []int{6}
}

func (m *GetScoreResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_GetScoreResponse.Unmarshal(m, b)
}
func (m *GetScoreResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_GetScoreResponse.Marshal(b, m, deterministic)
}
func (m *GetScoreResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GetScoreResponse.Merge(m, src)
}
func (m *GetScoreResponse) XXX_Size() int {
	return xxx_messageInfo_GetScoreResponse.Size(m)
}
func (m *GetScoreResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_GetScoreResponse.DiscardUnknown(m)
}

var xxx_messageInfo_GetScoreResponse proto.InternalMessageInfo

func (m *GetScoreResponse) GetIp() string {
	if m != nil {
		return m.Ip
	}
	return ""
}

func (m *GetScoreResponse) GetScore() float32 {
	if m != nil {
		return m.Score
	}
	return 0
}

func init() {
	proto.RegisterType((*Event)(nil), "iprep.Event")
	proto.RegisterType((*AggregateIPEntry)(nil), "iprep.AggregateIPEntry")
	proto.RegisterType((*AggregateTypeEntry)(nil), "iprep.AggregateTypeEntry")
	proto.RegisterType((*Aggregate)(nil), "iprep.Aggregate")
	proto.RegisterType((*SubmitRequest)(nil), "iprep.SubmitRequest")
	proto.RegisterType((*GetScoreRequest)(nil), "iprep.GetScoreRequest")
	proto.RegisterType((*GetScoreResponse)(nil), "iprep.GetScoreResponse")
}

func init() { proto.RegisterFile("iprep.proto", fileDescriptor_cda7d01e071c05fe) }

var fileDescriptor_cda7d01e071c05fe = []byte{
	// 361 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0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, 0x3d, 0x7d,
	0x6d, 0x3d, 0x83, 0xb5, 0x7c, 0xb9, 0xfc, 0xe3, 0x05, 0xee, 0x3d, 0x74, 0x2a, 0x1f, 0x9c, 0x41,
	0xdb, 0x97, 0x6b, 0xa5, 0xd6, 0x51, 0xe7, 0xf5, 0xa8, 0x6a, 0x29, 0x66, 0xfb, 0x32, 0x07, 0x6e,
	0x00, 0x27, 0xab, 0xcc, 0xdf, 0x87, 0x82, 0xd1, 0x7b, 0x46, 0xa9, 0xc0, 0x2b, 0xb0, 0x29, 0xaf,
	0x36, 0x2d, 0x3c, 0xfe, 0x17, 0x1e, 0xaa, 0x6f, 0x56, 0xfc, 0xc3, 0x1b, 0x80, 0x4d, 0x69, 0x9a,
	0x3a, 0xa6, 0x62, 0xf6, 0xea, 0x69, 0xec, 0x80, 0xe3, 0x5e, 0xc2, 0xd9, 0x23, 0x89, 0xd5, 0x36,
	0x4e, 0xa8, 0x8c, 0xaa, 0x95, 0x9a, 0x17, 0xff, 0x4d, 0x49, 0x79, 0x1c, 0xa5, 0xf4, 0x5b, 0xf1,
	0x69, 0x4e, 0x50, 0xfd, 0x98, 0x4c, 0x83, 0xd9, 0xa7, 0x01, 0xd6, 0x92, 0x33, 0xe2, 0x38, 0x07,
	0x5b, 0xdf, 0x83, 0xfd, 0x62, 0x9d, 0x1f, 0xe7, 0x8d, 0x06, 0x9e, 0x7e, 0x57, 0x5e, 0xf9, 0xae,
	0xbc, 0x45, 0xfe, 0xae, 0xdc, 0x06, 0xde, 0xc1, 0xbf, 0x32, 0x1d, 0x07, 0x85, 0xb6, 0xb6, 0xf1,
	0x68, 0x78, 0x34, 0xd7, 0x6b, 0xba, 0x0d, 0xdf, 0x56, 0x86, 0xb7, 0x5f, 0x01, 0x00, 0x00, 0xff,
	0xff, 0xbd, 0x0c, 0x4d, 0x84, 0xcc, 0x02, 0x00, 0x00,
}

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

// IpRepClient is the client API for IpRep service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type IpRepClient interface {
	Submit(ctx context.Context, in *SubmitRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	GetScore(ctx context.Context, in *GetScoreRequest, opts ...grpc.CallOption) (*GetScoreResponse, error)
}

type ipRepClient struct {
	cc *grpc.ClientConn
}

func NewIpRepClient(cc *grpc.ClientConn) IpRepClient {
	return &ipRepClient{cc}
}

func (c *ipRepClient) Submit(ctx context.Context, in *SubmitRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
	out := new(empty.Empty)
	err := c.cc.Invoke(ctx, "/iprep.IpRep/Submit", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *ipRepClient) GetScore(ctx context.Context, in *GetScoreRequest, opts ...grpc.CallOption) (*GetScoreResponse, error) {
	out := new(GetScoreResponse)
	err := c.cc.Invoke(ctx, "/iprep.IpRep/GetScore", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// IpRepServer is the server API for IpRep service.
type IpRepServer interface {
	Submit(context.Context, *SubmitRequest) (*empty.Empty, error)
	GetScore(context.Context, *GetScoreRequest) (*GetScoreResponse, error)
}

func RegisterIpRepServer(s *grpc.Server, srv IpRepServer) {
	s.RegisterService(&_IpRep_serviceDesc, srv)
}

func _IpRep_Submit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SubmitRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IpRepServer).Submit(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/iprep.IpRep/Submit",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IpRepServer).Submit(ctx, req.(*SubmitRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _IpRep_GetScore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetScoreRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(IpRepServer).GetScore(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/iprep.IpRep/GetScore",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(IpRepServer).GetScore(ctx, req.(*GetScoreRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _IpRep_serviceDesc = grpc.ServiceDesc{
	ServiceName: "iprep.IpRep",
	HandlerType: (*IpRepServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Submit",
			Handler:    _IpRep_Submit_Handler,
		},
		{
			MethodName: "GetScore",
			Handler:    _IpRep_GetScore_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "iprep.proto",
}