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

package echo

import (
	context "context"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	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

// Request message type for simple echo.
type EchoRequest struct {
	StringToEcho         string   `protobuf:"bytes,1,opt,name=string_to_echo,json=stringToEcho,proto3" json:"string_to_echo,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_EchoRequest proto.InternalMessageInfo

func (m *EchoRequest) GetStringToEcho() string {
	if m != nil {
		return m.StringToEcho
	}
	return ""
}

// Response message type for simple echo.
type EchoResponse struct {
	EchoedString         string   `protobuf:"bytes,1,opt,name=echoed_string,json=echoedString,proto3" json:"echoed_string,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_EchoResponse proto.InternalMessageInfo

func (m *EchoResponse) GetEchoedString() string {
	if m != nil {
		return m.EchoedString
	}
	return ""
}

type EchoWithResponseSizeRequest struct {
	EchoMsg              string   `protobuf:"bytes,1,opt,name=echo_msg,json=echoMsg,proto3" json:"echo_msg,omitempty"`
	ResponseSize         int32    `protobuf:"varint,2,opt,name=response_size,json=responseSize,proto3" json:"response_size,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_EchoWithResponseSizeRequest proto.InternalMessageInfo

func (m *EchoWithResponseSizeRequest) GetEchoMsg() string {
	if m != nil {
		return m.EchoMsg
	}
	return ""
}

func (m *EchoWithResponseSizeRequest) GetResponseSize() int32 {
	if m != nil {
		return m.ResponseSize
	}
	return 0
}

type StreamEchoRequest struct {
	MessageCount         int32    `protobuf:"varint,1,opt,name=message_count,json=messageCount,proto3" json:"message_count,omitempty"`
	MessageInterval      int32    `protobuf:"varint,2,opt,name=message_interval,json=messageInterval,proto3" json:"message_interval,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_StreamEchoRequest proto.InternalMessageInfo

func (m *StreamEchoRequest) GetMessageCount() int32 {
	if m != nil {
		return m.MessageCount
	}
	return 0
}

func (m *StreamEchoRequest) GetMessageInterval() int32 {
	if m != nil {
		return m.MessageInterval
	}
	return 0
}

func init() {
	proto.RegisterType((*EchoRequest)(nil), "e2e_service.EchoRequest")
	proto.RegisterType((*EchoResponse)(nil), "e2e_service.EchoResponse")
	proto.RegisterType((*EchoWithResponseSizeRequest)(nil), "e2e_service.EchoWithResponseSizeRequest")
	proto.RegisterType((*StreamEchoRequest)(nil), "e2e_service.StreamEchoRequest")
}

func init() { proto.RegisterFile("echo.proto", fileDescriptor_08134aea513e0001) }

var fileDescriptor_08134aea513e0001 = []byte{
	// 322 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcd, 0x4b, 0xc3, 0x40,
	0x10, 0xc5, 0x8d, 0xb4, 0x7e, 0x4c, 0xb7, 0x7e, 0x2c, 0x3d, 0xb4, 0x0a, 0x52, 0x52, 0x0f, 0xf5,
	0x12, 0xa4, 0x3d, 0x7b, 0xb1, 0x88, 0x88, 0x78, 0x49, 0x05, 0x41, 0x28, 0x4b, 0xdc, 0x0e, 0xe9,
	0x42, 0x9b, 0x8d, 0xbb, 0xdb, 0x1e, 0xfa, 0x9f, 0x7b, 0x93, 0xe9, 0x26, 0x10, 0x69, 0xed, 0x25,
	0x90, 0x97, 0xf7, 0x7b, 0x33, 0x79, 0xbb, 0x00,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x7c, 0xf1, 0x6b, 0x87, 0x07, 0x7c, 0x02, 0xad, 0x5d, 0x9d, 0xf0, 0xfe, 0x16, 0xf4, 0x4f, 0x6d,
	0xfb, 0xe3, 0x5f, 0x01, 0x48, 0xf1, 0xbd, 0xf0, 0x9b, 0x3f, 0xd6, 0xad, 0xb2, 0xf6, 0x46, 0xdd,
	0x07, 0x8f, 0x2d, 0x60, 0x4a, 0x47, 0xa9, 0xc9, 0x65, 0x44, 0x07, 0xf3, 0x59, 0xa3, 0xe7, 0xd7,
	0xd1, 0xe6, 0x4e, 0x0d, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x85, 0x80, 0x10, 0x61, 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

// GrpcCloudapiClient is the client API for GrpcCloudapi service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type GrpcCloudapiClient interface {
	// A simple echo RPC returns the input string
	Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error)
	// A simple echo RPC receives a custom response size
	EchoWithResponseSize(ctx context.Context, in *EchoWithResponseSizeRequest, opts ...grpc.CallOption) (*EchoResponse, error)
	// A simple stream endpoint
	EchoStream(ctx context.Context, in *StreamEchoRequest, opts ...grpc.CallOption) (GrpcCloudapi_EchoStreamClient, error)
}

type grpcCloudapiClient struct {
	cc *grpc.ClientConn
}

func NewGrpcCloudapiClient(cc *grpc.ClientConn) GrpcCloudapiClient {
	return &grpcCloudapiClient{cc}
}

func (c *grpcCloudapiClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) {
	out := new(EchoResponse)
	err := c.cc.Invoke(ctx, "/e2e_service.GrpcCloudapi/Echo", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *grpcCloudapiClient) EchoWithResponseSize(ctx context.Context, in *EchoWithResponseSizeRequest, opts ...grpc.CallOption) (*EchoResponse, error) {
	out := new(EchoResponse)
	err := c.cc.Invoke(ctx, "/e2e_service.GrpcCloudapi/EchoWithResponseSize", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *grpcCloudapiClient) EchoStream(ctx context.Context, in *StreamEchoRequest, opts ...grpc.CallOption) (GrpcCloudapi_EchoStreamClient, error) {
	stream, err := c.cc.NewStream(ctx, &_GrpcCloudapi_serviceDesc.Streams[0], "/e2e_service.GrpcCloudapi/EchoStream", opts...)
	if err != nil {
		return nil, err
	}
	x := &grpcCloudapiEchoStreamClient{stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

type GrpcCloudapi_EchoStreamClient interface {
	Recv() (*EchoResponse, error)
	grpc.ClientStream
}

type grpcCloudapiEchoStreamClient struct {
	grpc.ClientStream
}

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

// GrpcCloudapiServer is the server API for GrpcCloudapi service.
type GrpcCloudapiServer interface {
	// A simple echo RPC returns the input string
	Echo(context.Context, *EchoRequest) (*EchoResponse, error)
	// A simple echo RPC receives a custom response size
	EchoWithResponseSize(context.Context, *EchoWithResponseSizeRequest) (*EchoResponse, error)
	// A simple stream endpoint
	EchoStream(*StreamEchoRequest, GrpcCloudapi_EchoStreamServer) error
}

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

func (*UnimplementedGrpcCloudapiServer) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented")
}
func (*UnimplementedGrpcCloudapiServer) EchoWithResponseSize(ctx context.Context, req *EchoWithResponseSizeRequest) (*EchoResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method EchoWithResponseSize not implemented")
}
func (*UnimplementedGrpcCloudapiServer) EchoStream(req *StreamEchoRequest, srv GrpcCloudapi_EchoStreamServer) error {
	return status.Errorf(codes.Unimplemented, "method EchoStream not implemented")
}

func RegisterGrpcCloudapiServer(s *grpc.Server, srv GrpcCloudapiServer) {
	s.RegisterService(&_GrpcCloudapi_serviceDesc, srv)
}

func _GrpcCloudapi_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EchoRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GrpcCloudapiServer).Echo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/e2e_service.GrpcCloudapi/Echo",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GrpcCloudapiServer).Echo(ctx, req.(*EchoRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _GrpcCloudapi_EchoWithResponseSize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EchoWithResponseSizeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GrpcCloudapiServer).EchoWithResponseSize(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/e2e_service.GrpcCloudapi/EchoWithResponseSize",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GrpcCloudapiServer).EchoWithResponseSize(ctx, req.(*EchoWithResponseSizeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _GrpcCloudapi_EchoStream_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(StreamEchoRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(GrpcCloudapiServer).EchoStream(m, &grpcCloudapiEchoStreamServer{stream})
}

type GrpcCloudapi_EchoStreamServer interface {
	Send(*EchoResponse) error
	grpc.ServerStream
}

type grpcCloudapiEchoStreamServer struct {
	grpc.ServerStream
}

func (x *grpcCloudapiEchoStreamServer) Send(m *EchoResponse) error {
	return x.ServerStream.SendMsg(m)
}

var _GrpcCloudapi_serviceDesc = grpc.ServiceDesc{
	ServiceName: "e2e_service.GrpcCloudapi",
	HandlerType: (*GrpcCloudapiServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Echo",
			Handler:    _GrpcCloudapi_Echo_Handler,
		},
		{
			MethodName: "EchoWithResponseSize",
			Handler:    _GrpcCloudapi_EchoWithResponseSize_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "EchoStream",
			Handler:       _GrpcCloudapi_EchoStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "echo.proto",
}
