// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             (unknown)
// source: proto/rpc/sentry/cluster_authz.proto

package sentry

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

// ClusterAuthorizationClient is the client API for ClusterAuthorization 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 ClusterAuthorizationClient interface {
	GetUserAuthorization(ctx context.Context, in *GetUserAuthorizationRequest, opts ...grpc.CallOption) (*GetUserAuthorizationResponse, error)
}

type clusterAuthorizationClient struct {
	cc grpc.ClientConnInterface
}

func NewClusterAuthorizationClient(cc grpc.ClientConnInterface) ClusterAuthorizationClient {
	return &clusterAuthorizationClient{cc}
}

func (c *clusterAuthorizationClient) GetUserAuthorization(ctx context.Context, in *GetUserAuthorizationRequest, opts ...grpc.CallOption) (*GetUserAuthorizationResponse, error) {
	out := new(GetUserAuthorizationResponse)
	err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.ClusterAuthorization/GetUserAuthorization", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ClusterAuthorizationServer is the server API for ClusterAuthorization service.
// All implementations should embed UnimplementedClusterAuthorizationServer
// for forward compatibility
type ClusterAuthorizationServer interface {
	GetUserAuthorization(context.Context, *GetUserAuthorizationRequest) (*GetUserAuthorizationResponse, error)
}

// UnimplementedClusterAuthorizationServer should be embedded to have forward compatible implementations.
type UnimplementedClusterAuthorizationServer struct {
}

func (UnimplementedClusterAuthorizationServer) GetUserAuthorization(context.Context, *GetUserAuthorizationRequest) (*GetUserAuthorizationResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetUserAuthorization not implemented")
}

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

func RegisterClusterAuthorizationServer(s grpc.ServiceRegistrar, srv ClusterAuthorizationServer) {
	s.RegisterService(&ClusterAuthorization_ServiceDesc, srv)
}

func _ClusterAuthorization_GetUserAuthorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetUserAuthorizationRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ClusterAuthorizationServer).GetUserAuthorization(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/rafay.dev.sentry.rpc.ClusterAuthorization/GetUserAuthorization",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ClusterAuthorizationServer).GetUserAuthorization(ctx, req.(*GetUserAuthorizationRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ClusterAuthorization_ServiceDesc is the grpc.ServiceDesc for ClusterAuthorization service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ClusterAuthorization_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rafay.dev.sentry.rpc.ClusterAuthorization",
	HandlerType: (*ClusterAuthorizationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUserAuthorization",
			Handler:    _ClusterAuthorization_GetUserAuthorization_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/rpc/sentry/cluster_authz.proto",
}
