// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             (unknown)
// source: cluster.proto

package pb

import (
	context "context"
	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 (
	Cluster_GetStatus_FullMethodName    = "/ceph.Cluster/GetStatus"
	Cluster_UpdateStatus_FullMethodName = "/ceph.Cluster/UpdateStatus"
	Cluster_GetUsers_FullMethodName     = "/ceph.Cluster/GetUsers"
	Cluster_UpdateUser_FullMethodName   = "/ceph.Cluster/UpdateUser"
	Cluster_CreateUser_FullMethodName   = "/ceph.Cluster/CreateUser"
	Cluster_ExportUser_FullMethodName   = "/ceph.Cluster/ExportUser"
	Cluster_DeleteUser_FullMethodName   = "/ceph.Cluster/DeleteUser"
	Cluster_SearchConfig_FullMethodName = "/ceph.Cluster/SearchConfig"
)

// ClusterClient is the client API for Cluster 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 ClusterClient interface {
	// Get cluster status
	GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ClusterStatus, error)
	// Update cluster status
	UpdateStatus(ctx context.Context, in *ClusterStatus, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetUsers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ClusterUsers, error)
	UpdateUser(ctx context.Context, in *UpdateClusterUserReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CreateUser(ctx context.Context, in *CreateClusterUserReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ExportUser(ctx context.Context, in *ExportClusterUserReq, opts ...grpc.CallOption) (*ExportClusterUserResp, error)
	DeleteUser(ctx context.Context, in *DeleteClusterUserReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SearchConfig(ctx context.Context, in *SearchConfigRequest, opts ...grpc.CallOption) (*SearchConfigResponse, error)
}

type clusterClient struct {
	cc grpc.ClientConnInterface
}

func NewClusterClient(cc grpc.ClientConnInterface) ClusterClient {
	return &clusterClient{cc}
}

func (c *clusterClient) GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ClusterStatus, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ClusterStatus)
	err := c.cc.Invoke(ctx, Cluster_GetStatus_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *clusterClient) UpdateStatus(ctx context.Context, in *ClusterStatus, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, Cluster_UpdateStatus_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *clusterClient) GetUsers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ClusterUsers, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ClusterUsers)
	err := c.cc.Invoke(ctx, Cluster_GetUsers_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *clusterClient) UpdateUser(ctx context.Context, in *UpdateClusterUserReq, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, Cluster_UpdateUser_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *clusterClient) CreateUser(ctx context.Context, in *CreateClusterUserReq, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, Cluster_CreateUser_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *clusterClient) ExportUser(ctx context.Context, in *ExportClusterUserReq, opts ...grpc.CallOption) (*ExportClusterUserResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ExportClusterUserResp)
	err := c.cc.Invoke(ctx, Cluster_ExportUser_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *clusterClient) DeleteUser(ctx context.Context, in *DeleteClusterUserReq, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, Cluster_DeleteUser_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *clusterClient) SearchConfig(ctx context.Context, in *SearchConfigRequest, opts ...grpc.CallOption) (*SearchConfigResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SearchConfigResponse)
	err := c.cc.Invoke(ctx, Cluster_SearchConfig_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ClusterServer is the server API for Cluster service.
// All implementations should embed UnimplementedClusterServer
// for forward compatibility.
type ClusterServer interface {
	// Get cluster status
	GetStatus(context.Context, *emptypb.Empty) (*ClusterStatus, error)
	// Update cluster status
	UpdateStatus(context.Context, *ClusterStatus) (*emptypb.Empty, error)
	GetUsers(context.Context, *emptypb.Empty) (*ClusterUsers, error)
	UpdateUser(context.Context, *UpdateClusterUserReq) (*emptypb.Empty, error)
	CreateUser(context.Context, *CreateClusterUserReq) (*emptypb.Empty, error)
	ExportUser(context.Context, *ExportClusterUserReq) (*ExportClusterUserResp, error)
	DeleteUser(context.Context, *DeleteClusterUserReq) (*emptypb.Empty, error)
	SearchConfig(context.Context, *SearchConfigRequest) (*SearchConfigResponse, error)
}

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

func (UnimplementedClusterServer) GetStatus(context.Context, *emptypb.Empty) (*ClusterStatus, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented")
}
func (UnimplementedClusterServer) UpdateStatus(context.Context, *ClusterStatus) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateStatus not implemented")
}
func (UnimplementedClusterServer) GetUsers(context.Context, *emptypb.Empty) (*ClusterUsers, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetUsers not implemented")
}
func (UnimplementedClusterServer) UpdateUser(context.Context, *UpdateClusterUserReq) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented")
}
func (UnimplementedClusterServer) CreateUser(context.Context, *CreateClusterUserReq) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented")
}
func (UnimplementedClusterServer) ExportUser(context.Context, *ExportClusterUserReq) (*ExportClusterUserResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ExportUser not implemented")
}
func (UnimplementedClusterServer) DeleteUser(context.Context, *DeleteClusterUserReq) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented")
}
func (UnimplementedClusterServer) SearchConfig(context.Context, *SearchConfigRequest) (*SearchConfigResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SearchConfig not implemented")
}
func (UnimplementedClusterServer) testEmbeddedByValue() {}

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

