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

package strest

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 ResponseSpec struct {
	// how many bytes we expect in return.
	Length int32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"`
	// how long (in milliseconds) we want the response to wait.
	Latency              int64    `protobuf:"varint,2,opt,name=latency,proto3" json:"latency,omitempty"`
	ErrorRate            float32  `protobuf:"fixed32,3,opt,name=errorRate,proto3" json:"errorRate,omitempty"`
	Data                 []byte   `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *ResponseSpec) Reset()         { *m = ResponseSpec{} }
func (m *ResponseSpec) String() string { return proto.CompactTextString(m) }
func (*ResponseSpec) ProtoMessage()    {}
func (*ResponseSpec) Descriptor() ([]byte, []int) {
	return fileDescriptor_strest_5318b1caa40e457e, []int{0}
}
func (m *ResponseSpec) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ResponseSpec.Unmarshal(m, b)
}
func (m *ResponseSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ResponseSpec.Marshal(b, m, deterministic)
}
func (dst *ResponseSpec) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ResponseSpec.Merge(dst, src)
}
func (m *ResponseSpec) XXX_Size() int {
	return xxx_messageInfo_ResponseSpec.Size(m)
}
func (m *ResponseSpec) XXX_DiscardUnknown() {
	xxx_messageInfo_ResponseSpec.DiscardUnknown(m)
}

var xxx_messageInfo_ResponseSpec proto.InternalMessageInfo

func (m *ResponseSpec) GetLength() int32 {
	if m != nil {
		return m.Length
	}
	return 0
}

func (m *ResponseSpec) GetLatency() int64 {
	if m != nil {
		return m.Latency
	}
	return 0
}

func (m *ResponseSpec) GetErrorRate() float32 {
	if m != nil {
		return m.ErrorRate
	}
	return 0
}

func (m *ResponseSpec) GetData() []byte {
	if m != nil {
		return m.Data
	}
	return nil
}

type StreamingResponseSpec struct {
	// how many responses to send.
	Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// distributions for latency and body size
	LatencyPercentiles   map[int32]int64 `protobuf:"bytes,2,rep,name=latencyPercentiles,proto3" json:"latencyPercentiles,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
	LengthPercentiles    map[int32]int64 `protobuf:"bytes,3,rep,name=lengthPercentiles,proto3" json:"lengthPercentiles,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
	ErrorRate            float32         `protobuf:"fixed32,4,opt,name=errorRate,proto3" json:"errorRate,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (m *StreamingResponseSpec) Reset()         { *m = StreamingResponseSpec{} }
func (m *StreamingResponseSpec) String() string { return proto.CompactTextString(m) }
func (*StreamingResponseSpec) ProtoMessage()    {}
func (*StreamingResponseSpec) Descriptor() ([]byte, []int) {
	return fileDescriptor_strest_5318b1caa40e457e, []int{1}
}
func (m *StreamingResponseSpec) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_StreamingResponseSpec.Unmarshal(m, b)
}
func (m *StreamingResponseSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_StreamingResponseSpec.Marshal(b, m, deterministic)
}
func (dst *StreamingResponseSpec) XXX_Merge(src proto.Message) {
	xxx_messageInfo_StreamingResponseSpec.Merge(dst, src)
}
func (m *StreamingResponseSpec) XXX_Size() int {
	return xxx_messageInfo_StreamingResponseSpec.Size(m)
}
func (m *StreamingResponseSpec) XXX_DiscardUnknown() {
	xxx_messageInfo_StreamingResponseSpec.DiscardUnknown(m)
}

var xxx_messageInfo_StreamingResponseSpec proto.InternalMessageInfo

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

func (m *StreamingResponseSpec) GetLatencyPercentiles() map[int32]int64 {
	if m != nil {
		return m.LatencyPercentiles
	}
	return nil
}

func (m *StreamingResponseSpec) GetLengthPercentiles() map[int32]int64 {
	if m != nil {
		return m.LengthPercentiles
	}
	return nil
}

func (m *StreamingResponseSpec) GetErrorRate() float32 {
	if m != nil {
		return m.ErrorRate
	}
	return 0
}

