// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             (unknown)
// source: gosdn/southbound/southbound.proto

package southbound

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

const (
	SbiService_GetSchema_FullMethodName = "/gosdn.southbound.SbiService/GetSchema"
)

// SbiServiceClient is the client API for SbiService 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 SbiServiceClient interface {
	GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (SbiService_GetSchemaClient, error)
}

type sbiServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSbiServiceClient(cc grpc.ClientConnInterface) SbiServiceClient {
	return &sbiServiceClient{cc}
}

func (c *sbiServiceClient) GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (SbiService_GetSchemaClient, error) {
	stream, err := c.cc.NewStream(ctx, &SbiService_ServiceDesc.Streams[0], SbiService_GetSchema_FullMethodName, opts...)
	if err != nil {
		return nil, err
	}
	x := &sbiServiceGetSchemaClient{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 SbiService_GetSchemaClient interface {
	Recv() (*Payload, error)
	grpc.ClientStream
}

type sbiServiceGetSchemaClient struct {
	grpc.ClientStream
}

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

// SbiServiceServer is the server API for SbiService service.
// All implementations must embed UnimplementedSbiServiceServer
// for forward compatibility
type SbiServiceServer interface {
	GetSchema(*GetSchemaRequest, SbiService_GetSchemaServer) error
	mustEmbedUnimplementedSbiServiceServer()
}

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

func (UnimplementedSbiServiceServer) GetSchema(*GetSchemaRequest, SbiService_GetSchemaServer) error {
	return status.Errorf(codes.Unimplemented, "method GetSchema not implemented")
}
func (UnimplementedSbiServiceServer) mustEmbedUnimplementedSbiServiceServer() {}

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

func RegisterSbiServiceServer(s grpc.ServiceRegistrar, srv SbiServiceServer) {
	s.RegisterService(&SbiService_ServiceDesc, srv)
}

func _SbiService_GetSchema_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(GetSchemaRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(SbiServiceServer).GetSchema(m, &sbiServiceGetSchemaServer{stream})
}

type SbiService_GetSchemaServer interface {
	Send(*Payload) error
	grpc.ServerStream
}

type sbiServiceGetSchemaServer struct {
	grpc.ServerStream
}

func (x *sbiServiceGetSchemaServer) Send(m *Payload) error {
	return x.ServerStream.SendMsg(m)
}

// SbiService_ServiceDesc is the grpc.ServiceDesc for SbiService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SbiService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gosdn.southbound.SbiService",
	HandlerType: (*SbiServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetSchema",
			Handler:       _SbiService_GetSchema_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "gosdn/southbound/southbound.proto",
}
