// Code generated by make; DO NOT EDIT.

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v3.20.2
// source: volumegroup/volumegroup.proto

package volumegroup

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

const (
	Controller_CreateVolumeGroup_FullMethodName           = "/volumegroup.Controller/CreateVolumeGroup"
	Controller_ModifyVolumeGroupMembership_FullMethodName = "/volumegroup.Controller/ModifyVolumeGroupMembership"
	Controller_DeleteVolumeGroup_FullMethodName           = "/volumegroup.Controller/DeleteVolumeGroup"
	Controller_ListVolumeGroups_FullMethodName            = "/volumegroup.Controller/ListVolumeGroups"
	Controller_ControllerGetVolumeGroup_FullMethodName    = "/volumegroup.Controller/ControllerGetVolumeGroup"
)

// ControllerClient is the client API for Controller 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 ControllerClient interface {
	// CreateVolumeGroup RPC call to create a volume group.
	CreateVolumeGroup(ctx context.Context, in *CreateVolumeGroupRequest, opts ...grpc.CallOption) (*CreateVolumeGroupResponse, error)
	// ModifyVolumeGroupMembership RPC call to modify a volume group.
	ModifyVolumeGroupMembership(ctx context.Context, in *ModifyVolumeGroupMembershipRequest, opts ...grpc.CallOption) (*ModifyVolumeGroupMembershipResponse, error)
	// DeleteVolumeGroup RPC call to delete a volume group.
	DeleteVolumeGroup(ctx context.Context, in *DeleteVolumeGroupRequest, opts ...grpc.CallOption) (*DeleteVolumeGroupResponse, error)
	// ListVolumeGroups RPC call to list volume groups.
	ListVolumeGroups(ctx context.Context, in *ListVolumeGroupsRequest, opts ...grpc.CallOption) (*ListVolumeGroupsResponse, error)
	// CreateVolumeGroup RPC call to get a volume group.
	ControllerGetVolumeGroup(ctx context.Context, in *ControllerGetVolumeGroupRequest, opts ...grpc.CallOption) (*ControllerGetVolumeGroupResponse, error)
}

type controllerClient struct {
	cc grpc.ClientConnInterface
}

func NewControllerClient(cc grpc.ClientConnInterface) ControllerClient {
	return &controllerClient{cc}
}

