<?php
namespace Jaeger\Thrift;

/**
 * Autogenerated by Thrift Compiler (0.11.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
use Thrift\Base\TBase;
use Thrift\Type\TType;
use Thrift\Type\TMessageType;
use Thrift\Exception\TException;
use Thrift\Exception\TProtocolException;
use Thrift\Protocol\TProtocol;
use Thrift\Protocol\TBinaryProtocolAccelerated;
use Thrift\Exception\TApplicationException;


class Span extends TBase {
  static $isValidate = false;

  static $_TSPEC = array(
    1 => array(
      'var' => 'traceIdLow',
      'isRequired' => true,
      'type' => TType::I64,
      ),
    2 => array(
      'var' => 'traceIdHigh',
      'isRequired' => true,
      'type' => TType::I64,
      ),
    3 => array(
      'var' => 'spanId',
      'isRequired' => true,
      'type' => TType::I64,
      ),
    4 => array(
      'var' => 'parentSpanId',
      'isRequired' => true,
      'type' => TType::I64,
      ),
    5 => array(
      'var' => 'operationName',
      'isRequired' => true,
      'type' => TType::STRING,
      ),
    6 => array(
      'var' => 'references',
      'isRequired' => false,
      'type' => TType::LST,
      'etype' => TType::STRUCT,
      'elem' => array(
        'type' => TType::STRUCT,
        'class' => '\Jaeger\Thrift\SpanRef',
        ),
      ),
    7 => array(
      'var' => 'flags',
      'isRequired' => true,
      'type' => TType::I32,
      ),
    8 => array(
      'var' => 'startTime',
      'isRequired' => true,
      'type' => TType::I64,
      ),
    9 => array(
      'var' => 'duration',
      'isRequired' => true,
      'type' => TType::I64,
      ),
    10 => array(
      'var' => 'tags',
      'isRequired' => false,
      'type' => TType::LST,
      'etype' => TType::STRUCT,
      'elem' => array(
        'type' => TType::STRUCT,
        'class' => '\Jaeger\Thrift\Tag',
        ),
      ),
    11 => array(
      'var' => 'logs',
      'isRequired' => false,
      'type' => TType::LST,
      'etype' => TType::STRUCT,
      'elem' => array(
        'type' => TType::STRUCT,
        'class' => '\Jaeger\Thrift\Log',
        ),
      ),
    );

  /**
   * @var int
   */
  public $traceIdLow = null;
  /**
   * @var int
   */
  public $traceIdHigh = null;
  /**
   * @var int
   */
  public $spanId = null;
  /**
   * @var int
   */
  public $parentSpanId = null;
  /**
   * @var string
   */
  public $operationName = null;
  /**
   * @var \Jaeger\Thrift\SpanRef[]
   */
  public $references = null;
  /**
   * @var int
   */
  public $flags = null;
  /**
   * @var int
   */
  public $startTime = null;
  /**
   * @var int
   */
  public $duration = null;
  /**
   * @var \Jaeger\Thrift\Tag[]
   */
  public $tags = null;
  /**
   * @var \Jaeger\Thrift\Log[]
   */
  public $logs = null;

  public function __construct($vals=null) {
    if (is_array($vals)) {
      parent::__construct(self::$_TSPEC, $vals);
    }
  }

  public function getName() {
    return 'Span';
  }

  public function read($input)
  {
    return $this->_read('Span', self::$_TSPEC, $input);
  }

  public function write($output) {
    return $this->_write('Span', self::$_TSPEC, $output);
  }

}

