func isCELTryFilesLiteral(e *exprpb.Expr) bool {
	switch e.GetExprKind().(type) {
	case *exprpb.Expr_StructExpr:
		structExpr := e.GetStructExpr()
		if structExpr.GetMessageName() != "" {
			return false
		}
		for _, entry := range structExpr.GetEntries() {
			mapKey := entry.GetMapKey()
			mapVal := entry.GetValue()
			if !isCELStringLiteral(mapKey) {
				return false
			}
			mapKeyStr := mapKey.GetConstExpr().GetStringValue()
			if mapKeyStr == "try_files" || mapKeyStr == "split_path" {
				if !isCELStringListLiteral(mapVal) {
					return false
				}
			} else if mapKeyStr == "try_policy" || mapKeyStr == "root" {
				if !(isCELStringExpr(mapVal)) {
					return false
				}
			} else {
				return false
			}
		}
		return true
	}
	return false
}
// isCELMapLiteral returns whether the expression resolves to a map literal containing
// only string keys with or a placeholder call.
isCELMapLiteral returns whether the expression resolves to a map literal containing
only string keys with or a placeholder call.
// isCELMapLiteral returns whether the expression resolves to a map literal containing // only string keys with or a placeholder call .
func isCELTryFilesLiteral(e *exprpb.Expr) bool {
	switch e.GetExprKind().(type) {
	case *exprpb.Expr_StructExpr:
		structExpr := e.GetStructExpr()
		if structExpr.GetMessageName() != "" {
			return false
		}
		for _, entry := range structExpr.GetEntries() {
			mapKey := entry.GetMapKey()
			mapVal := entry.GetValue()
			if !isCELStringLiteral(mapKey) {
				return false
			}
			mapKeyStr := mapKey.GetConstExpr().GetStringValue()
			if mapKeyStr == "try_files" || mapKeyStr == "split_path" {
				if !isCELStringListLiteral(mapVal) {
					return false
				}
			} else if mapKeyStr == "try_policy" || mapKeyStr == "root" {
				if !(isCELStringExpr(mapVal)) {
					return false
				}
			} else {
				return false
			}
		}
		return true
	}
	return false
}
func isCELTryFilesLiteral ( e * exprpb . Expr ) bool { switch e . GetExprKind ( ) . ( type ) { case * exprpb . Expr_StructExpr : structExpr := e . GetStructExpr ( ) if structExpr . GetMessageName ( ) != " " { return false } for _ , entry := range structExpr . GetEntries ( ) { mapKey := entry . GetMapKey ( ) mapVal := entry . GetValue ( ) if ! isCELStringLiteral ( mapKey ) { return false } mapKeyStr := mapKey . GetConstExpr ( ) . GetStringValue ( ) if mapKeyStr == " " || mapKeyStr == " " { if ! isCELStringListLiteral ( mapVal ) { return false } } else if mapKeyStr == " " || mapKeyStr == " " { if ! ( isCELStringExpr ( mapVal ) ) { return false } } else { return false } } return true } return false }
isCELMapLiteral returns whether the expression resolves to a map literal containing
only string keys with or a placeholder call.
isCELMapLiteral returns whether the expression resolves to a map literal containing only string keys with or a placeholder call .