func IsMappable(name string) bool {
	if _, ok := system[name]; ok {
		return false
	}
	if _, ok := predefined[name]; ok {
		return false
	}
	return true
}
IsMappable returns true if name can have be mapped tho the alias.
package searchattribute
import (
	"strings"
	enumspb "go.temporal.io/api/enums/v1"
)
const (
	NamespaceID          = "NamespaceId"
	WorkflowID           = "WorkflowId"
	RunID                = "RunId"
	WorkflowType         = "WorkflowType"
	StartTime            = "StartTime"
	ExecutionTime        = "ExecutionTime"
	CloseTime            = "CloseTime"
	ExecutionStatus      = "ExecutionStatus"
	TaskQueue            = "TaskQueue"
	HistoryLength        = "HistoryLength"
	ExecutionDuration    = "ExecutionDuration"
	StateTransitionCount = "StateTransitionCount"
	TemporalChangeVersion = "TemporalChangeVersion"
	BinaryChecksums       = "BinaryChecksums"
	BatcherNamespace      = "BatcherNamespace"
	BatcherUser           = "BatcherUser"
	MemoEncoding      = "MemoEncoding"
	Memo              = "Memo"
	VisibilityTaskKey = "VisibilityTaskKey"
	ReservedPrefix = "Temporal"
)
var (
	system = map[string]enumspb.IndexedValueType{
		WorkflowID:           enumspb.INDEXED_VALUE_TYPE_KEYWORD,
		RunID:                enumspb.INDEXED_VALUE_TYPE_KEYWORD,
		WorkflowType:         enumspb.INDEXED_VALUE_TYPE_KEYWORD,
		StartTime:            enumspb.INDEXED_VALUE_TYPE_DATETIME,
		ExecutionTime:        enumspb.INDEXED_VALUE_TYPE_DATETIME,
		CloseTime:            enumspb.INDEXED_VALUE_TYPE_DATETIME,
		ExecutionStatus:      enumspb.INDEXED_VALUE_TYPE_KEYWORD,
		TaskQueue:            enumspb.INDEXED_VALUE_TYPE_KEYWORD,
		HistoryLength:        enumspb.INDEXED_VALUE_TYPE_INT,
		ExecutionDuration:    enumspb.INDEXED_VALUE_TYPE_INT,
		StateTransitionCount: enumspb.INDEXED_VALUE_TYPE_INT,
	}
	predefined = map[string]enumspb.IndexedValueType{
		TemporalChangeVersion: enumspb.INDEXED_VALUE_TYPE_KEYWORD,
		BinaryChecksums:       enumspb.INDEXED_VALUE_TYPE_KEYWORD,
		BatcherNamespace:      enumspb.INDEXED_VALUE_TYPE_KEYWORD,
		BatcherUser:           enumspb.INDEXED_VALUE_TYPE_KEYWORD,
	}
	reserved = map[string]struct{}{
		NamespaceID:       {},
		MemoEncoding:      {},
		Memo:              {},
		VisibilityTaskKey: {},
	}
)
func IsReserved(name string) bool {
	if _, ok := system[name]; ok {
		return true
	}
	if _, ok := predefined[name]; ok {
		return true
	}
	if _, ok := reserved[name]; ok {
		return true
	}
	return strings.HasPrefix(name, ReservedPrefix)
}