// Code generated by go:generate; DO NOT EDIT.
package bfxapi

var AllOrderStatuss = map[OrderStatus]struct{}{
	OrderStatusActive:            {},
	OrderStatusExecuted:          {},
	OrderStatusPartiallyFilled:   {},
	OrderStatusCanceled:          {},
	OrderStatusPostponed:         {},
	OrderStatusInsufficientBal:   {},
	OrderStatusStopped:           {},
	OrderStatusRejected:          {},
	OrderStatusExpired:           {},
	OrderStatusPending:           {},
	OrderStatusPartiallyCanceled: {},
}

var AllOrderStatussSlice = []OrderStatus{
	OrderStatusActive,
	OrderStatusExecuted,
	OrderStatusPartiallyFilled,
	OrderStatusCanceled,
	OrderStatusPostponed,
	OrderStatusInsufficientBal,
	OrderStatusStopped,
	OrderStatusRejected,
	OrderStatusExpired,
	OrderStatusPending,
	OrderStatusPartiallyCanceled,
}

func OrderStatusStrings(slice []OrderStatus) (out []string) {
	for _, el := range slice {
		out = append(out, string(el))
	}
	return out
}

// OrderStatusKeys converts a map of OrderStatus to a slice of OrderStatus
func OrderStatusKeys(values map[OrderStatus]struct{}) (slice []OrderStatus) {
	for k := range values {
		slice = append(slice, k)
	}
	return slice
}

// ValidateOrderStatus validates a value of type OrderStatus
func ValidateOrderStatus(ch OrderStatus) bool {
	_, ok := AllOrderStatuss[ch]
	return ok
}
