Serializes this User to a dictionary.

        :return: dictionary representation of this object.
        :rtype: dict
177677
def to_array(self):
        
        array = super(User, self).to_array()
        array['id'] = int(self.id)  # type int
        array['is_bot'] = bool(self.is_bot)  # type bool
        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.username is not None:
            array['username'] = u(self.username)  # py2: type unicode, py3: type str

        if self.language_code is not None:
            array['language_code'] = u(self.language_code)  # py2: type unicode, py3: type str

        return array
1153719
def to_dict(self):
        
        with self._lock:
            result = {}
            if self._gpayload:
                result.update(self._gpayload)
            if self._tpayload:
                result.update(getattr(self._tpayload, "context", {}))
            return result
194615
def as_dict(self):
        
        d = MSONable.as_dict(self)
        d["data"] = self.data.tolist()
        return d
48480
def to_dict(self):
        
        jdict = {
            'user': self.user,
            'summary': self.summary,
            'body': self.body,
            'markup': self.markup,
            'url': self.url,
            'timestamp': self.timestamp
            }
        return jdict
692393
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'text') and self.text is not None:
            _dict['text'] = self.text
        if hasattr(self, 'user') and self.user is not None:
            _dict['user'] = self.user
        return _dict
258253
def to_dict(self):
        
        d = {
            'id': self.id,
            'start': self.start,
            'end': self.end,
            'form': self.form
        }
        if self.lnk is not None:
            cfrom, cto = self.lnk.data
            d['from'] = cfrom
            d['to'] = cto
        # d['paths'] = self.paths
        if self.surface is not None:
            d['surface'] = self.surface
        # d['ipos'] = self.ipos
        # d['lrules'] = self.lrules
        if self.pos:
            d['tags'] = [ps[0] for ps in self.pos]
            d['probabilities'] = [ps[1] for ps in self.pos]
        return d
69233
def to_json(self):
        
        data = {}
        for k, v in self.__dict__.items():
            if not k.startswith('_'):
                # values not serializable, should be converted to strings
                if isinstance(v, datetime):
                    v = utils.datetime_to_string(v)
                elif isinstance(v, date):
                    v = utils.date_to_string(v)
                elif isinstance(v, uuid.UUID):
                    v = str(v)
                elif isinstance(v, Decimal):
                    v = str(v)
                data[k] = v
        return data
1229305
def to_dict(self):
        
        session = self._get_session()
        snapshot = self._get_snapshot()
        return {
            "session_id": session._session_id,
            "transaction_id": snapshot._transaction_id,
        }
460174
def to_dict(self) -> Dict[str, str]:
        
        return {
            'type': 'remote',
            'name': self.name,
            'location': self.location,
            'url': self.url,
            'version': self.version
        }
1255194
def to_dict(self):
        
        result = {}
        for name in self.__dict__:
            if name.startswith("_"):
                continue

            key = name.replace("_", "-")
            attr = getattr(self, name)
            result[key] = attr.to_dict() if hasattr(attr, "to_dict") else attr

        return result
1012462
def to_dict(self):
        
        data = {
            "name": self.name,
            "canEdit": self.can_edit,
            "canCreate": self.can_create,
            "canDelete": self.can_delete,
            "perPage": self.per_page,
            "showPage": self.generate_data_for_show_page(),
            "editPage": self.generate_data_for_edit_page(),
            "createPage": self.generate_data_for_create_page(),
        }

        return data
676649
def to_dict(self):
        
        data = dict()

        for key, value in self.__dict__.items():
            if value:
                if hasattr(value, 'to_dict'):
                    data[key] = value.to_dict()
                else:
                    data[key] = value

        return data
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
142071
def to_dict(self):
        
        obj_dict = super(PlainText, self).to_dict()
        child_dict = {
            'type': self.__class__.__name__,
            'text': self.text
        }
        obj_dict.update(child_dict)
        return obj_dict
921928
def to_dict(self):
        
        public_keys = [public_key.b64encoded for public_key in self.public_keys]
        return dict(name=self.name, passwd=self.passwd, uid=self.uid, gid=self.gid, gecos=self.gecos,
                    home_dir=self.home_dir, shell=self.shell, public_keys=public_keys)
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
651967
def to_dict(self):
        
        obj_dict = super(Text, self).to_dict()
        texts_dict = None
        if isinstance(self.text, list):
            texts_dict = [t.to_dict() for t in self.text]
        child_dict = {
            'type': self.__class__.__name__,
            'text': texts_dict
        }
        obj_dict.update(child_dict)
        return obj_dict