// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             (unknown)
// source: ring/v1/service.proto

package ringv1

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

// RingServiceClient is the client API for RingService 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 RingServiceClient interface {
	// account info service
	SendRawTransaction(ctx context.Context, in *SendRawTransactionRequest, opts ...grpc.CallOption) (*SendRawTransactionResponse, error)
}

type ringServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewRingServiceClient(cc grpc.ClientConnInterface) RingServiceClient {
	return &ringServiceClient{cc}
}

func (c *ringServiceClient) SendRawTransaction(ctx context.Context, in *SendRawTransactionRequest, opts ...grpc.CallOption) (*SendRawTransactionResponse, error) {
	out := new(SendRawTransactionResponse)
	err := c.cc.Invoke(ctx, "/ring.v1.RingService/SendRawTransaction", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RingServiceServer is the server API for RingService service.
// All implementations must embed UnimplementedRingServiceServer
// for forward compatibility
type RingServiceServer interface {
	// account info service
	SendRawTransaction(context.Context, *SendRawTransactionRequest) (*SendRawTransactionResponse, error)
	mustEmbedUnimplementedRingServiceServer()
}

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

func (UnimplementedRingServiceServer) SendRawTransaction(context.Context, *SendRawTransactionRequest) (*SendRawTransactionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SendRawTransaction not implemented")
}
func (UnimplementedRingServiceServer) mustEmbedUnimplementedRingServiceServer() {}

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

func RegisterRingServiceServer(s grpc.ServiceRegistrar, srv RingServiceServer) {
	s.RegisterService(&RingService_ServiceDesc, srv)
}

func _RingService_SendRawTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SendRawTransactionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RingServiceServer).SendRawTransaction(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ring.v1.RingService/SendRawTransaction",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RingServiceServer).SendRawTransaction(ctx, req.(*SendRawTransactionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// RingService_ServiceDesc is the grpc.ServiceDesc for RingService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RingService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ring.v1.RingService",
	HandlerType: (*RingServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendRawTransaction",
			Handler:    _RingService_SendRawTransaction_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ring/v1/service.proto",
}
