def to_dict(self):
return dict(<EOL>(attr, getattr(self, attr))<EOL>for attr in self.ATTRIBUTES<EOL>if hasattr(self, attr)<EOL>)<EOL>
Return a dict that can be serialised to JSON and sent to UpCloud's API.