(1) The district attorney, upon request of any county officer of any county within his district, without fee, shall give his opinion in writing upon all questions of law having references to the duties of such officer which may be submitted and shall file and preserve in his office a copy of all such opinions.
(2) The district attorney, upon a request in the form of a resolution by the board of county commissioners of any county within his district, shall represent any county officer enumerated in article 10 of title 30, C.R.S., or the employees of any such officer in the defense of any civil suit or civil proceeding brought against such officer in any court of this state or any federal court if such action directly relates to the duties of the county officer.
(3) In any city and county, the district attorney, upon a request in the form of a resolution by city council, shall represent any city and county officer, as provided in the charter of such city and county, or the employees of any such officer in the defense of any civil suit or civil proceeding brought against such officer in any court of this state or any federal court if such action directly relates to the duties of any such officer.