def to_dict(self):
data = {}<EOL>data["<STR_LIT:name>"] = self.name<EOL>data["<STR_LIT:description>"] = self.description if self.description and len(self.description) else None<EOL>data["<STR_LIT:type>"] = self.type if self.type and len(self.type) else None<EOL>data["<STR_LIT>"] = self.allowed_chars if self.allowed_chars and len(self.allowed_chars) else None<EOL>data["<STR_LIT>"] = self.allowed_choices<EOL>data["<STR_LIT>"] = self.autogenerated<EOL>data["<STR_LIT>"] = self.channel if self.channel and len(self.channel) else None<EOL>data["<STR_LIT>"] = self.creation_only<EOL>data["<STR_LIT>"] = self.default_order<EOL>data["<STR_LIT>"] = self.default_value if self.default_value and len(self.default_value) else None<EOL>data["<STR_LIT>"] = self.deprecated<EOL>data["<STR_LIT>"] = self.exposed<EOL>data["<STR_LIT>"] = self.filterable<EOL>data["<STR_LIT>"] = self.format if self.format and len(self.format) else None<EOL>data["<STR_LIT:max_length>"] = int(self.max_length) if self.max_length is not None else None<EOL>data["<STR_LIT>"] = int(self.max_value) if self.max_value is not None else None<EOL>data["<STR_LIT>"] = int(self.min_length) if self.min_length is not None else None<EOL>data["<STR_LIT>"] = int(self.min_value) if self.min_value is not None else None<EOL>data["<STR_LIT>"] = self.orderable<EOL>data["<STR_LIT>"] = self.read_only<EOL>data["<STR_LIT>"] = self.required<EOL>data["<STR_LIT>"] = self.transient<EOL>data["<STR_LIT>"] = self.unique<EOL>data["<STR_LIT>"] = self.unique_scope if self.unique_scope and len(self.unique_scope) else None<EOL>data["<STR_LIT>"] = self.subtype if self.subtype and len(self.subtype) else None<EOL>data["<STR_LIT>"] = self.userlabel if self.userlabel and len(self.userlabel) else None<EOL>return data<EOL>
Transform an attribute to a dict