def set_attributes(self, doc, fields,  <EOL>parent_type=None, catch_all_field=None):
if parent_type:<EOL><INDENT>assert isinstance(parent_type, Union)<EOL><DEDENT>super(Union, self).set_attributes(doc, fields, parent_type)<EOL>self.catch_all_field = catch_all_field<EOL>self.parent_type = parent_type<EOL>
:param UnionField catch_all_field: The field designated as the
    catch-all. This field should be a member of the list of fields.

See :meth:`Composite.set_attributes` for parameter definitions.