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

package kubes

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

// KubesServiceClient is the client API for KubesService 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 KubesServiceClient interface {
	ListDeployments(ctx context.Context, in *ListDeploymentsRequest, opts ...grpc.CallOption) (*ListDeploymentsResponse, error)
	NewDeployment(ctx context.Context, in *NewDeploymentRequest, opts ...grpc.CallOption) (*NewDeploymentResponse, error)
	DeleteDeployment(ctx context.Context, in *DeleteDeploymentRequest, opts ...grpc.CallOption) (*DeleteDeploymentResponse, error)
}

type kubesServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewKubesServiceClient(cc grpc.ClientConnInterface) KubesServiceClient {
	return &kubesServiceClient{cc}
}

func (c *kubesServiceClient) ListDeployments(ctx context.Context, in *ListDeploymentsRequest, opts ...grpc.CallOption) (*ListDeploymentsResponse, error) {
	out := new(ListDeploymentsResponse)
	err := c.cc.Invoke(ctx, "/kubes.KubesService/ListDeployments", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kubesServiceClient) NewDeployment(ctx context.Context, in *NewDeploymentRequest, opts ...grpc.CallOption) (*NewDeploymentResponse, error) {
	out := new(NewDeploymentResponse)
	err := c.cc.Invoke(ctx, "/kubes.KubesService/NewDeployment", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kubesServiceClient) DeleteDeployment(ctx context.Context, in *DeleteDeploymentRequest, opts ...grpc.CallOption) (*DeleteDeploymentResponse, error) {
	out := new(DeleteDeploymentResponse)
	err := c.cc.Invoke(ctx, "/kubes.KubesService/DeleteDeployment", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// KubesServiceServer is the server API for KubesService service.
// All implementations should embed UnimplementedKubesServiceServer
// for forward compatibility
type KubesServiceServer interface {
	ListDeployments(context.Context, *ListDeploymentsRequest) (*ListDeploymentsResponse, error)
	NewDeployment(context.Context, *NewDeploymentRequest) (*NewDeploymentResponse, error)
	DeleteDeployment(context.Context, *DeleteDeploymentRequest) (*DeleteDeploymentResponse, error)
}

// UnimplementedKubesServiceServer should be embedded to have forward compatible implementations.
type UnimplementedKubesServiceServer struct {
}

func (UnimplementedKubesServiceServer) ListDeployments(context.Context, *ListDeploymentsRequest) (*ListDeploymentsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListDeployments not implemented")
}
func (UnimplementedKubesServiceServer) NewDeployment(context.Context, *NewDeploymentRequest) (*NewDeploymentResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method NewDeployment not implemented")
}
func (UnimplementedKubesServiceServer) DeleteDeployment(context.Context, *DeleteDeploymentRequest) (*DeleteDeploymentResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteDeployment not implemented")
}

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

func RegisterKubesServiceServer(s grpc.ServiceRegistrar, srv KubesServiceServer) {
	s.RegisterService(&KubesService_ServiceDesc, srv)
}

func _KubesService_ListDeployments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListDeploymentsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KubesServiceServer).ListDeployments(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/kubes.KubesService/ListDeployments",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KubesServiceServer).ListDeployments(ctx, req.(*ListDeploymentsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KubesService_NewDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(NewDeploymentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KubesServiceServer).NewDeployment(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/kubes.KubesService/NewDeployment",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KubesServiceServer).NewDeployment(ctx, req.(*NewDeploymentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KubesService_DeleteDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteDeploymentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KubesServiceServer).DeleteDeployment(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/kubes.KubesService/DeleteDeployment",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KubesServiceServer).DeleteDeployment(ctx, req.(*DeleteDeploymentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// KubesService_ServiceDesc is the grpc.ServiceDesc for KubesService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var KubesService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "kubes.KubesService",
	HandlerType: (*KubesServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListDeployments",
			Handler:    _KubesService_ListDeployments_Handler,
		},
		{
			MethodName: "NewDeployment",
			Handler:    _KubesService_NewDeployment_Handler,
		},
		{
			MethodName: "DeleteDeployment",
			Handler:    _KubesService_DeleteDeployment_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "kubes/kubes.proto",
}
