def _generate_struct_class(self, ns, data_type):<EOL>
self.emit(self._class_declaration_for_type(ns, data_type))<EOL>with self.indent():<EOL><INDENT>if data_type.has_documented_type_or_fields():<EOL><INDENT>self.emit('<STR_LIT>')<EOL>if data_type.doc:<EOL><INDENT>self.emit_wrapped_text(<EOL>self.process_doc(data_type.doc, self._docf))<EOL>if data_type.has_documented_fields():<EOL><INDENT>self.emit()<EOL><DEDENT><DEDENT>for field in data_type.fields:<EOL><INDENT>if not field.doc:<EOL><INDENT>continue<EOL><DEDENT>self.emit_wrapped_text('<STR_LIT>'.format(<EOL>fmt_namespaced_var(ns.name, data_type.name, field.name),<EOL>self.process_doc(field.doc, self._docf)),<EOL>subsequent_prefix='<STR_LIT:U+0020>')<EOL><DEDENT>self.emit('<STR_LIT>')<EOL><DEDENT>self.emit()<EOL>self._generate_struct_class_slots(data_type)<EOL>self._generate_struct_class_has_required_fields(data_type)<EOL>self._generate_struct_class_init(data_type)<EOL>self._generate_struct_class_properties(ns, data_type)<EOL>self._generate_struct_class_custom_annotations(ns, data_type)<EOL>self._generate_struct_class_repr(data_type)<EOL><DEDENT>if data_type.has_enumerated_subtypes():<EOL><INDENT>validator = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>validator = '<STR_LIT>'<EOL><DEDENT>self.emit('<STR_LIT>'.format(<EOL>class_name_for_data_type(data_type),<EOL>validator,<EOL>))<EOL>self.emit()<EOL>
Defines a Python class that represents a struct in Stone.