// 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/olt_inter_adapter_service.proto

package olt_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 (
	OltInterAdapterService_GetHealthStatus_FullMethodName        = "/olt_inter_adapter_service.OltInterAdapterService/GetHealthStatus"
	OltInterAdapterService_ProxyOmciRequest_FullMethodName       = "/olt_inter_adapter_service.OltInterAdapterService/ProxyOmciRequest"
	OltInterAdapterService_ProxyOmciRequests_FullMethodName      = "/olt_inter_adapter_service.OltInterAdapterService/ProxyOmciRequests"
	OltInterAdapterService_GetTechProfileInstance_FullMethodName = "/olt_inter_adapter_service.OltInterAdapterService/GetTechProfileInstance"
)

// OltInterAdapterServiceClient is the client API for OltInterAdapterService 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 OltInterAdapterServiceClient interface {
	// GetHealthStatus is used by a OltInterAdapterService client to detect a connection
	// lost with the gRPC server hosting the OltInterAdapterService service
	GetHealthStatus(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[common.Connection, health.HealthStatus], error)
	ProxyOmciRequest(ctx context.Context, in *inter_adapter.OmciMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ProxyOmciRequests(ctx context.Context, in *inter_adapter.OmciMessages, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetTechProfileInstance(ctx context.Context, in *inter_adapter.TechProfileInstanceRequestMessage, opts ...grpc.CallOption) (*inter_adapter.TechProfileDownloadMessage, error)
}

type oltInterAdapterServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewOltInterAdapterServiceClient(cc grpc.ClientConnInterface) OltInterAdapterServiceClient {
	return &oltInterAdapterServiceClient{cc}
}

func (c *oltInterAdapterServiceClient) 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, &OltInterAdapterService_ServiceDesc.Streams[0], OltInterAdapterService_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 OltInterAdapterService_GetHealthStatusClient = grpc.BidiStreamingClient[common.Connection, health.HealthStatus]

func (c *oltInterAdapterServiceClient) ProxyOmciRequest(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, OltInterAdapterService_ProxyOmciRequest_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

func (c *oltInterAdapterServiceClient) GetTechProfileInstance(ctx context.Context, in *inter_adapter.TechProfileInstanceRequestMessage, opts ...grpc.CallOption) (*inter_adapter.TechProfileDownloadMessage, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(inter_adapter.TechProfileDownloadMessage)
	err := c.cc.Invoke(ctx, OltInterAdapterService_GetTechProfileInstance_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// OltInterAdapterServiceServer is the server API for OltInterAdapterService service.
// All implementations must embed UnimplementedOltInterAdapterServiceServer
// for forward compatibility.
type OltInterAdapterServiceServer interface {
	// GetHealthStatus is used by a OltInterAdapterService client to detect a connection
	// lost with the gRPC server hosting the OltInterAdapterService service
	GetHealthStatus(grpc.BidiStreamingServer[common.Connection, health.HealthStatus]) error
	ProxyOmciRequest(context.Context, *inter_adapter.OmciMessage) (*emptypb.Empty, error)
	ProxyOmciRequests(context.Context, *inter_adapter.OmciMessages) (*emptypb.Empty, error)
	GetTechProfileInstance(context.Context, *inter_adapter.TechProfileInstanceRequestMessage) (*inter_adapter.TechProfileDownloadMessage, error)
	mustEmbedUnimplementedOltInterAdapterServiceServer()
}

// UnimplementedOltInterAdapterServiceServer 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 UnimplementedOltInterAdapterServiceServer struct{}

func (UnimplementedOltInterAdapterServiceServer) GetHealthStatus(grpc.BidiStreamingServer[common.Connection, health.HealthStatus]) error {
	return status.Error(codes.Unimplemented, "method GetHealthStatus not implemented")
}
func (UnimplementedOltInterAdapterServiceServer) ProxyOmciRequest(context.Context, *inter_adapter.OmciMessage) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method ProxyOmciRequest not implemented")
}
func (UnimplementedOltInterAdapterServiceServer) ProxyOmciRequests(context.Context, *inter_adapter.OmciMessages) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method ProxyOmciRequests not implemented")
}
func (UnimplementedOltInterAdapterServiceServer) GetTechProfileInstance(context.Context, *inter_adapter.TechProfileInstanceRequestMessage) (*inter_adapter.TechProfileDownloadMessage, error) {
	return nil, status.Error(codes.Unimplemented, "method GetTechProfileInstance not implemented")
}
func (UnimplementedOltInterAdapterServiceServer) mustEmbedUnimplementedOltInterAdapterServiceServer() {
}
func (UnimplementedOltInterAdapterServiceServer) testEmbeddedByValue() {}

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

func RegisterOltInterAdapterServiceServer(s grpc.ServiceRegistrar, srv OltInterAdapterServiceServer) {
	// If the following call panics, it indicates UnimplementedOltInterAdapterServiceServer 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(&OltInterAdapterService_ServiceDesc, srv)
}

func _OltInterAdapterService_GetHealthStatus_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(OltInterAdapterServiceServer).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 OltInterAdapterService_GetHealthStatusServer = grpc.BidiStreamingServer[common.Connection, health.HealthStatus]

func _OltInterAdapterService_ProxyOmciRequest_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.(OltInterAdapterServiceServer).ProxyOmciRequest(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OltInterAdapterService_ProxyOmciRequest_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OltInterAdapterServiceServer).ProxyOmciRequest(ctx, req.(*inter_adapter.OmciMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _OltInterAdapterService_ProxyOmciRequests_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(inter_adapter.OmciMessages)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OltInterAdapterServiceServer).ProxyOmciRequests(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OltInterAdapterService_ProxyOmciRequests_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OltInterAdapterServiceServer).ProxyOmciRequests(ctx, req.(*inter_adapter.OmciMessages))
	}
	return interceptor(ctx, in, info, handler)
}

func _OltInterAdapterService_GetTechProfileInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(inter_adapter.TechProfileInstanceRequestMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OltInterAdapterServiceServer).GetTechProfileInstance(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OltInterAdapterService_GetTechProfileInstance_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OltInterAdapterServiceServer).GetTechProfileInstance(ctx, req.(*inter_adapter.TechProfileInstanceRequestMessage))
	}
	return interceptor(ctx, in, info, handler)
}

// OltInterAdapterService_ServiceDesc is the grpc.ServiceDesc for OltInterAdapterService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var OltInterAdapterService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "olt_inter_adapter_service.OltInterAdapterService",
	HandlerType: (*OltInterAdapterServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ProxyOmciRequest",
			Handler:    _OltInterAdapterService_ProxyOmciRequest_Handler,
		},
		{
			MethodName: "ProxyOmciRequests",
			Handler:    _OltInterAdapterService_ProxyOmciRequests_Handler,
		},
		{
			MethodName: "GetTechProfileInstance",
			Handler:    _OltInterAdapterService_GetTechProfileInstance_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetHealthStatus",
			Handler:       _OltInterAdapterService_GetHealthStatus_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "voltha_protos/olt_inter_adapter_service.proto",
}
