Serializes this InputContactMessageContent to a dictionary.

        :return: dictionary representation of this object.
        :rtype: dict
486953
def to_array(self):
        
        array = super(InputContactMessageContent, self).to_array()
        array['phone_number'] = u(self.phone_number)  # py2: type unicode, py3: type str
        array['first_name'] = u(self.first_name)  # py2: type unicode, py3: type str
        if self.last_name is not None:
            array['last_name'] = u(self.last_name)  # py2: type unicode, py3: type str
        if self.vcard is not None:
            array['vcard'] = u(self.vcard)  # py2: type unicode, py3: type str
        return array
1254211
def to_json(self):
        
        return json.dumps(self.to_dict(), sort_keys=True, indent=2, separators=(',', ': '))
1261013
def to_json(self):
    
    return {self.BLOB_KEY_PARAM: self._blob_key,
            self.START_INDEX_PARAM: self._start_index,
            self.END_INDEX_PARAM: self._end_index}
613028
def to_dict(self):
        
        return {k: v.to_dict() if isinstance(v, AttrDict) else v
                for k, v in self.__dict__.items() if not k.startswith('_')}
493413
def to_JSON(self):
        
        return json.dumps({"reception_time": self._reception_time,
                           "Location": json.loads(self._location.to_JSON()),
                           "Weather": json.loads(self._weather.to_JSON())
                           })
373909
def to_dict(self):
        
        return {
            'prediction' : self.prediction_file.to_dict(),
            'attachments' : [a.to_dict() for a in self.attachments]
        }
661809
def to_dict(self):
        
        plain_dict = dict()
        for k, v in self.items():
            if self.__fields__[k].is_list:
                if isinstance(self.__fields__[k], ViewModelField):
                    plain_dict[k] = tuple(vt.to_dict() for vt in v)
                    continue

                plain_dict[k] = tuple(copy.deepcopy(vt) for vt in v)
                continue

            if isinstance(self.__fields__[k], ViewModelField):
                plain_dict[k] = v.to_dict()
                continue

            plain_dict[k] = copy.deepcopy(v)

        return plain_dict
1368334
def serialize(self):
        

        if self.response is not None:
            return {'messaging_type': 'RESPONSE'}

        if self.update is not None:
            return {'messaging_type': 'UPDATE'}

        if self.tag is not None:
            return {
                'messaging_type': 'MESSAGE_TAG',
                'tag': self.tag.value,
            }

        if self.subscription is not None:
            return {'messaging_type': 'NON_PROMOTIONAL_SUBSCRIPTION'}
26783
def to_json(self, include_body=False):
        

        message = {
            'emailId': self.email_id,
            'timestamp': isoformat(self.timestamp),
            'subsystem': self.subsystem,
            'subject': self.subject,
            'sender': self.sender,
            'recipients': self.recipients,
            'uuid': self.uuid,
            'messageHtml': None,
            'messageText': None
        }

        if include_body:
            message['messageHtml'] = self.message_html
            message['messageText'] = self.message_text

        return message
117164
def to_dict(self):
        
        data = {
            'id': self.id,
            'referenceId': self.reference_id,
            'type': self.type,
            'displayName': self.display_name,
            'remoteUrl': self.remote_url}
        for key in data.keys():
            if data[key] == None:
                data.pop(key)
        return data
734023
def to_dict(self):
        
        out = {}
        for key in self.__dict__.keys():
            if key not in ['left', 'right', 'missing', 'parent']:
                out[key] = self.__dict__[key]
        return out
319585
def to_dict(self):
        
        ddict = {'name': self.name, 'icon': self.icon,
                 'line': self.line, 'column': self.column,
                 'children': [], 'description': self.description,
                 'user_data': self.user_data, 'path': self.file_path}
        for child in self.children:
            ddict['children'].append(child.to_dict())
        return ddict
1303755
def to_dict(self):
        

        msg_dict = {}
        msg_dict['level'] = self.level
        msg_dict['message'] = self.message
        msg_dict['now_time'] = monotonic()
        msg_dict['created_time'] = self.created
        msg_dict['id'] = self.id
        msg_dict['count'] = self.count

        return msg_dict
255151
def to_dict(self):
        
        rv = dict(self.payload or ())
        rv["message"] = self.message
        return rv
591990
def to_json(self):
        
        res = dict()
        res['Count'] = self.count
        res['Messages'] = self.messages
        res['ForcedState'] = self.forced
        res['ForcedKeyboard'] = self.keyboard
        res['Entities'] = list()
        for item in self.entities:
            res['Entities'].append(item.to_json())
        res['ForcedMessage'] = self.forced_message
        return res
340546
def to_dict(self, encoding='base64'):
        '''
        
        '''
        res = {}
        for k, v in self._data_fields.items():
            if isinstance(v, (bytes, bytearray, six.string_types)):
                v = StrEncodeEncoder(encoding).encode(v).tobytes().decode()
            res[k] = v
        for k, v in self._sub_reports.items():
            res[k] = v.to_dict(encoding)
        return res
152757
def serialize(self):
        '''
        
        '''
        return {
            'name' : self.name,
            'weight' : self.weight,
            'value' : self.value,
            'msgs' : self.msgs,
            'children' : [i.serialize() for i in self.children]
        }