The AccessLevel parameter is depricated from EPi 5 R2 and on. So you have no need for it anyway. If you want to check access you have to do it on the returned PageData object instead.
EPiServer.Core.PageData page = EPiServer.DataFactory.Instance.GetPage(new EPiServer.Core.PageReference(3));
bool hasAccess = page.QueryDistinctAccess(EPiServer.Security.AccessLevel.Read);
I am unable to get EPiServer.Security.AccessLevel enum? Actually i want to use GetPage to get contents of the page. Getpage has three parameters, last parameter is EPiServer.Security.AccessLevel but AccessLevel enum is not coming. Any idea?