// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             v4.25.8
// source: voltha_protos/onu_inter_adapter_service.proto

package onu_inter_adapter_service

import (
	context "context"
	common "github.com/opencord/voltha-protos/v5/go/common"
	health "github.com/opencord/voltha-protos/v5/go/health"
	inter_adapter "github.com/opencord/voltha-protos/v5/go/inter_adapter"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// 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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	OnuInterAdapterService_GetHealthStatus_FullMethodName     = "/onu_inter_adapter_service.OnuInterAdapterService/GetHealthStatus"
	OnuInterAdapterService_OnuIndication_FullMethodName       = "/onu_inter_adapter_service.OnuInterAdapterService/OnuIndication"
	OnuInterAdapterService_OmciIndication_FullMethodName      = "/onu_inter_adapter_service.OnuInterAdapterService/OmciIndication"
	OnuInterAdapterService_DownloadTechProfile_FullMethodName = "/onu_inter_adapter_service.OnuInterAdapterService/DownloadTechProfile"
	OnuInterAdapterService_DeleteGemPort_FullMethodName       = "/onu_inter_adapter_service.OnuInterAdapterService/DeleteGemPort"
	OnuInterAdapterService_DeleteTCont_FullMethodName         = "/onu_inter_adapter_service.OnuInterAdapterService/DeleteTCont"
)

