class_docstr: A base class that has methods generally useful for interacting with
  REST objects. The attributes are accessible either as dict keys or as
  attributes. The object also behaves like a dict, even replicating the
  repr() functionality.
  
  Attributes
  ----------
  
  __rest__ : set of str
      A set of all the rest attribute names. This is generated automatically
      and should include all of the base classes' __rest__ as well as any
      addition RESTProperty.
class_docstr_tok: ["A","base","class","that","has","methods","generally","useful","for","interacting","with","REST","objects",".","The","attributes","are","accessible","either","as","dict","keys","or","as","attributes",".","The","object","also","behaves","like","a","dict",",","even","replicating","the","repr","(",")","functionality",".","Attributes","--","--","--","--","--","__rest__",":","set","of","str","A","set","of","all","the","rest","attribute","names",".","This","is","generated","automatically","and","should","include","all","of","the","base","classes","'","__rest__","as","well","as","any","addition","RESTProperty","."]
docstr: Returns a dict representing this object. This dict will be sent to
  json.dumps().
  
  The keys are the items in __rest__ and the values are the current
  values. If missing, it is not included.
docstr_tok: ["Returns","a","dict","representing","this","object",".","This","dict","will","be","sent","to","json.dumps","(",")",".","The","keys","are","the","items","in","__rest__","and","the","values","are","the","current","values",".","If","missing",",","it","is","not","included","."]
code: def to_json(self):
      """Returns a dict representing this object. This dict will be sent to
      json.dumps().
  
      The keys are the items in __rest__ and the values are the current
      values. If missing, it is not included.
      """
      result = {}
      for attr in self.__rest__:
          prop = getattr(self.__class__, attr)
          try:
              result[attr] = prop.to_json(getattr(self, attr))
          except AttributeError:
              pass
  
      return result
  
imports: import abc
  from collections.abc import MutableMapping
  import logging
  import requests
  from requests.auth import HTTPBasicAuth
  from re import compile
  import json
label_desc: Use image node_id 4 for calling the RESTObject obj's underlying member method code with example usage: obj.to_json() and returns: result