// Code generated by Kitex v0.15.1. DO NOT EDIT.

package pbapi

import (
	"github.com/cloudwego/kitex/pkg/streaming"
	"github.com/cloudwego/prutal"
)

type Request struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}

func (x *Request) Reset() { *x = Request{} }

func (x *Request) Marshal(in []byte) ([]byte, error) { return prutal.MarshalAppend(in, x) }

func (x *Request) Unmarshal(in []byte) error { return prutal.Unmarshal(in, x) }

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

type Response struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}

func (x *Response) Reset() { *x = Response{} }

func (x *Response) Marshal(in []byte) ([]byte, error) { return prutal.MarshalAppend(in, x) }

func (x *Response) Unmarshal(in []byte) error { return prutal.Unmarshal(in, x) }

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

type Echo interface {
	StreamRequestEcho(stream Echo_StreamRequestEchoServer) (err error)
	StreamResponseEcho(req *Request, stream Echo_StreamResponseEchoServer) (err error)
	BidirectionalEcho(stream Echo_BidirectionalEchoServer) (err error)
}

type Echo_StreamRequestEchoServer interface {
	streaming.Stream
	Recv() (*Request, error)
	SendAndClose(*Response) error
}

type Echo_StreamResponseEchoServer interface {
	streaming.Stream
	Send(*Response) error
}

type Echo_BidirectionalEchoServer interface {
	streaming.Stream
	Recv() (*Request, error)
	Send(*Response) error
}
