text:
package tabletmanagerservice // import "vitess.io/vitess/go/vt/proto/tabletmanagerservice"

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import tabletmanagerdata "vitess.io/vitess/go/vt/proto/tabletmanagerdata"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// TabletManagerClient is the client API for TabletManager service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type TabletManagerClient interface {
	// Ping returns the input payload
	Ping(ctx context.Context, in *tabletmanagerdata.PingRequest, opts ...grpc.CallOption) (*tabletmanagerdata.PingResponse, error)
	// Sleep sleeps for the provided duration
	Sleep(ctx context.Context, in *tabletmanagerdata.SleepRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SleepResponse, error)
	// ExecuteHook executes the hook remotely
	ExecuteHook(ctx context.Context, in *tabletmanagerdata.ExecuteHookRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ExecuteHookResponse, error)
	// GetSchema asks the tablet for its schema
	GetSchema(ctx context.Context, in *tabletmanagerdata.GetSchemaRequest, opts ...grpc.CallOption) (*tabletmanagerdata.GetSchemaResponse, error)
	// GetPermissions asks the tablet for its permissions
	GetPermissions(ctx context.Context, in *tabletmanagerdata.GetPermissionsRequest, opts ...grpc.CallOption) (*tabletmanagerdata.GetPermissionsResponse, error)
	SetReadOnly(ctx context.Context, in *tabletmanagerdata.SetReadOnlyRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SetReadOnlyResponse, error)
	SetReadWrite(ctx context.Context, in *tabletmanagerdata.SetReadWriteRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SetReadWriteResponse, error)
	// ChangeType asks the remote tablet to change its type
	ChangeType(ctx context.Context, in *tabletmanagerdata.ChangeTypeRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ChangeTypeResponse, error)
	RefreshState(ctx context.Context, in *tabletmanagerdata.RefreshStateRequest, opts ...grpc.CallOption) (*tabletmanagerdata.RefreshStateResponse, error)
	RunHealthCheck(ctx context.Context, in *tabletmanagerdata.RunHealthCheckRequest, opts ...grpc.CallOption) (*tabletmanagerdata.RunHealthCheckResponse, error)
	IgnoreHealthError(ctx context.Context, in *tabletmanagerdata.IgnoreHealthErrorRequest, opts ...grpc.CallOption) (*tabletmanagerdata.IgnoreHealthErrorResponse, error)
	ReloadSchema(ctx context.Context, in *tabletmanagerdata.ReloadSchemaRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ReloadSchemaResponse, error)
	PreflightSchema(ctx context.Context, in *tabletmanagerdata.PreflightSchemaRequest, opts ...grpc.CallOption) (*tabletmanagerdata.PreflightSchemaResponse, error)
	ApplySchema(ctx context.Context, in *tabletmanagerdata.ApplySchemaRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ApplySchemaResponse, error)
	LockTables(ctx context.Context, in *tabletmanagerdata.LockTablesRequest, opts ...grpc.CallOption) (*tabletmanagerdata.LockTablesResponse, error)
	UnlockTables(ctx context.Context, in *tabletmanagerdata.UnlockTablesRequest, opts ...grpc.CallOption) (*tabletmanagerdata.UnlockTablesResponse, error)
	ExecuteFetchAsDba(ctx context.Context, in *tabletmanagerdata.ExecuteFetchAsDbaRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ExecuteFetchAsDbaResponse, error)
	ExecuteFetchAsAllPrivs(ctx context.Context, in *tabletmanagerdata.ExecuteFetchAsAllPrivsRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ExecuteFetchAsAllPrivsResponse, error)
	ExecuteFetchAsApp(ctx context.Context, in *tabletmanagerdata.ExecuteFetchAsAppRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ExecuteFetchAsAppResponse, error)
	// SlaveStatus returns the current slave status.
	SlaveStatus(ctx context.Context, in *tabletmanagerdata.SlaveStatusRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SlaveStatusResponse, error)
	// MasterPosition returns the current master position
	MasterPosition(ctx context.Context, in *tabletmanagerdata.MasterPositionRequest, opts ...grpc.CallOption) (*tabletmanagerdata.MasterPositionResponse, error)
	// StopSlave makes mysql stop its replication
	StopSlave(ctx context.Context, in *tabletmanagerdata.StopSlaveRequest, opts ...grpc.CallOption) (*tabletmanagerdata.StopSlaveResponse, error)
	// StopSlaveMinimum stops the mysql replication after it reaches
	// the provided minimum point
	StopSlaveMinimum(ctx context.Context, in *tabletmanagerdata.StopSlaveMinimumRequest, opts ...grpc.CallOption) (*tabletmanagerdata.StopSlaveMinimumResponse, error)
	// StartSlave starts the mysql replication
	StartSlave(ctx context.Context, in *tabletmanagerdata.StartSlaveRequest, opts ...grpc.CallOption) (*tabletmanagerdata.StartSlaveResponse, error)
	// StartSlave starts the mysql replication until and including
	// the provided position
	StartSlaveUntilAfter(ctx context.Context, in *tabletmanagerdata.StartSlaveUntilAfterRequest, opts ...grpc.CallOption) (*tabletmanagerdata.StartSlaveUntilAfterResponse, error)
	// TabletExternallyReparented tells a tablet that its underlying MySQL is
	// currently the master. It is only used in environments (tabletmanagerdata.such as Vitess+MoB)
	// in which MySQL is reparented by some agent external to Vitess, and then
	// that agent simply notifies Vitess.
	//
	// This call is idempotent with respect to a single target tablet.
	// However, the tablet assumes there is a cooling-off period following the
	// initial external reparent from A to B, before this call is repeated on any
	// tablet other than B. This assumption is configurable with the vttablet flag
	// "finalize_external_reparent_timeout".
	//
	// For more information, see the design doc at go/vt-fast-failover.
	TabletExternallyReparented(ctx context.Context, in *tabletmanagerdata.TabletExternallyReparentedRequest, opts ...grpc.CallOption) (*tabletmanagerdata.TabletExternallyReparentedResponse, error)
	// TabletExternallyElected is an notification that may be sent in
	// anticipation of potentially later sending TabletExternallyReparented.
	// The tablet can use this extra lead time to prepare to react quickly if
	// TabletExternallyReparented does follow.
	//
	// This call is effectively a no-op if it is not followed by a call to
	// TabletExternallyReparented, so the external agent doing the reparent can
	// still change its mind.
	//
	// The agent does not need to wait for this call or cancel it before calling
	// TabletExternallyReparented if the external reparent operation finishes
	// before TabletExternallyElected returns.
	TabletExternallyElected(ctx context.Context, in *tabletmanagerdata.TabletExternallyElectedRequest, opts ...grpc.CallOption) (*tabletmanagerdata.TabletExternallyElectedResponse, error)
	// GetSlaves asks for the list of mysql slaves
	GetSlaves(ctx context.Context, in *tabletmanagerdata.GetSlavesRequest, opts ...grpc.CallOption) (*tabletmanagerdata.GetSlavesResponse, error)
	// VReplication API
	VReplicationExec(ctx context.Context, in *tabletmanagerdata.VReplicationExecRequest, opts ...grpc.CallOption) (*tabletmanagerdata.VReplicationExecResponse, error)
	VReplicationWaitForPos(ctx context.Context, in *tabletmanagerdata.VReplicationWaitForPosRequest, opts ...grpc.CallOption) (*tabletmanagerdata.VReplicationWaitForPosResponse, error)
	// ResetReplication makes the target not replicating
	ResetReplication(ctx context.Context, in *tabletmanagerdata.ResetReplicationRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ResetReplicationResponse, error)
	// InitMaster initializes the tablet as a master
	InitMaster(ctx context.Context, in *tabletmanagerdata.InitMasterRequest, opts ...grpc.CallOption) (*tabletmanagerdata.InitMasterResponse, error)
	// PopulateReparentJournal tells the tablet to add an entry to its
	// reparent journal
	PopulateReparentJournal(ctx context.Context, in *tabletmanagerdata.PopulateReparentJournalRequest, opts ...grpc.CallOption) (*tabletmanagerdata.PopulateReparentJournalResponse, error)
	// InitSlave tells the tablet to reparent to the master unconditionnally
	InitSlave(ctx context.Context, in *tabletmanagerdata.InitSlaveRequest, opts ...grpc.CallOption) (*tabletmanagerdata.InitSlaveResponse, error)
	// DemoteMaster tells the soon-to-be-former master it's gonna change
	DemoteMaster(ctx context.Context, in *tabletmanagerdata.DemoteMasterRequest, opts ...grpc.CallOption) (*tabletmanagerdata.DemoteMasterResponse, error)
	// UndoDemoteMaster reverts all changes made by DemoteMaster
	UndoDemoteMaster(ctx context.Context, in *tabletmanagerdata.UndoDemoteMasterRequest, opts ...grpc.CallOption) (*tabletmanagerdata.UndoDemoteMasterResponse, error)
	// PromoteSlaveWhenCaughtUp tells the remote tablet to catch up,
	// and then be the master
	PromoteSlaveWhenCaughtUp(ctx context.Context, in *tabletmanagerdata.PromoteSlaveWhenCaughtUpRequest, opts ...grpc.CallOption) (*tabletmanagerdata.PromoteSlaveWhenCaughtUpResponse, error)
	// SlaveWasPromoted tells the remote tablet it is now the master
	SlaveWasPromoted(ctx context.Context, in *tabletmanagerdata.SlaveWasPromotedRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SlaveWasPromotedResponse, error)
	// SetMaster tells the slave to reparent
	SetMaster(ctx context.Context, in *tabletmanagerdata.SetMasterRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SetMasterResponse, error)
	// SlaveWasRestarted tells the remote tablet its master has changed
	SlaveWasRestarted(ctx context.Context, in *tabletmanagerdata.SlaveWasRestartedRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SlaveWasRestartedResponse, error)
	// StopReplicationAndGetStatus stops MySQL replication, and returns the
	// replication status
	StopReplicationAndGetStatus(ctx context.Context, in *tabletmanagerdata.StopReplicationAndGetStatusRequest, opts ...grpc.CallOption) (*tabletmanagerdata.StopReplicationAndGetStatusResponse, error)
	// PromoteSlave makes the slave the new master
	PromoteSlave(ctx context.Context, in *tabletmanagerdata.PromoteSlaveRequest, opts ...grpc.CallOption) (*tabletmanagerdata.PromoteSlaveResponse, error)
	Backup(ctx context.Context, in *tabletmanagerdata.BackupRequest, opts ...grpc.CallOption) (TabletManager_BackupClient, error)
	// RestoreFromBackup deletes all local data and restores it from the latest backup.
	RestoreFromBackup(ctx context.Context, in *tabletmanagerdata.RestoreFromBackupRequest, opts ...grpc.CallOption) (TabletManager_RestoreFromBackupClient, error)
}

