The city council shall appoint a city attorney and shall provide for the payment of such attorney for services rendered to the city. The city attorney shall be responsible for providing for the representation and defense of the city and all litigation in which the city is a party; shall attend the meetings of the city council as directed; shall advise the city council, mayor, and other officials and employees of the city concerning legal aspects of the city's affairs; and shall perform such other duties as may be required by virtue of such person's position as city attorney. The city attorney shall not be a public official of the city and is not required to take an oath of office. The city attorney shall at all times be an independent contractor.