// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v5.28.3
// source: helios/widgets/widgetservice.proto

package pbwidgets

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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	WidgetService_ListAppContexts_FullMethodName           = "/helios.widgets.WidgetService/ListAppContexts"
	WidgetService_ListSpaces_FullMethodName                = "/helios.widgets.WidgetService/ListSpaces"
	WidgetService_AddSpace_FullMethodName                  = "/helios.widgets.WidgetService/AddSpace"
	WidgetService_UpdateSpace_FullMethodName               = "/helios.widgets.WidgetService/UpdateSpace"
	WidgetService_DeleteSpace_FullMethodName               = "/helios.widgets.WidgetService/DeleteSpace"
	WidgetService_ReorderSpaces_FullMethodName             = "/helios.widgets.WidgetService/ReorderSpaces"
	WidgetService_CreateWidgetInstance_FullMethodName      = "/helios.widgets.WidgetService/CreateWidgetInstance"
	WidgetService_SaveWidgetInstanceData_FullMethodName    = "/helios.widgets.WidgetService/SaveWidgetInstanceData"
	WidgetService_MoveWidgetInstanceToSpace_FullMethodName = "/helios.widgets.WidgetService/MoveWidgetInstanceToSpace"
	WidgetService_DeleteWidgetInstance_FullMethodName      = "/helios.widgets.WidgetService/DeleteWidgetInstance"
)

// WidgetServiceClient is the client API for WidgetService 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.
//
// Requires authed human.
type WidgetServiceClient interface {
	ListAppContexts(ctx context.Context, in *ListAppContextsRequest, opts ...grpc.CallOption) (*ListAppContextsResponse, error)
	// All spaces & attached widget instances for the authed human.
	ListSpaces(ctx context.Context, in *ListSpacesRequest, opts ...grpc.CallOption) (*ListSpacesResponse, error)
	AddSpace(ctx context.Context, in *AddSpaceRequest, opts ...grpc.CallOption) (*AddSpaceResponse, error)
	// Authoritative: please define every field, otherwise they will be overwritten as empty.
	UpdateSpace(ctx context.Context, in *UpdateSpaceRequest, opts ...grpc.CallOption) (*UpdateSpaceResponse, error)
	// Deletes space and all widget instances within.
	DeleteSpace(ctx context.Context, in *DeleteSpaceRequest, opts ...grpc.CallOption) (*DeleteSpaceResponse, error)
	// All existing spaces for human must be provided.
	ReorderSpaces(ctx context.Context, in *ReorderSpacesRequest, opts ...grpc.CallOption) (*ReorderSpacesResponse, error)
	// Create a widget instance and set it's initial space
	CreateWidgetInstance(ctx context.Context, in *CreateWidgetInstanceRequest, opts ...grpc.CallOption) (*CreateWidgetInstanceResponse, error)
	SaveWidgetInstanceData(ctx context.Context, in *SaveWidgetInstanceDataRequest, opts ...grpc.CallOption) (*SaveWidgetInstanceDataResponse, error)
	MoveWidgetInstanceToSpace(ctx context.Context, in *MoveWidgetInstanceToSpaceRequest, opts ...grpc.CallOption) (*MoveWidgetInstanceToSpaceResponse, error)
	DeleteWidgetInstance(ctx context.Context, in *DeleteWidgetInstanceRequest, opts ...grpc.CallOption) (*DeleteWidgetInstanceResponse, error)
}

type widgetServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewWidgetServiceClient(cc grpc.ClientConnInterface) WidgetServiceClient {
	return &widgetServiceClient{cc}
}

