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

package billing

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// 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

// BillingServiceClient is the client API for BillingService 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 BillingServiceClient interface {
	SetupIntent(ctx context.Context, in *OrgIdReq, opts ...grpc.CallOption) (*SetupIntentResp, error)
	ListPaymentMethods(ctx context.Context, in *StripePaginationParam, opts ...grpc.CallOption) (*PaymentMethods, error)
	DeletePaymentMethod(ctx context.Context, in *OrgAndPaymentID, opts ...grpc.CallOption) (*emptypb.Empty, error)
	UpdatePaymentMethod(ctx context.Context, in *PaymentMethod, opts ...grpc.CallOption) (*PaymentMethod, error)
	ListInvoices(ctx context.Context, in *StripePaginationParam, opts ...grpc.CallOption) (*Invoices, error)
	ListCredits(ctx context.Context, in *OrgIdReq, opts ...grpc.CallOption) (*Credits, error)
	GetCustomerBillingInfo(ctx context.Context, in *OrgIdReq, opts ...grpc.CallOption) (*BillingInfo, error)
	UpdateCustomerBillingInfo(ctx context.Context, in *BillingInfo, opts ...grpc.CallOption) (*BillingInfo, error)
	GetCurrentBillingCycle(ctx context.Context, in *OrgIdReq, opts ...grpc.CallOption) (*CurrentBillingCycle, error)
	GetMonthUsageGroupByProject(ctx context.Context, in *MonthUsageGroupByProjectReq, opts ...grpc.CallOption) (*MonthUsageGroupByProjectResp, error)
}

type billingServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewBillingServiceClient(cc grpc.ClientConnInterface) BillingServiceClient {
	return &billingServiceClient{cc}
}

