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

package ceph

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

// CephClient is the client API for Ceph 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 CephClient interface {
	StorageScreen(ctx context.Context, in *StorageScreenReq, opts ...grpc.CallOption) (*StorageScreenResp, error)
	DailyPowerScreen(ctx context.Context, in *DailyPowerScreenReq, opts ...grpc.CallOption) (*DailyPowerScreenResp, error)
	PerCenterComputerPowerScreen(ctx context.Context, in *PerCenterComputerPowersReq, opts ...grpc.CallOption) (*PerCenterComputerPowersResp, error)
}

type cephClient struct {
	cc grpc.ClientConnInterface
}

func NewCephClient(cc grpc.ClientConnInterface) CephClient {
	return &cephClient{cc}
}

func (c *cephClient) StorageScreen(ctx context.Context, in *StorageScreenReq, opts ...grpc.CallOption) (*StorageScreenResp, error) {
	out := new(StorageScreenResp)
	err := c.cc.Invoke(ctx, "/template.Ceph/storageScreen", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cephClient) DailyPowerScreen(ctx context.Context, in *DailyPowerScreenReq, opts ...grpc.CallOption) (*DailyPowerScreenResp, error) {
	out := new(DailyPowerScreenResp)
	err := c.cc.Invoke(ctx, "/template.Ceph/dailyPowerScreen", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cephClient) PerCenterComputerPowerScreen(ctx context.Context, in *PerCenterComputerPowersReq, opts ...grpc.CallOption) (*PerCenterComputerPowersResp, error) {
	out := new(PerCenterComputerPowersResp)
	err := c.cc.Invoke(ctx, "/template.Ceph/perCenterComputerPowerScreen", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CephServer is the server API for Ceph service.
// All implementations must embed UnimplementedCephServer
// for forward compatibility
type CephServer interface {
	StorageScreen(context.Context, *StorageScreenReq) (*StorageScreenResp, error)
	DailyPowerScreen(context.Context, *DailyPowerScreenReq) (*DailyPowerScreenResp, error)
	PerCenterComputerPowerScreen(context.Context, *PerCenterComputerPowersReq) (*PerCenterComputerPowersResp, error)
	mustEmbedUnimplementedCephServer()
}

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

func (UnimplementedCephServer) StorageScreen(context.Context, *StorageScreenReq) (*StorageScreenResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method StorageScreen not implemented")
}
func (UnimplementedCephServer) DailyPowerScreen(context.Context, *DailyPowerScreenReq) (*DailyPowerScreenResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DailyPowerScreen not implemented")
}
func (UnimplementedCephServer) PerCenterComputerPowerScreen(context.Context, *PerCenterComputerPowersReq) (*PerCenterComputerPowersResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PerCenterComputerPowerScreen not implemented")
}
func (UnimplementedCephServer) mustEmbedUnimplementedCephServer() {}

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

func RegisterCephServer(s grpc.ServiceRegistrar, srv CephServer) {
	s.RegisterService(&Ceph_ServiceDesc, srv)
}

func _Ceph_StorageScreen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StorageScreenReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CephServer).StorageScreen(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/template.Ceph/storageScreen",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CephServer).StorageScreen(ctx, req.(*StorageScreenReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Ceph_DailyPowerScreen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DailyPowerScreenReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CephServer).DailyPowerScreen(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/template.Ceph/dailyPowerScreen",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CephServer).DailyPowerScreen(ctx, req.(*DailyPowerScreenReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Ceph_PerCenterComputerPowerScreen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PerCenterComputerPowersReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CephServer).PerCenterComputerPowerScreen(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/template.Ceph/perCenterComputerPowerScreen",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CephServer).PerCenterComputerPowerScreen(ctx, req.(*PerCenterComputerPowersReq))
	}
	return interceptor(ctx, in, info, handler)
}

// Ceph_ServiceDesc is the grpc.ServiceDesc for Ceph service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Ceph_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "template.Ceph",
	HandlerType: (*CephServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "storageScreen",
			Handler:    _Ceph_StorageScreen_Handler,
		},
		{
			MethodName: "dailyPowerScreen",
			Handler:    _Ceph_DailyPowerScreen_Handler,
		},
		{
			MethodName: "perCenterComputerPowerScreen",
			Handler:    _Ceph_PerCenterComputerPowerScreen_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pcm-ceph.proto",
}
