<?php
namespace Jaeger\Thrift\Agent;

/**
 * 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 PerOperationSamplingStrategies extends TBase {
  static $isValidate = false;

  static $_TSPEC = array(
    1 => array(
      'var' => 'defaultSamplingProbability',
      'isRequired' => true,
      'type' => TType::DOUBLE,
      ),
    2 => array(
      'var' => 'defaultLowerBoundTracesPerSecond',
      'isRequired' => true,
      'type' => TType::DOUBLE,
      ),
    3 => array(
      'var' => 'perOperationStrategies',
      'isRequired' => true,
      'type' => TType::LST,
      'etype' => TType::STRUCT,
      'elem' => array(
        'type' => TType::STRUCT,
        'class' => '\Jaeger\Thrift\Agent\OperationSamplingStrategy',
        ),
      ),
    4 => array(
      'var' => 'defaultUpperBoundTracesPerSecond',
      'isRequired' => false,
      'type' => TType::DOUBLE,
      ),
    );

  /**
   * @var double
   */
  public $defaultSamplingProbability = null;
  /**
   * @var double
   */
  public $defaultLowerBoundTracesPerSecond = null;
  /**
   * @var \Jaeger\Thrift\Agent\OperationSamplingStrategy[]
   */
  public $perOperationStrategies = null;
  /**
   * @var double
   */
  public $defaultUpperBoundTracesPerSecond = null;

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

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

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

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

}