func (c *billingServiceClient) SetupIntent(ctx context.Context, in *OrgIdReq, opts ...grpc.CallOption) (*SetupIntentResp, error) {
	out := new(SetupIntentResp)
	err := c.cc.Invoke(ctx, "/billing.BillingService/SetupIntent", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *billingServiceClient) ListPaymentMethods(ctx context.Context, in *StripePaginationParam, opts ...grpc.CallOption) (*PaymentMethods, error) {
	out := new(PaymentMethods)
	err := c.cc.Invoke(ctx, "/billing.BillingService/ListPaymentMethods", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *billingServiceClient) DeletePaymentMethod(ctx context.Context, in *OrgAndPaymentID, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/billing.BillingService/DeletePaymentMethod", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *billingServiceClient) UpdatePaymentMethod(ctx context.Context, in *PaymentMethod, opts ...grpc.CallOption) (*PaymentMethod, error) {
	out := new(PaymentMethod)
	err := c.cc.Invoke(ctx, "/billing.BillingService/UpdatePaymentMethod", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *billingServiceClient) ListInvoices(ctx context.Context, in *StripePaginationParam, opts ...grpc.CallOption) (*Invoices, error) {
	out := new(Invoices)
	err := c.cc.Invoke(ctx, "/billing.BillingService/ListInvoices", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *billingServiceClient) ListCredits(ctx context.Context, in *OrgIdReq, opts ...grpc.CallOption) (*Credits, error) {
	out := new(Credits)
	err := c.cc.Invoke(ctx, "/billing.BillingService/ListCredits", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *billingServiceClient) GetCustomerBillingInfo(ctx context.Context, in *OrgIdReq, opts ...grpc.CallOption) (*BillingInfo, error) {
	out := new(BillingInfo)
	err := c.cc.Invoke(ctx, "/billing.BillingService/GetCustomerBillingInfo", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *billingServiceClient) UpdateCustomerBillingInfo(ctx context.Context, in *BillingInfo, opts ...grpc.CallOption) (*BillingInfo, error) {
	out := new(BillingInfo)
	err := c.cc.Invoke(ctx, "/billing.BillingService/UpdateCustomerBillingInfo", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *billingServiceClient) GetCurrentBillingCycle(ctx context.Context, in *OrgIdReq, opts ...grpc.CallOption) (*CurrentBillingCycle, error) {
	out := new(CurrentBillingCycle)
	err := c.cc.Invoke(ctx, "/billing.BillingService/GetCurrentBillingCycle", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *billingServiceClient) GetMonthUsageGroupByProject(ctx context.Context, in *MonthUsageGroupByProjectReq, opts ...grpc.CallOption) (*MonthUsageGroupByProjectResp, error) {
	out := new(MonthUsageGroupByProjectResp)
	err := c.cc.Invoke(ctx, "/billing.BillingService/GetMonthUsageGroupByProject", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// BillingServiceServer is the server API for BillingService service.
// All implementations must embed UnimplementedBillingServiceServer
// for forward compatibility
type BillingServiceServer interface {
	SetupIntent(context.Context, *OrgIdReq) (*SetupIntentResp, error)
	ListPaymentMethods(context.Context, *StripePaginationParam) (*PaymentMethods, error)
	DeletePaymentMethod(context.Context, *OrgAndPaymentID) (*emptypb.Empty, error)
	UpdatePaymentMethod(context.Context, *PaymentMethod) (*PaymentMethod, error)
	ListInvoices(context.Context, *StripePaginationParam) (*Invoices, error)
	ListCredits(context.Context, *OrgIdReq) (*Credits, error)
	GetCustomerBillingInfo(context.Context, *OrgIdReq) (*BillingInfo, error)
	UpdateCustomerBillingInfo(context.Context, *BillingInfo) (*BillingInfo, error)
	GetCurrentBillingCycle(context.Context, *OrgIdReq) (*CurrentBillingCycle, error)
	GetMonthUsageGroupByProject(context.Context, *MonthUsageGroupByProjectReq) (*MonthUsageGroupByProjectResp, error)
	mustEmbedUnimplementedBillingServiceServer()
}

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

func (UnimplementedBillingServiceServer) SetupIntent(context.Context, *OrgIdReq) (*SetupIntentResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetupIntent not implemented")
}
func (UnimplementedBillingServiceServer) ListPaymentMethods(context.Context, *StripePaginationParam) (*PaymentMethods, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListPaymentMethods not implemented")
}
func (UnimplementedBillingServiceServer) DeletePaymentMethod(context.Context, *OrgAndPaymentID) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeletePaymentMethod not implemented")
}
func (UnimplementedBillingServiceServer) UpdatePaymentMethod(context.Context, *PaymentMethod) (*PaymentMethod, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdatePaymentMethod not implemented")
}
func (UnimplementedBillingServiceServer) ListInvoices(context.Context, *StripePaginationParam) (*Invoices, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListInvoices not implemented")
}
func (UnimplementedBillingServiceServer) ListCredits(context.Context, *OrgIdReq) (*Credits, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListCredits not implemented")
}
func (UnimplementedBillingServiceServer) GetCustomerBillingInfo(context.Context, *OrgIdReq) (*BillingInfo, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCustomerBillingInfo not implemented")
}
func (UnimplementedBillingServiceServer) UpdateCustomerBillingInfo(context.Context, *BillingInfo) (*BillingInfo, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateCustomerBillingInfo not implemented")
}
func (UnimplementedBillingServiceServer) GetCurrentBillingCycle(context.Context, *OrgIdReq) (*CurrentBillingCycle, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCurrentBillingCycle not implemented")
}
func (UnimplementedBillingServiceServer) GetMonthUsageGroupByProject(context.Context, *MonthUsageGroupByProjectReq) (*MonthUsageGroupByProjectResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetMonthUsageGroupByProject not implemented")
}
func (UnimplementedBillingServiceServer) mustEmbedUnimplementedBillingServiceServer() {}

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

func RegisterBillingServiceServer(s grpc.ServiceRegistrar, srv BillingServiceServer) {
	s.RegisterService(&BillingService_ServiceDesc, srv)
}

func _BillingService_SetupIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OrgIdReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BillingServiceServer).SetupIntent(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/billing.BillingService/SetupIntent",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BillingServiceServer).SetupIntent(ctx, req.(*OrgIdReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BillingService_ListPaymentMethods_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StripePaginationParam)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BillingServiceServer).ListPaymentMethods(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/billing.BillingService/ListPaymentMethods",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BillingServiceServer).ListPaymentMethods(ctx, req.(*StripePaginationParam))
	}
	return interceptor(ctx, in, info, handler)
}

func _BillingService_DeletePaymentMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OrgAndPaymentID)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BillingServiceServer).DeletePaymentMethod(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/billing.BillingService/DeletePaymentMethod",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BillingServiceServer).DeletePaymentMethod(ctx, req.(*OrgAndPaymentID))
	}
	return interceptor(ctx, in, info, handler)
}

func _BillingService_UpdatePaymentMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PaymentMethod)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BillingServiceServer).UpdatePaymentMethod(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/billing.BillingService/UpdatePaymentMethod",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BillingServiceServer).UpdatePaymentMethod(ctx, req.(*PaymentMethod))
	}
	return interceptor(ctx, in, info, handler)
}

