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

package celerx_fee_interface

import (
	context "context"
	fmt "fmt"
	entity "github.com/celer-network/goCeler/entity"
	proto "github.com/golang/protobuf/proto"
	any "github.com/golang/protobuf/ptypes/any"
	empty "github.com/golang/protobuf/ptypes/empty"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	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

// --------------------------- OSP-facing service -----------------------------
// Next Tag: 2
type NewHopStreamEvent struct {
	Addr                 string   `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_NewHopStreamEvent proto.InternalMessageInfo

func (m *NewHopStreamEvent) GetAddr() string {
	if m != nil {
		return m.Addr
	}
	return ""
}

// FeeEvent to be renamed to PayEvent to be use-case neutral and to be moved to proto repo.
// This message is now the API osp published for pay event.
// Next Tag: 6
type FeeEvent struct {
	Pay                  *entity.ConditionalPay `protobuf:"bytes,1,opt,name=pay,proto3" json:"pay,omitempty"`
	Note                 *any.Any               `protobuf:"bytes,2,opt,name=note,proto3" json:"note,omitempty"` // Deprecated: Do not use.
	SendSuccess          bool                   `protobuf:"varint,3,opt,name=send_success,json=sendSuccess,proto3" json:"send_success,omitempty"`
	PayId                []byte                 `protobuf:"bytes,4,opt,name=pay_id,json=payId,proto3" json:"pay_id,omitempty"`
	NotePbString         string                 `protobuf:"bytes,5,opt,name=note_pb_string,json=notePbString,proto3" json:"note_pb_string,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

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

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

var xxx_messageInfo_FeeEvent proto.InternalMessageInfo

func (m *FeeEvent) GetPay() *entity.ConditionalPay {
	if m != nil {
		return m.Pay
	}
	return nil
}

// Deprecated: Do not use.
func (m *FeeEvent) GetNote() *any.Any {
	if m != nil {
		return m.Note
	}
	return nil
}

func (m *FeeEvent) GetSendSuccess() bool {
	if m != nil {
		return m.SendSuccess
	}
	return false
}

func (m *FeeEvent) GetPayId() []byte {
	if m != nil {
		return m.PayId
	}
	return nil
}

func (m *FeeEvent) GetNotePbString() string {
	if m != nil {
		return m.NotePbString
	}
	return ""
}

func init() {
	proto.RegisterType((*NewHopStreamEvent)(nil), "celerx.fee.interface.NewHopStreamEvent")
	proto.RegisterType((*FeeEvent)(nil), "celerx.fee.interface.FeeEvent")
}

func init() { proto.RegisterFile("fee.proto", fileDescriptor_fa8e5264b1207167) }

var fileDescriptor_fa8e5264b1207167 = []byte{
	// 450 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0x41, 0x6e, 0xd3, 0x40,
	0x14, 0x86, 0xe5, 0x34, 0xad, 0xda, 0x69, 0x00, 0x75, 0xd4, 0x14, 0x13, 0x0a, 0x0a, 0x06, 0xa9,
	0x51, 0x81, 0xb1, 0x54, 0x76, 0xdd, 0x41, 0xd5, 0x0a, 0x36, 0xa1, 0xb2, 0x0f, 0x10, 0x8d, 0xed,
	0xe7, 0x30, 0x22, 0x79, 0x33, 0x9a, 0x79, 0x69, 0xf0, 0x96, 0x2b, 0x70, 0x23, 0xae, 0xc0, 0x15,
	0x58, 0x72, 0x08, 0x34, 0xe3, 0xa4, 0xaa, 0x68, 0xd9, 0x74, 0x67, 0xfd, 0xff, 0xff, 0xfe, 0xef,
	0xf9, 0x0d, 0xdb, 0xa9, 0x01, 0x84, 0xb1, 0x9a, 0x34, 0xdf, 0x2f, 0x61, 0x06, 0xf6, 0x9b, 0xf0,
	0x8a, 0x42, 0x02, 0x5b, 0xcb, 0x12, 0x06, 0xaf, 0xa7, 0x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xb1, 0x87,
	0xbe, 0x61, 0x62, 0x8a, 0x89, 0x23, 0xab, 0x70, 0x1a, 0x6f, 0x86, 0xe5, 0x7b, 0x5e, 0xbd, 0x2c,
	0xf2, 0xa0, 0x9d, 0xfc, 0xe9, 0xb0, 0x07, 0x9f, 0x9d, 0xc9, 0x17, 0x85, 0x2b, 0xad, 0x2a, 0xc0,
	0x72, 0x62, 0x8f, 0xc6, 0x9a, 0x54, 0xdd, 0x8c, 0x61, 0xd9, 0x9e, 0x80, 0x1f, 0x89, 0xbb, 0x1e,
	0x4b, 0xdc, 0x3a, 0xd3, 0xe0, 0xe0, 0xd6, 0xdf, 0x9c, 0xfb, 0xbb, 0x27, 0xc3, 0xef, 0xbf, 0x7e,
	0xff, 0xe8, 0x0c, 0x92, 0x7e, 0x8a, 0xa1, 0x3a, 0xd5, 0xce, 0xa4, 0x08, 0x4b, 0x17, 0x66, 0x4f,
	0xa3, 0x63, 0xae, 0xd9, 0x5e, 0x4b, 0xbd, 0x00, 0xc8, 0xa0, 0x04, 0x75, 0x05, 0x15, 0x7f, 0x7e,
	0x37, 0x77, 0x7d, 0xf4, 0xff, 0xe2, 0x92, 0x80, 0x3b, 0x4c, 0x1e, 0xdf, 0xc4, 0xd5, 0x00, 0x76,
	0x55, 0xec, 0x81, 0xc4, 0xfa, 0xd7, 0xc0, 0x1c, 0xb0, 0x3a, 0xd3, 0x73, 0x33, 0x03, 0x82, 0x7b,
	0x43, 0x5f, 0x06, 0xe8, 0xb3, 0x24, 0xbe, 0x09, 0xf5, 0xef, 0x54, 0xae, 0x9a, 0x4f, 0xa3, 0xe3,
	0x62, 0x2b, 0x0c, 0xbd, 0xfb, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xd3, 0xdc, 0x52, 0x09, 0x03,
	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

// OspSubscriberClient is the client API for OspSubscriber service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OspSubscriberClient interface {
	NotifyNewStream(ctx context.Context, in *NewHopStreamEvent, opts ...grpc.CallOption) (*empty.Empty, error)
	NotifyFeeReceived(ctx context.Context, in *FeeEvent, opts ...grpc.CallOption) (*empty.Empty, error)
	NotifyFeeSendComplete(ctx context.Context, in *FeeEvent, opts ...grpc.CallOption) (*empty.Empty, error)
}

type ospSubscriberClient struct {
	cc *grpc.ClientConn
}

func NewOspSubscriberClient(cc *grpc.ClientConn) OspSubscriberClient {
	return &ospSubscriberClient{cc}
}

func (c *ospSubscriberClient) NotifyNewStream(ctx context.Context, in *NewHopStreamEvent, opts ...grpc.CallOption) (*empty.Empty, error) {
	out := new(empty.Empty)
	err := c.cc.Invoke(ctx, "/celerx.fee.interface.OspSubscriber/NotifyNewStream", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *ospSubscriberClient) NotifyFeeReceived(ctx context.Context, in *FeeEvent, opts ...grpc.CallOption) (*empty.Empty, error) {
	out := new(empty.Empty)
	err := c.cc.Invoke(ctx, "/celerx.fee.interface.OspSubscriber/NotifyFeeReceived", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *ospSubscriberClient) NotifyFeeSendComplete(ctx context.Context, in *FeeEvent, opts ...grpc.CallOption) (*empty.Empty, error) {
	out := new(empty.Empty)
	err := c.cc.Invoke(ctx, "/celerx.fee.interface.OspSubscriber/NotifyFeeSendComplete", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// OspSubscriberServer is the server API for OspSubscriber service.
type OspSubscriberServer interface {
	NotifyNewStream(context.Context, *NewHopStreamEvent) (*empty.Empty, error)
	NotifyFeeReceived(context.Context, *FeeEvent) (*empty.Empty, error)
	NotifyFeeSendComplete(context.Context, *FeeEvent) (*empty.Empty, error)
}

func RegisterOspSubscriberServer(s *grpc.Server, srv OspSubscriberServer) {
	s.RegisterService(&_OspSubscriber_serviceDesc, srv)
}

func _OspSubscriber_NotifyNewStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(NewHopStreamEvent)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OspSubscriberServer).NotifyNewStream(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/celerx.fee.interface.OspSubscriber/NotifyNewStream",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OspSubscriberServer).NotifyNewStream(ctx, req.(*NewHopStreamEvent))
	}
	return interceptor(ctx, in, info, handler)
}

func _OspSubscriber_NotifyFeeReceived_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FeeEvent)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OspSubscriberServer).NotifyFeeReceived(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/celerx.fee.interface.OspSubscriber/NotifyFeeReceived",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OspSubscriberServer).NotifyFeeReceived(ctx, req.(*FeeEvent))
	}
	return interceptor(ctx, in, info, handler)
}

func _OspSubscriber_NotifyFeeSendComplete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FeeEvent)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OspSubscriberServer).NotifyFeeSendComplete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/celerx.fee.interface.OspSubscriber/NotifyFeeSendComplete",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OspSubscriberServer).NotifyFeeSendComplete(ctx, req.(*FeeEvent))
	}
	return interceptor(ctx, in, info, handler)
}

var _OspSubscriber_serviceDesc = grpc.ServiceDesc{
	ServiceName: "celerx.fee.interface.OspSubscriber",
	HandlerType: (*OspSubscriberServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NotifyNewStream",
			Handler:    _OspSubscriber_NotifyNewStream_Handler,
		},
		{
			MethodName: "NotifyFeeReceived",
			Handler:    _OspSubscriber_NotifyFeeReceived_Handler,
		},
		{
			MethodName: "NotifyFeeSendComplete",
			Handler:    _OspSubscriber_NotifyFeeSendComplete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "fee.proto",
}
