// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             v6.31.1
// source: omni/oidc/oidc.proto

package oidc

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

const (
	OIDCService_Authenticate_FullMethodName = "/oidc.OIDCService/Authenticate"
)

// OIDCServiceClient is the client API for OIDCService 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 OIDCServiceClient interface {
	// Authenticate an OIDC auth request by ID.
	Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
}

type oIDCServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewOIDCServiceClient(cc grpc.ClientConnInterface) OIDCServiceClient {
	return &oIDCServiceClient{cc}
}

func (c *oIDCServiceClient) Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(AuthenticateResponse)
	err := c.cc.Invoke(ctx, OIDCService_Authenticate_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// OIDCServiceServer is the server API for OIDCService service.
// All implementations must embed UnimplementedOIDCServiceServer
// for forward compatibility.
type OIDCServiceServer interface {
	// Authenticate an OIDC auth request by ID.
	Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
	mustEmbedUnimplementedOIDCServiceServer()
}

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

func (UnimplementedOIDCServiceServer) Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method Authenticate not implemented")
}
func (UnimplementedOIDCServiceServer) mustEmbedUnimplementedOIDCServiceServer() {}
func (UnimplementedOIDCServiceServer) testEmbeddedByValue()                     {}

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

func RegisterOIDCServiceServer(s grpc.ServiceRegistrar, srv OIDCServiceServer) {
	// If the following call panics, it indicates UnimplementedOIDCServiceServer 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(&OIDCService_ServiceDesc, srv)
}

func _OIDCService_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AuthenticateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OIDCServiceServer).Authenticate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OIDCService_Authenticate_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OIDCServiceServer).Authenticate(ctx, req.(*AuthenticateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// OIDCService_ServiceDesc is the grpc.ServiceDesc for OIDCService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var OIDCService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "oidc.OIDCService",
	HandlerType: (*OIDCServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Authenticate",
			Handler:    _OIDCService_Authenticate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "omni/oidc/oidc.proto",
}
