// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             (unknown)
// source: gosdn/rbac/role.proto

package rbac

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

const (
	RoleService_CreateRoles_FullMethodName              = "/gosdn.rbac.RoleService/CreateRoles"
	RoleService_GetRole_FullMethodName                  = "/gosdn.rbac.RoleService/GetRole"
	RoleService_GetRoles_FullMethodName                 = "/gosdn.rbac.RoleService/GetRoles"
	RoleService_UpdateRoles_FullMethodName              = "/gosdn.rbac.RoleService/UpdateRoles"
	RoleService_DeletePermissionsForRole_FullMethodName = "/gosdn.rbac.RoleService/DeletePermissionsForRole"
	RoleService_DeleteRoles_FullMethodName              = "/gosdn.rbac.RoleService/DeleteRoles"
)

// RoleServiceClient is the client API for RoleService 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 RoleServiceClient interface {
	// Creates roles, requires login beforehand.
	// Requires highest permissions.
	CreateRoles(ctx context.Context, in *CreateRolesRequest, opts ...grpc.CallOption) (*CreateRolesResponse, error)
	// Requests one role with its permissions, requires login beforehand.
	// Requires highest permissions.
	GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*GetRoleResponse, error)
	// Requests all roles with their permissions, requires login beforehand.
	// Requires highest permissions.
	GetRoles(ctx context.Context, in *GetRolesRequest, opts ...grpc.CallOption) (*GetRolesResponse, error)
	// Updates roles by setting the provided permissions, requires login beforehand.
	// Requires highest permissions.
	UpdateRoles(ctx context.Context, in *UpdateRolesRequest, opts ...grpc.CallOption) (*UpdateRolesResponse, error)
	// Deletes permissions from given role, requires login beforehand.
	// Requires highest permissions.
	DeletePermissionsForRole(ctx context.Context, in *DeletePermissionsForRoleRequest, opts ...grpc.CallOption) (*DeletePermissionsForRoleResponse, error)
	// Deletes roles with their permissions, requires login beforehand.
	// Requires highest permissions.
	DeleteRoles(ctx context.Context, in *DeleteRolesRequest, opts ...grpc.CallOption) (*DeleteRolesResponse, error)
}

type roleServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewRoleServiceClient(cc grpc.ClientConnInterface) RoleServiceClient {
	return &roleServiceClient{cc}
}

