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

package ping

import (
	context "context"
	fmt "fmt"
	math "math"

	proto "github.com/golang/protobuf/proto"
	timestamp "github.com/golang/protobuf/ptypes/timestamp"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// 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 Request struct {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_Request proto.InternalMessageInfo

func (m *Request) GetMessage() string {
	if m != nil {
		return m.Message
	}
	return ""
}

type Pong struct {
	Index                int32                `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Message              string               `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	ReceivedOn           *timestamp.Timestamp `protobuf:"bytes,3,opt,name=received_on,json=receivedOn,proto3" json:"received_on,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

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

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

var xxx_messageInfo_Pong proto.InternalMessageInfo

func (m *Pong) GetIndex() int32 {
	if m != nil {
		return m.Index
	}
	return 0
}

func (m *Pong) GetMessage() string {
	if m != nil {
		return m.Message
	}
	return ""
}

func (m *Pong) GetReceivedOn() *timestamp.Timestamp {
	if m != nil {
		return m.ReceivedOn
	}
	return nil
}

type Response struct {
	Pong                 *Pong    `protobuf:"bytes,1,opt,name=pong,proto3" json:"pong,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_Response proto.InternalMessageInfo

func (m *Response) GetPong() *Pong {
	if m != nil {
		return m.Pong
	}
	return nil
}

func init() {
	proto.RegisterType((*Request)(nil), "ping.Request")
	proto.RegisterType((*Pong)(nil), "ping.Pong")
	proto.RegisterType((*Response)(nil), "ping.Response")
}

func init() { proto.RegisterFile("message.proto", fileDescriptor_33c57e4bae7b9afd) }

var fileDescriptor_33c57e4bae7b9afd = []byte{
	// 243 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0xb1, 0x4e, 0xc3, 0x30,
	0x10, 0x86, 0x09, 0xa4, 0x14, 0x2e, 0x94, 0xc1, 0x62, 0x88, 0x32, 0x40, 0x15, 0x06, 0x2a, 0x06,
	0x47, 0x0a, 0x23, 0x0f, 0x41, 0xe5, 0xc2, 0x8c, 0xd2, 0xe6, 0xb0, 0x2c, 0x91, 0xb3, 0xc9, 0xb9,
	0x15, 0x8f, 0x8f, 0x62, 0xd7, 0x12, 0x4c, 0x8c, 0xff, 0xf9, 0xfb, 0xcf, 0xdf, 0xc1, 0x62, 0x40,
	0xe6, 0x4e, 0xa3, 0x74, 0xa3, 0xf5, 0x56, 0xe4, 0xce, 0x90, 0xae, 0xee, 0xb4, 0xb5, 0xfa, 0x13,
	0x9b, 0x30, 0xdb, 0xee, 0x3f, 0x1a, 0x6f, 0x06, 0x64, 0xdf, 0x0d, 0x2e, 0x62, 0xf5, 0x3d, 0xcc,
	0x15, 0x7e, 0xed, 0x91, 0xbd, 0x28, 0x61, 0x7e, 0x5c, 0x51, 0x66, 0xcb, 0x6c, 0x75, 0xa9, 0x52,
	0xac, 0x19, 0xf2, 0xb5, 0x25, 0x2d, 0x6e, 0x60, 0x66, 0xa8, 0xc7, 0xef, 0xf0, 0x3e, 0x53, 0x31,
	0xfc, 0xee, 0x9d, 0xfe, 0xe9, 0x89, 0x67, 0x28, 0x46, 0xdc, 0xa1, 0x39, 0x60, 0xff, 0x6e, 0xa9,
	0x3c, 0x5b, 0x66, 0xab, 0xa2, 0xad, 0x64, 0x74, 0x92, 0xc9, 0x49, 0xbe, 0x26, 0x27, 0x05, 0x09,
	0x7f, 0xa1, 0xfa, 0x11, 0x2e, 0x14, 0xb2, 0xb3, 0xc4, 0x28, 0x6e, 0x21, 0x77, 0x96, 0x74, 0xf8,
	0xb7, 0x68, 0x41, 0x4e, 0xb7, 0xc9, 0x49, 0x49, 0x85, 0x79, 0xab, 0xa1, 0x58, 0x1b, 0xd2, 0x1b,
	0x1c, 0x0f, 0x66, 0x87, 0xe2, 0x01, 0xf2, 0x0d, 0x52, 0x2f, 0x16, 0x11, 0x3c, 0x1e, 0x58, 0x5d,
	0xa7, 0x18, 0xb7, 0xd6, 0x27, 0xa2, 0x81, 0xab, 0x09, 0x7c, 0x73, 0xec, 0x47, 0xec, 0x86, 0x7f,
	0x0b, 0xdb, 0xf3, 0x20, 0xfd, 0xf4, 0x13, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x76, 0x30, 0x5b, 0x6d,
	0x01, 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

// PingServiceClient is the client API for PingService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type PingServiceClient interface {
	Send(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	SendUpstream(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

type pingServiceClient struct {
	cc *grpc.ClientConn
}

func NewPingServiceClient(cc *grpc.ClientConn) PingServiceClient {
	return &pingServiceClient{cc}
}

func (c *pingServiceClient) Send(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
	out := new(Response)
	err := c.cc.Invoke(ctx, "/ping.PingService/Send", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *pingServiceClient) SendUpstream(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
	out := new(Response)
	err := c.cc.Invoke(ctx, "/ping.PingService/SendUpstream", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// PingServiceServer is the server API for PingService service.
type PingServiceServer interface {
	Send(context.Context, *Request) (*Response, error)
	SendUpstream(context.Context, *Request) (*Response, error)
}

// UnimplementedPingServiceServer can be embedded to have forward compatible implementations.
type UnimplementedPingServiceServer struct {
}

func (*UnimplementedPingServiceServer) Send(ctx context.Context, req *Request) (*Response, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Send not implemented")
}
func (*UnimplementedPingServiceServer) SendUpstream(ctx context.Context, req *Request) (*Response, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SendUpstream not implemented")
}

func RegisterPingServiceServer(s *grpc.Server, srv PingServiceServer) {
	s.RegisterService(&_PingService_serviceDesc, srv)
}

func _PingService_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Request)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PingServiceServer).Send(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ping.PingService/Send",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PingServiceServer).Send(ctx, req.(*Request))
	}
	return interceptor(ctx, in, info, handler)
}

func _PingService_SendUpstream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Request)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PingServiceServer).SendUpstream(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ping.PingService/SendUpstream",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PingServiceServer).SendUpstream(ctx, req.(*Request))
	}
	return interceptor(ctx, in, info, handler)
}

var _PingService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "ping.PingService",
	HandlerType: (*PingServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Send",
			Handler:    _PingService_Send_Handler,
		},
		{
			MethodName: "SendUpstream",
			Handler:    _PingService_SendUpstream_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "message.proto",
}