// The response message containing the greetings
type ResponseReply struct {
	Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	// Time last frame sent (0 if not a streaming response)
	LastFrameSent int64 `protobuf:"varint,2,opt,name=lastFrameSent,proto3" json:"lastFrameSent,omitempty"`
	// Server time of current frame sent.
	CurrentFrameSent     int64    `protobuf:"varint,3,opt,name=currentFrameSent,proto3" json:"currentFrameSent,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *ResponseReply) Reset()         { *m = ResponseReply{} }
func (m *ResponseReply) String() string { return proto.CompactTextString(m) }
func (*ResponseReply) ProtoMessage()    {}
func (*ResponseReply) Descriptor() ([]byte, []int) {
	return fileDescriptor_strest_5318b1caa40e457e, []int{2}
}
func (m *ResponseReply) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ResponseReply.Unmarshal(m, b)
}
func (m *ResponseReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ResponseReply.Marshal(b, m, deterministic)
}
func (dst *ResponseReply) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ResponseReply.Merge(dst, src)
}
func (m *ResponseReply) XXX_Size() int {
	return xxx_messageInfo_ResponseReply.Size(m)
}
func (m *ResponseReply) XXX_DiscardUnknown() {
	xxx_messageInfo_ResponseReply.DiscardUnknown(m)
}

var xxx_messageInfo_ResponseReply proto.InternalMessageInfo

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

func (m *ResponseReply) GetLastFrameSent() int64 {
	if m != nil {
		return m.LastFrameSent
	}
	return 0
}

func (m *ResponseReply) GetCurrentFrameSent() int64 {
	if m != nil {
		return m.CurrentFrameSent
	}
	return 0
}

func init() {
	proto.RegisterType((*ResponseSpec)(nil), "strest.ResponseSpec")
	proto.RegisterType((*StreamingResponseSpec)(nil), "strest.StreamingResponseSpec")
	proto.RegisterMapType((map[int32]int64)(nil), "strest.StreamingResponseSpec.LatencyPercentilesEntry")
	proto.RegisterMapType((map[int32]int64)(nil), "strest.StreamingResponseSpec.LengthPercentilesEntry")
	proto.RegisterType((*ResponseReply)(nil), "strest.ResponseReply")
}

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

// ResponderClient is the client API for Responder service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ResponderClient interface {
	// Sends a greeting
	Get(ctx context.Context, in *ResponseSpec, opts ...grpc.CallOption) (*ResponseReply, error)
	StreamingGet(ctx context.Context, opts ...grpc.CallOption) (Responder_StreamingGetClient, error)
}

type responderClient struct {
	cc *grpc.ClientConn
}

func NewResponderClient(cc *grpc.ClientConn) ResponderClient {
	return &responderClient{cc}
}

func (c *responderClient) Get(ctx context.Context, in *ResponseSpec, opts ...grpc.CallOption) (*ResponseReply, error) {
	out := new(ResponseReply)
	err := c.cc.Invoke(ctx, "/strest.Responder/Get", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *responderClient) StreamingGet(ctx context.Context, opts ...grpc.CallOption) (Responder_StreamingGetClient, error) {
	stream, err := c.cc.NewStream(ctx, &_Responder_serviceDesc.Streams[0], "/strest.Responder/StreamingGet", opts...)
	if err != nil {
		return nil, err
	}
	x := &responderStreamingGetClient{stream}
	return x, nil
}

type Responder_StreamingGetClient interface {
	Send(*StreamingResponseSpec) error
	Recv() (*ResponseReply, error)
	grpc.ClientStream
}

type responderStreamingGetClient struct {
	grpc.ClientStream
}

func (x *responderStreamingGetClient) Send(m *StreamingResponseSpec) error {
	return x.ClientStream.SendMsg(m)
}

func (x *responderStreamingGetClient) Recv() (*ResponseReply, error) {
	m := new(ResponseReply)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// ResponderServer is the server API for Responder service.
type ResponderServer interface {
	// Sends a greeting
	Get(context.Context, *ResponseSpec) (*ResponseReply, error)
	StreamingGet(Responder_StreamingGetServer) error
}

func RegisterResponderServer(s *grpc.Server, srv ResponderServer) {
	s.RegisterService(&_Responder_serviceDesc, srv)
}

func _Responder_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ResponseSpec)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResponderServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/strest.Responder/Get",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResponderServer).Get(ctx, req.(*ResponseSpec))
	}
	return interceptor(ctx, in, info, handler)
}

func _Responder_StreamingGet_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(ResponderServer).StreamingGet(&responderStreamingGetServer{stream})
}

type Responder_StreamingGetServer interface {
	Send(*ResponseReply) error
	Recv() (*StreamingResponseSpec, error)
	grpc.ServerStream
}

type responderStreamingGetServer struct {
	grpc.ServerStream
}

func (x *responderStreamingGetServer) Send(m *ResponseReply) error {
	return x.ServerStream.SendMsg(m)
}

func (x *responderStreamingGetServer) Recv() (*StreamingResponseSpec, error) {
	m := new(StreamingResponseSpec)
	if err := x.ServerStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

var _Responder_serviceDesc = grpc.ServiceDesc{
	ServiceName: "strest.Responder",
	HandlerType: (*ResponderServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _Responder_Get_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamingGet",
			Handler:       _Responder_StreamingGet_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "strest.proto",
}

func init() { proto.RegisterFile("strest.proto", fileDescriptor_strest_5318b1caa40e457e) }

var fileDescriptor_strest_5318b1caa40e457e = []byte{
	// 367 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xdd, 0x4a, 0xf3, 0x40,
	0x10, 0xfd, 0x36, 0xdb, 0xf6, 0xa3, 0x63, 0x0a, 0x75, 0x68, 0x6b, 0x28, 0x0a, 0x21, 0x78, 0x11,
	0xbc, 0x28, 0x52, 0x2b, 0x88, 0xd7, 0x56, 0x41, 0xbc, 0x90, 0xed, 0x13, 0x6c, 0xd3, 0xa1, 0x16,
	0xd3, 0x4d, 0xd8, 0x6c, 0x84, 0x3c, 0x84, 0x4f, 0xe1, 0x8b, 0x4a, 0x7e, 0xaa, 0xfd, 0x55, 0xbc,
	0x9b, 0x33, 0xec, 0x9c, 0x33, 0x73, 0x0e, 0x0b, 0x76, 0x62, 0x34, 0x25, 0x66, 0x10, 0xeb, 0xc8,
	0x44, 0xd8, 0x28, 0x91, 0xa7, 0xc1, 0x16, 0x94, 0xc4, 0x91, 0x4a, 0x68, 0x12, 0x53, 0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