// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.32.0
// source: solana/corecast/corecast.proto

package solana_corecast

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 (
	CoreCast_DexTrades_FullMethodName    = "/solana_corecast.CoreCast/DexTrades"
	CoreCast_DexOrders_FullMethodName    = "/solana_corecast.CoreCast/DexOrders"
	CoreCast_DexPools_FullMethodName     = "/solana_corecast.CoreCast/DexPools"
	CoreCast_Transactions_FullMethodName = "/solana_corecast.CoreCast/Transactions"
	CoreCast_Transfers_FullMethodName    = "/solana_corecast.CoreCast/Transfers"
	CoreCast_Balances_FullMethodName     = "/solana_corecast.CoreCast/Balances"
)

// CoreCastClient is the client API for CoreCast 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 CoreCastClient interface {
	DexTrades(ctx context.Context, in *SubscribeTradesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DexTradeStreamMessage], error)
	DexOrders(ctx context.Context, in *SubscribeOrdersRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DexOrderStreamMessage], error)
	DexPools(ctx context.Context, in *SubscribePoolsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PoolLiquidityChangeStreamMessage], error)
	Transactions(ctx context.Context, in *SubscribeTransactionsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ParsedTransactionStreamMessage], error)
	Transfers(ctx context.Context, in *SubscribeTransfersRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TransferStreamMessage], error)
	Balances(ctx context.Context, in *SubscribeBalanceUpdateRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BalanceUpdateStreamMessage], error)
}

type coreCastClient struct {
	cc grpc.ClientConnInterface
}

func NewCoreCastClient(cc grpc.ClientConnInterface) CoreCastClient {
	return &coreCastClient{cc}
}

func (c *coreCastClient) DexTrades(ctx context.Context, in *SubscribeTradesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DexTradeStreamMessage], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CoreCast_ServiceDesc.Streams[0], CoreCast_DexTrades_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[SubscribeTradesRequest, DexTradeStreamMessage]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreCast_DexTradesClient = grpc.ServerStreamingClient[DexTradeStreamMessage]

func (c *coreCastClient) DexOrders(ctx context.Context, in *SubscribeOrdersRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DexOrderStreamMessage], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CoreCast_ServiceDesc.Streams[1], CoreCast_DexOrders_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[SubscribeOrdersRequest, DexOrderStreamMessage]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreCast_DexOrdersClient = grpc.ServerStreamingClient[DexOrderStreamMessage]

func (c *coreCastClient) DexPools(ctx context.Context, in *SubscribePoolsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PoolLiquidityChangeStreamMessage], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CoreCast_ServiceDesc.Streams[2], CoreCast_DexPools_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[SubscribePoolsRequest, PoolLiquidityChangeStreamMessage]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreCast_DexPoolsClient = grpc.ServerStreamingClient[PoolLiquidityChangeStreamMessage]

func (c *coreCastClient) Transactions(ctx context.Context, in *SubscribeTransactionsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ParsedTransactionStreamMessage], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CoreCast_ServiceDesc.Streams[3], CoreCast_Transactions_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[SubscribeTransactionsRequest, ParsedTransactionStreamMessage]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreCast_TransactionsClient = grpc.ServerStreamingClient[ParsedTransactionStreamMessage]

func (c *coreCastClient) Transfers(ctx context.Context, in *SubscribeTransfersRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TransferStreamMessage], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CoreCast_ServiceDesc.Streams[4], CoreCast_Transfers_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[SubscribeTransfersRequest, TransferStreamMessage]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreCast_TransfersClient = grpc.ServerStreamingClient[TransferStreamMessage]

func (c *coreCastClient) Balances(ctx context.Context, in *SubscribeBalanceUpdateRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BalanceUpdateStreamMessage], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CoreCast_ServiceDesc.Streams[5], CoreCast_Balances_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[SubscribeBalanceUpdateRequest, BalanceUpdateStreamMessage]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreCast_BalancesClient = grpc.ServerStreamingClient[BalanceUpdateStreamMessage]

// CoreCastServer is the server API for CoreCast service.
// All implementations must embed UnimplementedCoreCastServer
// for forward compatibility.
type CoreCastServer interface {
	DexTrades(*SubscribeTradesRequest, grpc.ServerStreamingServer[DexTradeStreamMessage]) error
	DexOrders(*SubscribeOrdersRequest, grpc.ServerStreamingServer[DexOrderStreamMessage]) error
	DexPools(*SubscribePoolsRequest, grpc.ServerStreamingServer[PoolLiquidityChangeStreamMessage]) error
	Transactions(*SubscribeTransactionsRequest, grpc.ServerStreamingServer[ParsedTransactionStreamMessage]) error
	Transfers(*SubscribeTransfersRequest, grpc.ServerStreamingServer[TransferStreamMessage]) error
	Balances(*SubscribeBalanceUpdateRequest, grpc.ServerStreamingServer[BalanceUpdateStreamMessage]) error
	mustEmbedUnimplementedCoreCastServer()
}

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

