def to_dict(self, remove_nones=False):
        """
        Creates a dictionary representation of the object.

        :param remove_nones: Whether ``None`` values should be filtered out of the dictionary.  Defaults to ``False``.
        :return: A dictionary representation of the report.
        """

        if remove_nones:
            report_dict = super().to_dict(remove_nones=True)
        else:
            report_dict = {
                'title': self.title,
                'reportBody': self.body,
                'timeBegan': self.time_began,
                'externalUrl': self.external_url,
                'distributionType': self._get_distribution_type(),
                'externalTrackingId': self.external_id,
                'enclaveIds': self.enclave_ids,
                'created': self.created,
                'updated': self.updated,
            }

        # id field might not be present
        if self.id is not None:
            report_dict['id'] = self.id
        else:
            report_dict['id'] = None

        return report_dict
def to_dict ( self , remove_nones = False ) : if remove_nones : report_dict = super ( ) . to_dict ( remove_nones = True ) else : report_dict = { 'title' : self . title , 'reportBody' : self . body , 'timeBegan' : self . time_began , 'externalUrl' : self . external_url , 'distributionType' : self . _get_distribution_type ( ) , 'externalTrackingId' : self . external_id , 'enclaveIds' : self . enclave_ids , 'created' : self . created , 'updated' : self . updated , } if self . id is not None : report_dict [ 'id' ] = self . id else : report_dict [ 'id' ] = None return report_dict
Creates a dictionary representation of the object.

        :param remove_nones: Whether ``None`` values should be filtered out of the dictionary.  Defaults to ``False``.
        :return: A dictionary representation of the report.