// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc             (unknown)
// source: console/branch.proto

package console

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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8

const (
	BranchService_ListBranches_FullMethodName         = "/console.BranchService/ListBranches"
	BranchService_CreateBranch_FullMethodName         = "/console.BranchService/CreateBranch"
	BranchService_GetBranch_FullMethodName            = "/console.BranchService/GetBranch"
	BranchService_DeleteBranch_FullMethodName         = "/console.BranchService/DeleteBranch"
	BranchService_ChangeBranchPassword_FullMethodName = "/console.BranchService/ChangeBranchPassword"
	BranchService_ListDatabases_FullMethodName        = "/console.BranchService/ListDatabases"
	BranchService_ResetBranch_FullMethodName          = "/console.BranchService/ResetBranch"
	BranchService_UpdateBranch_FullMethodName         = "/console.BranchService/UpdateBranch"
)

// BranchServiceClient is the client API for BranchService 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 BranchServiceClient interface {
	ListBranches(ctx context.Context, in *ListBranchesReq, opts ...grpc.CallOption) (*ListBranchesResp, error)
	CreateBranch(ctx context.Context, in *CreateBranchReq, opts ...grpc.CallOption) (*CreateBranchResp, error)
	GetBranch(ctx context.Context, in *GetBranchReq, opts ...grpc.CallOption) (*Branch, error)
	DeleteBranch(ctx context.Context, in *DeleteBranchReq, opts ...grpc.CallOption) (*DeleteBranchResp, error)
	ChangeBranchPassword(ctx context.Context, in *ChangeBranchPasswordReq, opts ...grpc.CallOption) (*DefaultResp, error)
	ListDatabases(ctx context.Context, in *BranchListDatabasesReq, opts ...grpc.CallOption) (*BranchListDatabasesResp, error)
	ResetBranch(ctx context.Context, in *ResetBranchReq, opts ...grpc.CallOption) (*DefaultResp, error)
	UpdateBranch(ctx context.Context, in *UpdateBranchReq, opts ...grpc.CallOption) (*DefaultResp, error)
}

type branchServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewBranchServiceClient(cc grpc.ClientConnInterface) BranchServiceClient {
	return &branchServiceClient{cc}
}

