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

package runtimev1

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 (
	SessionLifecycleService_CreateSession_FullMethodName = "/nexuscrm.runtime.v1.SessionLifecycleService/CreateSession"
	SessionLifecycleService_ReadSession_FullMethodName   = "/nexuscrm.runtime.v1.SessionLifecycleService/ReadSession"
	SessionLifecycleService_RevokeSession_FullMethodName = "/nexuscrm.runtime.v1.SessionLifecycleService/RevokeSession"
)

// SessionLifecycleServiceClient is the client API for SessionLifecycleService 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.
//
// SessionLifecycle is the Runtime-owned identity/session authority used by an
// authenticated L1 workload. Raw login credentials, access tokens, replacement
// tokens, and browser control proofs are transport credentials and are
// deliberately absent from these messages.
type SessionLifecycleServiceClient interface {
	CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*CreateSessionResponse, error)
	ReadSession(ctx context.Context, in *ReadSessionRequest, opts ...grpc.CallOption) (*ReadSessionResponse, error)
	RevokeSession(ctx context.Context, in *RevokeSessionRequest, opts ...grpc.CallOption) (*RevokeSessionResponse, error)
}

type sessionLifecycleServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSessionLifecycleServiceClient(cc grpc.ClientConnInterface) SessionLifecycleServiceClient {
	return &sessionLifecycleServiceClient{cc}
}

func (c *sessionLifecycleServiceClient) CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*CreateSessionResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CreateSessionResponse)
	err := c.cc.Invoke(ctx, SessionLifecycleService_CreateSession_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sessionLifecycleServiceClient) ReadSession(ctx context.Context, in *ReadSessionRequest, opts ...grpc.CallOption) (*ReadSessionResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ReadSessionResponse)
	err := c.cc.Invoke(ctx, SessionLifecycleService_ReadSession_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sessionLifecycleServiceClient) RevokeSession(ctx context.Context, in *RevokeSessionRequest, opts ...grpc.CallOption) (*RevokeSessionResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RevokeSessionResponse)
	err := c.cc.Invoke(ctx, SessionLifecycleService_RevokeSession_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SessionLifecycleServiceServer is the server API for SessionLifecycleService service.
// All implementations must embed UnimplementedSessionLifecycleServiceServer
// for forward compatibility.
//
// SessionLifecycle is the Runtime-owned identity/session authority used by an
// authenticated L1 workload. Raw login credentials, access tokens, replacement
// tokens, and browser control proofs are transport credentials and are
// deliberately absent from these messages.
type SessionLifecycleServiceServer interface {
	CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error)
	ReadSession(context.Context, *ReadSessionRequest) (*ReadSessionResponse, error)
	RevokeSession(context.Context, *RevokeSessionRequest) (*RevokeSessionResponse, error)
	mustEmbedUnimplementedSessionLifecycleServiceServer()
}

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

func (UnimplementedSessionLifecycleServiceServer) CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method CreateSession not implemented")
}
func (UnimplementedSessionLifecycleServiceServer) ReadSession(context.Context, *ReadSessionRequest) (*ReadSessionResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method ReadSession not implemented")
}
func (UnimplementedSessionLifecycleServiceServer) RevokeSession(context.Context, *RevokeSessionRequest) (*RevokeSessionResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method RevokeSession not implemented")
}
func (UnimplementedSessionLifecycleServiceServer) mustEmbedUnimplementedSessionLifecycleServiceServer() {
}
func (UnimplementedSessionLifecycleServiceServer) testEmbeddedByValue() {}

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

func RegisterSessionLifecycleServiceServer(s grpc.ServiceRegistrar, srv SessionLifecycleServiceServer) {
	// If the following call panics, it indicates UnimplementedSessionLifecycleServiceServer 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(&SessionLifecycleService_ServiceDesc, srv)
}

func _SessionLifecycleService_CreateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateSessionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SessionLifecycleServiceServer).CreateSession(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SessionLifecycleService_CreateSession_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SessionLifecycleServiceServer).CreateSession(ctx, req.(*CreateSessionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SessionLifecycleService_ReadSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReadSessionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SessionLifecycleServiceServer).ReadSession(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SessionLifecycleService_ReadSession_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SessionLifecycleServiceServer).ReadSession(ctx, req.(*ReadSessionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SessionLifecycleService_RevokeSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RevokeSessionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SessionLifecycleServiceServer).RevokeSession(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SessionLifecycleService_RevokeSession_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SessionLifecycleServiceServer).RevokeSession(ctx, req.(*RevokeSessionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// SessionLifecycleService_ServiceDesc is the grpc.ServiceDesc for SessionLifecycleService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SessionLifecycleService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "nexuscrm.runtime.v1.SessionLifecycleService",
	HandlerType: (*SessionLifecycleServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSession",
			Handler:    _SessionLifecycleService_CreateSession_Handler,
		},
		{
			MethodName: "ReadSession",
			Handler:    _SessionLifecycleService_ReadSession_Handler,
		},
		{
			MethodName: "RevokeSession",
			Handler:    _SessionLifecycleService_RevokeSession_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "runtime/v1/session.proto",
}