func RegisterClusterServer(s grpc.ServiceRegistrar, srv ClusterServer) {
	// If the following call pancis, it indicates UnimplementedClusterServer 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(&Cluster_ServiceDesc, srv)
}

func _Cluster_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ClusterServer).GetStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Cluster_GetStatus_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ClusterServer).GetStatus(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Cluster_UpdateStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ClusterStatus)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ClusterServer).UpdateStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Cluster_UpdateStatus_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ClusterServer).UpdateStatus(ctx, req.(*ClusterStatus))
	}
	return interceptor(ctx, in, info, handler)
}

func _Cluster_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ClusterServer).GetUsers(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Cluster_GetUsers_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ClusterServer).GetUsers(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Cluster_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateClusterUserReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ClusterServer).UpdateUser(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Cluster_UpdateUser_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ClusterServer).UpdateUser(ctx, req.(*UpdateClusterUserReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Cluster_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateClusterUserReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ClusterServer).CreateUser(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Cluster_CreateUser_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ClusterServer).CreateUser(ctx, req.(*CreateClusterUserReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Cluster_ExportUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ExportClusterUserReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ClusterServer).ExportUser(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Cluster_ExportUser_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ClusterServer).ExportUser(ctx, req.(*ExportClusterUserReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Cluster_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteClusterUserReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ClusterServer).DeleteUser(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Cluster_DeleteUser_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ClusterServer).DeleteUser(ctx, req.(*DeleteClusterUserReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Cluster_SearchConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SearchConfigRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ClusterServer).SearchConfig(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Cluster_SearchConfig_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ClusterServer).SearchConfig(ctx, req.(*SearchConfigRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Cluster_ServiceDesc is the grpc.ServiceDesc for Cluster service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Cluster_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ceph.Cluster",
	HandlerType: (*ClusterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetStatus",
			Handler:    _Cluster_GetStatus_Handler,
		},
		{
			MethodName: "UpdateStatus",
			Handler:    _Cluster_UpdateStatus_Handler,
		},
		{
			MethodName: "GetUsers",
			Handler:    _Cluster_GetUsers_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _Cluster_UpdateUser_Handler,
		},
		{
			MethodName: "CreateUser",
			Handler:    _Cluster_CreateUser_Handler,
		},
		{
			MethodName: "ExportUser",
			Handler:    _Cluster_ExportUser_Handler,
		},
		{
			MethodName: "DeleteUser",
			Handler:    _Cluster_DeleteUser_Handler,
		},
		{
			MethodName: "SearchConfig",
			Handler:    _Cluster_SearchConfig_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cluster.proto",
}