func (c *widgetServiceClient) ListAppContexts(ctx context.Context, in *ListAppContextsRequest, opts ...grpc.CallOption) (*ListAppContextsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListAppContextsResponse)
	err := c.cc.Invoke(ctx, WidgetService_ListAppContexts_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *widgetServiceClient) ListSpaces(ctx context.Context, in *ListSpacesRequest, opts ...grpc.CallOption) (*ListSpacesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListSpacesResponse)
	err := c.cc.Invoke(ctx, WidgetService_ListSpaces_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *widgetServiceClient) AddSpace(ctx context.Context, in *AddSpaceRequest, opts ...grpc.CallOption) (*AddSpaceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(AddSpaceResponse)
	err := c.cc.Invoke(ctx, WidgetService_AddSpace_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *widgetServiceClient) UpdateSpace(ctx context.Context, in *UpdateSpaceRequest, opts ...grpc.CallOption) (*UpdateSpaceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(UpdateSpaceResponse)
	err := c.cc.Invoke(ctx, WidgetService_UpdateSpace_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *widgetServiceClient) DeleteSpace(ctx context.Context, in *DeleteSpaceRequest, opts ...grpc.CallOption) (*DeleteSpaceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteSpaceResponse)
	err := c.cc.Invoke(ctx, WidgetService_DeleteSpace_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *widgetServiceClient) ReorderSpaces(ctx context.Context, in *ReorderSpacesRequest, opts ...grpc.CallOption) (*ReorderSpacesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ReorderSpacesResponse)
	err := c.cc.Invoke(ctx, WidgetService_ReorderSpaces_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *widgetServiceClient) CreateWidgetInstance(ctx context.Context, in *CreateWidgetInstanceRequest, opts ...grpc.CallOption) (*CreateWidgetInstanceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CreateWidgetInstanceResponse)
	err := c.cc.Invoke(ctx, WidgetService_CreateWidgetInstance_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *widgetServiceClient) SaveWidgetInstanceData(ctx context.Context, in *SaveWidgetInstanceDataRequest, opts ...grpc.CallOption) (*SaveWidgetInstanceDataResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SaveWidgetInstanceDataResponse)
	err := c.cc.Invoke(ctx, WidgetService_SaveWidgetInstanceData_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *widgetServiceClient) MoveWidgetInstanceToSpace(ctx context.Context, in *MoveWidgetInstanceToSpaceRequest, opts ...grpc.CallOption) (*MoveWidgetInstanceToSpaceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(MoveWidgetInstanceToSpaceResponse)
	err := c.cc.Invoke(ctx, WidgetService_MoveWidgetInstanceToSpace_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *widgetServiceClient) DeleteWidgetInstance(ctx context.Context, in *DeleteWidgetInstanceRequest, opts ...grpc.CallOption) (*DeleteWidgetInstanceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteWidgetInstanceResponse)
	err := c.cc.Invoke(ctx, WidgetService_DeleteWidgetInstance_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// WidgetServiceServer is the server API for WidgetService service.
// All implementations must embed UnimplementedWidgetServiceServer
// for forward compatibility.
//
// Requires authed human.
type WidgetServiceServer interface {
	ListAppContexts(context.Context, *ListAppContextsRequest) (*ListAppContextsResponse, error)
	// All spaces & attached widget instances for the authed human.
	ListSpaces(context.Context, *ListSpacesRequest) (*ListSpacesResponse, error)
	AddSpace(context.Context, *AddSpaceRequest) (*AddSpaceResponse, error)
	// Authoritative: please define every field, otherwise they will be overwritten as empty.
	UpdateSpace(context.Context, *UpdateSpaceRequest) (*UpdateSpaceResponse, error)
	// Deletes space and all widget instances within.
	DeleteSpace(context.Context, *DeleteSpaceRequest) (*DeleteSpaceResponse, error)
	// All existing spaces for human must be provided.
	ReorderSpaces(context.Context, *ReorderSpacesRequest) (*ReorderSpacesResponse, error)
	// Create a widget instance and set it's initial space
	CreateWidgetInstance(context.Context, *CreateWidgetInstanceRequest) (*CreateWidgetInstanceResponse, error)
	SaveWidgetInstanceData(context.Context, *SaveWidgetInstanceDataRequest) (*SaveWidgetInstanceDataResponse, error)
	MoveWidgetInstanceToSpace(context.Context, *MoveWidgetInstanceToSpaceRequest) (*MoveWidgetInstanceToSpaceResponse, error)
	DeleteWidgetInstance(context.Context, *DeleteWidgetInstanceRequest) (*DeleteWidgetInstanceResponse, error)
	mustEmbedUnimplementedWidgetServiceServer()
}

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

func (UnimplementedWidgetServiceServer) ListAppContexts(context.Context, *ListAppContextsRequest) (*ListAppContextsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListAppContexts not implemented")
}
func (UnimplementedWidgetServiceServer) ListSpaces(context.Context, *ListSpacesRequest) (*ListSpacesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListSpaces not implemented")
}
func (UnimplementedWidgetServiceServer) AddSpace(context.Context, *AddSpaceRequest) (*AddSpaceResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AddSpace not implemented")
}
func (UnimplementedWidgetServiceServer) UpdateSpace(context.Context, *UpdateSpaceRequest) (*UpdateSpaceResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateSpace not implemented")
}
func (UnimplementedWidgetServiceServer) DeleteSpace(context.Context, *DeleteSpaceRequest) (*DeleteSpaceResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteSpace not implemented")
}
func (UnimplementedWidgetServiceServer) ReorderSpaces(context.Context, *ReorderSpacesRequest) (*ReorderSpacesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReorderSpaces not implemented")
}
func (UnimplementedWidgetServiceServer) CreateWidgetInstance(context.Context, *CreateWidgetInstanceRequest) (*CreateWidgetInstanceResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateWidgetInstance not implemented")
}
func (UnimplementedWidgetServiceServer) SaveWidgetInstanceData(context.Context, *SaveWidgetInstanceDataRequest) (*SaveWidgetInstanceDataResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SaveWidgetInstanceData not implemented")
}
func (UnimplementedWidgetServiceServer) MoveWidgetInstanceToSpace(context.Context, *MoveWidgetInstanceToSpaceRequest) (*MoveWidgetInstanceToSpaceResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method MoveWidgetInstanceToSpace not implemented")
}
func (UnimplementedWidgetServiceServer) DeleteWidgetInstance(context.Context, *DeleteWidgetInstanceRequest) (*DeleteWidgetInstanceResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteWidgetInstance not implemented")
}
func (UnimplementedWidgetServiceServer) mustEmbedUnimplementedWidgetServiceServer() {}
func (UnimplementedWidgetServiceServer) testEmbeddedByValue()                       {}

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

func RegisterWidgetServiceServer(s grpc.ServiceRegistrar, srv WidgetServiceServer) {
	// If the following call pancis, it indicates UnimplementedWidgetServiceServer 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(&WidgetService_ServiceDesc, srv)
}

func _WidgetService_ListAppContexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListAppContextsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WidgetServiceServer).ListAppContexts(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WidgetService_ListAppContexts_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WidgetServiceServer).ListAppContexts(ctx, req.(*ListAppContextsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WidgetService_ListSpaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListSpacesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WidgetServiceServer).ListSpaces(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WidgetService_ListSpaces_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WidgetServiceServer).ListSpaces(ctx, req.(*ListSpacesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WidgetService_AddSpace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddSpaceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WidgetServiceServer).AddSpace(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WidgetService_AddSpace_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WidgetServiceServer).AddSpace(ctx, req.(*AddSpaceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WidgetService_UpdateSpace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateSpaceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WidgetServiceServer).UpdateSpace(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WidgetService_UpdateSpace_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WidgetServiceServer).UpdateSpace(ctx, req.(*UpdateSpaceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WidgetService_DeleteSpace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteSpaceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WidgetServiceServer).DeleteSpace(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WidgetService_DeleteSpace_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WidgetServiceServer).DeleteSpace(ctx, req.(*DeleteSpaceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WidgetService_ReorderSpaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReorderSpacesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WidgetServiceServer).ReorderSpaces(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WidgetService_ReorderSpaces_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WidgetServiceServer).ReorderSpaces(ctx, req.(*ReorderSpacesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WidgetService_CreateWidgetInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateWidgetInstanceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WidgetServiceServer).CreateWidgetInstance(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WidgetService_CreateWidgetInstance_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WidgetServiceServer).CreateWidgetInstance(ctx, req.(*CreateWidgetInstanceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WidgetService_SaveWidgetInstanceData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SaveWidgetInstanceDataRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WidgetServiceServer).SaveWidgetInstanceData(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WidgetService_SaveWidgetInstanceData_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WidgetServiceServer).SaveWidgetInstanceData(ctx, req.(*SaveWidgetInstanceDataRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WidgetService_MoveWidgetInstanceToSpace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MoveWidgetInstanceToSpaceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WidgetServiceServer).MoveWidgetInstanceToSpace(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WidgetService_MoveWidgetInstanceToSpace_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WidgetServiceServer).MoveWidgetInstanceToSpace(ctx, req.(*MoveWidgetInstanceToSpaceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WidgetService_DeleteWidgetInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteWidgetInstanceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WidgetServiceServer).DeleteWidgetInstance(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WidgetService_DeleteWidgetInstance_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WidgetServiceServer).DeleteWidgetInstance(ctx, req.(*DeleteWidgetInstanceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// WidgetService_ServiceDesc is the grpc.ServiceDesc for WidgetService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var WidgetService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "helios.widgets.WidgetService",
	HandlerType: (*WidgetServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListAppContexts",
			Handler:    _WidgetService_ListAppContexts_Handler,
		},
		{
			MethodName: "ListSpaces",
			Handler:    _WidgetService_ListSpaces_Handler,
		},
		{
			MethodName: "AddSpace",
			Handler:    _WidgetService_AddSpace_Handler,
		},
		{
			MethodName: "UpdateSpace",
			Handler:    _WidgetService_UpdateSpace_Handler,
		},
		{
			MethodName: "DeleteSpace",
			Handler:    _WidgetService_DeleteSpace_Handler,
		},
		{
			MethodName: "ReorderSpaces",
			Handler:    _WidgetService_ReorderSpaces_Handler,
		},
		{
			MethodName: "CreateWidgetInstance",
			Handler:    _WidgetService_CreateWidgetInstance_Handler,
		},
		{
			MethodName: "SaveWidgetInstanceData",
			Handler:    _WidgetService_SaveWidgetInstanceData_Handler,
		},
		{
			MethodName: "MoveWidgetInstanceToSpace",
			Handler:    _WidgetService_MoveWidgetInstanceToSpace_Handler,
		},
		{
			MethodName: "DeleteWidgetInstance",
			Handler:    _WidgetService_DeleteWidgetInstance_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "helios/widgets/widgetservice.proto",
}
