func (sr *SnapshotDone) Name() string {
	return "IsSnapshotDone"
}
Name returns the name of this RPC call.
package hrpc
import (
	"context"
	"errors"
	"github.com/tsuna/gohbase/pb"
	"google.golang.org/protobuf/proto"
)
type snap struct {
	name         string
	table        string
	snapshotType *pb.SnapshotDescription_Type
	version      int32
	owner        string
}
func (s *snap) ToProto() *pb.SnapshotDescription {
	return &pb.SnapshotDescription{
		Type:    s.snapshotType,
		Table:   proto.String(s.table),
		Name:    proto.String(s.name),
		Version: proto.Int32(s.version),
		Owner:   proto.String(s.owner),
	}
}
func (s *snap) Version(v int32) {
	s.version = v
}
func (s *snap) Owner(o string) {
	s.owner = o
}
func (s *snap) Type(t pb.SnapshotDescription_Type) {
	s.snapshotType = &t
}
type snapshotSettable interface {
	Version(int32)
	Owner(string)
	Type(pb.SnapshotDescription_Type)
}
func SnapshotVersion(v int32) func(Call) error {
	return func(g Call) error {
		sn, ok := g.(snapshotSettable)
		if !ok {
			return errors.New("'SnapshotVersion' option can only be used with Snapshot queries")
		}
		sn.Version(v)
		return nil
	}
}
func SnapshotOwner(o string) func(Call) error {
	return func(g Call) error {
		sn, ok := g.(snapshotSettable)
		if !ok {
			return errors.New("'SnapshotOwner' option can only be used with Snapshot queries")
		}
		sn.Owner(o)
		return nil
	}
}
func SnapshotSkipFlush() func(Call) error {
	return func(g Call) error {
		sn, ok := g.(snapshotSettable)
		if !ok {
			return errors.New("'SnapshotSkipFlush' option can only be used with Snapshot queries")
		}
		sn.Type(pb.SnapshotDescription_SKIPFLUSH)
		return nil
	}
}
type Snapshot struct {
	base
	snap
}
func NewSnapshot(ctx context.Context, name string, table string,
	opts ...func(Call) error) (*Snapshot, error) {
	sn := &Snapshot{
		base{
			table:    []byte(table),
			ctx:      ctx,
			resultch: make(chan RPCResult, 1),
		},
		snap{
			name: name, table: table,
		},
	}
	if err := applyOptions(sn, opts...); err != nil {
		return nil, err
	}
	return sn, nil
}
func (sr *Snapshot) Name() string {
	return "Snapshot"
}
func (sr *Snapshot) Description() string {
	return sr.Name()
}
func (sr *Snapshot) ToProto() proto.Message {
	return &pb.SnapshotRequest{Snapshot: sr.snap.ToProto()}
}
func (sr *Snapshot) NewResponse() proto.Message {
	return &pb.SnapshotResponse{}
}
type SnapshotDone struct {
	*Snapshot
}
func NewSnapshotDone(t *Snapshot) *SnapshotDone {
	return &SnapshotDone{t}
}