func _BillingService_ListInvoices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StripePaginationParam)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BillingServiceServer).ListInvoices(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/billing.BillingService/ListInvoices",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BillingServiceServer).ListInvoices(ctx, req.(*StripePaginationParam))
	}
	return interceptor(ctx, in, info, handler)
}

func _BillingService_ListCredits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OrgIdReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BillingServiceServer).ListCredits(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/billing.BillingService/ListCredits",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BillingServiceServer).ListCredits(ctx, req.(*OrgIdReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BillingService_GetCustomerBillingInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OrgIdReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BillingServiceServer).GetCustomerBillingInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/billing.BillingService/GetCustomerBillingInfo",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BillingServiceServer).GetCustomerBillingInfo(ctx, req.(*OrgIdReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BillingService_UpdateCustomerBillingInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BillingInfo)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BillingServiceServer).UpdateCustomerBillingInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/billing.BillingService/UpdateCustomerBillingInfo",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BillingServiceServer).UpdateCustomerBillingInfo(ctx, req.(*BillingInfo))
	}
	return interceptor(ctx, in, info, handler)
}

func _BillingService_GetCurrentBillingCycle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OrgIdReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BillingServiceServer).GetCurrentBillingCycle(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/billing.BillingService/GetCurrentBillingCycle",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BillingServiceServer).GetCurrentBillingCycle(ctx, req.(*OrgIdReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BillingService_GetMonthUsageGroupByProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MonthUsageGroupByProjectReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BillingServiceServer).GetMonthUsageGroupByProject(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/billing.BillingService/GetMonthUsageGroupByProject",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BillingServiceServer).GetMonthUsageGroupByProject(ctx, req.(*MonthUsageGroupByProjectReq))
	}
	return interceptor(ctx, in, info, handler)
}

// BillingService_ServiceDesc is the grpc.ServiceDesc for BillingService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BillingService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "billing.BillingService",
	HandlerType: (*BillingServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SetupIntent",
			Handler:    _BillingService_SetupIntent_Handler,
		},
		{
			MethodName: "ListPaymentMethods",
			Handler:    _BillingService_ListPaymentMethods_Handler,
		},
		{
			MethodName: "DeletePaymentMethod",
			Handler:    _BillingService_DeletePaymentMethod_Handler,
		},
		{
			MethodName: "UpdatePaymentMethod",
			Handler:    _BillingService_UpdatePaymentMethod_Handler,
		},
		{
			MethodName: "ListInvoices",
			Handler:    _BillingService_ListInvoices_Handler,
		},
		{
			MethodName: "ListCredits",
			Handler:    _BillingService_ListCredits_Handler,
		},
		{
			MethodName: "GetCustomerBillingInfo",
			Handler:    _BillingService_GetCustomerBillingInfo_Handler,
		},
		{
			MethodName: "UpdateCustomerBillingInfo",
			Handler:    _BillingService_UpdateCustomerBillingInfo_Handler,
		},
		{
			MethodName: "GetCurrentBillingCycle",
			Handler:    _BillingService_GetCurrentBillingCycle_Handler,
		},
		{
			MethodName: "GetMonthUsageGroupByProject",
			Handler:    _BillingService_GetMonthUsageGroupByProject_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "components/billing/pkg/service/proto/billing_service.proto",
}
