The city council shall appoint a city attorney and shall prescribe the qualifications, duties and compensation of such officer. The city attorney shall serve as legal counsel to the city government and all officers, departments, boards, commissions and agencies thereof and shall have such other powers and duties as may be prescribed by state law and by ordinance or resolution of the city council. In situations where the city attorney determines there is a conflict in representation by that office, the city council may authorize the retention or other legal counsel to represent one of the conflicting parties. The city attorney shall appoint all other members of the city attorney's office.