It is the duty of the director of the building and safety department to enforce the provisions of this chapter, and for the purpose of enforcement, the director of building and safety or his authorized representative, or the police chief or his authorized representative, may enter upon any premises occupied by any trailer, mobilehome, housecar, commercial coach, or similar vehicle or temporary building for the purpose of making inspection and enforcing the provisions of this chapter. (Prior code § 66500)