func (c *controllerClient) CreateVolumeGroup(ctx context.Context, in *CreateVolumeGroupRequest, opts ...grpc.CallOption) (*CreateVolumeGroupResponse, error) {
	out := new(CreateVolumeGroupResponse)
	err := c.cc.Invoke(ctx, Controller_CreateVolumeGroup_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *controllerClient) ModifyVolumeGroupMembership(ctx context.Context, in *ModifyVolumeGroupMembershipRequest, opts ...grpc.CallOption) (*ModifyVolumeGroupMembershipResponse, error) {
	out := new(ModifyVolumeGroupMembershipResponse)
	err := c.cc.Invoke(ctx, Controller_ModifyVolumeGroupMembership_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *controllerClient) DeleteVolumeGroup(ctx context.Context, in *DeleteVolumeGroupRequest, opts ...grpc.CallOption) (*DeleteVolumeGroupResponse, error) {
	out := new(DeleteVolumeGroupResponse)
	err := c.cc.Invoke(ctx, Controller_DeleteVolumeGroup_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *controllerClient) ListVolumeGroups(ctx context.Context, in *ListVolumeGroupsRequest, opts ...grpc.CallOption) (*ListVolumeGroupsResponse, error) {
	out := new(ListVolumeGroupsResponse)
	err := c.cc.Invoke(ctx, Controller_ListVolumeGroups_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *controllerClient) ControllerGetVolumeGroup(ctx context.Context, in *ControllerGetVolumeGroupRequest, opts ...grpc.CallOption) (*ControllerGetVolumeGroupResponse, error) {
	out := new(ControllerGetVolumeGroupResponse)
	err := c.cc.Invoke(ctx, Controller_ControllerGetVolumeGroup_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ControllerServer is the server API for Controller service.
// All implementations must embed UnimplementedControllerServer
// for forward compatibility
type ControllerServer interface {
	// CreateVolumeGroup RPC call to create a volume group.
	CreateVolumeGroup(context.Context, *CreateVolumeGroupRequest) (*CreateVolumeGroupResponse, error)
	// ModifyVolumeGroupMembership RPC call to modify a volume group.
	ModifyVolumeGroupMembership(context.Context, *ModifyVolumeGroupMembershipRequest) (*ModifyVolumeGroupMembershipResponse, error)
	// DeleteVolumeGroup RPC call to delete a volume group.
	DeleteVolumeGroup(context.Context, *DeleteVolumeGroupRequest) (*DeleteVolumeGroupResponse, error)
	// ListVolumeGroups RPC call to list volume groups.
	ListVolumeGroups(context.Context, *ListVolumeGroupsRequest) (*ListVolumeGroupsResponse, error)
	// CreateVolumeGroup RPC call to get a volume group.
	ControllerGetVolumeGroup(context.Context, *ControllerGetVolumeGroupRequest) (*ControllerGetVolumeGroupResponse, error)
	mustEmbedUnimplementedControllerServer()
}

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

func (UnimplementedControllerServer) CreateVolumeGroup(context.Context, *CreateVolumeGroupRequest) (*CreateVolumeGroupResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateVolumeGroup not implemented")
}
func (UnimplementedControllerServer) ModifyVolumeGroupMembership(context.Context, *ModifyVolumeGroupMembershipRequest) (*ModifyVolumeGroupMembershipResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ModifyVolumeGroupMembership not implemented")
}
func (UnimplementedControllerServer) DeleteVolumeGroup(context.Context, *DeleteVolumeGroupRequest) (*DeleteVolumeGroupResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteVolumeGroup not implemented")
}
func (UnimplementedControllerServer) ListVolumeGroups(context.Context, *ListVolumeGroupsRequest) (*ListVolumeGroupsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListVolumeGroups not implemented")
}
func (UnimplementedControllerServer) ControllerGetVolumeGroup(context.Context, *ControllerGetVolumeGroupRequest) (*ControllerGetVolumeGroupResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ControllerGetVolumeGroup not implemented")
}
func (UnimplementedControllerServer) mustEmbedUnimplementedControllerServer() {}

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

func RegisterControllerServer(s grpc.ServiceRegistrar, srv ControllerServer) {
	s.RegisterService(&Controller_ServiceDesc, srv)
}

func _Controller_CreateVolumeGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateVolumeGroupRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ControllerServer).CreateVolumeGroup(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Controller_CreateVolumeGroup_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ControllerServer).CreateVolumeGroup(ctx, req.(*CreateVolumeGroupRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Controller_ModifyVolumeGroupMembership_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ModifyVolumeGroupMembershipRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ControllerServer).ModifyVolumeGroupMembership(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Controller_ModifyVolumeGroupMembership_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ControllerServer).ModifyVolumeGroupMembership(ctx, req.(*ModifyVolumeGroupMembershipRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Controller_DeleteVolumeGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteVolumeGroupRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ControllerServer).DeleteVolumeGroup(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Controller_DeleteVolumeGroup_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ControllerServer).DeleteVolumeGroup(ctx, req.(*DeleteVolumeGroupRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Controller_ListVolumeGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListVolumeGroupsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ControllerServer).ListVolumeGroups(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Controller_ListVolumeGroups_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ControllerServer).ListVolumeGroups(ctx, req.(*ListVolumeGroupsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Controller_ControllerGetVolumeGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ControllerGetVolumeGroupRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ControllerServer).ControllerGetVolumeGroup(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Controller_ControllerGetVolumeGroup_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ControllerServer).ControllerGetVolumeGroup(ctx, req.(*ControllerGetVolumeGroupRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Controller_ServiceDesc is the grpc.ServiceDesc for Controller service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Controller_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "volumegroup.Controller",
	HandlerType: (*ControllerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateVolumeGroup",
			Handler:    _Controller_CreateVolumeGroup_Handler,
		},
		{
			MethodName: "ModifyVolumeGroupMembership",
			Handler:    _Controller_ModifyVolumeGroupMembership_Handler,
		},
		{
			MethodName: "DeleteVolumeGroup",
			Handler:    _Controller_DeleteVolumeGroup_Handler,
		},
		{
			MethodName: "ListVolumeGroups",
			Handler:    _Controller_ListVolumeGroups_Handler,
		},
		{
			MethodName: "ControllerGetVolumeGroup",
			Handler:    _Controller_ControllerGetVolumeGroup_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "volumegroup/volumegroup.proto",
}
