Set fields of class.