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

package rpc

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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8

const (
	ClusterCROperationService_UpdateCluster_FullMethodName = "/rpc.ClusterCROperationService/UpdateCluster"
	ClusterCROperationService_GetCluster_FullMethodName    = "/rpc.ClusterCROperationService/GetCluster"
)

// ClusterCROperationServiceClient is the client API for ClusterCROperationService 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.
//
// The ClusterCROperationService provides APIs for updating cluster CR.
type ClusterCROperationServiceClient interface {
	// Update Cluster CR.
	UpdateCluster(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*ClusterDetails, error)
	// Get Cluster Info.
	GetCluster(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*ClusterDetails, error)
}

type clusterCROperationServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewClusterCROperationServiceClient(cc grpc.ClientConnInterface) ClusterCROperationServiceClient {
	return &clusterCROperationServiceClient{cc}
}

func (c *clusterCROperationServiceClient) UpdateCluster(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*ClusterDetails, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ClusterDetails)
	err := c.cc.Invoke(ctx, ClusterCROperationService_UpdateCluster_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *clusterCROperationServiceClient) GetCluster(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*ClusterDetails, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ClusterDetails)
	err := c.cc.Invoke(ctx, ClusterCROperationService_GetCluster_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ClusterCROperationServiceServer is the server API for ClusterCROperationService service.
// All implementations must embed UnimplementedClusterCROperationServiceServer
// for forward compatibility
//
// The ClusterCROperationService provides APIs for updating cluster CR.
type ClusterCROperationServiceServer interface {
	// Update Cluster CR.
	UpdateCluster(context.Context, *UpdateClusterRequest) (*ClusterDetails, error)
	// Get Cluster Info.
	GetCluster(context.Context, *GetClusterRequest) (*ClusterDetails, error)
	mustEmbedUnimplementedClusterCROperationServiceServer()
}

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

func (UnimplementedClusterCROperationServiceServer) UpdateCluster(context.Context, *UpdateClusterRequest) (*ClusterDetails, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateCluster not implemented")
}
func (UnimplementedClusterCROperationServiceServer) GetCluster(context.Context, *GetClusterRequest) (*ClusterDetails, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCluster not implemented")
}
func (UnimplementedClusterCROperationServiceServer) mustEmbedUnimplementedClusterCROperationServiceServer() {
}

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

func RegisterClusterCROperationServiceServer(s grpc.ServiceRegistrar, srv ClusterCROperationServiceServer) {
	s.RegisterService(&ClusterCROperationService_ServiceDesc, srv)
}

func _ClusterCROperationService_UpdateCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateClusterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ClusterCROperationServiceServer).UpdateCluster(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ClusterCROperationService_UpdateCluster_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ClusterCROperationServiceServer).UpdateCluster(ctx, req.(*UpdateClusterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ClusterCROperationService_GetCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetClusterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ClusterCROperationServiceServer).GetCluster(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ClusterCROperationService_GetCluster_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ClusterCROperationServiceServer).GetCluster(ctx, req.(*GetClusterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ClusterCROperationService_ServiceDesc is the grpc.ServiceDesc for ClusterCROperationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ClusterCROperationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rpc.ClusterCROperationService",
	HandlerType: (*ClusterCROperationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UpdateCluster",
			Handler:    _ClusterCROperationService_UpdateCluster_Handler,
		},
		{
			MethodName: "GetCluster",
			Handler:    _ClusterCROperationService_GetCluster_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "rpc/cluster_ops.proto",
}