type tabletManagerClient struct {
	cc *grpc.ClientConn
}

func NewTabletManagerClient(cc *grpc.ClientConn) TabletManagerClient {
	return &tabletManagerClient{cc}
}

func (c *tabletManagerClient) Ping(ctx context.Context, in *tabletmanagerdata.PingRequest, opts ...grpc.CallOption) (*tabletmanagerdata.PingResponse, error) {
	out := new(tabletmanagerdata.PingResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/Ping", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) Sleep(ctx context.Context, in *tabletmanagerdata.SleepRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SleepResponse, error) {
	out := new(tabletmanagerdata.SleepResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/Sleep", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) ExecuteHook(ctx context.Context, in *tabletmanagerdata.ExecuteHookRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ExecuteHookResponse, error) {
	out := new(tabletmanagerdata.ExecuteHookResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/ExecuteHook", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) GetSchema(ctx context.Context, in *tabletmanagerdata.GetSchemaRequest, opts ...grpc.CallOption) (*tabletmanagerdata.GetSchemaResponse, error) {
	out := new(tabletmanagerdata.GetSchemaResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/GetSchema", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) GetPermissions(ctx context.Context, in *tabletmanagerdata.GetPermissionsRequest, opts ...grpc.CallOption) (*tabletmanagerdata.GetPermissionsResponse, error) {
	out := new(tabletmanagerdata.GetPermissionsResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/GetPermissions", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) SetReadOnly(ctx context.Context, in *tabletmanagerdata.SetReadOnlyRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SetReadOnlyResponse, error) {
	out := new(tabletmanagerdata.SetReadOnlyResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/SetReadOnly", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) SetReadWrite(ctx context.Context, in *tabletmanagerdata.SetReadWriteRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SetReadWriteResponse, error) {
	out := new(tabletmanagerdata.SetReadWriteResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/SetReadWrite", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) ChangeType(ctx context.Context, in *tabletmanagerdata.ChangeTypeRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ChangeTypeResponse, error) {
	out := new(tabletmanagerdata.ChangeTypeResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/ChangeType", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) RefreshState(ctx context.Context, in *tabletmanagerdata.RefreshStateRequest, opts ...grpc.CallOption) (*tabletmanagerdata.RefreshStateResponse, error) {
	out := new(tabletmanagerdata.RefreshStateResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/RefreshState", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) RunHealthCheck(ctx context.Context, in *tabletmanagerdata.RunHealthCheckRequest, opts ...grpc.CallOption) (*tabletmanagerdata.RunHealthCheckResponse, error) {
	out := new(tabletmanagerdata.RunHealthCheckResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/RunHealthCheck", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) IgnoreHealthError(ctx context.Context, in *tabletmanagerdata.IgnoreHealthErrorRequest, opts ...grpc.CallOption) (*tabletmanagerdata.IgnoreHealthErrorResponse, error) {
	out := new(tabletmanagerdata.IgnoreHealthErrorResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/IgnoreHealthError", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) ReloadSchema(ctx context.Context, in *tabletmanagerdata.ReloadSchemaRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ReloadSchemaResponse, error) {
	out := new(tabletmanagerdata.ReloadSchemaResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/ReloadSchema", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) PreflightSchema(ctx context.Context, in *tabletmanagerdata.PreflightSchemaRequest, opts ...grpc.CallOption) (*tabletmanagerdata.PreflightSchemaResponse, error) {
	out := new(tabletmanagerdata.PreflightSchemaResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/PreflightSchema", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) ApplySchema(ctx context.Context, in *tabletmanagerdata.ApplySchemaRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ApplySchemaResponse, error) {
	out := new(tabletmanagerdata.ApplySchemaResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/ApplySchema", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) LockTables(ctx context.Context, in *tabletmanagerdata.LockTablesRequest, opts ...grpc.CallOption) (*tabletmanagerdata.LockTablesResponse, error) {
	out := new(tabletmanagerdata.LockTablesResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/LockTables", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) UnlockTables(ctx context.Context, in *tabletmanagerdata.UnlockTablesRequest, opts ...grpc.CallOption) (*tabletmanagerdata.UnlockTablesResponse, error) {
	out := new(tabletmanagerdata.UnlockTablesResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/UnlockTables", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) ExecuteFetchAsDba(ctx context.Context, in *tabletmanagerdata.ExecuteFetchAsDbaRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ExecuteFetchAsDbaResponse, error) {
	out := new(tabletmanagerdata.ExecuteFetchAsDbaResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/ExecuteFetchAsDba", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) ExecuteFetchAsAllPrivs(ctx context.Context, in *tabletmanagerdata.ExecuteFetchAsAllPrivsRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ExecuteFetchAsAllPrivsResponse, error) {
	out := new(tabletmanagerdata.ExecuteFetchAsAllPrivsResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/ExecuteFetchAsAllPrivs", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) ExecuteFetchAsApp(ctx context.Context, in *tabletmanagerdata.ExecuteFetchAsAppRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ExecuteFetchAsAppResponse, error) {
	out := new(tabletmanagerdata.ExecuteFetchAsAppResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/ExecuteFetchAsApp", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) SlaveStatus(ctx context.Context, in *tabletmanagerdata.SlaveStatusRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SlaveStatusResponse, error) {
	out := new(tabletmanagerdata.SlaveStatusResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/SlaveStatus", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) MasterPosition(ctx context.Context, in *tabletmanagerdata.MasterPositionRequest, opts ...grpc.CallOption) (*tabletmanagerdata.MasterPositionResponse, error) {
	out := new(tabletmanagerdata.MasterPositionResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/MasterPosition", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) StopSlave(ctx context.Context, in *tabletmanagerdata.StopSlaveRequest, opts ...grpc.CallOption) (*tabletmanagerdata.StopSlaveResponse, error) {
	out := new(tabletmanagerdata.StopSlaveResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/StopSlave", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) StopSlaveMinimum(ctx context.Context, in *tabletmanagerdata.StopSlaveMinimumRequest, opts ...grpc.CallOption) (*tabletmanagerdata.StopSlaveMinimumResponse, error) {
	out := new(tabletmanagerdata.StopSlaveMinimumResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/StopSlaveMinimum", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) StartSlave(ctx context.Context, in *tabletmanagerdata.StartSlaveRequest, opts ...grpc.CallOption) (*tabletmanagerdata.StartSlaveResponse, error) {
	out := new(tabletmanagerdata.StartSlaveResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/StartSlave", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) StartSlaveUntilAfter(ctx context.Context, in *tabletmanagerdata.StartSlaveUntilAfterRequest, opts ...grpc.CallOption) (*tabletmanagerdata.StartSlaveUntilAfterResponse, error) {
	out := new(tabletmanagerdata.StartSlaveUntilAfterResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/StartSlaveUntilAfter", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) TabletExternallyReparented(ctx context.Context, in *tabletmanagerdata.TabletExternallyReparentedRequest, opts ...grpc.CallOption) (*tabletmanagerdata.TabletExternallyReparentedResponse, error) {
	out := new(tabletmanagerdata.TabletExternallyReparentedResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/TabletExternallyReparented", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) TabletExternallyElected(ctx context.Context, in *tabletmanagerdata.TabletExternallyElectedRequest, opts ...grpc.CallOption) (*tabletmanagerdata.TabletExternallyElectedResponse, error) {
	out := new(tabletmanagerdata.TabletExternallyElectedResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/TabletExternallyElected", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) GetSlaves(ctx context.Context, in *tabletmanagerdata.GetSlavesRequest, opts ...grpc.CallOption) (*tabletmanagerdata.GetSlavesResponse, error) {
	out := new(tabletmanagerdata.GetSlavesResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/GetSlaves", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) VReplicationExec(ctx context.Context, in *tabletmanagerdata.VReplicationExecRequest, opts ...grpc.CallOption) (*tabletmanagerdata.VReplicationExecResponse, error) {
	out := new(tabletmanagerdata.VReplicationExecResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/VReplicationExec", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) VReplicationWaitForPos(ctx context.Context, in *tabletmanagerdata.VReplicationWaitForPosRequest, opts ...grpc.CallOption) (*tabletmanagerdata.VReplicationWaitForPosResponse, error) {
	out := new(tabletmanagerdata.VReplicationWaitForPosResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/VReplicationWaitForPos", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) ResetReplication(ctx context.Context, in *tabletmanagerdata.ResetReplicationRequest, opts ...grpc.CallOption) (*tabletmanagerdata.ResetReplicationResponse, error) {
	out := new(tabletmanagerdata.ResetReplicationResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/ResetReplication", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) InitMaster(ctx context.Context, in *tabletmanagerdata.InitMasterRequest, opts ...grpc.CallOption) (*tabletmanagerdata.InitMasterResponse, error) {
	out := new(tabletmanagerdata.InitMasterResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/InitMaster", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) PopulateReparentJournal(ctx context.Context, in *tabletmanagerdata.PopulateReparentJournalRequest, opts ...grpc.CallOption) (*tabletmanagerdata.PopulateReparentJournalResponse, error) {
	out := new(tabletmanagerdata.PopulateReparentJournalResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/PopulateReparentJournal", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) InitSlave(ctx context.Context, in *tabletmanagerdata.InitSlaveRequest, opts ...grpc.CallOption) (*tabletmanagerdata.InitSlaveResponse, error) {
	out := new(tabletmanagerdata.InitSlaveResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/InitSlave", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) DemoteMaster(ctx context.Context, in *tabletmanagerdata.DemoteMasterRequest, opts ...grpc.CallOption) (*tabletmanagerdata.DemoteMasterResponse, error) {
	out := new(tabletmanagerdata.DemoteMasterResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/DemoteMaster", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) UndoDemoteMaster(ctx context.Context, in *tabletmanagerdata.UndoDemoteMasterRequest, opts ...grpc.CallOption) (*tabletmanagerdata.UndoDemoteMasterResponse, error) {
	out := new(tabletmanagerdata.UndoDemoteMasterResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/UndoDemoteMaster", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) PromoteSlaveWhenCaughtUp(ctx context.Context, in *tabletmanagerdata.PromoteSlaveWhenCaughtUpRequest, opts ...grpc.CallOption) (*tabletmanagerdata.PromoteSlaveWhenCaughtUpResponse, error) {
	out := new(tabletmanagerdata.PromoteSlaveWhenCaughtUpResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/PromoteSlaveWhenCaughtUp", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) SlaveWasPromoted(ctx context.Context, in *tabletmanagerdata.SlaveWasPromotedRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SlaveWasPromotedResponse, error) {
	out := new(tabletmanagerdata.SlaveWasPromotedResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/SlaveWasPromoted", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) SetMaster(ctx context.Context, in *tabletmanagerdata.SetMasterRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SetMasterResponse, error) {
	out := new(tabletmanagerdata.SetMasterResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/SetMaster", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) SlaveWasRestarted(ctx context.Context, in *tabletmanagerdata.SlaveWasRestartedRequest, opts ...grpc.CallOption) (*tabletmanagerdata.SlaveWasRestartedResponse, error) {
	out := new(tabletmanagerdata.SlaveWasRestartedResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/SlaveWasRestarted", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) StopReplicationAndGetStatus(ctx context.Context, in *tabletmanagerdata.StopReplicationAndGetStatusRequest, opts ...grpc.CallOption) (*tabletmanagerdata.StopReplicationAndGetStatusResponse, error) {
	out := new(tabletmanagerdata.StopReplicationAndGetStatusResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/StopReplicationAndGetStatus", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) PromoteSlave(ctx context.Context, in *tabletmanagerdata.PromoteSlaveRequest, opts ...grpc.CallOption) (*tabletmanagerdata.PromoteSlaveResponse, error) {
	out := new(tabletmanagerdata.PromoteSlaveResponse)
	err := c.cc.Invoke(ctx, "/tabletmanagerservice.TabletManager/PromoteSlave", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *tabletManagerClient) Backup(ctx context.Context, in *tabletmanagerdata.BackupRequest, opts ...grpc.CallOption) (TabletManager_BackupClient, error) {
	stream, err := c.cc.NewStream(ctx, &_TabletManager_serviceDesc.Streams[0], "/tabletmanagerservice.TabletManager/Backup", opts...)
	if err != nil {
		return nil, err
	}
	x := &tabletManagerBackupClient{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
}

type TabletManager_BackupClient interface {
	Recv() (*tabletmanagerdata.BackupResponse, error)
	grpc.ClientStream
}

type tabletManagerBackupClient struct {
	grpc.ClientStream
}

func (x *tabletManagerBackupClient) Recv() (*tabletmanagerdata.BackupResponse, error) {
	m := new(tabletmanagerdata.BackupResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func (c *tabletManagerClient) RestoreFromBackup(ctx context.Context, in *tabletmanagerdata.RestoreFromBackupRequest, opts ...grpc.CallOption) (TabletManager_RestoreFromBackupClient, error) {
	stream, err := c.cc.NewStream(ctx, &_TabletManager_serviceDesc.Streams[1], "/tabletmanagerservice.TabletManager/RestoreFromBackup", opts...)
	if err != nil {
		return nil, err
	}
	x := &tabletManagerRestoreFromBackupClient{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
}

type TabletManager_RestoreFromBackupClient interface {
	Recv() (*tabletmanagerdata.RestoreFromBackupResponse, error)
	grpc.ClientStream
}

type tabletManagerRestoreFromBackupClient struct {
	grpc.ClientStream
}

func (x *tabletManagerRestoreFromBackupClient) Recv() (*tabletmanagerdata.RestoreFromBackupResponse, error) {
	m := new(tabletmanagerdata.RestoreFromBackupResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// TabletManagerServer is the server API for TabletManager service.
type TabletManagerServer interface {
	// Ping returns the input payload
	Ping(context.Context, *tabletmanagerdata.PingRequest) (*tabletmanagerdata.PingResponse, error)
	// Sleep sleeps for the provided duration
	Sleep(context.Context, *tabletmanagerdata.SleepRequest) (*tabletmanagerdata.SleepResponse, error)
	// ExecuteHook executes the hook remotely
	ExecuteHook(context.Context, *tabletmanagerdata.ExecuteHookRequest) (*tabletmanagerdata.ExecuteHookResponse, error)
	// GetSchema asks the tablet for its schema
	GetSchema(context.Context, *tabletmanagerdata.GetSchemaRequest) (*tabletmanagerdata.GetSchemaResponse, error)
	// GetPermissions asks the tablet for its permissions
	GetPermissions(context.Context, *tabletmanagerdata.GetPermissionsRequest) (*tabletmanagerdata.GetPermissionsResponse, error)
	SetReadOnly(context.Context, *tabletmanagerdata.SetReadOnlyRequest) (*tabletmanagerdata.SetReadOnlyResponse, error)
	SetReadWrite(context.Context, *tabletmanagerdata.SetReadWriteRequest) (*tabletmanagerdata.SetReadWriteResponse, error)
	// ChangeType asks the remote tablet to change its type
	ChangeType(context.Context, *tabletmanagerdata.ChangeTypeRequest) (*tabletmanagerdata.ChangeTypeResponse, error)
	RefreshState(context.Context, *tabletmanagerdata.RefreshStateRequest) (*tabletmanagerdata.RefreshStateResponse, error)
	RunHealthCheck(context.Context, *tabletmanagerdata.RunHealthCheckRequest) (*tabletmanagerdata.RunHealthCheckResponse, error)
	IgnoreHealthError(context.Context, *tabletmanagerdata.IgnoreHealthErrorRequest) (*tabletmanagerdata.IgnoreHealthErrorResponse, error)
	ReloadSchema(context.Context, *tabletmanagerdata.ReloadSchemaRequest) (*tabletmanagerdata.ReloadSchemaResponse, error)
	PreflightSchema(context.Context, *tabletmanagerdata.PreflightSchemaRequest) (*tabletmanagerdata.PreflightSchemaResponse, error)
	ApplySchema(context.Context, *tabletmanagerdata.ApplySchemaRequest) (*tabletmanagerdata.ApplySchemaResponse, error)
	LockTables(context.Context, *tabletmanagerdata.LockTablesRequest) (*tabletmanagerdata.LockTablesResponse, error)
	UnlockTables(context.Context, *tabletmanagerdata.UnlockTablesRequest) (*tabletmanagerdata.UnlockTablesResponse, error)
	ExecuteFetchAsDba(context.Context, *tabletmanagerdata.ExecuteFetchAsDbaRequest) (*tabletmanagerdata.ExecuteFetchAsDbaResponse, error)
	ExecuteFetchAsAllPrivs(context.Context, *tabletmanagerdata.ExecuteFetchAsAllPrivsRequest) (*tabletmanagerdata.ExecuteFetchAsAllPrivsResponse, error)
	ExecuteFetchAsApp(context.Context, *tabletmanagerdata.ExecuteFetchAsAppRequest) (*tabletmanagerdata.ExecuteFetchAsAppResponse, error)
	// SlaveStatus returns the current slave status.
	SlaveStatus(context.Context, *tabletmanagerdata.SlaveStatusRequest) (*tabletmanagerdata.SlaveStatusResponse, error)
	// MasterPosition returns the current master position
	MasterPosition(context.Context, *tabletmanagerdata.MasterPositionRequest) (*tabletmanagerdata.MasterPositionResponse, error)
	// StopSlave makes mysql stop its replication
	StopSlave(context.Context, *tabletmanagerdata.StopSlaveRequest) (*tabletmanagerdata.StopSlaveResponse, error)
	// StopSlaveMinimum stops the mysql replication after it reaches
	// the provided minimum point
	StopSlaveMinimum(context.Context, *tabletmanagerdata.StopSlaveMinimumRequest) (*tabletmanagerdata.StopSlaveMinimumResponse, error)
	// StartSlave starts the mysql replication
	StartSlave(context.Context, *tabletmanagerdata.StartSlaveRequest) (*tabletmanagerdata.StartSlaveResponse, error)
	// StartSlave starts the mysql replication until and including
	// the provided position
	StartSlaveUntilAfter(context.Context, *tabletmanagerdata.StartSlaveUntilAfterRequest) (*tabletmanagerdata.StartSlaveUntilAfterResponse, error)
	// TabletExternallyReparented tells a tablet that its underlying MySQL is
	// currently the master. It is only used in environments (tabletmanagerdata.such as Vitess+MoB)
	// in which MySQL is reparented by some agent external to Vitess, and then
	// that agent simply notifies Vitess.
	//
	// This call is idempotent with respect to a single target tablet.
	// However, the tablet assumes there is a cooling-off period following the
	// initial external reparent from A to B, before this call is repeated on any
	// tablet other than B. This assumption is configurable with the vttablet flag
	// "finalize_external_reparent_timeout".
	//
	// For more information, see the design doc at go/vt-fast-failover.
	TabletExternallyReparented(context.Context, *tabletmanagerdata.TabletExternallyReparentedRequest) (*tabletmanagerdata.TabletExternallyReparentedResponse, error)
	// TabletExternallyElected is an notification that may be sent in
	// anticipation of potentially later sending TabletExternallyReparented.
	// The tablet can use this extra lead time to prepare to react quickly if
	// TabletExternallyReparented does follow.
	//
	// This call is effectively a no-op if it is not followed by a call to
	// TabletExternallyReparented, so the external agent doing the reparent can
	// still change its mind.
	//
	// The agent does not need to wait for this call or cancel it before calling
	// TabletExternallyReparented if the external reparent operation finishes
	// before TabletExternallyElected returns.
	TabletExternallyElected(context.Context, *tabletmanagerdata.TabletExternallyElectedRequest) (*tabletmanagerdata.TabletExternallyElectedResponse, error)
	// GetSlaves asks for the list of mysql slaves
	GetSlaves(context.Context, *tabletmanagerdata.GetSlavesRequest) (*tabletmanagerdata.GetSlavesResponse, error)
	// VReplication API
	VReplicationExec(context.Context, *tabletmanagerdata.VReplicationExecRequest) (*tabletmanagerdata.VReplicationExecResponse, error)
	VReplicationWaitForPos(context.Context, *tabletmanagerdata.VReplicationWaitForPosRequest) (*tabletmanagerdata.VReplicationWaitForPosResponse, error)
	// ResetReplication makes the target not replicating
	ResetReplication(context.Context, *tabletmanagerdata.ResetReplicationRequest) (*tabletmanagerdata.ResetReplicationResponse, error)
	// InitMaster initializes the tablet as a master
	InitMaster(context.Context, *tabletmanagerdata.InitMasterRequest) (*tabletmanagerdata.InitMasterResponse, error)
	// PopulateReparentJournal tells the tablet to add an entry to its
	// reparent journal
	PopulateReparentJournal(context.Context, *tabletmanagerdata.PopulateReparentJournalRequest) (*tabletmanagerdata.PopulateReparentJournalResponse, error)
	// InitSlave tells the tablet to reparent to the master unconditionnally
	InitSlave(context.Context, *tabletmanagerdata.InitSlaveRequest) (*tabletmanagerdata.InitSlaveResponse, error)
	// DemoteMaster tells the soon-to-be-former master it's gonna change
	DemoteMaster(context.Context, *tabletmanagerdata.DemoteMasterRequest) (*tabletmanagerdata.DemoteMasterResponse, error)
	// UndoDemoteMaster reverts all changes made by DemoteMaster
	UndoDemoteMaster(context.Context, *tabletmanagerdata.UndoDemoteMasterRequest) (*tabletmanagerdata.UndoDemoteMasterResponse, error)
	// PromoteSlaveWhenCaughtUp tells the remote tablet to catch up,
	// and then be the master
	PromoteSlaveWhenCaughtUp(context.Context, *tabletmanagerdata.PromoteSlaveWhenCaughtUpRequest) (*tabletmanagerdata.PromoteSlaveWhenCaughtUpResponse, error)
	// SlaveWasPromoted tells the remote tablet it is now the master
	SlaveWasPromoted(context.Context, *tabletmanagerdata.SlaveWasPromotedRequest) (*tabletmanagerdata.SlaveWasPromotedResponse, error)
	// SetMaster tells the slave to reparent
	SetMaster(context.Context, *tabletmanagerdata.SetMasterRequest) (*tabletmanagerdata.SetMasterResponse, error)
	// SlaveWasRestarted tells the remote tablet its master has changed
	SlaveWasRestarted(context.Context, *tabletmanagerdata.SlaveWasRestartedRequest) (*tabletmanagerdata.SlaveWasRestartedResponse, error)
	// StopReplicationAndGetStatus stops MySQL replication, and returns the
	// replication status
	StopReplicationAndGetStatus(context.Context, *tabletmanagerdata.StopReplicationAndGetStatusRequest) (*tabletmanagerdata.StopReplicationAndGetStatusResponse, error)
	// PromoteSlave makes the slave the new master
	PromoteSlave(context.Context, *tabletmanagerdata.PromoteSlaveRequest) (*tabletmanagerdata.PromoteSlaveResponse, error)
	Backup(*tabletmanagerdata.BackupRequest, TabletManager_BackupServer) error
	// RestoreFromBackup deletes all local data and restores it from the latest backup.
	RestoreFromBackup(*tabletmanagerdata.RestoreFromBackupRequest, TabletManager_RestoreFromBackupServer) error
}

func RegisterTabletManagerServer(s *grpc.Server, srv TabletManagerServer) {
	s.RegisterService(&_TabletManager_serviceDesc, srv)
}

func _TabletManager_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.PingRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).Ping(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/Ping",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).Ping(ctx, req.(*tabletmanagerdata.PingRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_Sleep_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.SleepRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).Sleep(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/Sleep",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).Sleep(ctx, req.(*tabletmanagerdata.SleepRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_ExecuteHook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.ExecuteHookRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).ExecuteHook(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/ExecuteHook",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).ExecuteHook(ctx, req.(*tabletmanagerdata.ExecuteHookRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_GetSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.GetSchemaRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).GetSchema(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/GetSchema",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).GetSchema(ctx, req.(*tabletmanagerdata.GetSchemaRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_GetPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.GetPermissionsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).GetPermissions(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/GetPermissions",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).GetPermissions(ctx, req.(*tabletmanagerdata.GetPermissionsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_SetReadOnly_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.SetReadOnlyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).SetReadOnly(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/SetReadOnly",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).SetReadOnly(ctx, req.(*tabletmanagerdata.SetReadOnlyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_SetReadWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.SetReadWriteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).SetReadWrite(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/SetReadWrite",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).SetReadWrite(ctx, req.(*tabletmanagerdata.SetReadWriteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_ChangeType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.ChangeTypeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).ChangeType(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/ChangeType",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).ChangeType(ctx, req.(*tabletmanagerdata.ChangeTypeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_RefreshState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.RefreshStateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).RefreshState(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/RefreshState",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).RefreshState(ctx, req.(*tabletmanagerdata.RefreshStateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_RunHealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.RunHealthCheckRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).RunHealthCheck(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/RunHealthCheck",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).RunHealthCheck(ctx, req.(*tabletmanagerdata.RunHealthCheckRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_IgnoreHealthError_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.IgnoreHealthErrorRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).IgnoreHealthError(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/IgnoreHealthError",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).IgnoreHealthError(ctx, req.(*tabletmanagerdata.IgnoreHealthErrorRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_ReloadSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.ReloadSchemaRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).ReloadSchema(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/ReloadSchema",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).ReloadSchema(ctx, req.(*tabletmanagerdata.ReloadSchemaRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_PreflightSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.PreflightSchemaRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).PreflightSchema(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/PreflightSchema",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).PreflightSchema(ctx, req.(*tabletmanagerdata.PreflightSchemaRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_ApplySchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.ApplySchemaRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).ApplySchema(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/ApplySchema",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).ApplySchema(ctx, req.(*tabletmanagerdata.ApplySchemaRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_LockTables_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.LockTablesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).LockTables(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/LockTables",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).LockTables(ctx, req.(*tabletmanagerdata.LockTablesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_UnlockTables_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.UnlockTablesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).UnlockTables(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/UnlockTables",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).UnlockTables(ctx, req.(*tabletmanagerdata.UnlockTablesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_ExecuteFetchAsDba_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.ExecuteFetchAsDbaRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).ExecuteFetchAsDba(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/ExecuteFetchAsDba",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).ExecuteFetchAsDba(ctx, req.(*tabletmanagerdata.ExecuteFetchAsDbaRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_ExecuteFetchAsAllPrivs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.ExecuteFetchAsAllPrivsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).ExecuteFetchAsAllPrivs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/ExecuteFetchAsAllPrivs",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).ExecuteFetchAsAllPrivs(ctx, req.(*tabletmanagerdata.ExecuteFetchAsAllPrivsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_ExecuteFetchAsApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.ExecuteFetchAsAppRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).ExecuteFetchAsApp(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/ExecuteFetchAsApp",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).ExecuteFetchAsApp(ctx, req.(*tabletmanagerdata.ExecuteFetchAsAppRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_SlaveStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.SlaveStatusRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).SlaveStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/SlaveStatus",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).SlaveStatus(ctx, req.(*tabletmanagerdata.SlaveStatusRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_MasterPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.MasterPositionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).MasterPosition(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/MasterPosition",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).MasterPosition(ctx, req.(*tabletmanagerdata.MasterPositionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_StopSlave_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.StopSlaveRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).StopSlave(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/StopSlave",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).StopSlave(ctx, req.(*tabletmanagerdata.StopSlaveRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_StopSlaveMinimum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.StopSlaveMinimumRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).StopSlaveMinimum(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/StopSlaveMinimum",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).StopSlaveMinimum(ctx, req.(*tabletmanagerdata.StopSlaveMinimumRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_StartSlave_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.StartSlaveRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).StartSlave(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/StartSlave",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).StartSlave(ctx, req.(*tabletmanagerdata.StartSlaveRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_StartSlaveUntilAfter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.StartSlaveUntilAfterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).StartSlaveUntilAfter(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/StartSlaveUntilAfter",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).StartSlaveUntilAfter(ctx, req.(*tabletmanagerdata.StartSlaveUntilAfterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_TabletExternallyReparented_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.TabletExternallyReparentedRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).TabletExternallyReparented(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/TabletExternallyReparented",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).TabletExternallyReparented(ctx, req.(*tabletmanagerdata.TabletExternallyReparentedRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_TabletExternallyElected_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.TabletExternallyElectedRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).TabletExternallyElected(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/TabletExternallyElected",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).TabletExternallyElected(ctx, req.(*tabletmanagerdata.TabletExternallyElectedRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_GetSlaves_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.GetSlavesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).GetSlaves(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/GetSlaves",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).GetSlaves(ctx, req.(*tabletmanagerdata.GetSlavesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_VReplicationExec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.VReplicationExecRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).VReplicationExec(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/VReplicationExec",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).VReplicationExec(ctx, req.(*tabletmanagerdata.VReplicationExecRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_VReplicationWaitForPos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.VReplicationWaitForPosRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).VReplicationWaitForPos(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/VReplicationWaitForPos",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).VReplicationWaitForPos(ctx, req.(*tabletmanagerdata.VReplicationWaitForPosRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_ResetReplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.ResetReplicationRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).ResetReplication(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/ResetReplication",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).ResetReplication(ctx, req.(*tabletmanagerdata.ResetReplicationRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_InitMaster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.InitMasterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).InitMaster(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/InitMaster",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).InitMaster(ctx, req.(*tabletmanagerdata.InitMasterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_PopulateReparentJournal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.PopulateReparentJournalRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).PopulateReparentJournal(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/PopulateReparentJournal",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).PopulateReparentJournal(ctx, req.(*tabletmanagerdata.PopulateReparentJournalRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_InitSlave_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.InitSlaveRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).InitSlave(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/InitSlave",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).InitSlave(ctx, req.(*tabletmanagerdata.InitSlaveRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_DemoteMaster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.DemoteMasterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).DemoteMaster(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/DemoteMaster",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).DemoteMaster(ctx, req.(*tabletmanagerdata.DemoteMasterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_UndoDemoteMaster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.UndoDemoteMasterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).UndoDemoteMaster(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/UndoDemoteMaster",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).UndoDemoteMaster(ctx, req.(*tabletmanagerdata.UndoDemoteMasterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_PromoteSlaveWhenCaughtUp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.PromoteSlaveWhenCaughtUpRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).PromoteSlaveWhenCaughtUp(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/PromoteSlaveWhenCaughtUp",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).PromoteSlaveWhenCaughtUp(ctx, req.(*tabletmanagerdata.PromoteSlaveWhenCaughtUpRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_SlaveWasPromoted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.SlaveWasPromotedRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).SlaveWasPromoted(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/SlaveWasPromoted",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).SlaveWasPromoted(ctx, req.(*tabletmanagerdata.SlaveWasPromotedRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_SetMaster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.SetMasterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).SetMaster(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/SetMaster",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).SetMaster(ctx, req.(*tabletmanagerdata.SetMasterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_SlaveWasRestarted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.SlaveWasRestartedRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).SlaveWasRestarted(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/SlaveWasRestarted",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).SlaveWasRestarted(ctx, req.(*tabletmanagerdata.SlaveWasRestartedRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_StopReplicationAndGetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.StopReplicationAndGetStatusRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).StopReplicationAndGetStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/StopReplicationAndGetStatus",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).StopReplicationAndGetStatus(ctx, req.(*tabletmanagerdata.StopReplicationAndGetStatusRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_PromoteSlave_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(tabletmanagerdata.PromoteSlaveRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TabletManagerServer).PromoteSlave(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/tabletmanagerservice.TabletManager/PromoteSlave",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TabletManagerServer).PromoteSlave(ctx, req.(*tabletmanagerdata.PromoteSlaveRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TabletManager_Backup_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(tabletmanagerdata.BackupRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(TabletManagerServer).Backup(m, &tabletManagerBackupServer{stream})
}

type TabletManager_BackupServer interface {
	Send(*tabletmanagerdata.BackupResponse) error
	grpc.ServerStream
}

type tabletManagerBackupServer struct {
	grpc.ServerStream
}

func (x *tabletManagerBackupServer) Send(m *tabletmanagerdata.BackupResponse) error {
	return x.ServerStream.SendMsg(m)
}

func _TabletManager_RestoreFromBackup_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(tabletmanagerdata.RestoreFromBackupRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(TabletManagerServer).RestoreFromBackup(m, &tabletManagerRestoreFromBackupServer{stream})
}

type TabletManager_RestoreFromBackupServer interface {
	Send(*tabletmanagerdata.RestoreFromBackupResponse) error
	grpc.ServerStream
}

type tabletManagerRestoreFromBackupServer struct {
	grpc.ServerStream
}

func (x *tabletManagerRestoreFromBackupServer) Send(m *tabletmanagerdata.RestoreFromBackupResponse) error {
	return x.ServerStream.SendMsg(m)
}

var _TabletManager_serviceDesc = grpc.ServiceDesc{
	ServiceName: "tabletmanagerservice.TabletManager",
	HandlerType: (*TabletManagerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _TabletManager_Ping_Handler,
		},
		{
			MethodName: "Sleep",
			Handler:    _TabletManager_Sleep_Handler,
		},
		{
			MethodName: "ExecuteHook",
			Handler:    _TabletManager_ExecuteHook_Handler,
		},
		{
			MethodName: "GetSchema",
			Handler:    _TabletManager_GetSchema_Handler,
		},
		{
			MethodName: "GetPermissions",
			Handler:    _TabletManager_GetPermissions_Handler,
		},
		{
			MethodName: "SetReadOnly",
			Handler:    _TabletManager_SetReadOnly_Handler,
		},
		{
			MethodName: "SetReadWrite",
			Handler:    _TabletManager_SetReadWrite_Handler,
		},
		{
			MethodName: "ChangeType",
			Handler:    _TabletManager_ChangeType_Handler,
		},
		{
			MethodName: "RefreshState",
			Handler:    _TabletManager_RefreshState_Handler,
		},
		{
			MethodName: "RunHealthCheck",
			Handler:    _TabletManager_RunHealthCheck_Handler,
		},
		{
			MethodName: "IgnoreHealthError",
			Handler:    _TabletManager_IgnoreHealthError_Handler,
		},
		{
			MethodName: "ReloadSchema",
			Handler:    _TabletManager_ReloadSchema_Handler,
		},
		{
			MethodName: "PreflightSchema",
			Handler:    _TabletManager_PreflightSchema_Handler,
		},
		{
			MethodName: "ApplySchema",
			Handler:    _TabletManager_ApplySchema_Handler,
		},
		{
			MethodName: "LockTables",
			Handler:    _TabletManager_LockTables_Handler,
		},
		{
			MethodName: "UnlockTables",
			Handler:    _TabletManager_UnlockTables_Handler,
		},
		{
			MethodName: "ExecuteFetchAsDba",
			Handler:    _TabletManager_ExecuteFetchAsDba_Handler,
		},
		{
			MethodName: "ExecuteFetchAsAllPrivs",
			Handler:    _TabletManager_ExecuteFetchAsAllPrivs_Handler,
		},
		{
			MethodName: "ExecuteFetchAsApp",
			Handler:    _TabletManager_ExecuteFetchAsApp_Handler,
		},
		{
			MethodName: "SlaveStatus",
			Handler:    _TabletManager_SlaveStatus_Handler,
		},
		{
			MethodName: "MasterPosition",
			Handler:    _TabletManager_MasterPosition_Handler,
		},
		{
			MethodName: "StopSlave",
			Handler:    _TabletManager_StopSlave_Handler,
		},
		{
			MethodName: "StopSlaveMinimum",
			Handler:    _TabletManager_StopSlaveMinimum_Handler,
		},
		{
			MethodName: "StartSlave",
			Handler:    _TabletManager_StartSlave_Handler,
		},
		{
			MethodName: "StartSlaveUntilAfter",
			Handler:    _TabletManager_StartSlaveUntilAfter_Handler,
		},
		{
			MethodName: "TabletExternallyReparented",
			Handler:    _TabletManager_TabletExternallyReparented_Handler,
		},
		{
			MethodName: "TabletExternallyElected",
			Handler:    _TabletManager_TabletExternallyElected_Handler,
		},
		{
			MethodName: "GetSlaves",
			Handler:    _TabletManager_GetSlaves_Handler,
		},
		{
			MethodName: "VReplicationExec",
			Handler:    _TabletManager_VReplicationExec_Handler,
		},
		{
			MethodName: "VReplicationWaitForPos",
			Handler:    _TabletManager_VReplicationWaitForPos_Handler,
		},
		{
			MethodName: "ResetReplication",
			Handler:    _TabletManager_ResetReplication_Handler,
		},
		{
			MethodName: "InitMaster",
			Handler:    _TabletManager_InitMaster_Handler,
		},
		{
			MethodName: "PopulateReparentJournal",
			Handler:    _TabletManager_PopulateReparentJournal_Handler,
		},
		{
			MethodName: "InitSlave",
			Handler:    _TabletManager_InitSlave_Handler,
		},
		{
			MethodName: "DemoteMaster",
			Handler:    _TabletManager_DemoteMaster_Handler,
		},
		{
			MethodName: "UndoDemoteMaster",
			Handler:    _TabletManager_UndoDemoteMaster_Handler,
		},
		{
			MethodName: "PromoteSlaveWhenCaughtUp",
			Handler:    _TabletManager_PromoteSlaveWhenCaughtUp_Handler,
		},
		{
			MethodName: "SlaveWasPromoted",
			Handler:    _TabletManager_SlaveWasPromoted_Handler,
		},
		{
			MethodName: "SetMaster",
			Handler:    _TabletManager_SetMaster_Handler,
		},
		{
			MethodName: "SlaveWasRestarted",
			Handler:    _TabletManager_SlaveWasRestarted_Handler,
		},
		{
			MethodName: "StopReplicationAndGetStatus",
			Handler:    _TabletManager_StopReplicationAndGetStatus_Handler,
		},
		{
			MethodName: "PromoteSlave",
			Handler:    _TabletManager_PromoteSlave_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Backup",
			Handler:       _TabletManager_Backup_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "RestoreFromBackup",
			Handler:       _TabletManager_RestoreFromBackup_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "tabletmanagerservice.proto",
}

func init() {
	proto.RegisterFile("tabletmanagerservice.proto", fileDescriptor_tabletmanagerservice_0dc181478a076ccc)
}

var fileDescriptor_tabletmanagerservice_0dc181478a076ccc = []byte{
	// 1030 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0x6d, 0x6f, 0x1b, 0x45,
	0x10, 0xc7, 0xb1, 0x04, 0x95, 0x58, 0x1e, 0xbb, 0xaa, 0x28, 0x0a, 0x12, 0x4f, 0x4d, 0x79, 0x48,
	0x51, 0xdc, 0x34, 0x94, 0xf7, 0x6e, 0x9a, 0xb4, 0x41, 0x8d, 0x30, 0x76, 0x43, 0x10, 0x48, 0x48,
	0x1b, 0x7b, 0xe2, 0x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, 0xcd, 0x6e, 0x97, 0xd9, 0x55, 0x1a, 0x4e, 0xb4, 0x9a, 0x37, 0xd6, 0x3b,
	0x66, 0x6b, 0x48, 0xc5, 0x0e, 0x8e, 0x80, 0x5b, 0x9f, 0x4f, 0x0e, 0x7f, 0x39, 0x58, 0xa4, 0x16,
	0x8c, 0xd9, 0x4f, 0x55, 0xbf, 0xfe, 0xab, 0x3f, 0x53, 0xfd, 0x85, 0xed, 0x57, 0x5f, 0x98, 0xfa,
	0xd4, 0xf7, 0xa8, 0xcb, 0x5b, 0x95, 0x76, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xae, 0x75,
	0xbb, 0x5f, 0xca, 0x12, 0x00, 0x00,
}


text:
package org.terasology.rendering.shader;

import org.lwjgl.opengl.GL13;
import org.terasology.config.Config;
import org.terasology.registry.CoreRegistry;
import org.terasology.rendering.assets.material.Material;
import org.terasology.rendering.cameras.Camera;
import org.terasology.rendering.opengl.LwjglRenderingProcess;
import org.terasology.rendering.world.WorldRenderer;

/**
 * Shader parameters for the Debug shader program.
 *
 * @author Benjamin Glatzel
 */
public class ShaderParametersDebug extends ShaderParametersBase {

    @Override
    public void applyParameters(Material program) {
        super.applyParameters(program);

        Config config = CoreRegistry.get(Config.class);

        int texId = 0;

        LwjglRenderingProcess renderingProcess = CoreRegistry.get(LwjglRenderingProcess.class);

        switch (config.getRendering().getDebug().getStage()) {
            case SHADOW_MAP:
                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboDepthTexture("sceneShadowMap");
                program.setInt("texDebug", texId++, true);
                break;
            case OPAQUE_COLOR:
                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboColorTexture("sceneOpaque");
                program.setInt("texDebug", texId++, true);
                break;
            case OPAQUE_NORMALS:
            case OPAQUE_SUNLIGHT:
                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboNormalsTexture("sceneOpaque");
                program.setInt("texDebug", texId++, true);
                break;
            case OPAQUE_DEPTH:
                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboDepthTexture("sceneOpaque");
                program.setInt("texDebug", texId++, true);
                break;
            case OPAQUE_LIGHT_BUFFER:
                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboLightBufferTexture("sceneOpaque");
                program.setInt("texDebug", texId++, true);
                break;
            case TRANSPARENT_COLOR:
                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboColorTexture("sceneReflectiveRefractive");
                program.setInt("texDebug", texId++, true);
                break;
            case SSAO:
                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboColorTexture("ssaoBlurred");
                program.setInt("texDebug", texId++, true);
                break;
            case SOBEL:
                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboColorTexture("outline");
                program.setInt("texDebug", texId++, true);
                break;
            case BAKED_OCCLUSION:
                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboColorTexture("sceneOpaque");
                program.setInt("texDebug", texId++, true);
                break;
            case RECONSTRUCTED_POSITION:
                Camera activeCamera = CoreRegistry.get(WorldRenderer.class).getActiveCamera();
                if (activeCamera != null) {
                    program.setMatrix4("invProjMatrix", activeCamera.getInverseProjectionMatrix(), true);
                }

                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboDepthTexture("sceneOpaque");
                program.setInt("texDebug", texId++, true);
                break;
            case BLOOM:
                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboColorTexture("sceneBloom2");
                program.setInt("texDebug", texId++, true);
                break;
            case HIGH_PASS:
                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboColorTexture("sceneHighPass");
                program.setInt("texDebug", texId++, true);
                break;
            case SKY_BAND:
                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboColorTexture("sceneSkyBand1");
                program.setInt("texDebug", texId++, true);
                break;
            case LIGHT_SHAFTS:
                GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);
                renderingProcess.bindFboColorTexture("lightShafts");
                program.setInt("texDebug", texId++, true);
                break;
            default:
                break;
        }

        program.setInt("debugRenderingStage", CoreRegistry.get(Config.class).getRendering().getDebug().getStage().getIndex());
    }
}

redpajama_set_name: RedPajamaGithub


text:
package assertions

import (
	"fmt"
	"path"
	"runtime"
	"strings"
	"testing"
)

func pass(t *testing.T, result string) {
	if result != success {
		_, file, line, _ := runtime.Caller(1)
		base := path.Base(file)
		t.Errorf("Expectation should have passed but failed (see %s: line %d): '%s'", base, line, result)
	}
}

func fail(t *testing.T, actual string, expected string) {
	actual = format(actual)
	expected = format(expected)

	if actual != expected {
		if actual == "" {
			actual = "(empty)"
		}
		_, file, line, _ := runtime.Caller(1)
		t.Errorf("\n%s:%d\nExpected: %s\nActual:   %s\n",
			file, line, expected, actual)
	}
}
func format(message string) string {
	message = strings.Replace(message, "\n", " ", -1)
	for strings.Contains(message, "  ") {
		message = strings.Replace(message, "  ", " ", -1)
	}
	return message
}

type Thing1 struct {
	a string
}
type Thing2 struct {
	a string
}

type Thinger interface {
	Hi()
}

type Thing struct{}

func (self *Thing) Hi() {}

type IntAlias int
type StringAlias string
type StringSliceAlias []string
type StringStringMapAlias map[string]string

/******** FakeSerialzier ********/

type fakeSerializer struct{}

func (self *fakeSerializer) serialize(expected, actual interface{}, message string) string {
	return fmt.Sprintf("%v|%v|%s", expected, actual, message)
}

func (self *fakeSerializer) serializeDetailed(expected, actual interface{}, message string) string {
	return fmt.Sprintf("%v|%v|%s", expected, actual, message)
}

func newFakeSerializer() *fakeSerializer {
	return new(fakeSerializer)
}


text:
// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Runtime.InteropServices;

using SharpDX.Direct2D1;

namespace SharpDX.DirectWrite
{
    /// <summary>
    /// Internal TextRenderer Callback
    /// </summary>
    internal class TextRendererShadow : PixelSnappingShadow
    {
        private static readonly TextRendererVtbl Vtbl = new TextRendererVtbl();

        /// <summary>
        /// Return a pointer to the unmanaged version of this callback.
        /// </summary>
        /// <param name="callback">The callback.</param>
        /// <returns>A pointer to a shadow c++ callback</returns>
        public static IntPtr ToIntPtr(TextRenderer callback)
        {
            return ToCallbackPtr<TextRenderer>(callback);
        }

        private class TextRendererVtbl : PixelSnappingVtbl
        {
            public TextRendererVtbl() : base(4)
            {
                unsafe
                {
                    AddMethod(new DrawGlyphRunDelegate(DrawGlyphRunImpl));
                    AddMethod(new DrawUnderlineDelegate(DrawUnderlineImpl));
                    AddMethod(new DrawStrikethroughDelegate(DrawStrikethroughImpl));
                    AddMethod(new DrawInlineObjectDelegate(DrawInlineObjectImpl));
                }
            }

            /// <unmanaged>HRESULT DrawGlyphRun([None] void* clientDrawingContext,[None] FLOAT baselineOriginX,[None] FLOAT baselineOriginY,[None] DWRITE_MEASURING_MODE measuringMode,[In] const DWRITE_GLYPH_RUN* glyphRun,[In] const DWRITE_GLYPH_RUN_DESCRIPTION* glyphRunDescription,[None] IUnknown* clientDrawingEffect)</unmanaged>
            [UnmanagedFunctionPointer(CallingConvention.StdCall)]
            private delegate int DrawGlyphRunDelegate(IntPtr thisObject, IntPtr clientDrawingContext, float baselineOriginX, float baselineOriginY, MeasuringMode measuringMode,
                                                      IntPtr glyphRunPtr, IntPtr glyphRunDescription, IntPtr clientDrawingEffect);
            private static int DrawGlyphRunImpl(IntPtr thisObject, IntPtr clientDrawingContextPtr, float baselineOriginX, float baselineOriginY, MeasuringMode measuringMode,
                                         IntPtr glyphRunPtr, IntPtr glyphRunDescriptionPtr, IntPtr clientDrawingEffectPtr)
            {
                unsafe
                {
                    var shadow = ToShadow<TextRendererShadow>(thisObject);
                    var callback = (TextRenderer) shadow.Callback;

                    // Read GlyphRun
                    var glyphRunData = default(GlyphRun.__Native);
                    Utilities.Read(glyphRunPtr, ref glyphRunData);
                    using (var glyphRun = new GlyphRun())
                    {
                        glyphRun.__MarshalFrom(ref glyphRunData);

                        // Read GlyphRunDescription
                        var glyphRunDescriptionData = default(GlyphRunDescription.__Native);
                        Utilities.Read(glyphRunDescriptionPtr, ref glyphRunDescriptionData);
                        var glyphRunDescription = new GlyphRunDescription();
                        glyphRunDescription.__MarshalFrom(ref glyphRunDescriptionData);

                        return
                            callback.DrawGlyphRun(GCHandle.FromIntPtr(clientDrawingContextPtr).Target, baselineOriginX,
                                                  baselineOriginY, measuringMode, glyphRun, glyphRunDescription,
                                                  (ComObject) Utilities.GetObjectForIUnknown(clientDrawingEffectPtr)).Code;
                    }
                }
            }

            /// <unmanaged>HRESULT DrawUnderline([None] void* clientDrawingContext,[None] FLOAT baselineOriginX,[None] FLOAT baselineOriginY,[In] const DWRITE_UNDERLINE* underline,[None] IUnknown* clientDrawingEffect)</unmanaged>
            [UnmanagedFunctionPointer(CallingConvention.StdCall)]
            private unsafe delegate int DrawUnderlineDelegate(IntPtr thisObject, IntPtr clientDrawingContext, float baselineOriginX, float baselineOriginY, Underline.__Native* underline, IntPtr clientDrawingEffect);
            private unsafe static int DrawUnderlineImpl(IntPtr thisObject, IntPtr clientDrawingContextPtr, float baselineOriginX, float baselineOriginY, Underline.__Native* underline, IntPtr clientDrawingEffectPtr)
            {
                unsafe
                {
                    var shadow = ToShadow<TextRendererShadow>(thisObject);
                    var callback = (TextRenderer)shadow.Callback;

                    var underlineData = new Underline();
                    underlineData.__MarshalFrom(ref *underline);
                    return callback.DrawUnderline(GCHandle.FromIntPtr(clientDrawingContextPtr).Target, baselineOriginX, baselineOriginY, ref underlineData, (ComObject)Utilities.GetObjectForIUnknown(clientDrawingEffectPtr)).Code;
                }
            }

            /// <unmanaged>HRESULT DrawStrikethrough([None] void* clientDrawingContext,[None] FLOAT baselineOriginX,[None] FLOAT baselineOriginY,[In] const DWRITE_STRIKETHROUGH* strikethrough,[None] IUnknown* clientDrawingEffect)</unmanaged>
            [UnmanagedFunctionPointer(CallingConvention.StdCall)]
            private unsafe delegate int DrawStrikethroughDelegate(IntPtr thisObject, IntPtr clientDrawingContext, float baselineOriginX, float baselineOriginY, Strikethrough.__Native* strikethrough,
                                                           IntPtr clientDrawingEffect);
            private unsafe static int DrawStrikethroughImpl(IntPtr thisObject, IntPtr clientDrawingContextPtr, float baselineOriginX, float baselineOriginY, Strikethrough.__Native* strikethrough, IntPtr clientDrawingEffectPtr)
            {
                unsafe
                {
                    var shadow = ToShadow<TextRendererShadow>(thisObject);
                    var callback = (TextRenderer)shadow.Callback;

                    var strikethroughData = new Strikethrough();
                    strikethroughData.__MarshalFrom(ref *strikethrough);
                    return callback.DrawStrikethrough(GCHandle.FromIntPtr(clientDrawingContextPtr).Target, baselineOriginX, baselineOriginY, ref strikethroughData, (ComObject)Utilities.GetObjectForIUnknown(clientDrawingEffectPtr)).Code;
                }
            }

            /// <unmanaged>HRESULT DrawInlineObject([None] void* clientDrawingContext,[None] FLOAT originX,[None] FLOAT originY,[None] IDWriteInlineObject* inlineObject,[None] BOOL isSideways,[None] BOOL isRightToLeft,[None] IUnknown* clientDrawingEffect)</unmanaged>
            [UnmanagedFunctionPointer(CallingConvention.StdCall)]
            private delegate int DrawInlineObjectDelegate(IntPtr thisObject, IntPtr clientDrawingContext, float originX, float originY, IntPtr inlineObject, int isSideways, int isRightToLeft, IntPtr clientDrawingEffect);
            private static int DrawInlineObjectImpl(IntPtr thisObject, IntPtr clientDrawingContextPtr, float originX, float originY, IntPtr inlineObject, int isSideways, int isRightToLeft, IntPtr clientDrawingEffectPtr)
            {
                var shadow = ToShadow<TextRendererShadow>(thisObject);
                var callback = (TextRenderer)shadow.Callback;
                return callback.DrawInlineObject(GCHandle.FromIntPtr(clientDrawingContextPtr).Target, originX, originY, new InlineObjectNative(inlineObject), isSideways != 0, isRightToLeft != 0, (ComObject)Utilities.GetObjectForIUnknown(clientDrawingEffectPtr)).Code;
            }
        }

        protected override CppObjectVtbl GetVtbl
        {
            get { return Vtbl; }
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://hl7.org/fhirpath/tests" xsi:schemaLocation="http://hl7.org/fhirpath/tests ../../testSchema/testSchema.xsd"
	name="CqlConditionalOperatorsTest" reference="https://cql.hl7.org/03-developersguide.html#conditional-expressions">
	<group name="if-then-else">
		<test name="IfTrue1">
			<expression>if 10 > 5 then 5 else 10</expression>
			<output>5</output>
		</test>
		<test name="IfFalse1">
			<expression>if 10 = 5 then 10 + 5 else 10 - 5</expression>
			<output>5</output>
		</test>
		<test name="IfNull1">
			<expression>if 10 = null then 5 else 10</expression>
			<output>10</output>
		</test>
	</group>
	<group name="standard case">
		<test name="StandardCase1">
			<expression>
				case
					when 10 > 5 then 5
					when 5 > 10 then 10
					else null
				end
			</expression>
			<output>5</output>
		</test>
		<test name="StandardCase2">
			<expression>
				case
					when 5 > 10 then 5 + 10
					when 5 = 10 then 10
					else 10 - 5
				end
			</expression>
			<output>5</output>
		</test>
		<test name="StandardCase3">
			<expression>
				case
					when null ~ 10 then null + 10
					when null ~ 5 then 5
					else 5 + 10
				end
			</expression>
			<output>15</output>
		</test>
	</group>
	<group name="selected case">
		<test name="SelectedCase1">
			<expression>
				case 5
					when 5 then 12
					when 10 then 10 + 5
					else 10 - 5
				end
			</expression>
			<output>12</output>
		</test>
		<test name="SelectedCase2">
			<expression>
				case 10
					when 5 then 12
					when 10 then 10 + 5
					else 10 - 5
				end
			</expression>
			<output>15</output>
		</test>
		<test name="SelectedCase3">
			<expression>
				case 10 + 5
					when 5 then 12
					when 10 then 10 + 5
					else 10 - 5
				end
			</expression>
			<output>5</output>
		</test>
	</group>
</tests>