The city council shall appoint a city attorney and such assistant attorneys as necessary and shall provide for payment for services rendered to the city by such attorney or attorneys. The city attorney shall be responsible for representing and defending the city in all litigation in which the city is a party; may be prosecuting officer in the municipal court; shall attend meetings of the city council as directed; shall advise the mayor, city council, and other officers and employees of the city concerning the city's legal affairs; and shall perform such other duties as specified by the city council. The city attorney is not a public official of the city and does not take an oath of office. The city attorney shall at all times be an independent contractor. A law firm, rather than an individual, may be designated as the city attorney.