func (c *roleServiceClient) CreateRoles(ctx context.Context, in *CreateRolesRequest, opts ...grpc.CallOption) (*CreateRolesResponse, error) {
	out := new(CreateRolesResponse)
	err := c.cc.Invoke(ctx, RoleService_CreateRoles_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *roleServiceClient) GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*GetRoleResponse, error) {
	out := new(GetRoleResponse)
	err := c.cc.Invoke(ctx, RoleService_GetRole_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *roleServiceClient) GetRoles(ctx context.Context, in *GetRolesRequest, opts ...grpc.CallOption) (*GetRolesResponse, error) {
	out := new(GetRolesResponse)
	err := c.cc.Invoke(ctx, RoleService_GetRoles_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *roleServiceClient) UpdateRoles(ctx context.Context, in *UpdateRolesRequest, opts ...grpc.CallOption) (*UpdateRolesResponse, error) {
	out := new(UpdateRolesResponse)
	err := c.cc.Invoke(ctx, RoleService_UpdateRoles_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *roleServiceClient) DeletePermissionsForRole(ctx context.Context, in *DeletePermissionsForRoleRequest, opts ...grpc.CallOption) (*DeletePermissionsForRoleResponse, error) {
	out := new(DeletePermissionsForRoleResponse)
	err := c.cc.Invoke(ctx, RoleService_DeletePermissionsForRole_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *roleServiceClient) DeleteRoles(ctx context.Context, in *DeleteRolesRequest, opts ...grpc.CallOption) (*DeleteRolesResponse, error) {
	out := new(DeleteRolesResponse)
	err := c.cc.Invoke(ctx, RoleService_DeleteRoles_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RoleServiceServer is the server API for RoleService service.
// All implementations must embed UnimplementedRoleServiceServer
// for forward compatibility
type RoleServiceServer interface {
	// Creates roles, requires login beforehand.
	// Requires highest permissions.
	CreateRoles(context.Context, *CreateRolesRequest) (*CreateRolesResponse, error)
	// Requests one role with its permissions, requires login beforehand.
	// Requires highest permissions.
	GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error)
	// Requests all roles with their permissions, requires login beforehand.
	// Requires highest permissions.
	GetRoles(context.Context, *GetRolesRequest) (*GetRolesResponse, error)
	// Updates roles by setting the provided permissions, requires login beforehand.
	// Requires highest permissions.
	UpdateRoles(context.Context, *UpdateRolesRequest) (*UpdateRolesResponse, error)
	// Deletes permissions from given role, requires login beforehand.
	// Requires highest permissions.
	DeletePermissionsForRole(context.Context, *DeletePermissionsForRoleRequest) (*DeletePermissionsForRoleResponse, error)
	// Deletes roles with their permissions, requires login beforehand.
	// Requires highest permissions.
	DeleteRoles(context.Context, *DeleteRolesRequest) (*DeleteRolesResponse, error)
	mustEmbedUnimplementedRoleServiceServer()
}

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

func (UnimplementedRoleServiceServer) CreateRoles(context.Context, *CreateRolesRequest) (*CreateRolesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateRoles not implemented")
}
func (UnimplementedRoleServiceServer) GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented")
}
func (UnimplementedRoleServiceServer) GetRoles(context.Context, *GetRolesRequest) (*GetRolesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRoles not implemented")
}
func (UnimplementedRoleServiceServer) UpdateRoles(context.Context, *UpdateRolesRequest) (*UpdateRolesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateRoles not implemented")
}
func (UnimplementedRoleServiceServer) DeletePermissionsForRole(context.Context, *DeletePermissionsForRoleRequest) (*DeletePermissionsForRoleResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeletePermissionsForRole not implemented")
}
func (UnimplementedRoleServiceServer) DeleteRoles(context.Context, *DeleteRolesRequest) (*DeleteRolesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteRoles not implemented")
}
func (UnimplementedRoleServiceServer) mustEmbedUnimplementedRoleServiceServer() {}

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

func RegisterRoleServiceServer(s grpc.ServiceRegistrar, srv RoleServiceServer) {
	s.RegisterService(&RoleService_ServiceDesc, srv)
}

func _RoleService_CreateRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateRolesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RoleServiceServer).CreateRoles(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RoleService_CreateRoles_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RoleServiceServer).CreateRoles(ctx, req.(*CreateRolesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RoleService_GetRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRoleRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RoleServiceServer).GetRole(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RoleService_GetRole_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RoleServiceServer).GetRole(ctx, req.(*GetRoleRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RoleService_GetRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRolesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RoleServiceServer).GetRoles(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RoleService_GetRoles_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RoleServiceServer).GetRoles(ctx, req.(*GetRolesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RoleService_UpdateRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateRolesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RoleServiceServer).UpdateRoles(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RoleService_UpdateRoles_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RoleServiceServer).UpdateRoles(ctx, req.(*UpdateRolesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RoleService_DeletePermissionsForRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeletePermissionsForRoleRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RoleServiceServer).DeletePermissionsForRole(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RoleService_DeletePermissionsForRole_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RoleServiceServer).DeletePermissionsForRole(ctx, req.(*DeletePermissionsForRoleRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RoleService_DeleteRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteRolesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RoleServiceServer).DeleteRoles(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RoleService_DeleteRoles_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RoleServiceServer).DeleteRoles(ctx, req.(*DeleteRolesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// RoleService_ServiceDesc is the grpc.ServiceDesc for RoleService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RoleService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gosdn.rbac.RoleService",
	HandlerType: (*RoleServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateRoles",
			Handler:    _RoleService_CreateRoles_Handler,
		},
		{
			MethodName: "GetRole",
			Handler:    _RoleService_GetRole_Handler,
		},
		{
			MethodName: "GetRoles",
			Handler:    _RoleService_GetRoles_Handler,
		},
		{
			MethodName: "UpdateRoles",
			Handler:    _RoleService_UpdateRoles_Handler,
		},
		{
			MethodName: "DeletePermissionsForRole",
			Handler:    _RoleService_DeletePermissionsForRole_Handler,
		},
		{
			MethodName: "DeleteRoles",
			Handler:    _RoleService_DeleteRoles_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gosdn/rbac/role.proto",
}
