// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             v3.21.12
// source: yandex/cloud/baremetal/v1alpha/mounted_image_service.proto

package baremetal

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 (
	MountedImageService_Create_FullMethodName = "/yandex.cloud.baremetal.v1alpha.MountedImageService/Create"
	MountedImageService_Delete_FullMethodName = "/yandex.cloud.baremetal.v1alpha.MountedImageService/Delete"
	MountedImageService_Get_FullMethodName    = "/yandex.cloud.baremetal.v1alpha.MountedImageService/Get"
)

// MountedImageServiceClient is the client API for MountedImageService 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.
//
// A set of methods for managing Image mounting.
type MountedImageServiceClient interface {
	// Mount user image.
	Create(ctx context.Context, in *CreateMountedImageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Unmount user image.
	Delete(ctx context.Context, in *DeleteMountedImageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Get mounted user image.
	Get(ctx context.Context, in *GetMountedImageRequest, opts ...grpc.CallOption) (*GetMountedImageResponse, error)
}

type mountedImageServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewMountedImageServiceClient(cc grpc.ClientConnInterface) MountedImageServiceClient {
	return &mountedImageServiceClient{cc}
}

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

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

func (c *mountedImageServiceClient) Get(ctx context.Context, in *GetMountedImageRequest, opts ...grpc.CallOption) (*GetMountedImageResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetMountedImageResponse)
	err := c.cc.Invoke(ctx, MountedImageService_Get_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// MountedImageServiceServer is the server API for MountedImageService service.
// All implementations should embed UnimplementedMountedImageServiceServer
// for forward compatibility.
//
// A set of methods for managing Image mounting.
type MountedImageServiceServer interface {
	// Mount user image.
	Create(context.Context, *CreateMountedImageRequest) (*emptypb.Empty, error)
	// Unmount user image.
	Delete(context.Context, *DeleteMountedImageRequest) (*emptypb.Empty, error)
	// Get mounted user image.
	Get(context.Context, *GetMountedImageRequest) (*GetMountedImageResponse, error)
}

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

func (UnimplementedMountedImageServiceServer) Create(context.Context, *CreateMountedImageRequest) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedMountedImageServiceServer) Delete(context.Context, *DeleteMountedImageRequest) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedMountedImageServiceServer) Get(context.Context, *GetMountedImageRequest) (*GetMountedImageResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedMountedImageServiceServer) testEmbeddedByValue() {}

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

func RegisterMountedImageServiceServer(s grpc.ServiceRegistrar, srv MountedImageServiceServer) {
	// If the following call panics, it indicates UnimplementedMountedImageServiceServer 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(&MountedImageService_ServiceDesc, srv)
}

func _MountedImageService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateMountedImageRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MountedImageServiceServer).Create(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MountedImageService_Create_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MountedImageServiceServer).Create(ctx, req.(*CreateMountedImageRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _MountedImageService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteMountedImageRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MountedImageServiceServer).Delete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MountedImageService_Delete_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MountedImageServiceServer).Delete(ctx, req.(*DeleteMountedImageRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _MountedImageService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetMountedImageRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MountedImageServiceServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: MountedImageService_Get_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MountedImageServiceServer).Get(ctx, req.(*GetMountedImageRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// MountedImageService_ServiceDesc is the grpc.ServiceDesc for MountedImageService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MountedImageService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.baremetal.v1alpha.MountedImageService",
	HandlerType: (*MountedImageServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _MountedImageService_Create_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _MountedImageService_Delete_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _MountedImageService_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/baremetal/v1alpha/mounted_image_service.proto",
}
