// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package pb

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

// VPNServiceClient is the client API for VPNService 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 VPNServiceClient interface {
	Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error)
	Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error)
	Update(ctx context.Context, in *VPNUpdateRequest, opts ...grpc.CallOption) (*VPNUpdateResponse, error)
	Restart(ctx context.Context, in *VPNRestartRequest, opts ...grpc.CallOption) (*VPNRestartResponse, error)
}

type vPNServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewVPNServiceClient(cc grpc.ClientConnInterface) VPNServiceClient {
	return &vPNServiceClient{cc}
}

func (c *vPNServiceClient) Status(ctx context.Context, in *VPNStatusRequest, opts ...grpc.CallOption) (*VPNStatusResponse, error) {
	out := new(VPNStatusResponse)
	err := c.cc.Invoke(ctx, "/pb.VPNService/Status", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *vPNServiceClient) Init(ctx context.Context, in *VPNInitRequest, opts ...grpc.CallOption) (*VPNInitResponse, error) {
	out := new(VPNInitResponse)
	err := c.cc.Invoke(ctx, "/pb.VPNService/Init", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *vPNServiceClient) Update(ctx context.Context, in *VPNUpdateRequest, opts ...grpc.CallOption) (*VPNUpdateResponse, error) {
	out := new(VPNUpdateResponse)
	err := c.cc.Invoke(ctx, "/pb.VPNService/Update", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *vPNServiceClient) Restart(ctx context.Context, in *VPNRestartRequest, opts ...grpc.CallOption) (*VPNRestartResponse, error) {
	out := new(VPNRestartResponse)
	err := c.cc.Invoke(ctx, "/pb.VPNService/Restart", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// VPNServiceServer is the server API for VPNService service.
// All implementations must embed UnimplementedVPNServiceServer
// for forward compatibility
type VPNServiceServer interface {
	Status(context.Context, *VPNStatusRequest) (*VPNStatusResponse, error)
	Init(context.Context, *VPNInitRequest) (*VPNInitResponse, error)
	Update(context.Context, *VPNUpdateRequest) (*VPNUpdateResponse, error)
	Restart(context.Context, *VPNRestartRequest) (*VPNRestartResponse, error)
	mustEmbedUnimplementedVPNServiceServer()
}

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

func (UnimplementedVPNServiceServer) Status(context.Context, *VPNStatusRequest) (*VPNStatusResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Status not implemented")
}
func (UnimplementedVPNServiceServer) Init(context.Context, *VPNInitRequest) (*VPNInitResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Init not implemented")
}
func (UnimplementedVPNServiceServer) Update(context.Context, *VPNUpdateRequest) (*VPNUpdateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedVPNServiceServer) Restart(context.Context, *VPNRestartRequest) (*VPNRestartResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Restart not implemented")
}
func (UnimplementedVPNServiceServer) mustEmbedUnimplementedVPNServiceServer() {}

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

func RegisterVPNServiceServer(s grpc.ServiceRegistrar, srv VPNServiceServer) {
	s.RegisterService(&VPNService_ServiceDesc, srv)
}

func _VPNService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(VPNStatusRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(VPNServiceServer).Status(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.VPNService/Status",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(VPNServiceServer).Status(ctx, req.(*VPNStatusRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _VPNService_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(VPNInitRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(VPNServiceServer).Init(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.VPNService/Init",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(VPNServiceServer).Init(ctx, req.(*VPNInitRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _VPNService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(VPNUpdateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(VPNServiceServer).Update(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.VPNService/Update",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(VPNServiceServer).Update(ctx, req.(*VPNUpdateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _VPNService_Restart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(VPNRestartRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(VPNServiceServer).Restart(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/pb.VPNService/Restart",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(VPNServiceServer).Restart(ctx, req.(*VPNRestartRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// VPNService_ServiceDesc is the grpc.ServiceDesc for VPNService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var VPNService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.VPNService",
	HandlerType: (*VPNServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Status",
			Handler:    _VPNService_Status_Handler,
		},
		{
			MethodName: "Init",
			Handler:    _VPNService_Init_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _VPNService_Update_Handler,
		},
		{
			MethodName: "Restart",
			Handler:    _VPNService_Restart_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "vpn.proto",
}
