// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v3.19.4
// source: agent.proto

package agent

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// StreamingStoreClient is the client API for StreamingStore service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type StreamingStoreClient interface {
	SetupAppStream(ctx context.Context, in *AppInfo, opts ...grpc.CallOption) (StreamingStore_SetupAppStreamClient, error)
}

type streamingStoreClient struct {
	cc grpc.ClientConnInterface
}

func NewStreamingStoreClient(cc grpc.ClientConnInterface) StreamingStoreClient {
	return &streamingStoreClient{cc}
}

func (c *streamingStoreClient) SetupAppStream(ctx context.Context, in *AppInfo, opts ...grpc.CallOption) (StreamingStore_SetupAppStreamClient, error) {
	stream, err := c.cc.NewStream(ctx, &StreamingStore_ServiceDesc.Streams[0], "/grpcAgent.StreamingStore/SetupAppStream", opts...)
	if err != nil {
		return nil, err
	}
	x := &streamingStoreSetupAppStreamClient{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 StreamingStore_SetupAppStreamClient interface {
	Recv() (*StreamResponse, error)
	grpc.ClientStream
}

type streamingStoreSetupAppStreamClient struct {
	grpc.ClientStream
}

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

// StreamingStoreServer is the server API for StreamingStore service.
// All implementations must embed UnimplementedStreamingStoreServer
// for forward compatibility
type StreamingStoreServer interface {
	SetupAppStream(*AppInfo, StreamingStore_SetupAppStreamServer) error
	mustEmbedUnimplementedStreamingStoreServer()
}

// UnimplementedStreamingStoreServer must be embedded to have forward compatible implementations.
type UnimplementedStreamingStoreServer struct {
}

func (UnimplementedStreamingStoreServer) SetupAppStream(*AppInfo, StreamingStore_SetupAppStreamServer) error {
	return status.Errorf(codes.Unimplemented, "method SetupAppStream not implemented")
}
func (UnimplementedStreamingStoreServer) mustEmbedUnimplementedStreamingStoreServer() {}

// UnsafeStreamingStoreServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to StreamingStoreServer will
// result in compilation errors.
type UnsafeStreamingStoreServer interface {
	mustEmbedUnimplementedStreamingStoreServer()
}

func RegisterStreamingStoreServer(s grpc.ServiceRegistrar, srv StreamingStoreServer) {
	s.RegisterService(&StreamingStore_ServiceDesc, srv)
}

func _StreamingStore_SetupAppStream_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(AppInfo)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(StreamingStoreServer).SetupAppStream(m, &streamingStoreSetupAppStreamServer{stream})
}

type StreamingStore_SetupAppStreamServer interface {
	Send(*StreamResponse) error
	grpc.ServerStream
}

type streamingStoreSetupAppStreamServer struct {
	grpc.ServerStream
}

func (x *streamingStoreSetupAppStreamServer) Send(m *StreamResponse) error {
	return x.ServerStream.SendMsg(m)
}

// StreamingStore_ServiceDesc is the grpc.ServiceDesc for StreamingStore service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var StreamingStore_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpcAgent.StreamingStore",
	HandlerType: (*StreamingStoreServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SetupAppStream",
			Handler:       _StreamingStore_SetupAppStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "agent.proto",
}
