func unmarshalOp(str string) (Operator, error) {
	var op Operator
	switch str {
	case "AND":
		op = AND
	case "OR":
		op = OR
	case "NONE":
		op = NONE
	default:
		return NONE, fmt.Errorf("Invalid operator: '%v'. Valid values are AND, OR, NONE", str)
	}
	return op, nil
}
unmarshalOp deserializes an operator
package policy
import (
	"encoding/base64"
	"encoding/json"
	"fmt"
)
func marshalOp(op Operator) (string, error) {
	var str string
	switch op {
	case AND:
		str = "AND"
	case OR:
		str = "OR"
	case NONE:
		str = "NONE"
	default:
		return "", fmt.Errorf("Invalid operator: '%v'. Valid values are AND, OR, NONE", op)
	}
	return str, nil
}