||Dublin Castle fulfilled a number of roles over the centuries. It was first and foremost a royal residence, resided in by the Lord Lieutenant of Ireland or Viceroy of Ireland, the representative of the monarch. The Viceregal Apartments (now called the State Apartments) remain one of the most splendid sites in Dublin, and are the location of the inauguration of the President of Ireland. The second in command in the Dublin Castle administration, the Chief Secretary for Ireland, also had his offices there. Over the years, parliament and the law courts met there, before moving to new purpose-built venues. It also served as a military garrison.