// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v3.15.8
// source: admission.proto

package proto

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

// AdmissionClient is the client API for Admission 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 AdmissionClient interface {
	Admit(ctx context.Context, in *AdmissionRequest, opts ...grpc.CallOption) (*AdmissionReply, error)
}

type admissionClient struct {
	cc grpc.ClientConnInterface
}

func NewAdmissionClient(cc grpc.ClientConnInterface) AdmissionClient {
	return &admissionClient{cc}
}

func (c *admissionClient) Admit(ctx context.Context, in *AdmissionRequest, opts ...grpc.CallOption) (*AdmissionReply, error) {
	out := new(AdmissionReply)
	err := c.cc.Invoke(ctx, "/proto.Admission/Admit", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AdmissionServer is the server API for Admission service.
// All implementations must embed UnimplementedAdmissionServer
// for forward compatibility
type AdmissionServer interface {
	Admit(context.Context, *AdmissionRequest) (*AdmissionReply, error)
	mustEmbedUnimplementedAdmissionServer()
}

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

func (UnimplementedAdmissionServer) Admit(context.Context, *AdmissionRequest) (*AdmissionReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Admit not implemented")
}
func (UnimplementedAdmissionServer) mustEmbedUnimplementedAdmissionServer() {}

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

func RegisterAdmissionServer(s grpc.ServiceRegistrar, srv AdmissionServer) {
	s.RegisterService(&Admission_ServiceDesc, srv)
}

func _Admission_Admit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AdmissionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AdmissionServer).Admit(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/proto.Admission/Admit",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AdmissionServer).Admit(ctx, req.(*AdmissionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Admission_ServiceDesc is the grpc.ServiceDesc for Admission service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Admission_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Admission",
	HandlerType: (*AdmissionServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Admit",
			Handler:    _Admission_Admit_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "admission.proto",
}