func (c *branchServiceClient) ListBranches(ctx context.Context, in *ListBranchesReq, opts ...grpc.CallOption) (*ListBranchesResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListBranchesResp)
	err := c.cc.Invoke(ctx, BranchService_ListBranches_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *branchServiceClient) CreateBranch(ctx context.Context, in *CreateBranchReq, opts ...grpc.CallOption) (*CreateBranchResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CreateBranchResp)
	err := c.cc.Invoke(ctx, BranchService_CreateBranch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *branchServiceClient) GetBranch(ctx context.Context, in *GetBranchReq, opts ...grpc.CallOption) (*Branch, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Branch)
	err := c.cc.Invoke(ctx, BranchService_GetBranch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *branchServiceClient) DeleteBranch(ctx context.Context, in *DeleteBranchReq, opts ...grpc.CallOption) (*DeleteBranchResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteBranchResp)
	err := c.cc.Invoke(ctx, BranchService_DeleteBranch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *branchServiceClient) ChangeBranchPassword(ctx context.Context, in *ChangeBranchPasswordReq, opts ...grpc.CallOption) (*DefaultResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DefaultResp)
	err := c.cc.Invoke(ctx, BranchService_ChangeBranchPassword_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *branchServiceClient) ListDatabases(ctx context.Context, in *BranchListDatabasesReq, opts ...grpc.CallOption) (*BranchListDatabasesResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(BranchListDatabasesResp)
	err := c.cc.Invoke(ctx, BranchService_ListDatabases_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *branchServiceClient) ResetBranch(ctx context.Context, in *ResetBranchReq, opts ...grpc.CallOption) (*DefaultResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DefaultResp)
	err := c.cc.Invoke(ctx, BranchService_ResetBranch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *branchServiceClient) UpdateBranch(ctx context.Context, in *UpdateBranchReq, opts ...grpc.CallOption) (*DefaultResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DefaultResp)
	err := c.cc.Invoke(ctx, BranchService_UpdateBranch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// BranchServiceServer is the server API for BranchService service.
// All implementations must embed UnimplementedBranchServiceServer
// for forward compatibility
type BranchServiceServer interface {
	ListBranches(context.Context, *ListBranchesReq) (*ListBranchesResp, error)
	CreateBranch(context.Context, *CreateBranchReq) (*CreateBranchResp, error)
	GetBranch(context.Context, *GetBranchReq) (*Branch, error)
	DeleteBranch(context.Context, *DeleteBranchReq) (*DeleteBranchResp, error)
	ChangeBranchPassword(context.Context, *ChangeBranchPasswordReq) (*DefaultResp, error)
	ListDatabases(context.Context, *BranchListDatabasesReq) (*BranchListDatabasesResp, error)
	ResetBranch(context.Context, *ResetBranchReq) (*DefaultResp, error)
	UpdateBranch(context.Context, *UpdateBranchReq) (*DefaultResp, error)
	mustEmbedUnimplementedBranchServiceServer()
}

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

func (UnimplementedBranchServiceServer) ListBranches(context.Context, *ListBranchesReq) (*ListBranchesResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListBranches not implemented")
}
func (UnimplementedBranchServiceServer) CreateBranch(context.Context, *CreateBranchReq) (*CreateBranchResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateBranch not implemented")
}
func (UnimplementedBranchServiceServer) GetBranch(context.Context, *GetBranchReq) (*Branch, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBranch not implemented")
}
func (UnimplementedBranchServiceServer) DeleteBranch(context.Context, *DeleteBranchReq) (*DeleteBranchResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteBranch not implemented")
}
func (UnimplementedBranchServiceServer) ChangeBranchPassword(context.Context, *ChangeBranchPasswordReq) (*DefaultResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ChangeBranchPassword not implemented")
}
func (UnimplementedBranchServiceServer) ListDatabases(context.Context, *BranchListDatabasesReq) (*BranchListDatabasesResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListDatabases not implemented")
}
func (UnimplementedBranchServiceServer) ResetBranch(context.Context, *ResetBranchReq) (*DefaultResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ResetBranch not implemented")
}
func (UnimplementedBranchServiceServer) UpdateBranch(context.Context, *UpdateBranchReq) (*DefaultResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateBranch not implemented")
}
func (UnimplementedBranchServiceServer) mustEmbedUnimplementedBranchServiceServer() {}

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

func RegisterBranchServiceServer(s grpc.ServiceRegistrar, srv BranchServiceServer) {
	s.RegisterService(&BranchService_ServiceDesc, srv)
}

func _BranchService_ListBranches_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListBranchesReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BranchServiceServer).ListBranches(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BranchService_ListBranches_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BranchServiceServer).ListBranches(ctx, req.(*ListBranchesReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BranchService_CreateBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateBranchReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BranchServiceServer).CreateBranch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BranchService_CreateBranch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BranchServiceServer).CreateBranch(ctx, req.(*CreateBranchReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BranchService_GetBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBranchReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BranchServiceServer).GetBranch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BranchService_GetBranch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BranchServiceServer).GetBranch(ctx, req.(*GetBranchReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BranchService_DeleteBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteBranchReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BranchServiceServer).DeleteBranch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BranchService_DeleteBranch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BranchServiceServer).DeleteBranch(ctx, req.(*DeleteBranchReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BranchService_ChangeBranchPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ChangeBranchPasswordReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BranchServiceServer).ChangeBranchPassword(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BranchService_ChangeBranchPassword_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BranchServiceServer).ChangeBranchPassword(ctx, req.(*ChangeBranchPasswordReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BranchService_ListDatabases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(BranchListDatabasesReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BranchServiceServer).ListDatabases(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BranchService_ListDatabases_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BranchServiceServer).ListDatabases(ctx, req.(*BranchListDatabasesReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BranchService_ResetBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ResetBranchReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BranchServiceServer).ResetBranch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BranchService_ResetBranch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BranchServiceServer).ResetBranch(ctx, req.(*ResetBranchReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _BranchService_UpdateBranch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateBranchReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(BranchServiceServer).UpdateBranch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: BranchService_UpdateBranch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(BranchServiceServer).UpdateBranch(ctx, req.(*UpdateBranchReq))
	}
	return interceptor(ctx, in, info, handler)
}

// BranchService_ServiceDesc is the grpc.ServiceDesc for BranchService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BranchService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "console.BranchService",
	HandlerType: (*BranchServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListBranches",
			Handler:    _BranchService_ListBranches_Handler,
		},
		{
			MethodName: "CreateBranch",
			Handler:    _BranchService_CreateBranch_Handler,
		},
		{
			MethodName: "GetBranch",
			Handler:    _BranchService_GetBranch_Handler,
		},
		{
			MethodName: "DeleteBranch",
			Handler:    _BranchService_DeleteBranch_Handler,
		},
		{
			MethodName: "ChangeBranchPassword",
			Handler:    _BranchService_ChangeBranchPassword_Handler,
		},
		{
			MethodName: "ListDatabases",
			Handler:    _BranchService_ListDatabases_Handler,
		},
		{
			MethodName: "ResetBranch",
			Handler:    _BranchService_ResetBranch_Handler,
		},
		{
			MethodName: "UpdateBranch",
			Handler:    _BranchService_UpdateBranch_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "console/branch.proto",
}
