<span class="comment">/** 
 * Contains a list of prototype chains from the ExamineObject() command.
 */</span>
message <span class="message">ObjectList</span>
{
  <span class="comment">/** 
   * A list of prototypes for the examined object, the first entry [0] is the
   * examined object while the rest are the object info for each prototype in the
   * chain.
   * 
   * If prototype were not examined the list contains only one entry.
   */</span>
  message <span class="message">PrototypeChain</span>
  {
    repeated <span class="message">Object</span> objectList = 1; 
  }
  <span class="comment">/** 
   * An Object is any non-primitive value in ECMAScript. Functions
   * and arrays, for instance, are also Objects.
   */</span>
  message <span class="message">Object</span>
  {
    enum ObjectType
    {
      OBJECT = 1;
      FUNCTION = 2;
    }

    <span class="comment">/** 
     * The unique ID of the object, valid until the object is garbage collected
     * or the service is disabled.
     * 
     * Is an integer from 1 and up.
     */</span>
    required <span class="number">uint32    </span> objectID     = 1; 
    <span class="comment">/** 
     * true if the object can be called, this is typically functions but
     * other objects are also possible.
     */</span>
    required <span class="bool">bool      </span> isCallable   = 2; 
    <span class="comment">/** 
     * The type of object, either a plain object or a function.
     */</span>
    required <span class="number">ObjectType</span> type         = 3; 
    <span class="comment">/** 
     * The ID of the prototype for this object if it has a prototype.
     * A prototype is just another object and can be examined with
     * ExamineObjects().
     */</span>
    optional <span class="number">uint32    </span> prototypeID  = 4; 
    <span class="comment">/** 
     * The name of the class used to create this object. Examples::
     * 
     *   "Object"
     *   "Array"
     *   "Function"
     *   "HTMLHtmlElement"
     */</span>
    optional <span class="string">string    </span> className    = 5; 
    <span class="comment">/** 
     * The name of the function, only set if type = FUNCTION. If the function
     * is anonymous, then a suitable alias *may* be assigned based on context,
     * if possible. For instance::
     * 
     *   foo.bar = function(){}
     * 
     * Would get the functionName 'bar'.
     */</span>
    optional <span class="string">string    </span> functionName = 6; 
    <span class="comment">/** 
     * A list of properties available on the object.
     * 
     * Is omitted in some cases when a full property list (can be huge) is not
     * desirable.
     */</span>
    repeated <span class="message">Property  </span> propertyList = 7; 
  }
  message <span class="message">Property</span>
  {
    required <span class="string">string</span> name  = 1; 
    required <span class="message">Value </span> value = 2; 
  }
  <span class="comment">/** 
   * Represents an ECMAScript value, a value is either one of the primitives
   * like string or boolean or an object.
   */</span>
  message <span class="message">Value</span>
  {
    enum Type
    {
      <span class="comment">/** 
       * The undefined type, returned when no value was found or "undefined"
       * was referenced.
       */</span>
      UNDEFINED = 0;
      <span class="comment">/** 
       * A null value.
       */</span>
      NULL = 1;
      <span class="comment">/** 
       * Boolean value true.
       */</span>
      TRUE = 2;
      <span class="comment">/** 
       * Boolean value false.
       */</span>
      FALSE = 3;
      <span class="comment">/** 
       * NaN value which cannot be exported to JSON directly.
       * Should be treated like a number.
       * 
       * ECMAScript users should use this code to get the value natively::
       * 
       *   parseFloat("NaN")
       */</span>
      NAN = 4;
      <span class="comment">/** 
       * Plus infinity value which cannot be export to JSON directly.
       * Should be treated like a number.
       * 
       * ECMAScript users should use this code to get the value natively::
       * 
       *   parseFloat("Infinity")
       */</span>
      PLUS_INFINITY = 5;
      <span class="comment">/** 
       * Minus infinity value which cannot be export to JSON directly.
       * Should be treated like a number.
       * 
       * ECMAScript users should use this code to get the value natively::
       * 
       *   parseFloat("-Infinity")
       */</span>
      MINUS_INFINITY = 6;
      <span class="comment">/** 
       * A number, use the field 'number' for the actual value.
       */</span>
      NUMBER = 7;
      <span class="comment">/** 
       * A string, use the field 'str' for the actual string data.
       */</span>
      STRING = 8;
      <span class="comment">/** 
       * An object, the field 'object' contains object details.
       */</span>
      OBJECT = 9;
    }

    <span class="comment">/** 
     * The type of value.
     * 
     * @note Booleans are encoded as either TRUE or FALSE to shorten the number
     * fields in use.
     */</span>
    optional <span class="number">Type  </span> type   = 1; 
    <span class="comment">/** 
     * The numeric value, set if type = NUMBER.
     */</span>
    optional <span class="number">double</span> number = 2; 
    <span class="comment">/** 
     * The string, set if type = STRING.
     */</span>
    optional <span class="string">string</span> str    = 3; 
    <span class="comment">/** 
     * Object information, set if type = OBJECT.
     */</span>
    optional <span class="message">Object</span> object = 4; 
  }
  repeated <span class="message">PrototypeChain</span> prototypeList = 1; 
}