func (UnimplementedCoreCastServer) DexTrades(*SubscribeTradesRequest, grpc.ServerStreamingServer[DexTradeStreamMessage]) error {
	return status.Errorf(codes.Unimplemented, "method DexTrades not implemented")
}
func (UnimplementedCoreCastServer) DexOrders(*SubscribeOrdersRequest, grpc.ServerStreamingServer[DexOrderStreamMessage]) error {
	return status.Errorf(codes.Unimplemented, "method DexOrders not implemented")
}
func (UnimplementedCoreCastServer) DexPools(*SubscribePoolsRequest, grpc.ServerStreamingServer[PoolLiquidityChangeStreamMessage]) error {
	return status.Errorf(codes.Unimplemented, "method DexPools not implemented")
}
func (UnimplementedCoreCastServer) Transactions(*SubscribeTransactionsRequest, grpc.ServerStreamingServer[ParsedTransactionStreamMessage]) error {
	return status.Errorf(codes.Unimplemented, "method Transactions not implemented")
}
func (UnimplementedCoreCastServer) Transfers(*SubscribeTransfersRequest, grpc.ServerStreamingServer[TransferStreamMessage]) error {
	return status.Errorf(codes.Unimplemented, "method Transfers not implemented")
}
func (UnimplementedCoreCastServer) Balances(*SubscribeBalanceUpdateRequest, grpc.ServerStreamingServer[BalanceUpdateStreamMessage]) error {
	return status.Errorf(codes.Unimplemented, "method Balances not implemented")
}
func (UnimplementedCoreCastServer) mustEmbedUnimplementedCoreCastServer() {}
func (UnimplementedCoreCastServer) testEmbeddedByValue()                  {}

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

func RegisterCoreCastServer(s grpc.ServiceRegistrar, srv CoreCastServer) {
	// If the following call pancis, it indicates UnimplementedCoreCastServer 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(&CoreCast_ServiceDesc, srv)
}

func _CoreCast_DexTrades_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(SubscribeTradesRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(CoreCastServer).DexTrades(m, &grpc.GenericServerStream[SubscribeTradesRequest, DexTradeStreamMessage]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreCast_DexTradesServer = grpc.ServerStreamingServer[DexTradeStreamMessage]

func _CoreCast_DexOrders_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(SubscribeOrdersRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(CoreCastServer).DexOrders(m, &grpc.GenericServerStream[SubscribeOrdersRequest, DexOrderStreamMessage]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreCast_DexOrdersServer = grpc.ServerStreamingServer[DexOrderStreamMessage]

func _CoreCast_DexPools_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(SubscribePoolsRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(CoreCastServer).DexPools(m, &grpc.GenericServerStream[SubscribePoolsRequest, PoolLiquidityChangeStreamMessage]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreCast_DexPoolsServer = grpc.ServerStreamingServer[PoolLiquidityChangeStreamMessage]

func _CoreCast_Transactions_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(SubscribeTransactionsRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(CoreCastServer).Transactions(m, &grpc.GenericServerStream[SubscribeTransactionsRequest, ParsedTransactionStreamMessage]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreCast_TransactionsServer = grpc.ServerStreamingServer[ParsedTransactionStreamMessage]

func _CoreCast_Transfers_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(SubscribeTransfersRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(CoreCastServer).Transfers(m, &grpc.GenericServerStream[SubscribeTransfersRequest, TransferStreamMessage]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreCast_TransfersServer = grpc.ServerStreamingServer[TransferStreamMessage]

func _CoreCast_Balances_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(SubscribeBalanceUpdateRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(CoreCastServer).Balances(m, &grpc.GenericServerStream[SubscribeBalanceUpdateRequest, BalanceUpdateStreamMessage]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreCast_BalancesServer = grpc.ServerStreamingServer[BalanceUpdateStreamMessage]

// CoreCast_ServiceDesc is the grpc.ServiceDesc for CoreCast service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CoreCast_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "solana_corecast.CoreCast",
	HandlerType: (*CoreCastServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "DexTrades",
			Handler:       _CoreCast_DexTrades_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "DexOrders",
			Handler:       _CoreCast_DexOrders_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "DexPools",
			Handler:       _CoreCast_DexPools_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Transactions",
			Handler:       _CoreCast_Transactions_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Transfers",
			Handler:       _CoreCast_Transfers_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Balances",
			Handler:       _CoreCast_Balances_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "solana/corecast/corecast.proto",
}