// OnuInterAdapterServiceClient is the client API for OnuInterAdapterService 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 OnuInterAdapterServiceClient interface {
	// GetHealthStatus is used by a OnuInterAdapterService client to detect a connection
	// lost with the gRPC server hosting the OnuInterAdapterService service
	GetHealthStatus(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[common.Connection, health.HealthStatus], error)
	OnuIndication(ctx context.Context, in *inter_adapter.OnuIndicationMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
	OmciIndication(ctx context.Context, in *inter_adapter.OmciMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DownloadTechProfile(ctx context.Context, in *inter_adapter.TechProfileDownloadMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteGemPort(ctx context.Context, in *inter_adapter.DeleteGemPortMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteTCont(ctx context.Context, in *inter_adapter.DeleteTcontMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

type onuInterAdapterServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewOnuInterAdapterServiceClient(cc grpc.ClientConnInterface) OnuInterAdapterServiceClient {
	return &onuInterAdapterServiceClient{cc}
}

func (c *onuInterAdapterServiceClient) GetHealthStatus(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[common.Connection, health.HealthStatus], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &OnuInterAdapterService_ServiceDesc.Streams[0], OnuInterAdapterService_GetHealthStatus_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[common.Connection, health.HealthStatus]{ClientStream: stream}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type OnuInterAdapterService_GetHealthStatusClient = grpc.BidiStreamingClient[common.Connection, health.HealthStatus]

func (c *onuInterAdapterServiceClient) OnuIndication(ctx context.Context, in *inter_adapter.OnuIndicationMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, OnuInterAdapterService_OnuIndication_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *onuInterAdapterServiceClient) OmciIndication(ctx context.Context, in *inter_adapter.OmciMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, OnuInterAdapterService_OmciIndication_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *onuInterAdapterServiceClient) DownloadTechProfile(ctx context.Context, in *inter_adapter.TechProfileDownloadMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, OnuInterAdapterService_DownloadTechProfile_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *onuInterAdapterServiceClient) DeleteGemPort(ctx context.Context, in *inter_adapter.DeleteGemPortMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, OnuInterAdapterService_DeleteGemPort_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *onuInterAdapterServiceClient) DeleteTCont(ctx context.Context, in *inter_adapter.DeleteTcontMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, OnuInterAdapterService_DeleteTCont_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// OnuInterAdapterServiceServer is the server API for OnuInterAdapterService service.
// All implementations must embed UnimplementedOnuInterAdapterServiceServer
// for forward compatibility.
type OnuInterAdapterServiceServer interface {
	// GetHealthStatus is used by a OnuInterAdapterService client to detect a connection
	// lost with the gRPC server hosting the OnuInterAdapterService service
	GetHealthStatus(grpc.BidiStreamingServer[common.Connection, health.HealthStatus]) error
	OnuIndication(context.Context, *inter_adapter.OnuIndicationMessage) (*emptypb.Empty, error)
	OmciIndication(context.Context, *inter_adapter.OmciMessage) (*emptypb.Empty, error)
	DownloadTechProfile(context.Context, *inter_adapter.TechProfileDownloadMessage) (*emptypb.Empty, error)
	DeleteGemPort(context.Context, *inter_adapter.DeleteGemPortMessage) (*emptypb.Empty, error)
	DeleteTCont(context.Context, *inter_adapter.DeleteTcontMessage) (*emptypb.Empty, error)
	mustEmbedUnimplementedOnuInterAdapterServiceServer()
}

// UnimplementedOnuInterAdapterServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedOnuInterAdapterServiceServer struct{}

func (UnimplementedOnuInterAdapterServiceServer) GetHealthStatus(grpc.BidiStreamingServer[common.Connection, health.HealthStatus]) error {
	return status.Error(codes.Unimplemented, "method GetHealthStatus not implemented")
}
func (UnimplementedOnuInterAdapterServiceServer) OnuIndication(context.Context, *inter_adapter.OnuIndicationMessage) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method OnuIndication not implemented")
}
func (UnimplementedOnuInterAdapterServiceServer) OmciIndication(context.Context, *inter_adapter.OmciMessage) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method OmciIndication not implemented")
}
func (UnimplementedOnuInterAdapterServiceServer) DownloadTechProfile(context.Context, *inter_adapter.TechProfileDownloadMessage) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method DownloadTechProfile not implemented")
}
func (UnimplementedOnuInterAdapterServiceServer) DeleteGemPort(context.Context, *inter_adapter.DeleteGemPortMessage) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method DeleteGemPort not implemented")
}
func (UnimplementedOnuInterAdapterServiceServer) DeleteTCont(context.Context, *inter_adapter.DeleteTcontMessage) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method DeleteTCont not implemented")
}
func (UnimplementedOnuInterAdapterServiceServer) mustEmbedUnimplementedOnuInterAdapterServiceServer() {
}
func (UnimplementedOnuInterAdapterServiceServer) testEmbeddedByValue() {}

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

func RegisterOnuInterAdapterServiceServer(s grpc.ServiceRegistrar, srv OnuInterAdapterServiceServer) {
	// If the following call panics, it indicates UnimplementedOnuInterAdapterServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&OnuInterAdapterService_ServiceDesc, srv)
}

func _OnuInterAdapterService_GetHealthStatus_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(OnuInterAdapterServiceServer).GetHealthStatus(&grpc.GenericServerStream[common.Connection, health.HealthStatus]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type OnuInterAdapterService_GetHealthStatusServer = grpc.BidiStreamingServer[common.Connection, health.HealthStatus]

func _OnuInterAdapterService_OnuIndication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(inter_adapter.OnuIndicationMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OnuInterAdapterServiceServer).OnuIndication(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OnuInterAdapterService_OnuIndication_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OnuInterAdapterServiceServer).OnuIndication(ctx, req.(*inter_adapter.OnuIndicationMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _OnuInterAdapterService_OmciIndication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(inter_adapter.OmciMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OnuInterAdapterServiceServer).OmciIndication(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OnuInterAdapterService_OmciIndication_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OnuInterAdapterServiceServer).OmciIndication(ctx, req.(*inter_adapter.OmciMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _OnuInterAdapterService_DownloadTechProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(inter_adapter.TechProfileDownloadMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OnuInterAdapterServiceServer).DownloadTechProfile(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OnuInterAdapterService_DownloadTechProfile_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OnuInterAdapterServiceServer).DownloadTechProfile(ctx, req.(*inter_adapter.TechProfileDownloadMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _OnuInterAdapterService_DeleteGemPort_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(inter_adapter.DeleteGemPortMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OnuInterAdapterServiceServer).DeleteGemPort(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OnuInterAdapterService_DeleteGemPort_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OnuInterAdapterServiceServer).DeleteGemPort(ctx, req.(*inter_adapter.DeleteGemPortMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _OnuInterAdapterService_DeleteTCont_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(inter_adapter.DeleteTcontMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OnuInterAdapterServiceServer).DeleteTCont(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OnuInterAdapterService_DeleteTCont_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OnuInterAdapterServiceServer).DeleteTCont(ctx, req.(*inter_adapter.DeleteTcontMessage))
	}
	return interceptor(ctx, in, info, handler)
}

// OnuInterAdapterService_ServiceDesc is the grpc.ServiceDesc for OnuInterAdapterService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var OnuInterAdapterService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "onu_inter_adapter_service.OnuInterAdapterService",
	HandlerType: (*OnuInterAdapterServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "OnuIndication",
			Handler:    _OnuInterAdapterService_OnuIndication_Handler,
		},
		{
			MethodName: "OmciIndication",
			Handler:    _OnuInterAdapterService_OmciIndication_Handler,
		},
		{
			MethodName: "DownloadTechProfile",
			Handler:    _OnuInterAdapterService_DownloadTechProfile_Handler,
		},
		{
			MethodName: "DeleteGemPort",
			Handler:    _OnuInterAdapterService_DeleteGemPort_Handler,
		},
		{
			MethodName: "DeleteTCont",
			Handler:    _OnuInterAdapterService_DeleteTCont_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetHealthStatus",
			Handler:       _OnuInterAdapterService_GetHealthStatus_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "voltha_protos/onu_inter_adapter_service.proto",
}
