<?php
namespace concourse\thrift;
/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * 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;


/**
 * The interface definition for the Concourse Server API.
 */
interface ConcourseServiceIf {
  /**
   * Abort the current transaction and discard any changes that are
   * currently staged.
   * <p>
   * After returning, the driver will return to {@code autocommit} mode and
   * all subsequent changes will be committed immediately.
   * </p>
   * <p>
   * Calling this method when the driver is not in {@code staging} mode is a
   * no-op.
   * </p>
   * @param record the id of the record in which an attempt is made to add
   *                 the data
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @throws exceptions.SecurityException if the {@code creds} don't represent a
   *         valid session
   * 
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   */
  public function abort(\concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * Append {@code key} as {@code value} in a new record.
   * 
   * @param key the field name
   * @param value the value to add
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return the new record id
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.InvalidArgumentException if any of provided data
   *         can't be stored
   * 
   * @param string $key
   * @param \concourse\thrift\data\TObject $value
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\InvalidArgumentException
   */
  public function addKeyValue($key, \concourse\thrift\data\TObject $value, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * Append {@code key} as {@code value} in {@code record}.
   * 
   * @param key the field name
   * @param value the value to add
   * @param record the record id where an attempt is made to add the data
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a bool that indicates if the data was added
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.InvalidArgumentException if any of provided data
   *         can't be stored
   * 
   * @param string $key
   * @param \concourse\thrift\data\TObject $value
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return bool
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\InvalidArgumentException
   */
  public function addKeyValueRecord($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * Append {@code key} as {@code value} in each of the {@code records} where it
   * doesn't exist.
   * 
   * @param key the field name
   * @param value the value to add
   * @param records a list of record ids where an attempt is made to add the
   *                  data
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a mapping from each record id to a boolean that indicates if the
   *                   data was added
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.InvalidArgumentException if any of provided data
   *         can't be stored
   * 
   * @param string $key
   * @param \concourse\thrift\data\TObject $value
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\InvalidArgumentException
   */
  public function addKeyValueRecords($key, \concourse\thrift\data\TObject $value, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the changes ever made to {@code record}.
   * 
   * @param record the record id
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return for each change, a mapping from timestamp to a description of the
   *                  revision
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function auditRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the changes made to {@code record} since {@code start}
   * (inclusive).
   * 
   * @param record the record id
   * @param start an inclusive timestamp for the oldest change that should
   *                possibly be included in the audit
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return for each change, a mapping from timestamp to a description of the
   *                  revision
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param int $record
   * @param int $start
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function auditRecordStart($record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the changes made to {@code record} since {@code start}
   * (inclusive).
   * 
   * @param record the record id
   * @param start an inclusive timestamp for the oldest change that should
   *                possibly be included in the audit
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return for each change, a mapping from timestamp to a description of the
   *                  revision
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param int $record
   * @param string $start
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function auditRecordStartstr($record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the changes made to {@code record} between {@code start}
   * (inclusive) and {@code end} (non-inclusive).
   * 
   * @param record the record id
   * @param start an inclusive timestamp for the oldest change that should
   *                possibly be included in the audit
   * @param end a non-inclusive timestamp that for the most recent recent
   *              change that should possibly be included in the audit
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return for each change, a mapping from timestamp to a description of the
   *         revision
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param int $record
   * @param int $start
   * @param int $tend
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function auditRecordStartEnd($record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the changes made to {@code record} between {@code start}
   * (inclusive) and {@code end} (non-inclusive).
   * 
   * @param record the record id
   * @param start an inclusive timestamp for the oldest change that should
   *                possibly be included in the audit
   * @param end a non-inclusive timestamp that for the most recent recent
   *              change that should possibly be included in the audit
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return for each change, a mapping from timestamp to a description of the
   *         revision
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param int $record
   * @param string $start
   * @param string $tend
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function auditRecordStartstrEndstr($record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the changes ever made to the {@code key} field in {@code record}.
   * 
   * @param key the field name
   * @param record the record id
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return for each change, a mapping from timestamp to a description of the
   *         revision
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string $key
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function auditKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the changes made to the {@code key} field in {@code record} since
   * {@code start} (inclusive).
   * 
   * @param key the field name
   * @param record the record id
   * @param start an inclusive timestamp for the oldest change that should
   *                possibly be included in the audit
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return for each change, a mapping from timestamp to a description of the
   *         revision
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string $key
   * @param int $record
   * @param int $start
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function auditKeyRecordStart($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the changes made to the {@code key} field in {@code record} since
   * {@code start} (inclusive).
   * 
   * @param key the field name
   * @param record the record id
   * @param start an inclusive timestamp for the oldest change that should
   *                possibly be included in the audit
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return for each change, a mapping from timestamp to a description of the
   *         revision
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param string $key
   * @param int $record
   * @param string $start
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function auditKeyRecordStartstr($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the changes made to the {@code key} field in {@code record}
   * between {@code start} (inclusive) and {@code end} (non-inclusive).
   * 
   * @param key the field name
   * @param record the record id
   * @param start an inclusive timestamp for the oldest change that should
   *                possibly be included in the audit
   * @param end a non-inclusive timestamp that for the most recent change that
   *              should possibly be included in the audit
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return for each change, a mapping from timestamp to a description of the
   *         revision
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string $key
   * @param int $record
   * @param int $start
   * @param int $tend
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function auditKeyRecordStartEnd($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the changes made to the {@code key} field in {@code record}
   * between {@code start} (inclusive) and {@code end} (non-inclusive).
   * 
   * @param key the field name
   * @param record the record id
   * @param start an inclusive timestamp for the oldest change that should
   *                possibly be included in the audit
   * @param end a non-inclusive timestamp that for the most recent recent
   *              change that should possibly be included in the audit
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return for each change, a mapping from timestamp to a description of the
   *         revision
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param string $key
   * @param int $record
   * @param string $start
   * @param string $tend
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function auditKeyRecordStartstrEndstr($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * View the values from all records that are currently stored for {@code key}.
   * 
   * @param keys the field name
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each value to the {@link Set} of records
   *         that contain that value in the {@code key} field
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string $key
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function browseKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * View the values from all records that are currently stored for each of the
   * {@code keys}.
   * 
   * @param keys a list of field names
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each key to a {@link Map} associating
   *         each value to the set of records that contain that value in the
   *         {@code key} field
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string[] $keys
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function browseKeys(array $keys, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * View the values from all records that were stored for {@code key} at
   * {@code timestamp}.
   * 
   * @param keys the field name
   * @param timestamp the historical timestamp to use in the lookup
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each value to the {@link Set} of records
   *         that contained that value in the {@code key} field at {@code
   *         timestamp}
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string $key
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function browseKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * View the values from all records that were stored for {@code key} at
   * {@code timestamp}.
   * 
   * @param keys the field name
   * @param timestamp the historical timestamp to use in the lookup
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each value to the {@link Set} of records
   *         that contained that value in the {@code key} field at {@code
   *         timestamp}
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param string $key
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function browseKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * View the values from all records that were stored for each of the
   * {@code keys} at {@code timestamp}.
   * 
   * @param keys a list of field names
   * @param timestamp the historical timestamp to use in the lookup
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each key to a {@link Map} associating
   *         each value to the {@link Set} of records that contained that value
   *         in the {@code key} field at {@code timestamp}
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string[] $keys
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function browseKeysTime(array $keys, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * View the values from all records that were stored for each of the
   * {@code keys} at {@code timestamp}.
   * 
   * @param keys a list of field names
   * @param timestamp the historical timestamp to use in the lookup
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each key to a {@link Map} associating
   *         each value to the {@link Set} of records that contained that value
   *         in the {@code key} field at {@code timestamp}
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param string[] $keys
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function browseKeysTimestr(array $keys, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * View a time series that associates the timestamp of each modification for
   * {@code key} in {@code record} to a snapshot containing the values that
   * were stored in the field after the change.
   * 
   * @param key the field name
   * @param record the record id
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each modification timestamp to the
   *         {@link Set} of values that were stored in the field after the
   *         change.
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string $key
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function chronologizeKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * View a time series between {@code start} (inclusive) and the present that
   * associates the timestamp of each modification for {@code key} in
   * {@code record} to a snapshot containing the values that
   * were stored in the field after the change.
   * 
   * @param key the field name
   * @param record the record id
   * @param start the first possible {@link Timestamp} to include in the
   *            time series
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each modification timestamp to the
   *         {@link Set} of values that were stored in the field after the
   *         change.
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string $key
   * @param int $record
   * @param int $start
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function chronologizeKeyRecordStart($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * View a time series between {@code start} (inclusive) and the present that
   * associates the timestamp of each modification for {@code key} in
   * {@code record} to a snapshot containing the values that
   * were stored in the field after the change.
   * 
   * @param key the field name
   * @param record the record id
   * @param start the first possible {@link Timestamp} to include in the
   *            time series
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each modification timestamp to the
   *         {@link Set} of values that were stored in the field after the
   *         change.
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param string $key
   * @param int $record
   * @param string $start
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function chronologizeKeyRecordStartstr($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * View a time series between {@code start} (inclusive) and {@code end}
   * (non-inclusive) that associates the timestamp of each modification for
   * {@code key} in {@code record} to a snapshot containing the values that
   * were stored in the field after the change.
   * 
   * @param key the field name
   * @param record the record id
   * @param start the first possible {@link Timestamp} to include in the
   *            time series
   * @param end the {@link Timestamp} that should be greater than every
   *            timestamp in the time series
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each modification timestamp to the
   *         {@link Set} of values that were stored in the field after the
   *         change.
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string $key
   * @param int $record
   * @param int $start
   * @param int $tend
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function chronologizeKeyRecordStartEnd($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * View a time series between {@code start} (inclusive) and {@code end}
   * (non-inclusive) that associates the timestamp of each modification for
   * {@code key} in {@code record} to a snapshot containing the values that
   * were stored in the field after the change.
   * 
   * @param key the field name
   * @param record the record id
   * @param start the first possible {@link Timestamp} to include in the
   *            time series
   * @param end the {@link Timestamp} that should be greater than every
   *            timestamp in the time series
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each modification timestamp to the
   *         {@link Set} of values that were stored in the field after the
   *         change.
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param string $key
   * @param int $record
   * @param string $start
   * @param string $tend
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function chronologizeKeyRecordStartstrEndstr($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function clearRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function clearRecords(array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function clearKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function clearKeysRecord(array $keys, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function clearKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function clearKeysRecords(array $keys, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * Attempt to permanently commit any changes that are staged in a transaction
   * and return {@code true} if and only if all the changes can be applied.
   * Otherwise, returns {@code false} and all the changes are discarded.
   * <p>
   * After returning, the driver will return to {@code autocommit} mode and
   * all subsequent changes will be committed immediately.
   * </p>
   * <p>
   * This method will return {@code false} if it is called when the driver is
   * not in {@code staging} mode.
   * </p>
   * 
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return {@code true} if all staged changes are committed, otherwise {@code
   *                      false}
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return bool
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function commit(\concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the keys in the database.
   * 
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return the {@link Set} of keys in the database
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return string[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function describe(\concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the keys in the database at {@code timestamp}.
   * 
   * @param timestamp the historical timestamp to use in the lookup
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return the {@link Set} of keys that were in the database at
   *         {@code timestamp}
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return string[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function describeTime($timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the keys in the database at {@code timestamp}.
   * 
   * @param timestamp the historical timestamp to use in the lookup
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return the {@link Set} of keys that were in the database at
   *         {@code timestamp}
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return string[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function describeTimestr($timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the keys in {@code record} that have at least one value.
   * 
   * @param record the record id
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return the {@link Set} of keys in {@code record}
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return string[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function describeRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the keys in {@code record} that had at least one value at
   * {@code timestamp}.
   * 
   * @param record the record id
   * @param timestamp the historical timestamp to use in the lookup
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return the {@link Set} of keys that were in {@code record} at
   *         {@code timestamp}
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return string[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function describeRecordTime($record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List all the keys in {@code record} that have at least one value.
   * 
   * @param record the record id
   * @param timestamp the historical timestamp to use in the lookup
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return the {@link Set} of keys that were in {@code record} at
   *         {@code timestamp}
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return string[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function describeRecordTimestr($record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * For each of the {@code records}, list all of the keys that have at least
   * one value.
   * 
   * @param records a collection of record ids
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each record id to the {@link Set} of
   *         keys in that record
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function describeRecords(array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * For each of the {@code records}, list all the keys that had at least one
   * value at {@code timestamp}.
   * 
   * @param records a collection of record ids
   * @param timestamp the historical timestamp to use in the lookup
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each record id to the {@link Set} of
   *         keys that were in that record at {@code timestamp}
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function describeRecordsTime(array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * For each of the {@code records}, list all the keys that had at least one
   * value at {@code timestamp}.
   * 
   * @param records a collection of record ids
   * @param timestamp the historical timestamp to use in the lookup
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} associating each record id to the {@link Set} of
   *         keys that were in that record at {@code timestamp}
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function describeRecordsTimestr(array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List the net changes made to {@code record} since {@code start}.
   * 
   * <p>
   * If you begin with the state of the {@code record} at {@code start} and
   * re-apply all the changes in the diff, you'll re-create the state of the
   * {@code record} at the present.
   * </p>
   * 
   * @param record the record id
   * @param start the base timestamp from which the diff is calculated
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} that associates each key in the {@code record} to
   *         another {@link Map} that associates a {@link Diff change
   *         description} to the {@link Set} of values that fit the
   *         description (i.e. <code>
   *         {"key": {ADDED: ["value1", "value2"], REMOVED: ["value3",
   *         "value4"]}}
   *         </code> )
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param int $record
   * @param int $start
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function diffRecordStart($record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List the net changes made to {@code record} since {@code start}.
   * 
   * <p>
   * If you begin with the state of the {@code record} at {@code start} and
   * re-apply all the changes in the diff, you'll re-create the state of the
   * {@code record} at the present.
   * </p>
   * 
   * @param record the record id
   * @param start the base timestamp from which the diff is calculated
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} that associates each key in the {@code record} to
   *         another {@link Map} that associates a {@link Diff change
   *         description} to the {@link Set} of values that fit the
   *         description (i.e. <code>
   *         {"key": {ADDED: ["value1", "value2"], REMOVED: ["value3",
   *         "value4"]}}
   *         </code> )
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param int $record
   * @param string $start
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function diffRecordStartstr($record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List the net changes made to {@code record} from {@code start} to
   * {@code end}.
   * 
   * <p>
   * If you begin with the state of the {@code record} at {@code start} and
   * re-apply all the changes in the diff, you'll re-create the state of the
   * {@code record} at {@code end}.
   * </p>
   * 
   * @param record the record id
   * @param start the base timestamp from which the diff is calculated
   * @param end the comparison timestamp to which the diff is calculated
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} that associates each key in the {@code record} to
   *         another {@link Map} that associates a {@link Diff change
   *         description} to the {@link Set} of values that fit the
   *         description (i.e. <code>
   *         {"key": {ADDED: ["value1", "value2"], REMOVED: ["value3",
   *         "value4"]}}
   *         </code> )
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param int $record
   * @param int $start
   * @param int $tend
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function diffRecordStartEnd($record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List the net changes made to {@code record} from {@code start} to
   * {@code end}.
   * 
   * <p>
   * If you begin with the state of the {@code record} at {@code start} and
   * re-apply all the changes in the diff, you'll re-create the state of the
   * {@code record} at {@code end}.
   * </p>
   * 
   * @param record the record id
   * @param start the base timestamp from which the diff is calculated
   * @param end the comparison timestamp to which the diff is calculated
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} that associates each key in the {@code record} to
   *         another {@link Map} that associates a {@link Diff change
   *         description} to the {@link Set} of values that fit the
   *         description (i.e. <code>
   *         {"key": {ADDED: ["value1", "value2"], REMOVED: ["value3",
   *         "value4"]}}
   *         </code> )
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param int $record
   * @param string $start
   * @param string $tend
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function diffRecordStartstrEndstr($record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List the net changes made to {@code key} in {@code record} since
   * {@code start}.
   * 
   * <p>
   * If you begin with the state of the field at {@code start} and re-apply
   * all the changes in the diff, you'll re-create the state of the field at
   * the present.
   * </p>
   * 
   * @param key the field name
   * @param record the record id
   * @param start the base timestamp from which the diff is calculated
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} that associates a {@link Diff change
   *         description} to the {@link Set} of values that fit the
   *         description (i.e. <code>
   *         {ADDED: ["value1", "value2"], REMOVED: ["value3", "value4"]}
   *         </code> )
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string $key
   * @param int $record
   * @param int $start
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function diffKeyRecordStart($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List the net changes made to {@code key} in {@code record} since
   * {@code start}.
   * 
   * <p>
   * If you begin with the state of the field at {@code start} and re-apply
   * all the changes in the diff, you'll re-create the state of the field at
   * the present.
   * </p>
   * 
   * @param key the field name
   * @param record the record id
   * @param start the base timestamp from which the diff is calculated
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} that associates a {@link Diff change
   *         description} to the {@link Set} of values that fit the
   *         description (i.e. <code>
   *         {ADDED: ["value1", "value2"], REMOVED: ["value3", "value4"]}
   *         </code> )
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param string $key
   * @param int $record
   * @param string $start
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function diffKeyRecordStartstr($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List the net changes made to {@code key} in {@code record} from
   * {@code start} to {@code end}.
   * 
   * <p>
   * If you begin with the state of the field at {@code start} and re-apply
   * all the changes in the diff, you'll re-create the state of the field at
   * {@code end}.
   * </p>
   * 
   * @param key the field name
   * @param record the record id
   * @param start the base timestamp from which the diff is calculated
   * @param end the comparison timestamp to which the diff is calculated
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} that associates a {@link Diff change
   *         description} to the {@link Set} of values that fit the
   *         description (i.e. <code>
   *         {ADDED: ["value1", "value2"], REMOVED: ["value3", "value4"]}
   *         </code> )
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string $key
   * @param int $record
   * @param int $start
   * @param int $tend
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function diffKeyRecordStartEnd($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List the net changes made to {@code key} in {@code record} from
   * {@code start} to {@code end}.
   * 
   * <p>
   * If you begin with the state of the field at {@code start} and re-apply
   * all the changes in the diff, you'll re-create the state of the field at
   * {@code end}.
   * </p>
   * 
   * @param key the field name
   * @param record the record id
   * @param start the base timestamp from which the diff is calculated
   * @param end the comparison timestamp to which the diff is calculated
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} that associates a {@link Diff change
   *         description} to the {@link Set} of values that fit the
   *         description (i.e. <code>
   *         {ADDED: ["value1", "value2"], REMOVED: ["value3", "value4"]}
   *         </code> )
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param string $key
   * @param int $record
   * @param string $start
   * @param string $tend
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function diffKeyRecordStartstrEndstr($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List the net changes made to the {@code key} field across all records
   * since {@code start}.
   * 
   * <p>
   * If you begin with the state of an inverted index for {@code key} at
   * {@code start} and re-apply all the changes in the diff, you'll re-create
   * the state of the same index at the present.
   * </p>
   * 
   * @param key the field name
   * @param start the base timestamp from which the diff is calculated
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} that associates each value stored for {@code key}
   *         across all records to another {@link Map} that associates a
   *         {@link Diff change description} to the {@link Set} of records
   *         where the description applies to that value in the {@code key}
   *         field (i.e. <code>
   *         {"value1": {ADDED: [1, 2], REMOVED: [3, 4]}}
   *         </code>)
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string $key
   * @param int $start
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function diffKeyStart($key, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List the net changes made to the {@code key} field across all records
   * since {@code start}.
   * 
   * <p>
   * If you begin with the state of an inverted index for {@code key} at
   * {@code start} and re-apply all the changes in the diff, you'll re-create
   * the state of the same index at the present.
   * </p>
   * 
   * @param key the field name
   * @param start the base timestamp from which the diff is calculated
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} that associates each value stored for {@code key}
   *         across all records to another {@link Map} that associates a
   *         {@link Diff change description} to the {@link Set} of records
   *         where the description applies to that value in the {@code key}
   *         field (i.e. <code>
   *         {"value1": {ADDED: [1, 2], REMOVED: [3, 4]}}
   *         </code>)
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param string $key
   * @param string $start
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function diffKeyStartstr($key, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List the net changes made to the {@code key} field across all records
   * from {@code start} to {@code end}.
   * 
   * <p>
   * If you begin with the state of an inverted index for {@code key} at
   * {@code start} and re-apply all the changes in the diff, you'll re-create
   * the state of the same index at {@code end}.
   * </p>
   * 
   * @param key the field name
   * @param start the base timestamp from which the diff is calculated
   * @param end the comparison timestamp to which the diff is calculated
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} that associates each value stored for {@code key}
   *         across all records to another {@link Map} that associates a
   *         {@link Diff change description} to the {@link Set} of records
   *         where the description applies to that value in the {@code key}
   *         field (i.e. <code>
   *         {"value1": {ADDED: [1, 2], REMOVED: [3, 4]}}
   *         </code>)
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * 
   * @param string $key
   * @param int $start
   * @param int $tend
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function diffKeyStartEnd($key, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * List the net changes made to the {@code key} field across all records
   * from {@code start} to {@code end}.
   * 
   * <p>
   * If you begin with the state of an inverted index for {@code key} at
   * {@code start} and re-apply all the changes in the diff, you'll re-create
   * the state of the same index at {@code end}.
   * </p>
   * 
   * @param key the field name
   * @param start the base timestamp from which the diff is calculated
   * @param end the comparison timestamp to which the diff is calculated
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a {@link Map} that associates each value stored for {@code key}
   *         across all records to another {@link Map} that associates a
   *         {@link Diff change description} to the {@link Set} of records
   *         where the description applies to that value in the {@code key}
   *         field (i.e. <code>
   *         {"value1": {ADDED: [1, 2], REMOVED: [3, 4]}}
   *         </code>)
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.ParseException if a string cannot be properly parsed
   *         into a timestamp
   * 
   * @param string $key
   * @param string $start
   * @param string $tend
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function diffKeyStartstrEndstr($key, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * Invoke a Plugin method.
   * 
   * <p>
   * Assuming that there is a plugin distribution that contains a class
   * named after {@code id}, and has the specified {@code method}, invoke the
   * same with {@code params} and return the result.
   * </p>
   * 
   * @param id the fully qualified name of the plugin class
   * @param method the name of the method in {@code clazz} to invoke
   * @param params a list of TObjects to pass to {@code method} as args
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return the result of the method invocation
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.InvalidArgumentException if any of the arguments are
   *         invalid
   * 
   * @param string $id
   * @param string $method
   * @param \concourse\thrift\complex\ComplexTObject[] $params
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\complex\ComplexTObject A recursive structure that encodes one or more {@link TObject TObjects}.
   * 
   * <p>
   * The most basic {@link ComplexTObject} is a
   * {@link ComplexTObjectType#SCALAR scalar}, which is just a wrapped
   * {@link TObject}. Beyond that, complex collections can be represented as a
   * {@link Set}, {@link List} or {@link Map} of
   * {@link ComplexTObject ComplexTObjects}.
   * </p>
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\InvalidArgumentException
   */
  public function invokePlugin($id, $method, array $params, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * Attempt to authenticate the user identified by the {@code username} and
   * {@code password} combination to the specified {@code environment}. If
   * successful, establish a new session within the {@code environment} on
   * behalf of that user and return an {@link shared.AccessToken}, which is
   * required for all subsequent operations.
   * 
   * <p>
   * The AccessToken <em>may</em> expire after a while so clients should be
   * prepared to seamlessly login again for active user sessions.
   * </p>
   * 
   * @param username a binary representation of the UTF-8 encoded username
   * @param password a binary representation of the UTF-8 encoded password
   * @param environment the name of the environment into which to login
   * @return an {@link shared.AccessToken} to submit with all subsequent method
   *         calls
   * @throws exceptions.SecurityException if the login is not successful
   * 
   * @param string $username
   * @param string $password
   * @param string $environment
   * @return \concourse\thrift\shared\AccessToken A temporary token that is returned by the
   * {@link ConcourseService#login(String, String)} method to grant access
   * to secure resources in place of raw credentials.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   */
  public function login($username, $password, $environment);
  /**
   * Terminate the session within {@code environment} for the user represented
   * by the {@code token}. Afterwards, all other attempts to use {@code token}
   * will result in a {@link exceptions.SecurityException} being thrown.
   * 
   * @param token the {@link shared.AccessToken to expire}
   * @param environment the environment of the session represented by the
   *                    {@code token}
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * 
   * @param \concourse\thrift\shared\AccessToken $token
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   */
  public function logout(\concourse\thrift\shared\AccessToken $token, $environment);
  /**
   * Start a new transaction.
   * <p>
   * This method will turn on STAGING mode so that all subsequent changes are
   * collected in an isolated buffer before possibly being committed to the
   * database. Staged operations are guaranteed to be reliable, all or nothing
   * units of work that allow correct recovery from failures and provide
   * isolation between clients so the database is always in a consistent state.
   * </p>
   * <p>
   * After this method returns, all subsequent operations will be done in
   * {@code staging} mode until either #abort(shared.AccessToken) or
   * #commit(shared.AccessToken) is called.
   * </p>
   * 
   * @param token
   * @param environment
   * @return TransactionToken
   * @throws TSecurityException
   * 
   * @param \concourse\thrift\shared\AccessToken $token
   * @param string $environment
   * @return \concourse\thrift\shared\TransactionToken A token that identifies a Transaction.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   */
  public function stage(\concourse\thrift\shared\AccessToken $token, $environment);
  /**
   * @param string $json
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function insertJson($json, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $json
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return bool
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function insertJsonRecord($json, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $json
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function insertJsonRecords($json, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TObject $value
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return bool
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\InvalidArgumentException
   */
  public function removeKeyValueRecord($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TObject $value
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\InvalidArgumentException
   */
  public function removeKeyValueRecords($key, \concourse\thrift\data\TObject $value, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TObject $value
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\InvalidArgumentException
   */
  public function setKeyValueRecord($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TObject $value
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\InvalidArgumentException
   */
  public function setKeyValue($key, \concourse\thrift\data\TObject $value, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TObject $value
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\InvalidArgumentException
   */
  public function setKeyValueRecords($key, \concourse\thrift\data\TObject $value, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * The {@code value} in {@code key} of {@code record} are added
   * and removed to be set as exactly the same as the input values
   * 
   * @param key the field name
   * @param record the record id where an attempt is made to add the data
   * @param values collection of values to set
   * @param creds the {@link shared.AccessToken} that is used to authenticate
   *                the user on behalf of whom the client is connected
   * @param transaction the {@link shared.TransactionToken} that the
   *                      server uses to find the current transaction for the
   *                      client (optional)
   * @param environment the environment to which the client is connected
   * @return a bool that indicates if the data was added
   * @throws exceptions.SecurityException if the {@code creds} don't
   *         represent a valid session
   * @throws exceptions.TransactionException if the client was in a
   *         transaction and an error occurred that caused the transaction
   *         to end itself
   * @throws exceptions.InvalidArgumentException if any of provided data
   *         can't be stored
   * 
   * @param string $key
   * @param int $record
   * @param \concourse\thrift\data\TObject[] $values
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\InvalidArgumentException
   */
  public function reconcileKeyRecordValues($key, $record, array $values, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function inventory(\concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectRecords(array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectRecordTime($record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectRecordTimestr($record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectRecordsTime(array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectRecordsTimestr(array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectKeysRecord(array $keys, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectKeysRecordTime(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectKeysRecordTimestr(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectKeysRecords(array $keys, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectKeysRecordsTime(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectKeysRecordsTimestr(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectCriteria(\concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectCcl($ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectCriteriaTime(\concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectCriteriaTimestr(\concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $ccl
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectCclTime($ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $ccl
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectCclTimestr($ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectKeysCriteria(array $keys, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectKeysCcl(array $keys, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function selectKeysCriteriaTime(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectKeysCriteriaTimestr(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param string $ccl
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectKeysCclTime(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param string $ccl
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function selectKeysCclTimestr(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getKeysRecord(array $keys, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getKeysRecordTime(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getKeysRecordTimestr(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getKeysRecords(array $keys, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getKeysRecordsTime(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getKeysRecordsTimestr(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getCriteria(\concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getCcl($ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getCriteriaTime(\concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getCriteriaTimestr(\concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $ccl
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getCclTime($ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $ccl
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getCclTimestr($ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getKeysCriteria(array $keys, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getKeysCcl(array $keys, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getKeysCriteriaTime(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getKeysCriteriaTimestr(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param string $ccl
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getKeysCclTime(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param string $ccl
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function getKeysCclTimestr(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TObject $value
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return bool
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function verifyKeyValueRecord($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TObject $value
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return bool
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function verifyKeyValueRecordTime($key, \concourse\thrift\data\TObject $value, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TObject $value
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return bool
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function verifyKeyValueRecordTimestr($key, \concourse\thrift\data\TObject $value, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param int[] $records
   * @param bool $identifier
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return string
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function jsonifyRecords(array $records, $identifier, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param int[] $records
   * @param int $timestamp
   * @param bool $identifier
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return string
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function jsonifyRecordsTime(array $records, $timestamp, $identifier, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param int[] $records
   * @param string $timestamp
   * @param bool $identifier
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return string
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function jsonifyRecordsTimestr(array $records, $timestamp, $identifier, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function findCriteria(\concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function findCcl($ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $operator
   * @param \concourse\thrift\data\TObject[] $values
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function findKeyOperatorValues($key, $operator, array $values, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $operator
   * @param \concourse\thrift\data\TObject[] $values
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function findKeyOperatorValuesTime($key, $operator, array $values, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $operator
   * @param \concourse\thrift\data\TObject[] $values
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function findKeyOperatorValuesTimestr($key, $operator, array $values, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $operator
   * @param \concourse\thrift\data\TObject[] $values
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function findKeyOperatorstrValues($key, $operator, array $values, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $operator
   * @param \concourse\thrift\data\TObject[] $values
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function findKeyOperatorstrValuesTime($key, $operator, array $values, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $operator
   * @param \concourse\thrift\data\TObject[] $values
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function findKeyOperatorstrValuesTimestr($key, $operator, array $values, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $query
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int[]
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function search($key, $query, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function revertKeysRecordsTime(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function revertKeysRecordsTimestr(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function revertKeysRecordTime(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function revertKeysRecordTimestr(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function revertKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function revertKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function revertKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function revertKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function pingRecords(array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return bool
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function pingRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TObject $expected
   * @param int $record
   * @param \concourse\thrift\data\TObject $replacement
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return bool
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function verifyAndSwap($key, \concourse\thrift\data\TObject $expected, $record, \concourse\thrift\data\TObject $replacement, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TObject $value
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\InvalidArgumentException
   */
  public function verifyOrSet($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TObject $value
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\DuplicateEntryException
   * @throws \concourse\thrift\exceptions\InvalidArgumentException
   */
  public function findOrAddKeyValue($key, \concourse\thrift\data\TObject $value, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $json
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\DuplicateEntryException
   */
  public function findOrInsertCriteriaJson(\concourse\thrift\data\TCriteria $criteria, $json, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $ccl
   * @param string $json
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   * @throws \concourse\thrift\exceptions\DuplicateEntryException
   */
  public function findOrInsertCclJson($ccl, $json, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function sumKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function sumKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function sumKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function sumKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function sumKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function sumKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function sumKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function sumKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function sumKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function sumKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function sumKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function sumKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function sumKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function sumKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function sumKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function averageKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function averageKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function averageKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function averageKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function averageKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function averageKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function averageKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function averageKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function averageKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function averageKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function averageKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function averageKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function averageKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function averageKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function averageKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function countKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function countKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function countKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function countKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function countKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function countKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function countKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function countKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function countKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function countKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function countKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function countKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function countKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function countKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function countKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function maxKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function maxKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function maxKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function maxKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function maxKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function maxKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function maxKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function maxKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function maxKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function maxKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function maxKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function maxKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function maxKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function maxKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function maxKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function minKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function minKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function minKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function minKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function minKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function minKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function minKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function minKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function minKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function minKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function minKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function minKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function minKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function minKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return \concourse\thrift\data\TObject A lightweight wrapper for a typed Object that has been encoded
   * as binary data.
   * 
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function minKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function navigateKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function navigateKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int $record
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function navigateKeysRecord(array $keys, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int $record
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function navigateKeysRecordTime(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int $record
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeysRecordTimestr(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function navigateKeysRecords(array $keys, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function navigateKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function navigateKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int[] $records
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function navigateKeysRecordsTime(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param int[] $records
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeysRecordsTimestr(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param string $ccl
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param string $ccl
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeysCcl(array $keys, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param string $ccl
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeysCclTime(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param string $ccl
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeysCclTimestr(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string $key
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeysCriteria(array $keys, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param int $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeysCriteriaTime(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param string[] $keys
   * @param \concourse\thrift\data\TCriteria $criteria
   * @param string $timestamp
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $transaction
   * @param string $environment
   * @return array
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function navigateKeysCriteriaTimestr(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment);
  /**
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $token
   * @param string $environment
   * @return string
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getServerEnvironment(\concourse\thrift\shared\AccessToken $creds,  $token, $environment);
  /**
   * @return string
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function getServerVersion();
  /**
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $token
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   */
  public function time(\concourse\thrift\shared\AccessToken $creds,  $token, $environment);
  /**
   * @param string $phrase
   * @param \concourse\thrift\shared\AccessToken $creds
   * @param \concourse\thrift\shared\TransactionToken $token
   * @param string $environment
   * @return int
   * @throws \concourse\thrift\exceptions\SecurityException
   * @throws \concourse\thrift\exceptions\TransactionException
   * @throws \concourse\thrift\exceptions\ParseException
   */
  public function timePhrase($phrase, \concourse\thrift\shared\AccessToken $creds,  $token, $environment);
}

class ConcourseServiceClient implements \concourse\thrift\ConcourseServiceIf {
  protected $input_ = null;
  protected $output_ = null;

  protected $seqid_ = 0;

  public function __construct($input, $output=null) {
    $this->input_ = $input;
    $this->output_ = $output ? $output : $input;
  }

  public function abort(\concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_abort($creds, $transaction, $environment);
    $this->recv_abort();
  }

  public function send_abort(\concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_abort_args();
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'abort', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('abort', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_abort()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_abort_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_abort_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    return;
  }

  public function addKeyValue($key, \concourse\thrift\data\TObject $value, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_addKeyValue($key, $value, $creds, $transaction, $environment);
    return $this->recv_addKeyValue();
  }

  public function send_addKeyValue($key, \concourse\thrift\data\TObject $value, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_addKeyValue_args();
    $args->key = $key;
    $args->value = $value;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addKeyValue', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addKeyValue', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addKeyValue()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_addKeyValue_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_addKeyValue_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("addKeyValue failed: unknown result");
  }

  public function addKeyValueRecord($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_addKeyValueRecord($key, $value, $record, $creds, $transaction, $environment);
    return $this->recv_addKeyValueRecord();
  }

  public function send_addKeyValueRecord($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_addKeyValueRecord_args();
    $args->key = $key;
    $args->value = $value;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addKeyValueRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addKeyValueRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addKeyValueRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_addKeyValueRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_addKeyValueRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("addKeyValueRecord failed: unknown result");
  }

  public function addKeyValueRecords($key, \concourse\thrift\data\TObject $value, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_addKeyValueRecords($key, $value, $records, $creds, $transaction, $environment);
    return $this->recv_addKeyValueRecords();
  }

  public function send_addKeyValueRecords($key, \concourse\thrift\data\TObject $value, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_addKeyValueRecords_args();
    $args->key = $key;
    $args->value = $value;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'addKeyValueRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('addKeyValueRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_addKeyValueRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_addKeyValueRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_addKeyValueRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("addKeyValueRecords failed: unknown result");
  }

  public function auditRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_auditRecord($record, $creds, $transaction, $environment);
    return $this->recv_auditRecord();
  }

  public function send_auditRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_auditRecord_args();
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'auditRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('auditRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_auditRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_auditRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_auditRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("auditRecord failed: unknown result");
  }

  public function auditRecordStart($record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_auditRecordStart($record, $start, $creds, $transaction, $environment);
    return $this->recv_auditRecordStart();
  }

  public function send_auditRecordStart($record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_auditRecordStart_args();
    $args->record = $record;
    $args->start = $start;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'auditRecordStart', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('auditRecordStart', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_auditRecordStart()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_auditRecordStart_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_auditRecordStart_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("auditRecordStart failed: unknown result");
  }

  public function auditRecordStartstr($record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_auditRecordStartstr($record, $start, $creds, $transaction, $environment);
    return $this->recv_auditRecordStartstr();
  }

  public function send_auditRecordStartstr($record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_auditRecordStartstr_args();
    $args->record = $record;
    $args->start = $start;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'auditRecordStartstr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('auditRecordStartstr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_auditRecordStartstr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_auditRecordStartstr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_auditRecordStartstr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("auditRecordStartstr failed: unknown result");
  }

  public function auditRecordStartEnd($record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_auditRecordStartEnd($record, $start, $tend, $creds, $transaction, $environment);
    return $this->recv_auditRecordStartEnd();
  }

  public function send_auditRecordStartEnd($record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_auditRecordStartEnd_args();
    $args->record = $record;
    $args->start = $start;
    $args->tend = $tend;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'auditRecordStartEnd', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('auditRecordStartEnd', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_auditRecordStartEnd()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_auditRecordStartEnd_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_auditRecordStartEnd_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("auditRecordStartEnd failed: unknown result");
  }

  public function auditRecordStartstrEndstr($record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_auditRecordStartstrEndstr($record, $start, $tend, $creds, $transaction, $environment);
    return $this->recv_auditRecordStartstrEndstr();
  }

  public function send_auditRecordStartstrEndstr($record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_auditRecordStartstrEndstr_args();
    $args->record = $record;
    $args->start = $start;
    $args->tend = $tend;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'auditRecordStartstrEndstr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('auditRecordStartstrEndstr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_auditRecordStartstrEndstr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_auditRecordStartstrEndstr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_auditRecordStartstrEndstr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("auditRecordStartstrEndstr failed: unknown result");
  }

  public function auditKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_auditKeyRecord($key, $record, $creds, $transaction, $environment);
    return $this->recv_auditKeyRecord();
  }

  public function send_auditKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_auditKeyRecord_args();
    $args->key = $key;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'auditKeyRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('auditKeyRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_auditKeyRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_auditKeyRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_auditKeyRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("auditKeyRecord failed: unknown result");
  }

  public function auditKeyRecordStart($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_auditKeyRecordStart($key, $record, $start, $creds, $transaction, $environment);
    return $this->recv_auditKeyRecordStart();
  }

  public function send_auditKeyRecordStart($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_auditKeyRecordStart_args();
    $args->key = $key;
    $args->record = $record;
    $args->start = $start;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'auditKeyRecordStart', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('auditKeyRecordStart', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_auditKeyRecordStart()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_auditKeyRecordStart_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_auditKeyRecordStart_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("auditKeyRecordStart failed: unknown result");
  }

  public function auditKeyRecordStartstr($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_auditKeyRecordStartstr($key, $record, $start, $creds, $transaction, $environment);
    return $this->recv_auditKeyRecordStartstr();
  }

  public function send_auditKeyRecordStartstr($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_auditKeyRecordStartstr_args();
    $args->key = $key;
    $args->record = $record;
    $args->start = $start;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'auditKeyRecordStartstr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('auditKeyRecordStartstr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_auditKeyRecordStartstr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_auditKeyRecordStartstr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_auditKeyRecordStartstr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("auditKeyRecordStartstr failed: unknown result");
  }

  public function auditKeyRecordStartEnd($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_auditKeyRecordStartEnd($key, $record, $start, $tend, $creds, $transaction, $environment);
    return $this->recv_auditKeyRecordStartEnd();
  }

  public function send_auditKeyRecordStartEnd($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_auditKeyRecordStartEnd_args();
    $args->key = $key;
    $args->record = $record;
    $args->start = $start;
    $args->tend = $tend;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'auditKeyRecordStartEnd', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('auditKeyRecordStartEnd', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_auditKeyRecordStartEnd()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_auditKeyRecordStartEnd_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_auditKeyRecordStartEnd_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("auditKeyRecordStartEnd failed: unknown result");
  }

  public function auditKeyRecordStartstrEndstr($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_auditKeyRecordStartstrEndstr($key, $record, $start, $tend, $creds, $transaction, $environment);
    return $this->recv_auditKeyRecordStartstrEndstr();
  }

  public function send_auditKeyRecordStartstrEndstr($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_auditKeyRecordStartstrEndstr_args();
    $args->key = $key;
    $args->record = $record;
    $args->start = $start;
    $args->tend = $tend;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'auditKeyRecordStartstrEndstr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('auditKeyRecordStartstrEndstr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_auditKeyRecordStartstrEndstr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_auditKeyRecordStartstrEndstr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_auditKeyRecordStartstrEndstr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("auditKeyRecordStartstrEndstr failed: unknown result");
  }

  public function browseKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_browseKey($key, $creds, $transaction, $environment);
    return $this->recv_browseKey();
  }

  public function send_browseKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_browseKey_args();
    $args->key = $key;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'browseKey', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('browseKey', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_browseKey()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_browseKey_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_browseKey_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("browseKey failed: unknown result");
  }

  public function browseKeys(array $keys, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_browseKeys($keys, $creds, $transaction, $environment);
    return $this->recv_browseKeys();
  }

  public function send_browseKeys(array $keys, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_browseKeys_args();
    $args->keys = $keys;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'browseKeys', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('browseKeys', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_browseKeys()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_browseKeys_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_browseKeys_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("browseKeys failed: unknown result");
  }

  public function browseKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_browseKeyTime($key, $timestamp, $creds, $transaction, $environment);
    return $this->recv_browseKeyTime();
  }

  public function send_browseKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_browseKeyTime_args();
    $args->key = $key;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'browseKeyTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('browseKeyTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_browseKeyTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_browseKeyTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_browseKeyTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("browseKeyTime failed: unknown result");
  }

  public function browseKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_browseKeyTimestr($key, $timestamp, $creds, $transaction, $environment);
    return $this->recv_browseKeyTimestr();
  }

  public function send_browseKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_browseKeyTimestr_args();
    $args->key = $key;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'browseKeyTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('browseKeyTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_browseKeyTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_browseKeyTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_browseKeyTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("browseKeyTimestr failed: unknown result");
  }

  public function browseKeysTime(array $keys, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_browseKeysTime($keys, $timestamp, $creds, $transaction, $environment);
    return $this->recv_browseKeysTime();
  }

  public function send_browseKeysTime(array $keys, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_browseKeysTime_args();
    $args->keys = $keys;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'browseKeysTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('browseKeysTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_browseKeysTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_browseKeysTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_browseKeysTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("browseKeysTime failed: unknown result");
  }

  public function browseKeysTimestr(array $keys, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_browseKeysTimestr($keys, $timestamp, $creds, $transaction, $environment);
    return $this->recv_browseKeysTimestr();
  }

  public function send_browseKeysTimestr(array $keys, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_browseKeysTimestr_args();
    $args->keys = $keys;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'browseKeysTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('browseKeysTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_browseKeysTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_browseKeysTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_browseKeysTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("browseKeysTimestr failed: unknown result");
  }

  public function chronologizeKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_chronologizeKeyRecord($key, $record, $creds, $transaction, $environment);
    return $this->recv_chronologizeKeyRecord();
  }

  public function send_chronologizeKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_chronologizeKeyRecord_args();
    $args->key = $key;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'chronologizeKeyRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('chronologizeKeyRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_chronologizeKeyRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_chronologizeKeyRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_chronologizeKeyRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("chronologizeKeyRecord failed: unknown result");
  }

  public function chronologizeKeyRecordStart($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_chronologizeKeyRecordStart($key, $record, $start, $creds, $transaction, $environment);
    return $this->recv_chronologizeKeyRecordStart();
  }

  public function send_chronologizeKeyRecordStart($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_chronologizeKeyRecordStart_args();
    $args->key = $key;
    $args->record = $record;
    $args->start = $start;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'chronologizeKeyRecordStart', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('chronologizeKeyRecordStart', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_chronologizeKeyRecordStart()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_chronologizeKeyRecordStart_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_chronologizeKeyRecordStart_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("chronologizeKeyRecordStart failed: unknown result");
  }

  public function chronologizeKeyRecordStartstr($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_chronologizeKeyRecordStartstr($key, $record, $start, $creds, $transaction, $environment);
    return $this->recv_chronologizeKeyRecordStartstr();
  }

  public function send_chronologizeKeyRecordStartstr($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_chronologizeKeyRecordStartstr_args();
    $args->key = $key;
    $args->record = $record;
    $args->start = $start;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'chronologizeKeyRecordStartstr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('chronologizeKeyRecordStartstr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_chronologizeKeyRecordStartstr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_chronologizeKeyRecordStartstr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_chronologizeKeyRecordStartstr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("chronologizeKeyRecordStartstr failed: unknown result");
  }

  public function chronologizeKeyRecordStartEnd($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_chronologizeKeyRecordStartEnd($key, $record, $start, $tend, $creds, $transaction, $environment);
    return $this->recv_chronologizeKeyRecordStartEnd();
  }

  public function send_chronologizeKeyRecordStartEnd($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_chronologizeKeyRecordStartEnd_args();
    $args->key = $key;
    $args->record = $record;
    $args->start = $start;
    $args->tend = $tend;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'chronologizeKeyRecordStartEnd', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('chronologizeKeyRecordStartEnd', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_chronologizeKeyRecordStartEnd()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_chronologizeKeyRecordStartEnd_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_chronologizeKeyRecordStartEnd_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("chronologizeKeyRecordStartEnd failed: unknown result");
  }

  public function chronologizeKeyRecordStartstrEndstr($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_chronologizeKeyRecordStartstrEndstr($key, $record, $start, $tend, $creds, $transaction, $environment);
    return $this->recv_chronologizeKeyRecordStartstrEndstr();
  }

  public function send_chronologizeKeyRecordStartstrEndstr($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_chronologizeKeyRecordStartstrEndstr_args();
    $args->key = $key;
    $args->record = $record;
    $args->start = $start;
    $args->tend = $tend;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'chronologizeKeyRecordStartstrEndstr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('chronologizeKeyRecordStartstrEndstr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_chronologizeKeyRecordStartstrEndstr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_chronologizeKeyRecordStartstrEndstr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_chronologizeKeyRecordStartstrEndstr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("chronologizeKeyRecordStartstrEndstr failed: unknown result");
  }

  public function clearRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_clearRecord($record, $creds, $transaction, $environment);
    $this->recv_clearRecord();
  }

  public function send_clearRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_clearRecord_args();
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'clearRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('clearRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_clearRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_clearRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_clearRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    return;
  }

  public function clearRecords(array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_clearRecords($records, $creds, $transaction, $environment);
    $this->recv_clearRecords();
  }

  public function send_clearRecords(array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_clearRecords_args();
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'clearRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('clearRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_clearRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_clearRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_clearRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    return;
  }

  public function clearKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_clearKeyRecord($key, $record, $creds, $transaction, $environment);
    $this->recv_clearKeyRecord();
  }

  public function send_clearKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_clearKeyRecord_args();
    $args->key = $key;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'clearKeyRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('clearKeyRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_clearKeyRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_clearKeyRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_clearKeyRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    return;
  }

  public function clearKeysRecord(array $keys, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_clearKeysRecord($keys, $record, $creds, $transaction, $environment);
    $this->recv_clearKeysRecord();
  }

  public function send_clearKeysRecord(array $keys, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_clearKeysRecord_args();
    $args->keys = $keys;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'clearKeysRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('clearKeysRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_clearKeysRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_clearKeysRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_clearKeysRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    return;
  }

  public function clearKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_clearKeyRecords($key, $records, $creds, $transaction, $environment);
    $this->recv_clearKeyRecords();
  }

  public function send_clearKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_clearKeyRecords_args();
    $args->key = $key;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'clearKeyRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('clearKeyRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_clearKeyRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_clearKeyRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_clearKeyRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    return;
  }

  public function clearKeysRecords(array $keys, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_clearKeysRecords($keys, $records, $creds, $transaction, $environment);
    $this->recv_clearKeysRecords();
  }

  public function send_clearKeysRecords(array $keys, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_clearKeysRecords_args();
    $args->keys = $keys;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'clearKeysRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('clearKeysRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_clearKeysRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_clearKeysRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_clearKeysRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    return;
  }

  public function commit(\concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_commit($creds, $transaction, $environment);
    return $this->recv_commit();
  }

  public function send_commit(\concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_commit_args();
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'commit', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('commit', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_commit()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_commit_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_commit_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("commit failed: unknown result");
  }

  public function describe(\concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_describe($creds, $transaction, $environment);
    return $this->recv_describe();
  }

  public function send_describe(\concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_describe_args();
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'describe', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('describe', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_describe()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_describe_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_describe_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("describe failed: unknown result");
  }

  public function describeTime($timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_describeTime($timestamp, $creds, $transaction, $environment);
    return $this->recv_describeTime();
  }

  public function send_describeTime($timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_describeTime_args();
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'describeTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('describeTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_describeTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_describeTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_describeTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("describeTime failed: unknown result");
  }

  public function describeTimestr($timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_describeTimestr($timestamp, $creds, $transaction, $environment);
    return $this->recv_describeTimestr();
  }

  public function send_describeTimestr($timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_describeTimestr_args();
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'describeTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('describeTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_describeTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_describeTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_describeTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("describeTimestr failed: unknown result");
  }

  public function describeRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_describeRecord($record, $creds, $transaction, $environment);
    return $this->recv_describeRecord();
  }

  public function send_describeRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_describeRecord_args();
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'describeRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('describeRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_describeRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_describeRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_describeRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("describeRecord failed: unknown result");
  }

  public function describeRecordTime($record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_describeRecordTime($record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_describeRecordTime();
  }

  public function send_describeRecordTime($record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_describeRecordTime_args();
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'describeRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('describeRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_describeRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_describeRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_describeRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("describeRecordTime failed: unknown result");
  }

  public function describeRecordTimestr($record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_describeRecordTimestr($record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_describeRecordTimestr();
  }

  public function send_describeRecordTimestr($record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_describeRecordTimestr_args();
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'describeRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('describeRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_describeRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_describeRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_describeRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("describeRecordTimestr failed: unknown result");
  }

  public function describeRecords(array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_describeRecords($records, $creds, $transaction, $environment);
    return $this->recv_describeRecords();
  }

  public function send_describeRecords(array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_describeRecords_args();
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'describeRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('describeRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_describeRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_describeRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_describeRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("describeRecords failed: unknown result");
  }

  public function describeRecordsTime(array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_describeRecordsTime($records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_describeRecordsTime();
  }

  public function send_describeRecordsTime(array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_describeRecordsTime_args();
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'describeRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('describeRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_describeRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_describeRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_describeRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("describeRecordsTime failed: unknown result");
  }

  public function describeRecordsTimestr(array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_describeRecordsTimestr($records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_describeRecordsTimestr();
  }

  public function send_describeRecordsTimestr(array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_describeRecordsTimestr_args();
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'describeRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('describeRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_describeRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_describeRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_describeRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("describeRecordsTimestr failed: unknown result");
  }

  public function diffRecordStart($record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_diffRecordStart($record, $start, $creds, $transaction, $environment);
    return $this->recv_diffRecordStart();
  }

  public function send_diffRecordStart($record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_diffRecordStart_args();
    $args->record = $record;
    $args->start = $start;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'diffRecordStart', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('diffRecordStart', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_diffRecordStart()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_diffRecordStart_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_diffRecordStart_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("diffRecordStart failed: unknown result");
  }

  public function diffRecordStartstr($record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_diffRecordStartstr($record, $start, $creds, $transaction, $environment);
    return $this->recv_diffRecordStartstr();
  }

  public function send_diffRecordStartstr($record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_diffRecordStartstr_args();
    $args->record = $record;
    $args->start = $start;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'diffRecordStartstr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('diffRecordStartstr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_diffRecordStartstr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_diffRecordStartstr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_diffRecordStartstr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("diffRecordStartstr failed: unknown result");
  }

  public function diffRecordStartEnd($record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_diffRecordStartEnd($record, $start, $tend, $creds, $transaction, $environment);
    return $this->recv_diffRecordStartEnd();
  }

  public function send_diffRecordStartEnd($record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_diffRecordStartEnd_args();
    $args->record = $record;
    $args->start = $start;
    $args->tend = $tend;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'diffRecordStartEnd', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('diffRecordStartEnd', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_diffRecordStartEnd()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_diffRecordStartEnd_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_diffRecordStartEnd_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("diffRecordStartEnd failed: unknown result");
  }

  public function diffRecordStartstrEndstr($record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_diffRecordStartstrEndstr($record, $start, $tend, $creds, $transaction, $environment);
    return $this->recv_diffRecordStartstrEndstr();
  }

  public function send_diffRecordStartstrEndstr($record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_diffRecordStartstrEndstr_args();
    $args->record = $record;
    $args->start = $start;
    $args->tend = $tend;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'diffRecordStartstrEndstr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('diffRecordStartstrEndstr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_diffRecordStartstrEndstr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_diffRecordStartstrEndstr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_diffRecordStartstrEndstr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("diffRecordStartstrEndstr failed: unknown result");
  }

  public function diffKeyRecordStart($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_diffKeyRecordStart($key, $record, $start, $creds, $transaction, $environment);
    return $this->recv_diffKeyRecordStart();
  }

  public function send_diffKeyRecordStart($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_diffKeyRecordStart_args();
    $args->key = $key;
    $args->record = $record;
    $args->start = $start;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'diffKeyRecordStart', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('diffKeyRecordStart', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_diffKeyRecordStart()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_diffKeyRecordStart_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_diffKeyRecordStart_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("diffKeyRecordStart failed: unknown result");
  }

  public function diffKeyRecordStartstr($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_diffKeyRecordStartstr($key, $record, $start, $creds, $transaction, $environment);
    return $this->recv_diffKeyRecordStartstr();
  }

  public function send_diffKeyRecordStartstr($key, $record, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_diffKeyRecordStartstr_args();
    $args->key = $key;
    $args->record = $record;
    $args->start = $start;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'diffKeyRecordStartstr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('diffKeyRecordStartstr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_diffKeyRecordStartstr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_diffKeyRecordStartstr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_diffKeyRecordStartstr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("diffKeyRecordStartstr failed: unknown result");
  }

  public function diffKeyRecordStartEnd($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_diffKeyRecordStartEnd($key, $record, $start, $tend, $creds, $transaction, $environment);
    return $this->recv_diffKeyRecordStartEnd();
  }

  public function send_diffKeyRecordStartEnd($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_diffKeyRecordStartEnd_args();
    $args->key = $key;
    $args->record = $record;
    $args->start = $start;
    $args->tend = $tend;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'diffKeyRecordStartEnd', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('diffKeyRecordStartEnd', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_diffKeyRecordStartEnd()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_diffKeyRecordStartEnd_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_diffKeyRecordStartEnd_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("diffKeyRecordStartEnd failed: unknown result");
  }

  public function diffKeyRecordStartstrEndstr($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_diffKeyRecordStartstrEndstr($key, $record, $start, $tend, $creds, $transaction, $environment);
    return $this->recv_diffKeyRecordStartstrEndstr();
  }

  public function send_diffKeyRecordStartstrEndstr($key, $record, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_diffKeyRecordStartstrEndstr_args();
    $args->key = $key;
    $args->record = $record;
    $args->start = $start;
    $args->tend = $tend;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'diffKeyRecordStartstrEndstr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('diffKeyRecordStartstrEndstr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_diffKeyRecordStartstrEndstr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_diffKeyRecordStartstrEndstr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_diffKeyRecordStartstrEndstr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("diffKeyRecordStartstrEndstr failed: unknown result");
  }

  public function diffKeyStart($key, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_diffKeyStart($key, $start, $creds, $transaction, $environment);
    return $this->recv_diffKeyStart();
  }

  public function send_diffKeyStart($key, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_diffKeyStart_args();
    $args->key = $key;
    $args->start = $start;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'diffKeyStart', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('diffKeyStart', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_diffKeyStart()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_diffKeyStart_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_diffKeyStart_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("diffKeyStart failed: unknown result");
  }

  public function diffKeyStartstr($key, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_diffKeyStartstr($key, $start, $creds, $transaction, $environment);
    return $this->recv_diffKeyStartstr();
  }

  public function send_diffKeyStartstr($key, $start, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_diffKeyStartstr_args();
    $args->key = $key;
    $args->start = $start;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'diffKeyStartstr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('diffKeyStartstr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_diffKeyStartstr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_diffKeyStartstr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_diffKeyStartstr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("diffKeyStartstr failed: unknown result");
  }

  public function diffKeyStartEnd($key, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_diffKeyStartEnd($key, $start, $tend, $creds, $transaction, $environment);
    return $this->recv_diffKeyStartEnd();
  }

  public function send_diffKeyStartEnd($key, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_diffKeyStartEnd_args();
    $args->key = $key;
    $args->start = $start;
    $args->tend = $tend;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'diffKeyStartEnd', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('diffKeyStartEnd', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_diffKeyStartEnd()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_diffKeyStartEnd_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_diffKeyStartEnd_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("diffKeyStartEnd failed: unknown result");
  }

  public function diffKeyStartstrEndstr($key, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_diffKeyStartstrEndstr($key, $start, $tend, $creds, $transaction, $environment);
    return $this->recv_diffKeyStartstrEndstr();
  }

  public function send_diffKeyStartstrEndstr($key, $start, $tend, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_diffKeyStartstrEndstr_args();
    $args->key = $key;
    $args->start = $start;
    $args->tend = $tend;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'diffKeyStartstrEndstr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('diffKeyStartstrEndstr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_diffKeyStartstrEndstr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_diffKeyStartstrEndstr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_diffKeyStartstrEndstr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("diffKeyStartstrEndstr failed: unknown result");
  }

  public function invokePlugin($id, $method, array $params, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_invokePlugin($id, $method, $params, $creds, $transaction, $environment);
    return $this->recv_invokePlugin();
  }

  public function send_invokePlugin($id, $method, array $params, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_invokePlugin_args();
    $args->id = $id;
    $args->method = $method;
    $args->params = $params;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'invokePlugin', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('invokePlugin', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_invokePlugin()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_invokePlugin_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_invokePlugin_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("invokePlugin failed: unknown result");
  }

  public function login($username, $password, $environment)
  {
    $this->send_login($username, $password, $environment);
    return $this->recv_login();
  }

  public function send_login($username, $password, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_login_args();
    $args->username = $username;
    $args->password = $password;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'login', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('login', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_login()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_login_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_login_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    throw new \Exception("login failed: unknown result");
  }

  public function logout(\concourse\thrift\shared\AccessToken $token, $environment)
  {
    $this->send_logout($token, $environment);
    $this->recv_logout();
  }

  public function send_logout(\concourse\thrift\shared\AccessToken $token, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_logout_args();
    $args->token = $token;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'logout', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('logout', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_logout()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_logout_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_logout_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    return;
  }

  public function stage(\concourse\thrift\shared\AccessToken $token, $environment)
  {
    $this->send_stage($token, $environment);
    return $this->recv_stage();
  }

  public function send_stage(\concourse\thrift\shared\AccessToken $token, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_stage_args();
    $args->token = $token;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'stage', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('stage', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_stage()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_stage_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_stage_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    throw new \Exception("stage failed: unknown result");
  }

  public function insertJson($json, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_insertJson($json, $creds, $transaction, $environment);
    return $this->recv_insertJson();
  }

  public function send_insertJson($json, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_insertJson_args();
    $args->json = $json;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'insertJson', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('insertJson', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_insertJson()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_insertJson_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_insertJson_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("insertJson failed: unknown result");
  }

  public function insertJsonRecord($json, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_insertJsonRecord($json, $record, $creds, $transaction, $environment);
    return $this->recv_insertJsonRecord();
  }

  public function send_insertJsonRecord($json, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_insertJsonRecord_args();
    $args->json = $json;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'insertJsonRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('insertJsonRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_insertJsonRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_insertJsonRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_insertJsonRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("insertJsonRecord failed: unknown result");
  }

  public function insertJsonRecords($json, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_insertJsonRecords($json, $records, $creds, $transaction, $environment);
    return $this->recv_insertJsonRecords();
  }

  public function send_insertJsonRecords($json, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_insertJsonRecords_args();
    $args->json = $json;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'insertJsonRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('insertJsonRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_insertJsonRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_insertJsonRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_insertJsonRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("insertJsonRecords failed: unknown result");
  }

  public function removeKeyValueRecord($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_removeKeyValueRecord($key, $value, $record, $creds, $transaction, $environment);
    return $this->recv_removeKeyValueRecord();
  }

  public function send_removeKeyValueRecord($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_removeKeyValueRecord_args();
    $args->key = $key;
    $args->value = $value;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'removeKeyValueRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('removeKeyValueRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_removeKeyValueRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_removeKeyValueRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_removeKeyValueRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("removeKeyValueRecord failed: unknown result");
  }

  public function removeKeyValueRecords($key, \concourse\thrift\data\TObject $value, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_removeKeyValueRecords($key, $value, $records, $creds, $transaction, $environment);
    return $this->recv_removeKeyValueRecords();
  }

  public function send_removeKeyValueRecords($key, \concourse\thrift\data\TObject $value, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_removeKeyValueRecords_args();
    $args->key = $key;
    $args->value = $value;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'removeKeyValueRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('removeKeyValueRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_removeKeyValueRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_removeKeyValueRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_removeKeyValueRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("removeKeyValueRecords failed: unknown result");
  }

  public function setKeyValueRecord($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_setKeyValueRecord($key, $value, $record, $creds, $transaction, $environment);
    $this->recv_setKeyValueRecord();
  }

  public function send_setKeyValueRecord($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_setKeyValueRecord_args();
    $args->key = $key;
    $args->value = $value;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'setKeyValueRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('setKeyValueRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_setKeyValueRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_setKeyValueRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_setKeyValueRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    return;
  }

  public function setKeyValue($key, \concourse\thrift\data\TObject $value, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_setKeyValue($key, $value, $creds, $transaction, $environment);
    return $this->recv_setKeyValue();
  }

  public function send_setKeyValue($key, \concourse\thrift\data\TObject $value, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_setKeyValue_args();
    $args->key = $key;
    $args->value = $value;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'setKeyValue', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('setKeyValue', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_setKeyValue()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_setKeyValue_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_setKeyValue_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("setKeyValue failed: unknown result");
  }

  public function setKeyValueRecords($key, \concourse\thrift\data\TObject $value, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_setKeyValueRecords($key, $value, $records, $creds, $transaction, $environment);
    $this->recv_setKeyValueRecords();
  }

  public function send_setKeyValueRecords($key, \concourse\thrift\data\TObject $value, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_setKeyValueRecords_args();
    $args->key = $key;
    $args->value = $value;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'setKeyValueRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('setKeyValueRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_setKeyValueRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_setKeyValueRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_setKeyValueRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    return;
  }

  public function reconcileKeyRecordValues($key, $record, array $values, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_reconcileKeyRecordValues($key, $record, $values, $creds, $transaction, $environment);
    $this->recv_reconcileKeyRecordValues();
  }

  public function send_reconcileKeyRecordValues($key, $record, array $values, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_reconcileKeyRecordValues_args();
    $args->key = $key;
    $args->record = $record;
    $args->values = $values;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'reconcileKeyRecordValues', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('reconcileKeyRecordValues', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_reconcileKeyRecordValues()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_reconcileKeyRecordValues_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_reconcileKeyRecordValues_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    return;
  }

  public function inventory(\concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_inventory($creds, $transaction, $environment);
    return $this->recv_inventory();
  }

  public function send_inventory(\concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_inventory_args();
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'inventory', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('inventory', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_inventory()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_inventory_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_inventory_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("inventory failed: unknown result");
  }

  public function selectRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectRecord($record, $creds, $transaction, $environment);
    return $this->recv_selectRecord();
  }

  public function send_selectRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectRecord_args();
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectRecord failed: unknown result");
  }

  public function selectRecords(array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectRecords($records, $creds, $transaction, $environment);
    return $this->recv_selectRecords();
  }

  public function send_selectRecords(array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectRecords_args();
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectRecords failed: unknown result");
  }

  public function selectRecordTime($record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectRecordTime($record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectRecordTime();
  }

  public function send_selectRecordTime($record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectRecordTime_args();
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectRecordTime failed: unknown result");
  }

  public function selectRecordTimestr($record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectRecordTimestr($record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectRecordTimestr();
  }

  public function send_selectRecordTimestr($record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectRecordTimestr_args();
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectRecordTimestr failed: unknown result");
  }

  public function selectRecordsTime(array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectRecordsTime($records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectRecordsTime();
  }

  public function send_selectRecordsTime(array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectRecordsTime_args();
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectRecordsTime failed: unknown result");
  }

  public function selectRecordsTimestr(array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectRecordsTimestr($records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectRecordsTimestr();
  }

  public function send_selectRecordsTimestr(array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectRecordsTimestr_args();
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectRecordsTimestr failed: unknown result");
  }

  public function selectKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeyRecord($key, $record, $creds, $transaction, $environment);
    return $this->recv_selectKeyRecord();
  }

  public function send_selectKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeyRecord_args();
    $args->key = $key;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeyRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeyRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeyRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeyRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeyRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectKeyRecord failed: unknown result");
  }

  public function selectKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeyRecordTime($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeyRecordTime();
  }

  public function send_selectKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeyRecordTime_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeyRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeyRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeyRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeyRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeyRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectKeyRecordTime failed: unknown result");
  }

  public function selectKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeyRecordTimestr($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeyRecordTimestr();
  }

  public function send_selectKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeyRecordTimestr_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeyRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeyRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeyRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeyRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeyRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectKeyRecordTimestr failed: unknown result");
  }

  public function selectKeysRecord(array $keys, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeysRecord($keys, $record, $creds, $transaction, $environment);
    return $this->recv_selectKeysRecord();
  }

  public function send_selectKeysRecord(array $keys, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeysRecord_args();
    $args->keys = $keys;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeysRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeysRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeysRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeysRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeysRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectKeysRecord failed: unknown result");
  }

  public function selectKeysRecordTime(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeysRecordTime($keys, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeysRecordTime();
  }

  public function send_selectKeysRecordTime(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeysRecordTime_args();
    $args->keys = $keys;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeysRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeysRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeysRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeysRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeysRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectKeysRecordTime failed: unknown result");
  }

  public function selectKeysRecordTimestr(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeysRecordTimestr($keys, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeysRecordTimestr();
  }

  public function send_selectKeysRecordTimestr(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeysRecordTimestr_args();
    $args->keys = $keys;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeysRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeysRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeysRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeysRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeysRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectKeysRecordTimestr failed: unknown result");
  }

  public function selectKeysRecords(array $keys, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeysRecords($keys, $records, $creds, $transaction, $environment);
    return $this->recv_selectKeysRecords();
  }

  public function send_selectKeysRecords(array $keys, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeysRecords_args();
    $args->keys = $keys;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeysRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeysRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeysRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeysRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeysRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectKeysRecords failed: unknown result");
  }

  public function selectKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeyRecords($key, $records, $creds, $transaction, $environment);
    return $this->recv_selectKeyRecords();
  }

  public function send_selectKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeyRecords_args();
    $args->key = $key;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeyRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeyRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeyRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeyRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeyRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectKeyRecords failed: unknown result");
  }

  public function selectKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeyRecordsTime($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeyRecordsTime();
  }

  public function send_selectKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeyRecordsTime_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeyRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeyRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeyRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeyRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeyRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectKeyRecordsTime failed: unknown result");
  }

  public function selectKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeyRecordsTimestr($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeyRecordsTimestr();
  }

  public function send_selectKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeyRecordsTimestr_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeyRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeyRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeyRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeyRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeyRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectKeyRecordsTimestr failed: unknown result");
  }

  public function selectKeysRecordsTime(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeysRecordsTime($keys, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeysRecordsTime();
  }

  public function send_selectKeysRecordsTime(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeysRecordsTime_args();
    $args->keys = $keys;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeysRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeysRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeysRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeysRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeysRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectKeysRecordsTime failed: unknown result");
  }

  public function selectKeysRecordsTimestr(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeysRecordsTimestr($keys, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeysRecordsTimestr();
  }

  public function send_selectKeysRecordsTimestr(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeysRecordsTimestr_args();
    $args->keys = $keys;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeysRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeysRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeysRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeysRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeysRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectKeysRecordsTimestr failed: unknown result");
  }

  public function selectCriteria(\concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectCriteria($criteria, $creds, $transaction, $environment);
    return $this->recv_selectCriteria();
  }

  public function send_selectCriteria(\concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectCriteria_args();
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectCriteria failed: unknown result");
  }

  public function selectCcl($ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectCcl($ccl, $creds, $transaction, $environment);
    return $this->recv_selectCcl();
  }

  public function send_selectCcl($ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectCcl_args();
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectCcl failed: unknown result");
  }

  public function selectCriteriaTime(\concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectCriteriaTime($criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectCriteriaTime();
  }

  public function send_selectCriteriaTime(\concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectCriteriaTime_args();
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectCriteriaTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectCriteriaTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectCriteriaTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectCriteriaTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectCriteriaTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectCriteriaTime failed: unknown result");
  }

  public function selectCriteriaTimestr(\concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectCriteriaTimestr($criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectCriteriaTimestr();
  }

  public function send_selectCriteriaTimestr(\concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectCriteriaTimestr_args();
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectCriteriaTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectCriteriaTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectCriteriaTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectCriteriaTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectCriteriaTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectCriteriaTimestr failed: unknown result");
  }

  public function selectCclTime($ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectCclTime($ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectCclTime();
  }

  public function send_selectCclTime($ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectCclTime_args();
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectCclTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectCclTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectCclTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectCclTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectCclTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectCclTime failed: unknown result");
  }

  public function selectCclTimestr($ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectCclTimestr($ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectCclTimestr();
  }

  public function send_selectCclTimestr($ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectCclTimestr_args();
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectCclTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectCclTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectCclTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectCclTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectCclTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectCclTimestr failed: unknown result");
  }

  public function selectKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeyCriteria($key, $criteria, $creds, $transaction, $environment);
    return $this->recv_selectKeyCriteria();
  }

  public function send_selectKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeyCriteria_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeyCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeyCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeyCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeyCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeyCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectKeyCriteria failed: unknown result");
  }

  public function selectKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeyCcl($key, $ccl, $creds, $transaction, $environment);
    return $this->recv_selectKeyCcl();
  }

  public function send_selectKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeyCcl_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeyCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeyCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeyCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeyCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeyCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectKeyCcl failed: unknown result");
  }

  public function selectKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeyCriteriaTime($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeyCriteriaTime();
  }

  public function send_selectKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeyCriteriaTime_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeyCriteriaTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeyCriteriaTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeyCriteriaTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeyCriteriaTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeyCriteriaTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectKeyCriteriaTime failed: unknown result");
  }

  public function selectKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeyCriteriaTimestr($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeyCriteriaTimestr();
  }

  public function send_selectKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeyCriteriaTimestr_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeyCriteriaTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeyCriteriaTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeyCriteriaTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeyCriteriaTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeyCriteriaTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectKeyCriteriaTimestr failed: unknown result");
  }

  public function selectKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeyCclTime($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeyCclTime();
  }

  public function send_selectKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeyCclTime_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeyCclTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeyCclTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeyCclTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeyCclTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeyCclTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectKeyCclTime failed: unknown result");
  }

  public function selectKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeyCclTimestr($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeyCclTimestr();
  }

  public function send_selectKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeyCclTimestr_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeyCclTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeyCclTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeyCclTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeyCclTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeyCclTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectKeyCclTimestr failed: unknown result");
  }

  public function selectKeysCriteria(array $keys, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeysCriteria($keys, $criteria, $creds, $transaction, $environment);
    return $this->recv_selectKeysCriteria();
  }

  public function send_selectKeysCriteria(array $keys, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeysCriteria_args();
    $args->keys = $keys;
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeysCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeysCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeysCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeysCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeysCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectKeysCriteria failed: unknown result");
  }

  public function selectKeysCcl(array $keys, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeysCcl($keys, $ccl, $creds, $transaction, $environment);
    return $this->recv_selectKeysCcl();
  }

  public function send_selectKeysCcl(array $keys, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeysCcl_args();
    $args->keys = $keys;
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeysCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeysCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeysCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeysCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeysCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectKeysCcl failed: unknown result");
  }

  public function selectKeysCriteriaTime(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeysCriteriaTime($keys, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeysCriteriaTime();
  }

  public function send_selectKeysCriteriaTime(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeysCriteriaTime_args();
    $args->keys = $keys;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeysCriteriaTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeysCriteriaTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeysCriteriaTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeysCriteriaTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeysCriteriaTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("selectKeysCriteriaTime failed: unknown result");
  }

  public function selectKeysCriteriaTimestr(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeysCriteriaTimestr($keys, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeysCriteriaTimestr();
  }

  public function send_selectKeysCriteriaTimestr(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeysCriteriaTimestr_args();
    $args->keys = $keys;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeysCriteriaTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeysCriteriaTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeysCriteriaTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeysCriteriaTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeysCriteriaTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectKeysCriteriaTimestr failed: unknown result");
  }

  public function selectKeysCclTime(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeysCclTime($keys, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeysCclTime();
  }

  public function send_selectKeysCclTime(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeysCclTime_args();
    $args->keys = $keys;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeysCclTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeysCclTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeysCclTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeysCclTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeysCclTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectKeysCclTime failed: unknown result");
  }

  public function selectKeysCclTimestr(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_selectKeysCclTimestr($keys, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_selectKeysCclTimestr();
  }

  public function send_selectKeysCclTimestr(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_selectKeysCclTimestr_args();
    $args->keys = $keys;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'selectKeysCclTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('selectKeysCclTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_selectKeysCclTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_selectKeysCclTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_selectKeysCclTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("selectKeysCclTimestr failed: unknown result");
  }

  public function getKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeyRecord($key, $record, $creds, $transaction, $environment);
    return $this->recv_getKeyRecord();
  }

  public function send_getKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeyRecord_args();
    $args->key = $key;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeyRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeyRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeyRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeyRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeyRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getKeyRecord failed: unknown result");
  }

  public function getKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeyRecordTime($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeyRecordTime();
  }

  public function send_getKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeyRecordTime_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeyRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeyRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeyRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeyRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeyRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getKeyRecordTime failed: unknown result");
  }

  public function getKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeyRecordTimestr($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeyRecordTimestr();
  }

  public function send_getKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeyRecordTimestr_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeyRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeyRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeyRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeyRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeyRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getKeyRecordTimestr failed: unknown result");
  }

  public function getKeysRecord(array $keys, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeysRecord($keys, $record, $creds, $transaction, $environment);
    return $this->recv_getKeysRecord();
  }

  public function send_getKeysRecord(array $keys, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeysRecord_args();
    $args->keys = $keys;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeysRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeysRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeysRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeysRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeysRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getKeysRecord failed: unknown result");
  }

  public function getKeysRecordTime(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeysRecordTime($keys, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeysRecordTime();
  }

  public function send_getKeysRecordTime(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeysRecordTime_args();
    $args->keys = $keys;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeysRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeysRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeysRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeysRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeysRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getKeysRecordTime failed: unknown result");
  }

  public function getKeysRecordTimestr(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeysRecordTimestr($keys, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeysRecordTimestr();
  }

  public function send_getKeysRecordTimestr(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeysRecordTimestr_args();
    $args->keys = $keys;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeysRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeysRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeysRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeysRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeysRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getKeysRecordTimestr failed: unknown result");
  }

  public function getKeysRecords(array $keys, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeysRecords($keys, $records, $creds, $transaction, $environment);
    return $this->recv_getKeysRecords();
  }

  public function send_getKeysRecords(array $keys, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeysRecords_args();
    $args->keys = $keys;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeysRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeysRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeysRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeysRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeysRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getKeysRecords failed: unknown result");
  }

  public function getKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeyRecords($key, $records, $creds, $transaction, $environment);
    return $this->recv_getKeyRecords();
  }

  public function send_getKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeyRecords_args();
    $args->key = $key;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeyRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeyRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeyRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeyRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeyRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getKeyRecords failed: unknown result");
  }

  public function getKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeyRecordsTime($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeyRecordsTime();
  }

  public function send_getKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeyRecordsTime_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeyRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeyRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeyRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeyRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeyRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getKeyRecordsTime failed: unknown result");
  }

  public function getKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeyRecordsTimestr($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeyRecordsTimestr();
  }

  public function send_getKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeyRecordsTimestr_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeyRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeyRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeyRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeyRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeyRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getKeyRecordsTimestr failed: unknown result");
  }

  public function getKeysRecordsTime(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeysRecordsTime($keys, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeysRecordsTime();
  }

  public function send_getKeysRecordsTime(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeysRecordsTime_args();
    $args->keys = $keys;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeysRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeysRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeysRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeysRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeysRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getKeysRecordsTime failed: unknown result");
  }

  public function getKeysRecordsTimestr(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeysRecordsTimestr($keys, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeysRecordsTimestr();
  }

  public function send_getKeysRecordsTimestr(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeysRecordsTimestr_args();
    $args->keys = $keys;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeysRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeysRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeysRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeysRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeysRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getKeysRecordsTimestr failed: unknown result");
  }

  public function getKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeyCriteria($key, $criteria, $creds, $transaction, $environment);
    return $this->recv_getKeyCriteria();
  }

  public function send_getKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeyCriteria_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeyCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeyCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeyCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeyCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeyCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getKeyCriteria failed: unknown result");
  }

  public function getCriteria(\concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getCriteria($criteria, $creds, $transaction, $environment);
    return $this->recv_getCriteria();
  }

  public function send_getCriteria(\concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getCriteria_args();
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getCriteria failed: unknown result");
  }

  public function getCcl($ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getCcl($ccl, $creds, $transaction, $environment);
    return $this->recv_getCcl();
  }

  public function send_getCcl($ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getCcl_args();
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getCcl failed: unknown result");
  }

  public function getCriteriaTime(\concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getCriteriaTime($criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getCriteriaTime();
  }

  public function send_getCriteriaTime(\concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getCriteriaTime_args();
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getCriteriaTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getCriteriaTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getCriteriaTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getCriteriaTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getCriteriaTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getCriteriaTime failed: unknown result");
  }

  public function getCriteriaTimestr(\concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getCriteriaTimestr($criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getCriteriaTimestr();
  }

  public function send_getCriteriaTimestr(\concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getCriteriaTimestr_args();
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getCriteriaTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getCriteriaTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getCriteriaTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getCriteriaTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getCriteriaTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getCriteriaTimestr failed: unknown result");
  }

  public function getCclTime($ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getCclTime($ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getCclTime();
  }

  public function send_getCclTime($ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getCclTime_args();
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getCclTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getCclTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getCclTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getCclTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getCclTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getCclTime failed: unknown result");
  }

  public function getCclTimestr($ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getCclTimestr($ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getCclTimestr();
  }

  public function send_getCclTimestr($ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getCclTimestr_args();
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getCclTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getCclTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getCclTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getCclTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getCclTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getCclTimestr failed: unknown result");
  }

  public function getKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeyCcl($key, $ccl, $creds, $transaction, $environment);
    return $this->recv_getKeyCcl();
  }

  public function send_getKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeyCcl_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeyCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeyCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeyCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeyCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeyCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getKeyCcl failed: unknown result");
  }

  public function getKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeyCriteriaTime($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeyCriteriaTime();
  }

  public function send_getKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeyCriteriaTime_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeyCriteriaTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeyCriteriaTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeyCriteriaTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeyCriteriaTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeyCriteriaTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getKeyCriteriaTime failed: unknown result");
  }

  public function getKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeyCriteriaTimestr($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeyCriteriaTimestr();
  }

  public function send_getKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeyCriteriaTimestr_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeyCriteriaTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeyCriteriaTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeyCriteriaTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeyCriteriaTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeyCriteriaTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getKeyCriteriaTimestr failed: unknown result");
  }

  public function getKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeyCclTime($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeyCclTime();
  }

  public function send_getKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeyCclTime_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeyCclTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeyCclTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeyCclTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeyCclTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeyCclTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getKeyCclTime failed: unknown result");
  }

  public function getKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeyCclTimestr($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeyCclTimestr();
  }

  public function send_getKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeyCclTimestr_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeyCclTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeyCclTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeyCclTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeyCclTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeyCclTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getKeyCclTimestr failed: unknown result");
  }

  public function getKeysCriteria(array $keys, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeysCriteria($keys, $criteria, $creds, $transaction, $environment);
    return $this->recv_getKeysCriteria();
  }

  public function send_getKeysCriteria(array $keys, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeysCriteria_args();
    $args->keys = $keys;
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeysCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeysCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeysCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeysCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeysCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getKeysCriteria failed: unknown result");
  }

  public function getKeysCcl(array $keys, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeysCcl($keys, $ccl, $creds, $transaction, $environment);
    return $this->recv_getKeysCcl();
  }

  public function send_getKeysCcl(array $keys, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeysCcl_args();
    $args->keys = $keys;
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeysCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeysCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeysCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeysCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeysCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getKeysCcl failed: unknown result");
  }

  public function getKeysCriteriaTime(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeysCriteriaTime($keys, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeysCriteriaTime();
  }

  public function send_getKeysCriteriaTime(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeysCriteriaTime_args();
    $args->keys = $keys;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeysCriteriaTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeysCriteriaTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeysCriteriaTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeysCriteriaTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeysCriteriaTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getKeysCriteriaTime failed: unknown result");
  }

  public function getKeysCriteriaTimestr(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeysCriteriaTimestr($keys, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeysCriteriaTimestr();
  }

  public function send_getKeysCriteriaTimestr(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeysCriteriaTimestr_args();
    $args->keys = $keys;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeysCriteriaTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeysCriteriaTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeysCriteriaTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeysCriteriaTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeysCriteriaTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getKeysCriteriaTimestr failed: unknown result");
  }

  public function getKeysCclTime(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeysCclTime($keys, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeysCclTime();
  }

  public function send_getKeysCclTime(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeysCclTime_args();
    $args->keys = $keys;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeysCclTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeysCclTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeysCclTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeysCclTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeysCclTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getKeysCclTime failed: unknown result");
  }

  public function getKeysCclTimestr(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_getKeysCclTimestr($keys, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_getKeysCclTimestr();
  }

  public function send_getKeysCclTimestr(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getKeysCclTimestr_args();
    $args->keys = $keys;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getKeysCclTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getKeysCclTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getKeysCclTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getKeysCclTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getKeysCclTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("getKeysCclTimestr failed: unknown result");
  }

  public function verifyKeyValueRecord($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_verifyKeyValueRecord($key, $value, $record, $creds, $transaction, $environment);
    return $this->recv_verifyKeyValueRecord();
  }

  public function send_verifyKeyValueRecord($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_verifyKeyValueRecord_args();
    $args->key = $key;
    $args->value = $value;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'verifyKeyValueRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('verifyKeyValueRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_verifyKeyValueRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_verifyKeyValueRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_verifyKeyValueRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("verifyKeyValueRecord failed: unknown result");
  }

  public function verifyKeyValueRecordTime($key, \concourse\thrift\data\TObject $value, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_verifyKeyValueRecordTime($key, $value, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_verifyKeyValueRecordTime();
  }

  public function send_verifyKeyValueRecordTime($key, \concourse\thrift\data\TObject $value, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_verifyKeyValueRecordTime_args();
    $args->key = $key;
    $args->value = $value;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'verifyKeyValueRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('verifyKeyValueRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_verifyKeyValueRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_verifyKeyValueRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_verifyKeyValueRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("verifyKeyValueRecordTime failed: unknown result");
  }

  public function verifyKeyValueRecordTimestr($key, \concourse\thrift\data\TObject $value, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_verifyKeyValueRecordTimestr($key, $value, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_verifyKeyValueRecordTimestr();
  }

  public function send_verifyKeyValueRecordTimestr($key, \concourse\thrift\data\TObject $value, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_verifyKeyValueRecordTimestr_args();
    $args->key = $key;
    $args->value = $value;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'verifyKeyValueRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('verifyKeyValueRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_verifyKeyValueRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_verifyKeyValueRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_verifyKeyValueRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("verifyKeyValueRecordTimestr failed: unknown result");
  }

  public function jsonifyRecords(array $records, $identifier, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_jsonifyRecords($records, $identifier, $creds, $transaction, $environment);
    return $this->recv_jsonifyRecords();
  }

  public function send_jsonifyRecords(array $records, $identifier, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_jsonifyRecords_args();
    $args->records = $records;
    $args->identifier = $identifier;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'jsonifyRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('jsonifyRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_jsonifyRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_jsonifyRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_jsonifyRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("jsonifyRecords failed: unknown result");
  }

  public function jsonifyRecordsTime(array $records, $timestamp, $identifier, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_jsonifyRecordsTime($records, $timestamp, $identifier, $creds, $transaction, $environment);
    return $this->recv_jsonifyRecordsTime();
  }

  public function send_jsonifyRecordsTime(array $records, $timestamp, $identifier, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_jsonifyRecordsTime_args();
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->identifier = $identifier;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'jsonifyRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('jsonifyRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_jsonifyRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_jsonifyRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_jsonifyRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("jsonifyRecordsTime failed: unknown result");
  }

  public function jsonifyRecordsTimestr(array $records, $timestamp, $identifier, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_jsonifyRecordsTimestr($records, $timestamp, $identifier, $creds, $transaction, $environment);
    return $this->recv_jsonifyRecordsTimestr();
  }

  public function send_jsonifyRecordsTimestr(array $records, $timestamp, $identifier, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_jsonifyRecordsTimestr_args();
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->identifier = $identifier;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'jsonifyRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('jsonifyRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_jsonifyRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_jsonifyRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_jsonifyRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("jsonifyRecordsTimestr failed: unknown result");
  }

  public function findCriteria(\concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_findCriteria($criteria, $creds, $transaction, $environment);
    return $this->recv_findCriteria();
  }

  public function send_findCriteria(\concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_findCriteria_args();
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'findCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('findCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_findCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_findCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_findCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("findCriteria failed: unknown result");
  }

  public function findCcl($ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_findCcl($ccl, $creds, $transaction, $environment);
    return $this->recv_findCcl();
  }

  public function send_findCcl($ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_findCcl_args();
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'findCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('findCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_findCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_findCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_findCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("findCcl failed: unknown result");
  }

  public function findKeyOperatorValues($key, $operator, array $values, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_findKeyOperatorValues($key, $operator, $values, $creds, $transaction, $environment);
    return $this->recv_findKeyOperatorValues();
  }

  public function send_findKeyOperatorValues($key, $operator, array $values, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_findKeyOperatorValues_args();
    $args->key = $key;
    $args->operator = $operator;
    $args->values = $values;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'findKeyOperatorValues', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('findKeyOperatorValues', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_findKeyOperatorValues()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_findKeyOperatorValues_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_findKeyOperatorValues_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("findKeyOperatorValues failed: unknown result");
  }

  public function findKeyOperatorValuesTime($key, $operator, array $values, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_findKeyOperatorValuesTime($key, $operator, $values, $timestamp, $creds, $transaction, $environment);
    return $this->recv_findKeyOperatorValuesTime();
  }

  public function send_findKeyOperatorValuesTime($key, $operator, array $values, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_findKeyOperatorValuesTime_args();
    $args->key = $key;
    $args->operator = $operator;
    $args->values = $values;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'findKeyOperatorValuesTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('findKeyOperatorValuesTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_findKeyOperatorValuesTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_findKeyOperatorValuesTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_findKeyOperatorValuesTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("findKeyOperatorValuesTime failed: unknown result");
  }

  public function findKeyOperatorValuesTimestr($key, $operator, array $values, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_findKeyOperatorValuesTimestr($key, $operator, $values, $timestamp, $creds, $transaction, $environment);
    return $this->recv_findKeyOperatorValuesTimestr();
  }

  public function send_findKeyOperatorValuesTimestr($key, $operator, array $values, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_findKeyOperatorValuesTimestr_args();
    $args->key = $key;
    $args->operator = $operator;
    $args->values = $values;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'findKeyOperatorValuesTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('findKeyOperatorValuesTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_findKeyOperatorValuesTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_findKeyOperatorValuesTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_findKeyOperatorValuesTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("findKeyOperatorValuesTimestr failed: unknown result");
  }

  public function findKeyOperatorstrValues($key, $operator, array $values, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_findKeyOperatorstrValues($key, $operator, $values, $creds, $transaction, $environment);
    return $this->recv_findKeyOperatorstrValues();
  }

  public function send_findKeyOperatorstrValues($key, $operator, array $values, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_findKeyOperatorstrValues_args();
    $args->key = $key;
    $args->operator = $operator;
    $args->values = $values;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'findKeyOperatorstrValues', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('findKeyOperatorstrValues', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_findKeyOperatorstrValues()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_findKeyOperatorstrValues_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_findKeyOperatorstrValues_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("findKeyOperatorstrValues failed: unknown result");
  }

  public function findKeyOperatorstrValuesTime($key, $operator, array $values, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_findKeyOperatorstrValuesTime($key, $operator, $values, $timestamp, $creds, $transaction, $environment);
    return $this->recv_findKeyOperatorstrValuesTime();
  }

  public function send_findKeyOperatorstrValuesTime($key, $operator, array $values, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_findKeyOperatorstrValuesTime_args();
    $args->key = $key;
    $args->operator = $operator;
    $args->values = $values;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'findKeyOperatorstrValuesTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('findKeyOperatorstrValuesTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_findKeyOperatorstrValuesTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_findKeyOperatorstrValuesTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_findKeyOperatorstrValuesTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("findKeyOperatorstrValuesTime failed: unknown result");
  }

  public function findKeyOperatorstrValuesTimestr($key, $operator, array $values, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_findKeyOperatorstrValuesTimestr($key, $operator, $values, $timestamp, $creds, $transaction, $environment);
    return $this->recv_findKeyOperatorstrValuesTimestr();
  }

  public function send_findKeyOperatorstrValuesTimestr($key, $operator, array $values, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_findKeyOperatorstrValuesTimestr_args();
    $args->key = $key;
    $args->operator = $operator;
    $args->values = $values;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'findKeyOperatorstrValuesTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('findKeyOperatorstrValuesTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_findKeyOperatorstrValuesTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_findKeyOperatorstrValuesTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_findKeyOperatorstrValuesTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("findKeyOperatorstrValuesTimestr failed: unknown result");
  }

  public function search($key, $query, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_search($key, $query, $creds, $transaction, $environment);
    return $this->recv_search();
  }

  public function send_search($key, $query, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_search_args();
    $args->key = $key;
    $args->query = $query;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'search', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('search', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_search()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_search_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_search_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("search failed: unknown result");
  }

  public function revertKeysRecordsTime(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_revertKeysRecordsTime($keys, $records, $timestamp, $creds, $transaction, $environment);
    $this->recv_revertKeysRecordsTime();
  }

  public function send_revertKeysRecordsTime(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_revertKeysRecordsTime_args();
    $args->keys = $keys;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'revertKeysRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('revertKeysRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_revertKeysRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_revertKeysRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_revertKeysRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    return;
  }

  public function revertKeysRecordsTimestr(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_revertKeysRecordsTimestr($keys, $records, $timestamp, $creds, $transaction, $environment);
    $this->recv_revertKeysRecordsTimestr();
  }

  public function send_revertKeysRecordsTimestr(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_revertKeysRecordsTimestr_args();
    $args->keys = $keys;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'revertKeysRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('revertKeysRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_revertKeysRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_revertKeysRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_revertKeysRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    return;
  }

  public function revertKeysRecordTime(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_revertKeysRecordTime($keys, $record, $timestamp, $creds, $transaction, $environment);
    $this->recv_revertKeysRecordTime();
  }

  public function send_revertKeysRecordTime(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_revertKeysRecordTime_args();
    $args->keys = $keys;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'revertKeysRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('revertKeysRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_revertKeysRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_revertKeysRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_revertKeysRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    return;
  }

  public function revertKeysRecordTimestr(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_revertKeysRecordTimestr($keys, $record, $timestamp, $creds, $transaction, $environment);
    $this->recv_revertKeysRecordTimestr();
  }

  public function send_revertKeysRecordTimestr(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_revertKeysRecordTimestr_args();
    $args->keys = $keys;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'revertKeysRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('revertKeysRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_revertKeysRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_revertKeysRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_revertKeysRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    return;
  }

  public function revertKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_revertKeyRecordsTime($key, $records, $timestamp, $creds, $transaction, $environment);
    $this->recv_revertKeyRecordsTime();
  }

  public function send_revertKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_revertKeyRecordsTime_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'revertKeyRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('revertKeyRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_revertKeyRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_revertKeyRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_revertKeyRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    return;
  }

  public function revertKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_revertKeyRecordsTimestr($key, $records, $timestamp, $creds, $transaction, $environment);
    $this->recv_revertKeyRecordsTimestr();
  }

  public function send_revertKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_revertKeyRecordsTimestr_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'revertKeyRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('revertKeyRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_revertKeyRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_revertKeyRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_revertKeyRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    return;
  }

  public function revertKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_revertKeyRecordTime($key, $record, $timestamp, $creds, $transaction, $environment);
    $this->recv_revertKeyRecordTime();
  }

  public function send_revertKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_revertKeyRecordTime_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'revertKeyRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('revertKeyRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_revertKeyRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_revertKeyRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_revertKeyRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    return;
  }

  public function revertKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_revertKeyRecordTimestr($key, $record, $timestamp, $creds, $transaction, $environment);
    $this->recv_revertKeyRecordTimestr();
  }

  public function send_revertKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_revertKeyRecordTimestr_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'revertKeyRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('revertKeyRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_revertKeyRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_revertKeyRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_revertKeyRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    return;
  }

  public function pingRecords(array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_pingRecords($records, $creds, $transaction, $environment);
    return $this->recv_pingRecords();
  }

  public function send_pingRecords(array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_pingRecords_args();
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'pingRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('pingRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_pingRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_pingRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_pingRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("pingRecords failed: unknown result");
  }

  public function pingRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_pingRecord($record, $creds, $transaction, $environment);
    return $this->recv_pingRecord();
  }

  public function send_pingRecord($record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_pingRecord_args();
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'pingRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('pingRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_pingRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_pingRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_pingRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("pingRecord failed: unknown result");
  }

  public function verifyAndSwap($key, \concourse\thrift\data\TObject $expected, $record, \concourse\thrift\data\TObject $replacement, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_verifyAndSwap($key, $expected, $record, $replacement, $creds, $transaction, $environment);
    return $this->recv_verifyAndSwap();
  }

  public function send_verifyAndSwap($key, \concourse\thrift\data\TObject $expected, $record, \concourse\thrift\data\TObject $replacement, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_verifyAndSwap_args();
    $args->key = $key;
    $args->expected = $expected;
    $args->record = $record;
    $args->replacement = $replacement;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'verifyAndSwap', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('verifyAndSwap', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_verifyAndSwap()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_verifyAndSwap_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_verifyAndSwap_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("verifyAndSwap failed: unknown result");
  }

  public function verifyOrSet($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_verifyOrSet($key, $value, $record, $creds, $transaction, $environment);
    $this->recv_verifyOrSet();
  }

  public function send_verifyOrSet($key, \concourse\thrift\data\TObject $value, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_verifyOrSet_args();
    $args->key = $key;
    $args->value = $value;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'verifyOrSet', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('verifyOrSet', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_verifyOrSet()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_verifyOrSet_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_verifyOrSet_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    return;
  }

  public function findOrAddKeyValue($key, \concourse\thrift\data\TObject $value, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_findOrAddKeyValue($key, $value, $creds, $transaction, $environment);
    return $this->recv_findOrAddKeyValue();
  }

  public function send_findOrAddKeyValue($key, \concourse\thrift\data\TObject $value, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_findOrAddKeyValue_args();
    $args->key = $key;
    $args->value = $value;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'findOrAddKeyValue', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('findOrAddKeyValue', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_findOrAddKeyValue()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_findOrAddKeyValue_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_findOrAddKeyValue_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    if ($result->ex4 !== null) {
      throw $result->ex4;
    }
    throw new \Exception("findOrAddKeyValue failed: unknown result");
  }

  public function findOrInsertCriteriaJson(\concourse\thrift\data\TCriteria $criteria, $json, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_findOrInsertCriteriaJson($criteria, $json, $creds, $transaction, $environment);
    return $this->recv_findOrInsertCriteriaJson();
  }

  public function send_findOrInsertCriteriaJson(\concourse\thrift\data\TCriteria $criteria, $json, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_findOrInsertCriteriaJson_args();
    $args->criteria = $criteria;
    $args->json = $json;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'findOrInsertCriteriaJson', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('findOrInsertCriteriaJson', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_findOrInsertCriteriaJson()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_findOrInsertCriteriaJson_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_findOrInsertCriteriaJson_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("findOrInsertCriteriaJson failed: unknown result");
  }

  public function findOrInsertCclJson($ccl, $json, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_findOrInsertCclJson($ccl, $json, $creds, $transaction, $environment);
    return $this->recv_findOrInsertCclJson();
  }

  public function send_findOrInsertCclJson($ccl, $json, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_findOrInsertCclJson_args();
    $args->ccl = $ccl;
    $args->json = $json;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'findOrInsertCclJson', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('findOrInsertCclJson', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_findOrInsertCclJson()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_findOrInsertCclJson_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_findOrInsertCclJson_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    if ($result->ex4 !== null) {
      throw $result->ex4;
    }
    throw new \Exception("findOrInsertCclJson failed: unknown result");
  }

  public function sumKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyRecord($key, $record, $creds, $transaction, $environment);
    return $this->recv_sumKeyRecord();
  }

  public function send_sumKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyRecord_args();
    $args->key = $key;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("sumKeyRecord failed: unknown result");
  }

  public function sumKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyRecordTime($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_sumKeyRecordTime();
  }

  public function send_sumKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyRecordTime_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("sumKeyRecordTime failed: unknown result");
  }

  public function sumKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyRecordTimestr($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_sumKeyRecordTimestr();
  }

  public function send_sumKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyRecordTimestr_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("sumKeyRecordTimestr failed: unknown result");
  }

  public function sumKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyRecords($key, $records, $creds, $transaction, $environment);
    return $this->recv_sumKeyRecords();
  }

  public function send_sumKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyRecords_args();
    $args->key = $key;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("sumKeyRecords failed: unknown result");
  }

  public function sumKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyRecordsTime($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_sumKeyRecordsTime();
  }

  public function send_sumKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyRecordsTime_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("sumKeyRecordsTime failed: unknown result");
  }

  public function sumKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyRecordsTimestr($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_sumKeyRecordsTimestr();
  }

  public function send_sumKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyRecordsTimestr_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("sumKeyRecordsTimestr failed: unknown result");
  }

  public function sumKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKey($key, $creds, $transaction, $environment);
    return $this->recv_sumKey();
  }

  public function send_sumKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKey_args();
    $args->key = $key;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKey', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKey', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKey()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKey_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKey_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("sumKey failed: unknown result");
  }

  public function sumKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyTime($key, $timestamp, $creds, $transaction, $environment);
    return $this->recv_sumKeyTime();
  }

  public function send_sumKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyTime_args();
    $args->key = $key;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("sumKeyTime failed: unknown result");
  }

  public function sumKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyTimestr($key, $timestamp, $creds, $transaction, $environment);
    return $this->recv_sumKeyTimestr();
  }

  public function send_sumKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyTimestr_args();
    $args->key = $key;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("sumKeyTimestr failed: unknown result");
  }

  public function sumKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyCriteria($key, $criteria, $creds, $transaction, $environment);
    return $this->recv_sumKeyCriteria();
  }

  public function send_sumKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyCriteria_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("sumKeyCriteria failed: unknown result");
  }

  public function sumKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyCriteriaTime($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_sumKeyCriteriaTime();
  }

  public function send_sumKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyCriteriaTime_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyCriteriaTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyCriteriaTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyCriteriaTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyCriteriaTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyCriteriaTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("sumKeyCriteriaTime failed: unknown result");
  }

  public function sumKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyCriteriaTimestr($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_sumKeyCriteriaTimestr();
  }

  public function send_sumKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyCriteriaTimestr_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyCriteriaTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyCriteriaTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyCriteriaTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyCriteriaTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyCriteriaTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("sumKeyCriteriaTimestr failed: unknown result");
  }

  public function sumKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyCcl($key, $ccl, $creds, $transaction, $environment);
    return $this->recv_sumKeyCcl();
  }

  public function send_sumKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyCcl_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("sumKeyCcl failed: unknown result");
  }

  public function sumKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyCclTime($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_sumKeyCclTime();
  }

  public function send_sumKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyCclTime_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyCclTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyCclTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyCclTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyCclTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyCclTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("sumKeyCclTime failed: unknown result");
  }

  public function sumKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_sumKeyCclTimestr($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_sumKeyCclTimestr();
  }

  public function send_sumKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_sumKeyCclTimestr_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'sumKeyCclTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('sumKeyCclTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_sumKeyCclTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_sumKeyCclTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_sumKeyCclTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("sumKeyCclTimestr failed: unknown result");
  }

  public function averageKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyRecord($key, $record, $creds, $transaction, $environment);
    return $this->recv_averageKeyRecord();
  }

  public function send_averageKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyRecord_args();
    $args->key = $key;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("averageKeyRecord failed: unknown result");
  }

  public function averageKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyRecordTime($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_averageKeyRecordTime();
  }

  public function send_averageKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyRecordTime_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("averageKeyRecordTime failed: unknown result");
  }

  public function averageKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyRecordTimestr($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_averageKeyRecordTimestr();
  }

  public function send_averageKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyRecordTimestr_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("averageKeyRecordTimestr failed: unknown result");
  }

  public function averageKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyRecords($key, $records, $creds, $transaction, $environment);
    return $this->recv_averageKeyRecords();
  }

  public function send_averageKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyRecords_args();
    $args->key = $key;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("averageKeyRecords failed: unknown result");
  }

  public function averageKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyRecordsTime($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_averageKeyRecordsTime();
  }

  public function send_averageKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyRecordsTime_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("averageKeyRecordsTime failed: unknown result");
  }

  public function averageKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyRecordsTimestr($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_averageKeyRecordsTimestr();
  }

  public function send_averageKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyRecordsTimestr_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("averageKeyRecordsTimestr failed: unknown result");
  }

  public function averageKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKey($key, $creds, $transaction, $environment);
    return $this->recv_averageKey();
  }

  public function send_averageKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKey_args();
    $args->key = $key;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKey', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKey', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKey()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKey_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKey_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("averageKey failed: unknown result");
  }

  public function averageKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyTime($key, $timestamp, $creds, $transaction, $environment);
    return $this->recv_averageKeyTime();
  }

  public function send_averageKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyTime_args();
    $args->key = $key;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("averageKeyTime failed: unknown result");
  }

  public function averageKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyTimestr($key, $timestamp, $creds, $transaction, $environment);
    return $this->recv_averageKeyTimestr();
  }

  public function send_averageKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyTimestr_args();
    $args->key = $key;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("averageKeyTimestr failed: unknown result");
  }

  public function averageKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyCriteria($key, $criteria, $creds, $transaction, $environment);
    return $this->recv_averageKeyCriteria();
  }

  public function send_averageKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyCriteria_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("averageKeyCriteria failed: unknown result");
  }

  public function averageKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyCriteriaTime($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_averageKeyCriteriaTime();
  }

  public function send_averageKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyCriteriaTime_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyCriteriaTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyCriteriaTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyCriteriaTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyCriteriaTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyCriteriaTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("averageKeyCriteriaTime failed: unknown result");
  }

  public function averageKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyCriteriaTimestr($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_averageKeyCriteriaTimestr();
  }

  public function send_averageKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyCriteriaTimestr_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyCriteriaTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyCriteriaTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyCriteriaTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyCriteriaTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyCriteriaTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("averageKeyCriteriaTimestr failed: unknown result");
  }

  public function averageKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyCcl($key, $ccl, $creds, $transaction, $environment);
    return $this->recv_averageKeyCcl();
  }

  public function send_averageKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyCcl_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("averageKeyCcl failed: unknown result");
  }

  public function averageKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyCclTime($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_averageKeyCclTime();
  }

  public function send_averageKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyCclTime_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyCclTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyCclTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyCclTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyCclTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyCclTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("averageKeyCclTime failed: unknown result");
  }

  public function averageKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_averageKeyCclTimestr($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_averageKeyCclTimestr();
  }

  public function send_averageKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_averageKeyCclTimestr_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'averageKeyCclTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('averageKeyCclTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_averageKeyCclTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_averageKeyCclTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_averageKeyCclTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("averageKeyCclTimestr failed: unknown result");
  }

  public function countKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyRecord($key, $record, $creds, $transaction, $environment);
    return $this->recv_countKeyRecord();
  }

  public function send_countKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyRecord_args();
    $args->key = $key;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("countKeyRecord failed: unknown result");
  }

  public function countKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyRecordTime($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_countKeyRecordTime();
  }

  public function send_countKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyRecordTime_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("countKeyRecordTime failed: unknown result");
  }

  public function countKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyRecordTimestr($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_countKeyRecordTimestr();
  }

  public function send_countKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyRecordTimestr_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("countKeyRecordTimestr failed: unknown result");
  }

  public function countKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyRecords($key, $records, $creds, $transaction, $environment);
    return $this->recv_countKeyRecords();
  }

  public function send_countKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyRecords_args();
    $args->key = $key;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("countKeyRecords failed: unknown result");
  }

  public function countKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyRecordsTime($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_countKeyRecordsTime();
  }

  public function send_countKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyRecordsTime_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("countKeyRecordsTime failed: unknown result");
  }

  public function countKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyRecordsTimestr($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_countKeyRecordsTimestr();
  }

  public function send_countKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyRecordsTimestr_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("countKeyRecordsTimestr failed: unknown result");
  }

  public function countKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKey($key, $creds, $transaction, $environment);
    return $this->recv_countKey();
  }

  public function send_countKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKey_args();
    $args->key = $key;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKey', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKey', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKey()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKey_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKey_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("countKey failed: unknown result");
  }

  public function countKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyTime($key, $timestamp, $creds, $transaction, $environment);
    return $this->recv_countKeyTime();
  }

  public function send_countKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyTime_args();
    $args->key = $key;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("countKeyTime failed: unknown result");
  }

  public function countKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyTimestr($key, $timestamp, $creds, $transaction, $environment);
    return $this->recv_countKeyTimestr();
  }

  public function send_countKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyTimestr_args();
    $args->key = $key;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("countKeyTimestr failed: unknown result");
  }

  public function countKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyCriteria($key, $criteria, $creds, $transaction, $environment);
    return $this->recv_countKeyCriteria();
  }

  public function send_countKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyCriteria_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("countKeyCriteria failed: unknown result");
  }

  public function countKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyCriteriaTime($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_countKeyCriteriaTime();
  }

  public function send_countKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyCriteriaTime_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyCriteriaTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyCriteriaTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyCriteriaTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyCriteriaTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyCriteriaTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("countKeyCriteriaTime failed: unknown result");
  }

  public function countKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyCriteriaTimestr($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_countKeyCriteriaTimestr();
  }

  public function send_countKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyCriteriaTimestr_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyCriteriaTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyCriteriaTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyCriteriaTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyCriteriaTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyCriteriaTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("countKeyCriteriaTimestr failed: unknown result");
  }

  public function countKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyCcl($key, $ccl, $creds, $transaction, $environment);
    return $this->recv_countKeyCcl();
  }

  public function send_countKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyCcl_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("countKeyCcl failed: unknown result");
  }

  public function countKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyCclTime($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_countKeyCclTime();
  }

  public function send_countKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyCclTime_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyCclTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyCclTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyCclTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyCclTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyCclTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("countKeyCclTime failed: unknown result");
  }

  public function countKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_countKeyCclTimestr($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_countKeyCclTimestr();
  }

  public function send_countKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_countKeyCclTimestr_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'countKeyCclTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('countKeyCclTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_countKeyCclTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_countKeyCclTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_countKeyCclTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("countKeyCclTimestr failed: unknown result");
  }

  public function maxKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyRecord($key, $record, $creds, $transaction, $environment);
    return $this->recv_maxKeyRecord();
  }

  public function send_maxKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyRecord_args();
    $args->key = $key;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("maxKeyRecord failed: unknown result");
  }

  public function maxKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyRecordTime($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_maxKeyRecordTime();
  }

  public function send_maxKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyRecordTime_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("maxKeyRecordTime failed: unknown result");
  }

  public function maxKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyRecordTimestr($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_maxKeyRecordTimestr();
  }

  public function send_maxKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyRecordTimestr_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("maxKeyRecordTimestr failed: unknown result");
  }

  public function maxKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyRecords($key, $records, $creds, $transaction, $environment);
    return $this->recv_maxKeyRecords();
  }

  public function send_maxKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyRecords_args();
    $args->key = $key;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("maxKeyRecords failed: unknown result");
  }

  public function maxKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyRecordsTime($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_maxKeyRecordsTime();
  }

  public function send_maxKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyRecordsTime_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("maxKeyRecordsTime failed: unknown result");
  }

  public function maxKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyRecordsTimestr($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_maxKeyRecordsTimestr();
  }

  public function send_maxKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyRecordsTimestr_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("maxKeyRecordsTimestr failed: unknown result");
  }

  public function maxKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyCriteria($key, $criteria, $creds, $transaction, $environment);
    return $this->recv_maxKeyCriteria();
  }

  public function send_maxKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyCriteria_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("maxKeyCriteria failed: unknown result");
  }

  public function maxKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyCriteriaTime($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_maxKeyCriteriaTime();
  }

  public function send_maxKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyCriteriaTime_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyCriteriaTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyCriteriaTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyCriteriaTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyCriteriaTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyCriteriaTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("maxKeyCriteriaTime failed: unknown result");
  }

  public function maxKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyCriteriaTimestr($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_maxKeyCriteriaTimestr();
  }

  public function send_maxKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyCriteriaTimestr_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyCriteriaTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyCriteriaTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyCriteriaTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyCriteriaTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyCriteriaTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("maxKeyCriteriaTimestr failed: unknown result");
  }

  public function maxKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyCcl($key, $ccl, $creds, $transaction, $environment);
    return $this->recv_maxKeyCcl();
  }

  public function send_maxKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyCcl_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("maxKeyCcl failed: unknown result");
  }

  public function maxKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyCclTime($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_maxKeyCclTime();
  }

  public function send_maxKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyCclTime_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyCclTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyCclTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyCclTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyCclTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyCclTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("maxKeyCclTime failed: unknown result");
  }

  public function maxKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyCclTimestr($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_maxKeyCclTimestr();
  }

  public function send_maxKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyCclTimestr_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyCclTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyCclTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyCclTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyCclTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyCclTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("maxKeyCclTimestr failed: unknown result");
  }

  public function maxKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKey($key, $creds, $transaction, $environment);
    return $this->recv_maxKey();
  }

  public function send_maxKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKey_args();
    $args->key = $key;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKey', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKey', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKey()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKey_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKey_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("maxKey failed: unknown result");
  }

  public function maxKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyTime($key, $timestamp, $creds, $transaction, $environment);
    return $this->recv_maxKeyTime();
  }

  public function send_maxKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyTime_args();
    $args->key = $key;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("maxKeyTime failed: unknown result");
  }

  public function maxKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_maxKeyTimestr($key, $timestamp, $creds, $transaction, $environment);
    return $this->recv_maxKeyTimestr();
  }

  public function send_maxKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_maxKeyTimestr_args();
    $args->key = $key;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'maxKeyTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('maxKeyTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_maxKeyTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_maxKeyTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_maxKeyTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("maxKeyTimestr failed: unknown result");
  }

  public function minKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyRecord($key, $record, $creds, $transaction, $environment);
    return $this->recv_minKeyRecord();
  }

  public function send_minKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyRecord_args();
    $args->key = $key;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("minKeyRecord failed: unknown result");
  }

  public function minKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyRecordTime($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_minKeyRecordTime();
  }

  public function send_minKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyRecordTime_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("minKeyRecordTime failed: unknown result");
  }

  public function minKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyRecordTimestr($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_minKeyRecordTimestr();
  }

  public function send_minKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyRecordTimestr_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("minKeyRecordTimestr failed: unknown result");
  }

  public function minKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKey($key, $creds, $transaction, $environment);
    return $this->recv_minKey();
  }

  public function send_minKey($key, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKey_args();
    $args->key = $key;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKey', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKey', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKey()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKey_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKey_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("minKey failed: unknown result");
  }

  public function minKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyRecordsTime($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_minKeyRecordsTime();
  }

  public function send_minKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyRecordsTime_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("minKeyRecordsTime failed: unknown result");
  }

  public function minKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyRecordsTimestr($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_minKeyRecordsTimestr();
  }

  public function send_minKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyRecordsTimestr_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("minKeyRecordsTimestr failed: unknown result");
  }

  public function minKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyCriteria($key, $criteria, $creds, $transaction, $environment);
    return $this->recv_minKeyCriteria();
  }

  public function send_minKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyCriteria_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("minKeyCriteria failed: unknown result");
  }

  public function minKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyCriteriaTime($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_minKeyCriteriaTime();
  }

  public function send_minKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyCriteriaTime_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyCriteriaTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyCriteriaTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyCriteriaTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyCriteriaTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyCriteriaTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("minKeyCriteriaTime failed: unknown result");
  }

  public function minKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyCriteriaTimestr($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_minKeyCriteriaTimestr();
  }

  public function send_minKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyCriteriaTimestr_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyCriteriaTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyCriteriaTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyCriteriaTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyCriteriaTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyCriteriaTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("minKeyCriteriaTimestr failed: unknown result");
  }

  public function minKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyCcl($key, $ccl, $creds, $transaction, $environment);
    return $this->recv_minKeyCcl();
  }

  public function send_minKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyCcl_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("minKeyCcl failed: unknown result");
  }

  public function minKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyCclTime($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_minKeyCclTime();
  }

  public function send_minKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyCclTime_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyCclTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyCclTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyCclTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyCclTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyCclTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("minKeyCclTime failed: unknown result");
  }

  public function minKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyCclTimestr($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_minKeyCclTimestr();
  }

  public function send_minKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyCclTimestr_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyCclTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyCclTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyCclTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyCclTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyCclTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("minKeyCclTimestr failed: unknown result");
  }

  public function minKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyTime($key, $timestamp, $creds, $transaction, $environment);
    return $this->recv_minKeyTime();
  }

  public function send_minKeyTime($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyTime_args();
    $args->key = $key;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("minKeyTime failed: unknown result");
  }

  public function minKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyTimestr($key, $timestamp, $creds, $transaction, $environment);
    return $this->recv_minKeyTimestr();
  }

  public function send_minKeyTimestr($key, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyTimestr_args();
    $args->key = $key;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("minKeyTimestr failed: unknown result");
  }

  public function minKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_minKeyRecords($key, $records, $creds, $transaction, $environment);
    return $this->recv_minKeyRecords();
  }

  public function send_minKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_minKeyRecords_args();
    $args->key = $key;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'minKeyRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('minKeyRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_minKeyRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_minKeyRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_minKeyRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("minKeyRecords failed: unknown result");
  }

  public function navigateKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeyRecord($key, $record, $creds, $transaction, $environment);
    return $this->recv_navigateKeyRecord();
  }

  public function send_navigateKeyRecord($key, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeyRecord_args();
    $args->key = $key;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeyRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeyRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeyRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeyRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeyRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("navigateKeyRecord failed: unknown result");
  }

  public function navigateKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeyRecordTime($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeyRecordTime();
  }

  public function send_navigateKeyRecordTime($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeyRecordTime_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeyRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeyRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeyRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeyRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeyRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("navigateKeyRecordTime failed: unknown result");
  }

  public function navigateKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeyRecordTimestr($key, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeyRecordTimestr();
  }

  public function send_navigateKeyRecordTimestr($key, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeyRecordTimestr_args();
    $args->key = $key;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeyRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeyRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeyRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeyRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeyRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeyRecordTimestr failed: unknown result");
  }

  public function navigateKeysRecord(array $keys, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeysRecord($keys, $record, $creds, $transaction, $environment);
    return $this->recv_navigateKeysRecord();
  }

  public function send_navigateKeysRecord(array $keys, $record, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeysRecord_args();
    $args->keys = $keys;
    $args->record = $record;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeysRecord', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeysRecord', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeysRecord()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeysRecord_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeysRecord_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("navigateKeysRecord failed: unknown result");
  }

  public function navigateKeysRecordTime(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeysRecordTime($keys, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeysRecordTime();
  }

  public function send_navigateKeysRecordTime(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeysRecordTime_args();
    $args->keys = $keys;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeysRecordTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeysRecordTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeysRecordTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeysRecordTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeysRecordTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("navigateKeysRecordTime failed: unknown result");
  }

  public function navigateKeysRecordTimestr(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeysRecordTimestr($keys, $record, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeysRecordTimestr();
  }

  public function send_navigateKeysRecordTimestr(array $keys, $record, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeysRecordTimestr_args();
    $args->keys = $keys;
    $args->record = $record;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeysRecordTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeysRecordTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeysRecordTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeysRecordTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeysRecordTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeysRecordTimestr failed: unknown result");
  }

  public function navigateKeysRecords(array $keys, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeysRecords($keys, $records, $creds, $transaction, $environment);
    return $this->recv_navigateKeysRecords();
  }

  public function send_navigateKeysRecords(array $keys, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeysRecords_args();
    $args->keys = $keys;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeysRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeysRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeysRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeysRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeysRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("navigateKeysRecords failed: unknown result");
  }

  public function navigateKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeyRecords($key, $records, $creds, $transaction, $environment);
    return $this->recv_navigateKeyRecords();
  }

  public function send_navigateKeyRecords($key, array $records, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeyRecords_args();
    $args->key = $key;
    $args->records = $records;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeyRecords', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeyRecords', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeyRecords()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeyRecords_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeyRecords_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("navigateKeyRecords failed: unknown result");
  }

  public function navigateKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeyRecordsTime($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeyRecordsTime();
  }

  public function send_navigateKeyRecordsTime($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeyRecordsTime_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeyRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeyRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeyRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeyRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeyRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("navigateKeyRecordsTime failed: unknown result");
  }

  public function navigateKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeyRecordsTimestr($key, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeyRecordsTimestr();
  }

  public function send_navigateKeyRecordsTimestr($key, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeyRecordsTimestr_args();
    $args->key = $key;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeyRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeyRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeyRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeyRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeyRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeyRecordsTimestr failed: unknown result");
  }

  public function navigateKeysRecordsTime(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeysRecordsTime($keys, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeysRecordsTime();
  }

  public function send_navigateKeysRecordsTime(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeysRecordsTime_args();
    $args->keys = $keys;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeysRecordsTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeysRecordsTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeysRecordsTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeysRecordsTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeysRecordsTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("navigateKeysRecordsTime failed: unknown result");
  }

  public function navigateKeysRecordsTimestr(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeysRecordsTimestr($keys, $records, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeysRecordsTimestr();
  }

  public function send_navigateKeysRecordsTimestr(array $keys, array $records, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeysRecordsTimestr_args();
    $args->keys = $keys;
    $args->records = $records;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeysRecordsTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeysRecordsTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeysRecordsTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeysRecordsTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeysRecordsTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeysRecordsTimestr failed: unknown result");
  }

  public function navigateKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeyCcl($key, $ccl, $creds, $transaction, $environment);
    return $this->recv_navigateKeyCcl();
  }

  public function send_navigateKeyCcl($key, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeyCcl_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeyCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeyCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeyCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeyCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeyCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeyCcl failed: unknown result");
  }

  public function navigateKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeyCclTime($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeyCclTime();
  }

  public function send_navigateKeyCclTime($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeyCclTime_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeyCclTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeyCclTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeyCclTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeyCclTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeyCclTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeyCclTime failed: unknown result");
  }

  public function navigateKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeyCclTimestr($key, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeyCclTimestr();
  }

  public function send_navigateKeyCclTimestr($key, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeyCclTimestr_args();
    $args->key = $key;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeyCclTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeyCclTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeyCclTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeyCclTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeyCclTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeyCclTimestr failed: unknown result");
  }

  public function navigateKeysCcl(array $keys, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeysCcl($keys, $ccl, $creds, $transaction, $environment);
    return $this->recv_navigateKeysCcl();
  }

  public function send_navigateKeysCcl(array $keys, $ccl, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeysCcl_args();
    $args->keys = $keys;
    $args->ccl = $ccl;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeysCcl', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeysCcl', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeysCcl()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeysCcl_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeysCcl_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeysCcl failed: unknown result");
  }

  public function navigateKeysCclTime(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeysCclTime($keys, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeysCclTime();
  }

  public function send_navigateKeysCclTime(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeysCclTime_args();
    $args->keys = $keys;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeysCclTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeysCclTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeysCclTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeysCclTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeysCclTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeysCclTime failed: unknown result");
  }

  public function navigateKeysCclTimestr(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeysCclTimestr($keys, $ccl, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeysCclTimestr();
  }

  public function send_navigateKeysCclTimestr(array $keys, $ccl, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeysCclTimestr_args();
    $args->keys = $keys;
    $args->ccl = $ccl;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeysCclTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeysCclTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeysCclTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeysCclTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeysCclTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeysCclTimestr failed: unknown result");
  }

  public function navigateKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeyCriteria($key, $criteria, $creds, $transaction, $environment);
    return $this->recv_navigateKeyCriteria();
  }

  public function send_navigateKeyCriteria($key, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeyCriteria_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeyCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeyCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeyCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeyCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeyCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeyCriteria failed: unknown result");
  }

  public function navigateKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeyCriteriaTime($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeyCriteriaTime();
  }

  public function send_navigateKeyCriteriaTime($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeyCriteriaTime_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeyCriteriaTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeyCriteriaTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeyCriteriaTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeyCriteriaTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeyCriteriaTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeyCriteriaTime failed: unknown result");
  }

  public function navigateKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeyCriteriaTimestr($key, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeyCriteriaTimestr();
  }

  public function send_navigateKeyCriteriaTimestr($key, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeyCriteriaTimestr_args();
    $args->key = $key;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeyCriteriaTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeyCriteriaTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeyCriteriaTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeyCriteriaTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeyCriteriaTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeyCriteriaTimestr failed: unknown result");
  }

  public function navigateKeysCriteria(array $keys, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeysCriteria($keys, $criteria, $creds, $transaction, $environment);
    return $this->recv_navigateKeysCriteria();
  }

  public function send_navigateKeysCriteria(array $keys, \concourse\thrift\data\TCriteria $criteria, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeysCriteria_args();
    $args->keys = $keys;
    $args->criteria = $criteria;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeysCriteria', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeysCriteria', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeysCriteria()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeysCriteria_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeysCriteria_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeysCriteria failed: unknown result");
  }

  public function navigateKeysCriteriaTime(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeysCriteriaTime($keys, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeysCriteriaTime();
  }

  public function send_navigateKeysCriteriaTime(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeysCriteriaTime_args();
    $args->keys = $keys;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeysCriteriaTime', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeysCriteriaTime', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeysCriteriaTime()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeysCriteriaTime_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeysCriteriaTime_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeysCriteriaTime failed: unknown result");
  }

  public function navigateKeysCriteriaTimestr(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $this->send_navigateKeysCriteriaTimestr($keys, $criteria, $timestamp, $creds, $transaction, $environment);
    return $this->recv_navigateKeysCriteriaTimestr();
  }

  public function send_navigateKeysCriteriaTimestr(array $keys, \concourse\thrift\data\TCriteria $criteria, $timestamp, \concourse\thrift\shared\AccessToken $creds,  $transaction, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_navigateKeysCriteriaTimestr_args();
    $args->keys = $keys;
    $args->criteria = $criteria;
    $args->timestamp = $timestamp;
    $args->creds = $creds;
    $args->transaction = $transaction;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'navigateKeysCriteriaTimestr', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('navigateKeysCriteriaTimestr', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_navigateKeysCriteriaTimestr()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_navigateKeysCriteriaTimestr_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_navigateKeysCriteriaTimestr_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("navigateKeysCriteriaTimestr failed: unknown result");
  }

  public function getServerEnvironment(\concourse\thrift\shared\AccessToken $creds,  $token, $environment)
  {
    $this->send_getServerEnvironment($creds, $token, $environment);
    return $this->recv_getServerEnvironment();
  }

  public function send_getServerEnvironment(\concourse\thrift\shared\AccessToken $creds,  $token, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_getServerEnvironment_args();
    $args->creds = $creds;
    $args->token = $token;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getServerEnvironment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getServerEnvironment', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getServerEnvironment()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getServerEnvironment_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getServerEnvironment_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getServerEnvironment failed: unknown result");
  }

  public function getServerVersion()
  {
    $this->send_getServerVersion();
    return $this->recv_getServerVersion();
  }

  public function send_getServerVersion()
  {
    $args = new \concourse\thrift\ConcourseService_getServerVersion_args();
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'getServerVersion', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('getServerVersion', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_getServerVersion()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_getServerVersion_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_getServerVersion_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("getServerVersion failed: unknown result");
  }

  public function time(\concourse\thrift\shared\AccessToken $creds,  $token, $environment)
  {
    $this->send_time($creds, $token, $environment);
    return $this->recv_time();
  }

  public function send_time(\concourse\thrift\shared\AccessToken $creds,  $token, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_time_args();
    $args->creds = $creds;
    $args->token = $token;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'time', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('time', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_time()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_time_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_time_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    throw new \Exception("time failed: unknown result");
  }

  public function timePhrase($phrase, \concourse\thrift\shared\AccessToken $creds,  $token, $environment)
  {
    $this->send_timePhrase($phrase, $creds, $token, $environment);
    return $this->recv_timePhrase();
  }

  public function send_timePhrase($phrase, \concourse\thrift\shared\AccessToken $creds,  $token, $environment)
  {
    $args = new \concourse\thrift\ConcourseService_timePhrase_args();
    $args->phrase = $phrase;
    $args->creds = $creds;
    $args->token = $token;
    $args->environment = $environment;
    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
    if ($bin_accel)
    {
      thrift_protocol_write_binary($this->output_, 'timePhrase', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
    }
    else
    {
      $this->output_->writeMessageBegin('timePhrase', TMessageType::CALL, $this->seqid_);
      $args->write($this->output_);
      $this->output_->writeMessageEnd();
      $this->output_->getTransport()->flush();
    }
  }

  public function recv_timePhrase()
  {
    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\concourse\thrift\ConcourseService_timePhrase_result', $this->input_->isStrictRead());
    else
    {
      $rseqid = 0;
      $fname = null;
      $mtype = 0;

      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
      if ($mtype == TMessageType::EXCEPTION) {
        $x = new TApplicationException();
        $x->read($this->input_);
        $this->input_->readMessageEnd();
        throw $x;
      }
      $result = new \concourse\thrift\ConcourseService_timePhrase_result();
      $result->read($this->input_);
      $this->input_->readMessageEnd();
    }
    if ($result->success !== null) {
      return $result->success;
    }
    if ($result->ex !== null) {
      throw $result->ex;
    }
    if ($result->ex2 !== null) {
      throw $result->ex2;
    }
    if ($result->ex3 !== null) {
      throw $result->ex3;
    }
    throw new \Exception("timePhrase failed: unknown result");
  }

}

// HELPER FUNCTIONS AND STRUCTURES

class ConcourseService_abort_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        2 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        3 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_abort_args');
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 1);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 2);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 3);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_abort_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_abort_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_addKeyValue_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $value = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'value',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['value'])) {
        $this->value = $vals['value'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->value = new \concourse\thrift\data\TObject();
            $xfer += $this->value->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_addKeyValue_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->value !== null) {
      if (!is_object($this->value)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('value', TType::STRUCT, 2);
      $xfer += $this->value->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_addKeyValue_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\InvalidArgumentException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\InvalidArgumentException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\InvalidArgumentException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_addKeyValue_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_addKeyValueRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $value = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'value',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['value'])) {
        $this->value = $vals['value'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->value = new \concourse\thrift\data\TObject();
            $xfer += $this->value->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_addKeyValueRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->value !== null) {
      if (!is_object($this->value)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('value', TType::STRUCT, 2);
      $xfer += $this->value->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 3);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_addKeyValueRecord_result {
  static $_TSPEC;

  /**
   * @var bool
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\InvalidArgumentException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::BOOL,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\InvalidArgumentException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::BOOL) {
            $xfer += $input->readBool($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\InvalidArgumentException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_addKeyValueRecord_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
      $xfer += $output->writeBool($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_addKeyValueRecords_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $value = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'value',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['value'])) {
        $this->value = $vals['value'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->value = new \concourse\thrift\data\TObject();
            $xfer += $this->value->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size0 = 0;
            $_etype3 = 0;
            $xfer += $input->readListBegin($_etype3, $_size0);
            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
            {
              $elem5 = null;
              $xfer += $input->readI64($elem5);
              $this->records []= $elem5;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_addKeyValueRecords_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->value !== null) {
      if (!is_object($this->value)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('value', TType::STRUCT, 2);
      $xfer += $this->value->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 3);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter6)
          {
            $xfer += $output->writeI64($iter6);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_addKeyValueRecords_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\InvalidArgumentException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::BOOL,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::BOOL,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\InvalidArgumentException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size7 = 0;
            $_ktype8 = 0;
            $_vtype9 = 0;
            $xfer += $input->readMapBegin($_ktype8, $_vtype9, $_size7);
            for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
            {
              $key12 = 0;
              $val13 = false;
              $xfer += $input->readI64($key12);
              $xfer += $input->readBool($val13);
              $this->success[(!is_string($key12) && !is_integer($key12)) ? serialize($key12) : $key12] = $val13;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\InvalidArgumentException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_addKeyValueRecords_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::BOOL, count($this->success));
        {
          foreach ($this->success as $kiter14 => $viter15)
          {
            $xfer += $output->writeI64($kiter14);
            $xfer += $output->writeBool($viter15);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditRecord_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditRecord_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditRecord_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size16 = 0;
            $_ktype17 = 0;
            $_vtype18 = 0;
            $xfer += $input->readMapBegin($_ktype17, $_vtype18, $_size16);
            for ($_i20 = 0; $_i20 < $_size16; ++$_i20)
            {
              $key21 = 0;
              $val22 = '';
              $xfer += $input->readI64($key21);
              $xfer += $input->readString($val22);
              $this->success[(!is_string($key21) && !is_integer($key21)) ? serialize($key21) : $key21] = $val22;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditRecord_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter23 => $viter24)
          {
            $xfer += $output->writeI64($kiter23);
            $xfer += $output->writeString($viter24);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditRecordStart_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $start = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'start',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditRecordStart_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::I64, 2);
      $xfer += $output->writeI64($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditRecordStart_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size25 = 0;
            $_ktype26 = 0;
            $_vtype27 = 0;
            $xfer += $input->readMapBegin($_ktype26, $_vtype27, $_size25);
            for ($_i29 = 0; $_i29 < $_size25; ++$_i29)
            {
              $key30 = 0;
              $val31 = '';
              $xfer += $input->readI64($key30);
              $xfer += $input->readString($val31);
              $this->success[(!is_string($key30) && !is_integer($key30)) ? serialize($key30) : $key30] = $val31;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditRecordStart_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter32 => $viter33)
          {
            $xfer += $output->writeI64($kiter32);
            $xfer += $output->writeString($viter33);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditRecordStartstr_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $start = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'start',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditRecordStartstr_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::STRING, 2);
      $xfer += $output->writeString($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditRecordStartstr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size34 = 0;
            $_ktype35 = 0;
            $_vtype36 = 0;
            $xfer += $input->readMapBegin($_ktype35, $_vtype36, $_size34);
            for ($_i38 = 0; $_i38 < $_size34; ++$_i38)
            {
              $key39 = 0;
              $val40 = '';
              $xfer += $input->readI64($key39);
              $xfer += $input->readString($val40);
              $this->success[(!is_string($key39) && !is_integer($key39)) ? serialize($key39) : $key39] = $val40;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditRecordStartstr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter41 => $viter42)
          {
            $xfer += $output->writeI64($kiter41);
            $xfer += $output->writeString($viter42);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditRecordStartEnd_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $start = null;
  /**
   * @var int
   */
  public $tend = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'start',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'tend',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['tend'])) {
        $this->tend = $vals['tend'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->tend);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditRecordStartEnd_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::I64, 2);
      $xfer += $output->writeI64($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->tend !== null) {
      $xfer += $output->writeFieldBegin('tend', TType::I64, 3);
      $xfer += $output->writeI64($this->tend);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditRecordStartEnd_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size43 = 0;
            $_ktype44 = 0;
            $_vtype45 = 0;
            $xfer += $input->readMapBegin($_ktype44, $_vtype45, $_size43);
            for ($_i47 = 0; $_i47 < $_size43; ++$_i47)
            {
              $key48 = 0;
              $val49 = '';
              $xfer += $input->readI64($key48);
              $xfer += $input->readString($val49);
              $this->success[(!is_string($key48) && !is_integer($key48)) ? serialize($key48) : $key48] = $val49;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditRecordStartEnd_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter50 => $viter51)
          {
            $xfer += $output->writeI64($kiter50);
            $xfer += $output->writeString($viter51);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditRecordStartstrEndstr_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $start = null;
  /**
   * @var string
   */
  public $tend = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'start',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'tend',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['tend'])) {
        $this->tend = $vals['tend'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->tend);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditRecordStartstrEndstr_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::STRING, 2);
      $xfer += $output->writeString($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->tend !== null) {
      $xfer += $output->writeFieldBegin('tend', TType::STRING, 3);
      $xfer += $output->writeString($this->tend);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditRecordStartstrEndstr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size52 = 0;
            $_ktype53 = 0;
            $_vtype54 = 0;
            $xfer += $input->readMapBegin($_ktype53, $_vtype54, $_size52);
            for ($_i56 = 0; $_i56 < $_size52; ++$_i56)
            {
              $key57 = 0;
              $val58 = '';
              $xfer += $input->readI64($key57);
              $xfer += $input->readString($val58);
              $this->success[(!is_string($key57) && !is_integer($key57)) ? serialize($key57) : $key57] = $val58;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditRecordStartstrEndstr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter59 => $viter60)
          {
            $xfer += $output->writeI64($kiter59);
            $xfer += $output->writeString($viter60);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditKeyRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditKeyRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditKeyRecord_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size61 = 0;
            $_ktype62 = 0;
            $_vtype63 = 0;
            $xfer += $input->readMapBegin($_ktype62, $_vtype63, $_size61);
            for ($_i65 = 0; $_i65 < $_size61; ++$_i65)
            {
              $key66 = 0;
              $val67 = '';
              $xfer += $input->readI64($key66);
              $xfer += $input->readString($val67);
              $this->success[(!is_string($key66) && !is_integer($key66)) ? serialize($key66) : $key66] = $val67;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditKeyRecord_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter68 => $viter69)
          {
            $xfer += $output->writeI64($kiter68);
            $xfer += $output->writeString($viter69);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditKeyRecordStart_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $start = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'start',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditKeyRecordStart_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::I64, 3);
      $xfer += $output->writeI64($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditKeyRecordStart_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size70 = 0;
            $_ktype71 = 0;
            $_vtype72 = 0;
            $xfer += $input->readMapBegin($_ktype71, $_vtype72, $_size70);
            for ($_i74 = 0; $_i74 < $_size70; ++$_i74)
            {
              $key75 = 0;
              $val76 = '';
              $xfer += $input->readI64($key75);
              $xfer += $input->readString($val76);
              $this->success[(!is_string($key75) && !is_integer($key75)) ? serialize($key75) : $key75] = $val76;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditKeyRecordStart_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter77 => $viter78)
          {
            $xfer += $output->writeI64($kiter77);
            $xfer += $output->writeString($viter78);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditKeyRecordStartstr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $start = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'start',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditKeyRecordStartstr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::STRING, 3);
      $xfer += $output->writeString($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditKeyRecordStartstr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size79 = 0;
            $_ktype80 = 0;
            $_vtype81 = 0;
            $xfer += $input->readMapBegin($_ktype80, $_vtype81, $_size79);
            for ($_i83 = 0; $_i83 < $_size79; ++$_i83)
            {
              $key84 = 0;
              $val85 = '';
              $xfer += $input->readI64($key84);
              $xfer += $input->readString($val85);
              $this->success[(!is_string($key84) && !is_integer($key84)) ? serialize($key84) : $key84] = $val85;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditKeyRecordStartstr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter86 => $viter87)
          {
            $xfer += $output->writeI64($kiter86);
            $xfer += $output->writeString($viter87);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditKeyRecordStartEnd_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $start = null;
  /**
   * @var int
   */
  public $tend = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'start',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'tend',
          'type' => TType::I64,
          ),
        5 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        6 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        7 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['tend'])) {
        $this->tend = $vals['tend'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->tend);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditKeyRecordStartEnd_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::I64, 3);
      $xfer += $output->writeI64($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->tend !== null) {
      $xfer += $output->writeFieldBegin('tend', TType::I64, 4);
      $xfer += $output->writeI64($this->tend);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 5);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 6);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 7);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditKeyRecordStartEnd_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size88 = 0;
            $_ktype89 = 0;
            $_vtype90 = 0;
            $xfer += $input->readMapBegin($_ktype89, $_vtype90, $_size88);
            for ($_i92 = 0; $_i92 < $_size88; ++$_i92)
            {
              $key93 = 0;
              $val94 = '';
              $xfer += $input->readI64($key93);
              $xfer += $input->readString($val94);
              $this->success[(!is_string($key93) && !is_integer($key93)) ? serialize($key93) : $key93] = $val94;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditKeyRecordStartEnd_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter95 => $viter96)
          {
            $xfer += $output->writeI64($kiter95);
            $xfer += $output->writeString($viter96);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditKeyRecordStartstrEndstr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $start = null;
  /**
   * @var string
   */
  public $tend = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'start',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'tend',
          'type' => TType::STRING,
          ),
        5 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        6 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        7 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['tend'])) {
        $this->tend = $vals['tend'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->tend);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditKeyRecordStartstrEndstr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::STRING, 3);
      $xfer += $output->writeString($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->tend !== null) {
      $xfer += $output->writeFieldBegin('tend', TType::STRING, 4);
      $xfer += $output->writeString($this->tend);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 5);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 6);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 7);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_auditKeyRecordStartstrEndstr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRING,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size97 = 0;
            $_ktype98 = 0;
            $_vtype99 = 0;
            $xfer += $input->readMapBegin($_ktype98, $_vtype99, $_size97);
            for ($_i101 = 0; $_i101 < $_size97; ++$_i101)
            {
              $key102 = 0;
              $val103 = '';
              $xfer += $input->readI64($key102);
              $xfer += $input->readString($val103);
              $this->success[(!is_string($key102) && !is_integer($key102)) ? serialize($key102) : $key102] = $val103;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_auditKeyRecordStartstrEndstr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRING, count($this->success));
        {
          foreach ($this->success as $kiter104 => $viter105)
          {
            $xfer += $output->writeI64($kiter104);
            $xfer += $output->writeString($viter105);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_browseKey_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_browseKey_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_browseKey_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRUCT,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::I64,
            'elem' => array(
              'type' => TType::I64,
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size106 = 0;
            $_ktype107 = 0;
            $_vtype108 = 0;
            $xfer += $input->readMapBegin($_ktype107, $_vtype108, $_size106);
            for ($_i110 = 0; $_i110 < $_size106; ++$_i110)
            {
              $key111 = new \concourse\thrift\data\TObject();
              $val112 = array();
              $key111 = new \concourse\thrift\data\TObject();
              $xfer += $key111->read($input);
              $val112 = array();
              $_size113 = 0;
              $_etype116 = 0;
              $xfer += $input->readSetBegin($_etype116, $_size113);
              for ($_i117 = 0; $_i117 < $_size113; ++$_i117)
              {
                $elem118 = null;
                $xfer += $input->readI64($elem118);
                if (is_scalar($elem118)) {
                  $val112 []= $elem118;
                } else {
                  $val112 []= $elem118;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key111) && !is_integer($key111)) ? serialize($key111) : $key111] = $val112;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_browseKey_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRUCT, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter119 => $viter120)
          {
            $xfer += $kiter119->write($output);
            {
              $output->writeSetBegin(TType::I64, count($viter120));
              {
                foreach ($viter120 as $iter121 => $iter122)
                {
                  if (is_scalar($iter122)) {
                  $xfer += $output->writeI64($iter121);
                  } else {
                  $xfer += $output->writeI64($iter122);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_browseKeys_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size123 = 0;
            $_etype126 = 0;
            $xfer += $input->readListBegin($_etype126, $_size123);
            for ($_i127 = 0; $_i127 < $_size123; ++$_i127)
            {
              $elem128 = null;
              $xfer += $input->readString($elem128);
              $this->keys []= $elem128;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_browseKeys_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter129)
          {
            $xfer += $output->writeString($iter129);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_browseKeys_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRUCT,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::I64,
              'elem' => array(
                'type' => TType::I64,
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size130 = 0;
            $_ktype131 = 0;
            $_vtype132 = 0;
            $xfer += $input->readMapBegin($_ktype131, $_vtype132, $_size130);
            for ($_i134 = 0; $_i134 < $_size130; ++$_i134)
            {
              $key135 = '';
              $val136 = array();
              $xfer += $input->readString($key135);
              $val136 = array();
              $_size137 = 0;
              $_ktype138 = 0;
              $_vtype139 = 0;
              $xfer += $input->readMapBegin($_ktype138, $_vtype139, $_size137);
              for ($_i141 = 0; $_i141 < $_size137; ++$_i141)
              {
                $key142 = new \concourse\thrift\data\TObject();
                $val143 = array();
                $key142 = new \concourse\thrift\data\TObject();
                $xfer += $key142->read($input);
                $val143 = array();
                $_size144 = 0;
                $_etype147 = 0;
                $xfer += $input->readSetBegin($_etype147, $_size144);
                for ($_i148 = 0; $_i148 < $_size144; ++$_i148)
                {
                  $elem149 = null;
                  $xfer += $input->readI64($elem149);
                  if (is_scalar($elem149)) {
                    $val143 []= $elem149;
                  } else {
                    $val143 []= $elem149;
                  }
                }
                $xfer += $input->readSetEnd();
                $val136[(!is_string($key142) && !is_integer($key142)) ? serialize($key142) : $key142] = $val143;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key135) && !is_integer($key135)) ? serialize($key135) : $key135] = $val136;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_browseKeys_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter150 => $viter151)
          {
            $xfer += $output->writeString($kiter150);
            {
              $output->writeMapBegin(TType::STRUCT, TType::SET, count($viter151));
              {
                foreach ($viter151 as $kiter152 => $viter153)
                {
                  $xfer += $kiter152->write($output);
                  {
                    $output->writeSetBegin(TType::I64, count($viter153));
                    {
                      foreach ($viter153 as $iter154 => $iter155)
                      {
                        if (is_scalar($iter155)) {
                        $xfer += $output->writeI64($iter154);
                        } else {
                        $xfer += $output->writeI64($iter155);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_browseKeyTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_browseKeyTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_browseKeyTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRUCT,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::I64,
            'elem' => array(
              'type' => TType::I64,
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size156 = 0;
            $_ktype157 = 0;
            $_vtype158 = 0;
            $xfer += $input->readMapBegin($_ktype157, $_vtype158, $_size156);
            for ($_i160 = 0; $_i160 < $_size156; ++$_i160)
            {
              $key161 = new \concourse\thrift\data\TObject();
              $val162 = array();
              $key161 = new \concourse\thrift\data\TObject();
              $xfer += $key161->read($input);
              $val162 = array();
              $_size163 = 0;
              $_etype166 = 0;
              $xfer += $input->readSetBegin($_etype166, $_size163);
              for ($_i167 = 0; $_i167 < $_size163; ++$_i167)
              {
                $elem168 = null;
                $xfer += $input->readI64($elem168);
                if (is_scalar($elem168)) {
                  $val162 []= $elem168;
                } else {
                  $val162 []= $elem168;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key161) && !is_integer($key161)) ? serialize($key161) : $key161] = $val162;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_browseKeyTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRUCT, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter169 => $viter170)
          {
            $xfer += $kiter169->write($output);
            {
              $output->writeSetBegin(TType::I64, count($viter170));
              {
                foreach ($viter170 as $iter171 => $iter172)
                {
                  if (is_scalar($iter172)) {
                  $xfer += $output->writeI64($iter171);
                  } else {
                  $xfer += $output->writeI64($iter172);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_browseKeyTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_browseKeyTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_browseKeyTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRUCT,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::I64,
            'elem' => array(
              'type' => TType::I64,
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size173 = 0;
            $_ktype174 = 0;
            $_vtype175 = 0;
            $xfer += $input->readMapBegin($_ktype174, $_vtype175, $_size173);
            for ($_i177 = 0; $_i177 < $_size173; ++$_i177)
            {
              $key178 = new \concourse\thrift\data\TObject();
              $val179 = array();
              $key178 = new \concourse\thrift\data\TObject();
              $xfer += $key178->read($input);
              $val179 = array();
              $_size180 = 0;
              $_etype183 = 0;
              $xfer += $input->readSetBegin($_etype183, $_size180);
              for ($_i184 = 0; $_i184 < $_size180; ++$_i184)
              {
                $elem185 = null;
                $xfer += $input->readI64($elem185);
                if (is_scalar($elem185)) {
                  $val179 []= $elem185;
                } else {
                  $val179 []= $elem185;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key178) && !is_integer($key178)) ? serialize($key178) : $key178] = $val179;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_browseKeyTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRUCT, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter186 => $viter187)
          {
            $xfer += $kiter186->write($output);
            {
              $output->writeSetBegin(TType::I64, count($viter187));
              {
                foreach ($viter187 as $iter188 => $iter189)
                {
                  if (is_scalar($iter189)) {
                  $xfer += $output->writeI64($iter188);
                  } else {
                  $xfer += $output->writeI64($iter189);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_browseKeysTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size190 = 0;
            $_etype193 = 0;
            $xfer += $input->readListBegin($_etype193, $_size190);
            for ($_i194 = 0; $_i194 < $_size190; ++$_i194)
            {
              $elem195 = null;
              $xfer += $input->readString($elem195);
              $this->keys []= $elem195;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_browseKeysTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter196)
          {
            $xfer += $output->writeString($iter196);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_browseKeysTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRUCT,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::I64,
              'elem' => array(
                'type' => TType::I64,
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size197 = 0;
            $_ktype198 = 0;
            $_vtype199 = 0;
            $xfer += $input->readMapBegin($_ktype198, $_vtype199, $_size197);
            for ($_i201 = 0; $_i201 < $_size197; ++$_i201)
            {
              $key202 = '';
              $val203 = array();
              $xfer += $input->readString($key202);
              $val203 = array();
              $_size204 = 0;
              $_ktype205 = 0;
              $_vtype206 = 0;
              $xfer += $input->readMapBegin($_ktype205, $_vtype206, $_size204);
              for ($_i208 = 0; $_i208 < $_size204; ++$_i208)
              {
                $key209 = new \concourse\thrift\data\TObject();
                $val210 = array();
                $key209 = new \concourse\thrift\data\TObject();
                $xfer += $key209->read($input);
                $val210 = array();
                $_size211 = 0;
                $_etype214 = 0;
                $xfer += $input->readSetBegin($_etype214, $_size211);
                for ($_i215 = 0; $_i215 < $_size211; ++$_i215)
                {
                  $elem216 = null;
                  $xfer += $input->readI64($elem216);
                  if (is_scalar($elem216)) {
                    $val210 []= $elem216;
                  } else {
                    $val210 []= $elem216;
                  }
                }
                $xfer += $input->readSetEnd();
                $val203[(!is_string($key209) && !is_integer($key209)) ? serialize($key209) : $key209] = $val210;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key202) && !is_integer($key202)) ? serialize($key202) : $key202] = $val203;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_browseKeysTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter217 => $viter218)
          {
            $xfer += $output->writeString($kiter217);
            {
              $output->writeMapBegin(TType::STRUCT, TType::SET, count($viter218));
              {
                foreach ($viter218 as $kiter219 => $viter220)
                {
                  $xfer += $kiter219->write($output);
                  {
                    $output->writeSetBegin(TType::I64, count($viter220));
                    {
                      foreach ($viter220 as $iter221 => $iter222)
                      {
                        if (is_scalar($iter222)) {
                        $xfer += $output->writeI64($iter221);
                        } else {
                        $xfer += $output->writeI64($iter222);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_browseKeysTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size223 = 0;
            $_etype226 = 0;
            $xfer += $input->readListBegin($_etype226, $_size223);
            for ($_i227 = 0; $_i227 < $_size223; ++$_i227)
            {
              $elem228 = null;
              $xfer += $input->readString($elem228);
              $this->keys []= $elem228;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_browseKeysTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter229)
          {
            $xfer += $output->writeString($iter229);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_browseKeysTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRUCT,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::I64,
              'elem' => array(
                'type' => TType::I64,
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size230 = 0;
            $_ktype231 = 0;
            $_vtype232 = 0;
            $xfer += $input->readMapBegin($_ktype231, $_vtype232, $_size230);
            for ($_i234 = 0; $_i234 < $_size230; ++$_i234)
            {
              $key235 = '';
              $val236 = array();
              $xfer += $input->readString($key235);
              $val236 = array();
              $_size237 = 0;
              $_ktype238 = 0;
              $_vtype239 = 0;
              $xfer += $input->readMapBegin($_ktype238, $_vtype239, $_size237);
              for ($_i241 = 0; $_i241 < $_size237; ++$_i241)
              {
                $key242 = new \concourse\thrift\data\TObject();
                $val243 = array();
                $key242 = new \concourse\thrift\data\TObject();
                $xfer += $key242->read($input);
                $val243 = array();
                $_size244 = 0;
                $_etype247 = 0;
                $xfer += $input->readSetBegin($_etype247, $_size244);
                for ($_i248 = 0; $_i248 < $_size244; ++$_i248)
                {
                  $elem249 = null;
                  $xfer += $input->readI64($elem249);
                  if (is_scalar($elem249)) {
                    $val243 []= $elem249;
                  } else {
                    $val243 []= $elem249;
                  }
                }
                $xfer += $input->readSetEnd();
                $val236[(!is_string($key242) && !is_integer($key242)) ? serialize($key242) : $key242] = $val243;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key235) && !is_integer($key235)) ? serialize($key235) : $key235] = $val236;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_browseKeysTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter250 => $viter251)
          {
            $xfer += $output->writeString($kiter250);
            {
              $output->writeMapBegin(TType::STRUCT, TType::SET, count($viter251));
              {
                foreach ($viter251 as $kiter252 => $viter253)
                {
                  $xfer += $kiter252->write($output);
                  {
                    $output->writeSetBegin(TType::I64, count($viter253));
                    {
                      foreach ($viter253 as $iter254 => $iter255)
                      {
                        if (is_scalar($iter255)) {
                        $xfer += $output->writeI64($iter254);
                        } else {
                        $xfer += $output->writeI64($iter255);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_chronologizeKeyRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_chronologizeKeyRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_chronologizeKeyRecord_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size256 = 0;
            $_ktype257 = 0;
            $_vtype258 = 0;
            $xfer += $input->readMapBegin($_ktype257, $_vtype258, $_size256);
            for ($_i260 = 0; $_i260 < $_size256; ++$_i260)
            {
              $key261 = 0;
              $val262 = array();
              $xfer += $input->readI64($key261);
              $val262 = array();
              $_size263 = 0;
              $_etype266 = 0;
              $xfer += $input->readSetBegin($_etype266, $_size263);
              for ($_i267 = 0; $_i267 < $_size263; ++$_i267)
              {
                $elem268 = null;
                $elem268 = new \concourse\thrift\data\TObject();
                $xfer += $elem268->read($input);
                if (is_scalar($elem268)) {
                  $val262 []= $elem268;
                } else {
                  $val262 []= $elem268;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key261) && !is_integer($key261)) ? serialize($key261) : $key261] = $val262;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_chronologizeKeyRecord_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter269 => $viter270)
          {
            $xfer += $output->writeI64($kiter269);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter270));
              {
                foreach ($viter270 as $iter271 => $iter272)
                {
                  if (is_scalar($iter272)) {
                  $xfer += $iter271->write($output);
                  } else {
                  $xfer += $iter272->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_chronologizeKeyRecordStart_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $start = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'start',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_chronologizeKeyRecordStart_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::I64, 3);
      $xfer += $output->writeI64($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_chronologizeKeyRecordStart_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size273 = 0;
            $_ktype274 = 0;
            $_vtype275 = 0;
            $xfer += $input->readMapBegin($_ktype274, $_vtype275, $_size273);
            for ($_i277 = 0; $_i277 < $_size273; ++$_i277)
            {
              $key278 = 0;
              $val279 = array();
              $xfer += $input->readI64($key278);
              $val279 = array();
              $_size280 = 0;
              $_etype283 = 0;
              $xfer += $input->readSetBegin($_etype283, $_size280);
              for ($_i284 = 0; $_i284 < $_size280; ++$_i284)
              {
                $elem285 = null;
                $elem285 = new \concourse\thrift\data\TObject();
                $xfer += $elem285->read($input);
                if (is_scalar($elem285)) {
                  $val279 []= $elem285;
                } else {
                  $val279 []= $elem285;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key278) && !is_integer($key278)) ? serialize($key278) : $key278] = $val279;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_chronologizeKeyRecordStart_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter286 => $viter287)
          {
            $xfer += $output->writeI64($kiter286);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter287));
              {
                foreach ($viter287 as $iter288 => $iter289)
                {
                  if (is_scalar($iter289)) {
                  $xfer += $iter288->write($output);
                  } else {
                  $xfer += $iter289->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_chronologizeKeyRecordStartstr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $start = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'start',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_chronologizeKeyRecordStartstr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::STRING, 3);
      $xfer += $output->writeString($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_chronologizeKeyRecordStartstr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size290 = 0;
            $_ktype291 = 0;
            $_vtype292 = 0;
            $xfer += $input->readMapBegin($_ktype291, $_vtype292, $_size290);
            for ($_i294 = 0; $_i294 < $_size290; ++$_i294)
            {
              $key295 = 0;
              $val296 = array();
              $xfer += $input->readI64($key295);
              $val296 = array();
              $_size297 = 0;
              $_etype300 = 0;
              $xfer += $input->readSetBegin($_etype300, $_size297);
              for ($_i301 = 0; $_i301 < $_size297; ++$_i301)
              {
                $elem302 = null;
                $elem302 = new \concourse\thrift\data\TObject();
                $xfer += $elem302->read($input);
                if (is_scalar($elem302)) {
                  $val296 []= $elem302;
                } else {
                  $val296 []= $elem302;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key295) && !is_integer($key295)) ? serialize($key295) : $key295] = $val296;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_chronologizeKeyRecordStartstr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter303 => $viter304)
          {
            $xfer += $output->writeI64($kiter303);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter304));
              {
                foreach ($viter304 as $iter305 => $iter306)
                {
                  if (is_scalar($iter306)) {
                  $xfer += $iter305->write($output);
                  } else {
                  $xfer += $iter306->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_chronologizeKeyRecordStartEnd_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $start = null;
  /**
   * @var int
   */
  public $tend = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'start',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'tend',
          'type' => TType::I64,
          ),
        5 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        6 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        7 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['tend'])) {
        $this->tend = $vals['tend'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->tend);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_chronologizeKeyRecordStartEnd_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::I64, 3);
      $xfer += $output->writeI64($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->tend !== null) {
      $xfer += $output->writeFieldBegin('tend', TType::I64, 4);
      $xfer += $output->writeI64($this->tend);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 5);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 6);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 7);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_chronologizeKeyRecordStartEnd_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size307 = 0;
            $_ktype308 = 0;
            $_vtype309 = 0;
            $xfer += $input->readMapBegin($_ktype308, $_vtype309, $_size307);
            for ($_i311 = 0; $_i311 < $_size307; ++$_i311)
            {
              $key312 = 0;
              $val313 = array();
              $xfer += $input->readI64($key312);
              $val313 = array();
              $_size314 = 0;
              $_etype317 = 0;
              $xfer += $input->readSetBegin($_etype317, $_size314);
              for ($_i318 = 0; $_i318 < $_size314; ++$_i318)
              {
                $elem319 = null;
                $elem319 = new \concourse\thrift\data\TObject();
                $xfer += $elem319->read($input);
                if (is_scalar($elem319)) {
                  $val313 []= $elem319;
                } else {
                  $val313 []= $elem319;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key312) && !is_integer($key312)) ? serialize($key312) : $key312] = $val313;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_chronologizeKeyRecordStartEnd_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter320 => $viter321)
          {
            $xfer += $output->writeI64($kiter320);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter321));
              {
                foreach ($viter321 as $iter322 => $iter323)
                {
                  if (is_scalar($iter323)) {
                  $xfer += $iter322->write($output);
                  } else {
                  $xfer += $iter323->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_chronologizeKeyRecordStartstrEndstr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $start = null;
  /**
   * @var string
   */
  public $tend = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'start',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'tend',
          'type' => TType::STRING,
          ),
        5 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        6 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        7 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['tend'])) {
        $this->tend = $vals['tend'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->tend);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_chronologizeKeyRecordStartstrEndstr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::STRING, 3);
      $xfer += $output->writeString($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->tend !== null) {
      $xfer += $output->writeFieldBegin('tend', TType::STRING, 4);
      $xfer += $output->writeString($this->tend);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 5);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 6);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 7);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_chronologizeKeyRecordStartstrEndstr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size324 = 0;
            $_ktype325 = 0;
            $_vtype326 = 0;
            $xfer += $input->readMapBegin($_ktype325, $_vtype326, $_size324);
            for ($_i328 = 0; $_i328 < $_size324; ++$_i328)
            {
              $key329 = 0;
              $val330 = array();
              $xfer += $input->readI64($key329);
              $val330 = array();
              $_size331 = 0;
              $_etype334 = 0;
              $xfer += $input->readSetBegin($_etype334, $_size331);
              for ($_i335 = 0; $_i335 < $_size331; ++$_i335)
              {
                $elem336 = null;
                $elem336 = new \concourse\thrift\data\TObject();
                $xfer += $elem336->read($input);
                if (is_scalar($elem336)) {
                  $val330 []= $elem336;
                } else {
                  $val330 []= $elem336;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key329) && !is_integer($key329)) ? serialize($key329) : $key329] = $val330;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_chronologizeKeyRecordStartstrEndstr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter337 => $viter338)
          {
            $xfer += $output->writeI64($kiter337);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter338));
              {
                foreach ($viter338 as $iter339 => $iter340)
                {
                  if (is_scalar($iter340)) {
                  $xfer += $iter339->write($output);
                  } else {
                  $xfer += $iter340->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_clearRecord_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_clearRecord_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_clearRecord_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_clearRecord_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_clearRecords_args {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size341 = 0;
            $_etype344 = 0;
            $xfer += $input->readListBegin($_etype344, $_size341);
            for ($_i345 = 0; $_i345 < $_size341; ++$_i345)
            {
              $elem346 = null;
              $xfer += $input->readI64($elem346);
              $this->records []= $elem346;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_clearRecords_args');
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 1);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter347)
          {
            $xfer += $output->writeI64($iter347);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_clearRecords_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_clearRecords_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_clearKeyRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_clearKeyRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_clearKeyRecord_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_clearKeyRecord_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_clearKeysRecord_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size348 = 0;
            $_etype351 = 0;
            $xfer += $input->readListBegin($_etype351, $_size348);
            for ($_i352 = 0; $_i352 < $_size348; ++$_i352)
            {
              $elem353 = null;
              $xfer += $input->readString($elem353);
              $this->keys []= $elem353;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_clearKeysRecord_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter354)
          {
            $xfer += $output->writeString($iter354);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_clearKeysRecord_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_clearKeysRecord_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_clearKeyRecords_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size355 = 0;
            $_etype358 = 0;
            $xfer += $input->readListBegin($_etype358, $_size355);
            for ($_i359 = 0; $_i359 < $_size355; ++$_i359)
            {
              $elem360 = null;
              $xfer += $input->readI64($elem360);
              $this->records []= $elem360;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_clearKeyRecords_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter361)
          {
            $xfer += $output->writeI64($iter361);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_clearKeyRecords_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_clearKeyRecords_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_clearKeysRecords_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size362 = 0;
            $_etype365 = 0;
            $xfer += $input->readListBegin($_etype365, $_size362);
            for ($_i366 = 0; $_i366 < $_size362; ++$_i366)
            {
              $elem367 = null;
              $xfer += $input->readString($elem367);
              $this->keys []= $elem367;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size368 = 0;
            $_etype371 = 0;
            $xfer += $input->readListBegin($_etype371, $_size368);
            for ($_i372 = 0; $_i372 < $_size368; ++$_i372)
            {
              $elem373 = null;
              $xfer += $input->readI64($elem373);
              $this->records []= $elem373;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_clearKeysRecords_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter374)
          {
            $xfer += $output->writeString($iter374);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter375)
          {
            $xfer += $output->writeI64($iter375);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_clearKeysRecords_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_clearKeysRecords_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_commit_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        2 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        3 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_commit_args');
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 1);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 2);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 3);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_commit_result {
  static $_TSPEC;

  /**
   * @var bool
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::BOOL,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::BOOL) {
            $xfer += $input->readBool($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_commit_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
      $xfer += $output->writeBool($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describe_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        2 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        3 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describe_args');
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 1);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 2);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 3);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describe_result {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size376 = 0;
            $_etype379 = 0;
            $xfer += $input->readSetBegin($_etype379, $_size376);
            for ($_i380 = 0; $_i380 < $_size376; ++$_i380)
            {
              $elem381 = null;
              $xfer += $input->readString($elem381);
              if (is_scalar($elem381)) {
                $this->success []= $elem381;
              } else {
                $this->success []= $elem381;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describe_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::STRING, count($this->success));
        {
          foreach ($this->success as $iter382 => $iter383)
          {
            if (is_scalar($iter383)) {
            $xfer += $output->writeString($iter382);
            } else {
            $xfer += $output->writeString($iter383);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeTime_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeTime_args');
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 1);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeTime_result {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size384 = 0;
            $_etype387 = 0;
            $xfer += $input->readSetBegin($_etype387, $_size384);
            for ($_i388 = 0; $_i388 < $_size384; ++$_i388)
            {
              $elem389 = null;
              $xfer += $input->readString($elem389);
              if (is_scalar($elem389)) {
                $this->success []= $elem389;
              } else {
                $this->success []= $elem389;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::STRING, count($this->success));
        {
          foreach ($this->success as $iter390 => $iter391)
          {
            if (is_scalar($iter391)) {
            $xfer += $output->writeString($iter390);
            } else {
            $xfer += $output->writeString($iter391);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeTimestr_args');
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 1);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeTimestr_result {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size392 = 0;
            $_etype395 = 0;
            $xfer += $input->readSetBegin($_etype395, $_size392);
            for ($_i396 = 0; $_i396 < $_size392; ++$_i396)
            {
              $elem397 = null;
              $xfer += $input->readString($elem397);
              if (is_scalar($elem397)) {
                $this->success []= $elem397;
              } else {
                $this->success []= $elem397;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::STRING, count($this->success));
        {
          foreach ($this->success as $iter398 => $iter399)
          {
            if (is_scalar($iter399)) {
            $xfer += $output->writeString($iter398);
            } else {
            $xfer += $output->writeString($iter399);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeRecord_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeRecord_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeRecord_result {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size400 = 0;
            $_etype403 = 0;
            $xfer += $input->readSetBegin($_etype403, $_size400);
            for ($_i404 = 0; $_i404 < $_size400; ++$_i404)
            {
              $elem405 = null;
              $xfer += $input->readString($elem405);
              if (is_scalar($elem405)) {
                $this->success []= $elem405;
              } else {
                $this->success []= $elem405;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeRecord_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::STRING, count($this->success));
        {
          foreach ($this->success as $iter406 => $iter407)
          {
            if (is_scalar($iter407)) {
            $xfer += $output->writeString($iter406);
            } else {
            $xfer += $output->writeString($iter407);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeRecordTime_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeRecordTime_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeRecordTime_result {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size408 = 0;
            $_etype411 = 0;
            $xfer += $input->readSetBegin($_etype411, $_size408);
            for ($_i412 = 0; $_i412 < $_size408; ++$_i412)
            {
              $elem413 = null;
              $xfer += $input->readString($elem413);
              if (is_scalar($elem413)) {
                $this->success []= $elem413;
              } else {
                $this->success []= $elem413;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeRecordTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::STRING, count($this->success));
        {
          foreach ($this->success as $iter414 => $iter415)
          {
            if (is_scalar($iter415)) {
            $xfer += $output->writeString($iter414);
            } else {
            $xfer += $output->writeString($iter415);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeRecordTimestr_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size416 = 0;
            $_etype419 = 0;
            $xfer += $input->readSetBegin($_etype419, $_size416);
            for ($_i420 = 0; $_i420 < $_size416; ++$_i420)
            {
              $elem421 = null;
              $xfer += $input->readString($elem421);
              if (is_scalar($elem421)) {
                $this->success []= $elem421;
              } else {
                $this->success []= $elem421;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeRecordTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::STRING, count($this->success));
        {
          foreach ($this->success as $iter422 => $iter423)
          {
            if (is_scalar($iter423)) {
            $xfer += $output->writeString($iter422);
            } else {
            $xfer += $output->writeString($iter423);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeRecords_args {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size424 = 0;
            $_etype427 = 0;
            $xfer += $input->readListBegin($_etype427, $_size424);
            for ($_i428 = 0; $_i428 < $_size424; ++$_i428)
            {
              $elem429 = null;
              $xfer += $input->readI64($elem429);
              $this->records []= $elem429;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeRecords_args');
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 1);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter430)
          {
            $xfer += $output->writeI64($iter430);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeRecords_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRING,
            'elem' => array(
              'type' => TType::STRING,
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size431 = 0;
            $_ktype432 = 0;
            $_vtype433 = 0;
            $xfer += $input->readMapBegin($_ktype432, $_vtype433, $_size431);
            for ($_i435 = 0; $_i435 < $_size431; ++$_i435)
            {
              $key436 = 0;
              $val437 = array();
              $xfer += $input->readI64($key436);
              $val437 = array();
              $_size438 = 0;
              $_etype441 = 0;
              $xfer += $input->readSetBegin($_etype441, $_size438);
              for ($_i442 = 0; $_i442 < $_size438; ++$_i442)
              {
                $elem443 = null;
                $xfer += $input->readString($elem443);
                if (is_scalar($elem443)) {
                  $val437 []= $elem443;
                } else {
                  $val437 []= $elem443;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key436) && !is_integer($key436)) ? serialize($key436) : $key436] = $val437;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeRecords_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter444 => $viter445)
          {
            $xfer += $output->writeI64($kiter444);
            {
              $output->writeSetBegin(TType::STRING, count($viter445));
              {
                foreach ($viter445 as $iter446 => $iter447)
                {
                  if (is_scalar($iter447)) {
                  $xfer += $output->writeString($iter446);
                  } else {
                  $xfer += $output->writeString($iter447);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeRecordsTime_args {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size448 = 0;
            $_etype451 = 0;
            $xfer += $input->readListBegin($_etype451, $_size448);
            for ($_i452 = 0; $_i452 < $_size448; ++$_i452)
            {
              $elem453 = null;
              $xfer += $input->readI64($elem453);
              $this->records []= $elem453;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeRecordsTime_args');
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 1);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter454)
          {
            $xfer += $output->writeI64($iter454);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeRecordsTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRING,
            'elem' => array(
              'type' => TType::STRING,
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size455 = 0;
            $_ktype456 = 0;
            $_vtype457 = 0;
            $xfer += $input->readMapBegin($_ktype456, $_vtype457, $_size455);
            for ($_i459 = 0; $_i459 < $_size455; ++$_i459)
            {
              $key460 = 0;
              $val461 = array();
              $xfer += $input->readI64($key460);
              $val461 = array();
              $_size462 = 0;
              $_etype465 = 0;
              $xfer += $input->readSetBegin($_etype465, $_size462);
              for ($_i466 = 0; $_i466 < $_size462; ++$_i466)
              {
                $elem467 = null;
                $xfer += $input->readString($elem467);
                if (is_scalar($elem467)) {
                  $val461 []= $elem467;
                } else {
                  $val461 []= $elem467;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key460) && !is_integer($key460)) ? serialize($key460) : $key460] = $val461;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeRecordsTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter468 => $viter469)
          {
            $xfer += $output->writeI64($kiter468);
            {
              $output->writeSetBegin(TType::STRING, count($viter469));
              {
                foreach ($viter469 as $iter470 => $iter471)
                {
                  if (is_scalar($iter471)) {
                  $xfer += $output->writeString($iter470);
                  } else {
                  $xfer += $output->writeString($iter471);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size472 = 0;
            $_etype475 = 0;
            $xfer += $input->readListBegin($_etype475, $_size472);
            for ($_i476 = 0; $_i476 < $_size472; ++$_i476)
            {
              $elem477 = null;
              $xfer += $input->readI64($elem477);
              $this->records []= $elem477;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeRecordsTimestr_args');
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 1);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter478)
          {
            $xfer += $output->writeI64($iter478);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_describeRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRING,
            'elem' => array(
              'type' => TType::STRING,
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size479 = 0;
            $_ktype480 = 0;
            $_vtype481 = 0;
            $xfer += $input->readMapBegin($_ktype480, $_vtype481, $_size479);
            for ($_i483 = 0; $_i483 < $_size479; ++$_i483)
            {
              $key484 = 0;
              $val485 = array();
              $xfer += $input->readI64($key484);
              $val485 = array();
              $_size486 = 0;
              $_etype489 = 0;
              $xfer += $input->readSetBegin($_etype489, $_size486);
              for ($_i490 = 0; $_i490 < $_size486; ++$_i490)
              {
                $elem491 = null;
                $xfer += $input->readString($elem491);
                if (is_scalar($elem491)) {
                  $val485 []= $elem491;
                } else {
                  $val485 []= $elem491;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key484) && !is_integer($key484)) ? serialize($key484) : $key484] = $val485;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_describeRecordsTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter492 => $viter493)
          {
            $xfer += $output->writeI64($kiter492);
            {
              $output->writeSetBegin(TType::STRING, count($viter493));
              {
                foreach ($viter493 as $iter494 => $iter495)
                {
                  if (is_scalar($iter495)) {
                  $xfer += $output->writeString($iter494);
                  } else {
                  $xfer += $output->writeString($iter495);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffRecordStart_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $start = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'start',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffRecordStart_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::I64, 2);
      $xfer += $output->writeI64($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffRecordStart_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::I32,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::I32,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size496 = 0;
            $_ktype497 = 0;
            $_vtype498 = 0;
            $xfer += $input->readMapBegin($_ktype497, $_vtype498, $_size496);
            for ($_i500 = 0; $_i500 < $_size496; ++$_i500)
            {
              $key501 = '';
              $val502 = array();
              $xfer += $input->readString($key501);
              $val502 = array();
              $_size503 = 0;
              $_ktype504 = 0;
              $_vtype505 = 0;
              $xfer += $input->readMapBegin($_ktype504, $_vtype505, $_size503);
              for ($_i507 = 0; $_i507 < $_size503; ++$_i507)
              {
                $key508 = 0;
                $val509 = array();
                $xfer += $input->readI32($key508);
                $val509 = array();
                $_size510 = 0;
                $_etype513 = 0;
                $xfer += $input->readSetBegin($_etype513, $_size510);
                for ($_i514 = 0; $_i514 < $_size510; ++$_i514)
                {
                  $elem515 = null;
                  $elem515 = new \concourse\thrift\data\TObject();
                  $xfer += $elem515->read($input);
                  if (is_scalar($elem515)) {
                    $val509 []= $elem515;
                  } else {
                    $val509 []= $elem515;
                  }
                }
                $xfer += $input->readSetEnd();
                $val502[(!is_string($key508) && !is_integer($key508)) ? serialize($key508) : $key508] = $val509;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key501) && !is_integer($key501)) ? serialize($key501) : $key501] = $val502;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffRecordStart_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter516 => $viter517)
          {
            $xfer += $output->writeString($kiter516);
            {
              $output->writeMapBegin(TType::I32, TType::SET, count($viter517));
              {
                foreach ($viter517 as $kiter518 => $viter519)
                {
                  $xfer += $output->writeI32($kiter518);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter519));
                    {
                      foreach ($viter519 as $iter520 => $iter521)
                      {
                        if (is_scalar($iter521)) {
                        $xfer += $iter520->write($output);
                        } else {
                        $xfer += $iter521->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffRecordStartstr_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $start = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'start',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffRecordStartstr_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::STRING, 2);
      $xfer += $output->writeString($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffRecordStartstr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::I32,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::I32,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size522 = 0;
            $_ktype523 = 0;
            $_vtype524 = 0;
            $xfer += $input->readMapBegin($_ktype523, $_vtype524, $_size522);
            for ($_i526 = 0; $_i526 < $_size522; ++$_i526)
            {
              $key527 = '';
              $val528 = array();
              $xfer += $input->readString($key527);
              $val528 = array();
              $_size529 = 0;
              $_ktype530 = 0;
              $_vtype531 = 0;
              $xfer += $input->readMapBegin($_ktype530, $_vtype531, $_size529);
              for ($_i533 = 0; $_i533 < $_size529; ++$_i533)
              {
                $key534 = 0;
                $val535 = array();
                $xfer += $input->readI32($key534);
                $val535 = array();
                $_size536 = 0;
                $_etype539 = 0;
                $xfer += $input->readSetBegin($_etype539, $_size536);
                for ($_i540 = 0; $_i540 < $_size536; ++$_i540)
                {
                  $elem541 = null;
                  $elem541 = new \concourse\thrift\data\TObject();
                  $xfer += $elem541->read($input);
                  if (is_scalar($elem541)) {
                    $val535 []= $elem541;
                  } else {
                    $val535 []= $elem541;
                  }
                }
                $xfer += $input->readSetEnd();
                $val528[(!is_string($key534) && !is_integer($key534)) ? serialize($key534) : $key534] = $val535;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key527) && !is_integer($key527)) ? serialize($key527) : $key527] = $val528;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffRecordStartstr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter542 => $viter543)
          {
            $xfer += $output->writeString($kiter542);
            {
              $output->writeMapBegin(TType::I32, TType::SET, count($viter543));
              {
                foreach ($viter543 as $kiter544 => $viter545)
                {
                  $xfer += $output->writeI32($kiter544);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter545));
                    {
                      foreach ($viter545 as $iter546 => $iter547)
                      {
                        if (is_scalar($iter547)) {
                        $xfer += $iter546->write($output);
                        } else {
                        $xfer += $iter547->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffRecordStartEnd_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $start = null;
  /**
   * @var int
   */
  public $tend = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'start',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'tend',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['tend'])) {
        $this->tend = $vals['tend'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->tend);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffRecordStartEnd_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::I64, 2);
      $xfer += $output->writeI64($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->tend !== null) {
      $xfer += $output->writeFieldBegin('tend', TType::I64, 3);
      $xfer += $output->writeI64($this->tend);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffRecordStartEnd_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::I32,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::I32,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size548 = 0;
            $_ktype549 = 0;
            $_vtype550 = 0;
            $xfer += $input->readMapBegin($_ktype549, $_vtype550, $_size548);
            for ($_i552 = 0; $_i552 < $_size548; ++$_i552)
            {
              $key553 = '';
              $val554 = array();
              $xfer += $input->readString($key553);
              $val554 = array();
              $_size555 = 0;
              $_ktype556 = 0;
              $_vtype557 = 0;
              $xfer += $input->readMapBegin($_ktype556, $_vtype557, $_size555);
              for ($_i559 = 0; $_i559 < $_size555; ++$_i559)
              {
                $key560 = 0;
                $val561 = array();
                $xfer += $input->readI32($key560);
                $val561 = array();
                $_size562 = 0;
                $_etype565 = 0;
                $xfer += $input->readSetBegin($_etype565, $_size562);
                for ($_i566 = 0; $_i566 < $_size562; ++$_i566)
                {
                  $elem567 = null;
                  $elem567 = new \concourse\thrift\data\TObject();
                  $xfer += $elem567->read($input);
                  if (is_scalar($elem567)) {
                    $val561 []= $elem567;
                  } else {
                    $val561 []= $elem567;
                  }
                }
                $xfer += $input->readSetEnd();
                $val554[(!is_string($key560) && !is_integer($key560)) ? serialize($key560) : $key560] = $val561;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key553) && !is_integer($key553)) ? serialize($key553) : $key553] = $val554;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffRecordStartEnd_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter568 => $viter569)
          {
            $xfer += $output->writeString($kiter568);
            {
              $output->writeMapBegin(TType::I32, TType::SET, count($viter569));
              {
                foreach ($viter569 as $kiter570 => $viter571)
                {
                  $xfer += $output->writeI32($kiter570);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter571));
                    {
                      foreach ($viter571 as $iter572 => $iter573)
                      {
                        if (is_scalar($iter573)) {
                        $xfer += $iter572->write($output);
                        } else {
                        $xfer += $iter573->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffRecordStartstrEndstr_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $start = null;
  /**
   * @var string
   */
  public $tend = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'start',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'tend',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['tend'])) {
        $this->tend = $vals['tend'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->tend);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffRecordStartstrEndstr_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::STRING, 2);
      $xfer += $output->writeString($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->tend !== null) {
      $xfer += $output->writeFieldBegin('tend', TType::STRING, 3);
      $xfer += $output->writeString($this->tend);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffRecordStartstrEndstr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::I32,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::I32,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size574 = 0;
            $_ktype575 = 0;
            $_vtype576 = 0;
            $xfer += $input->readMapBegin($_ktype575, $_vtype576, $_size574);
            for ($_i578 = 0; $_i578 < $_size574; ++$_i578)
            {
              $key579 = '';
              $val580 = array();
              $xfer += $input->readString($key579);
              $val580 = array();
              $_size581 = 0;
              $_ktype582 = 0;
              $_vtype583 = 0;
              $xfer += $input->readMapBegin($_ktype582, $_vtype583, $_size581);
              for ($_i585 = 0; $_i585 < $_size581; ++$_i585)
              {
                $key586 = 0;
                $val587 = array();
                $xfer += $input->readI32($key586);
                $val587 = array();
                $_size588 = 0;
                $_etype591 = 0;
                $xfer += $input->readSetBegin($_etype591, $_size588);
                for ($_i592 = 0; $_i592 < $_size588; ++$_i592)
                {
                  $elem593 = null;
                  $elem593 = new \concourse\thrift\data\TObject();
                  $xfer += $elem593->read($input);
                  if (is_scalar($elem593)) {
                    $val587 []= $elem593;
                  } else {
                    $val587 []= $elem593;
                  }
                }
                $xfer += $input->readSetEnd();
                $val580[(!is_string($key586) && !is_integer($key586)) ? serialize($key586) : $key586] = $val587;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key579) && !is_integer($key579)) ? serialize($key579) : $key579] = $val580;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffRecordStartstrEndstr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter594 => $viter595)
          {
            $xfer += $output->writeString($kiter594);
            {
              $output->writeMapBegin(TType::I32, TType::SET, count($viter595));
              {
                foreach ($viter595 as $kiter596 => $viter597)
                {
                  $xfer += $output->writeI32($kiter596);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter597));
                    {
                      foreach ($viter597 as $iter598 => $iter599)
                      {
                        if (is_scalar($iter599)) {
                        $xfer += $iter598->write($output);
                        } else {
                        $xfer += $iter599->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyRecordStart_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $start = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'start',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyRecordStart_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::I64, 3);
      $xfer += $output->writeI64($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyRecordStart_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I32,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I32,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size600 = 0;
            $_ktype601 = 0;
            $_vtype602 = 0;
            $xfer += $input->readMapBegin($_ktype601, $_vtype602, $_size600);
            for ($_i604 = 0; $_i604 < $_size600; ++$_i604)
            {
              $key605 = 0;
              $val606 = array();
              $xfer += $input->readI32($key605);
              $val606 = array();
              $_size607 = 0;
              $_etype610 = 0;
              $xfer += $input->readSetBegin($_etype610, $_size607);
              for ($_i611 = 0; $_i611 < $_size607; ++$_i611)
              {
                $elem612 = null;
                $elem612 = new \concourse\thrift\data\TObject();
                $xfer += $elem612->read($input);
                if (is_scalar($elem612)) {
                  $val606 []= $elem612;
                } else {
                  $val606 []= $elem612;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key605) && !is_integer($key605)) ? serialize($key605) : $key605] = $val606;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyRecordStart_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I32, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter613 => $viter614)
          {
            $xfer += $output->writeI32($kiter613);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter614));
              {
                foreach ($viter614 as $iter615 => $iter616)
                {
                  if (is_scalar($iter616)) {
                  $xfer += $iter615->write($output);
                  } else {
                  $xfer += $iter616->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyRecordStartstr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $start = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'start',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyRecordStartstr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::STRING, 3);
      $xfer += $output->writeString($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyRecordStartstr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I32,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I32,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size617 = 0;
            $_ktype618 = 0;
            $_vtype619 = 0;
            $xfer += $input->readMapBegin($_ktype618, $_vtype619, $_size617);
            for ($_i621 = 0; $_i621 < $_size617; ++$_i621)
            {
              $key622 = 0;
              $val623 = array();
              $xfer += $input->readI32($key622);
              $val623 = array();
              $_size624 = 0;
              $_etype627 = 0;
              $xfer += $input->readSetBegin($_etype627, $_size624);
              for ($_i628 = 0; $_i628 < $_size624; ++$_i628)
              {
                $elem629 = null;
                $elem629 = new \concourse\thrift\data\TObject();
                $xfer += $elem629->read($input);
                if (is_scalar($elem629)) {
                  $val623 []= $elem629;
                } else {
                  $val623 []= $elem629;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key622) && !is_integer($key622)) ? serialize($key622) : $key622] = $val623;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyRecordStartstr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I32, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter630 => $viter631)
          {
            $xfer += $output->writeI32($kiter630);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter631));
              {
                foreach ($viter631 as $iter632 => $iter633)
                {
                  if (is_scalar($iter633)) {
                  $xfer += $iter632->write($output);
                  } else {
                  $xfer += $iter633->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyRecordStartEnd_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $start = null;
  /**
   * @var int
   */
  public $tend = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'start',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'tend',
          'type' => TType::I64,
          ),
        5 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        6 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        7 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['tend'])) {
        $this->tend = $vals['tend'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->tend);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyRecordStartEnd_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::I64, 3);
      $xfer += $output->writeI64($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->tend !== null) {
      $xfer += $output->writeFieldBegin('tend', TType::I64, 4);
      $xfer += $output->writeI64($this->tend);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 5);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 6);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 7);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyRecordStartEnd_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I32,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I32,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size634 = 0;
            $_ktype635 = 0;
            $_vtype636 = 0;
            $xfer += $input->readMapBegin($_ktype635, $_vtype636, $_size634);
            for ($_i638 = 0; $_i638 < $_size634; ++$_i638)
            {
              $key639 = 0;
              $val640 = array();
              $xfer += $input->readI32($key639);
              $val640 = array();
              $_size641 = 0;
              $_etype644 = 0;
              $xfer += $input->readSetBegin($_etype644, $_size641);
              for ($_i645 = 0; $_i645 < $_size641; ++$_i645)
              {
                $elem646 = null;
                $elem646 = new \concourse\thrift\data\TObject();
                $xfer += $elem646->read($input);
                if (is_scalar($elem646)) {
                  $val640 []= $elem646;
                } else {
                  $val640 []= $elem646;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key639) && !is_integer($key639)) ? serialize($key639) : $key639] = $val640;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyRecordStartEnd_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I32, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter647 => $viter648)
          {
            $xfer += $output->writeI32($kiter647);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter648));
              {
                foreach ($viter648 as $iter649 => $iter650)
                {
                  if (is_scalar($iter650)) {
                  $xfer += $iter649->write($output);
                  } else {
                  $xfer += $iter650->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyRecordStartstrEndstr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $start = null;
  /**
   * @var string
   */
  public $tend = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'start',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'tend',
          'type' => TType::STRING,
          ),
        5 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        6 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        7 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['tend'])) {
        $this->tend = $vals['tend'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->tend);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyRecordStartstrEndstr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::STRING, 3);
      $xfer += $output->writeString($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->tend !== null) {
      $xfer += $output->writeFieldBegin('tend', TType::STRING, 4);
      $xfer += $output->writeString($this->tend);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 5);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 6);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 7);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyRecordStartstrEndstr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I32,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I32,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size651 = 0;
            $_ktype652 = 0;
            $_vtype653 = 0;
            $xfer += $input->readMapBegin($_ktype652, $_vtype653, $_size651);
            for ($_i655 = 0; $_i655 < $_size651; ++$_i655)
            {
              $key656 = 0;
              $val657 = array();
              $xfer += $input->readI32($key656);
              $val657 = array();
              $_size658 = 0;
              $_etype661 = 0;
              $xfer += $input->readSetBegin($_etype661, $_size658);
              for ($_i662 = 0; $_i662 < $_size658; ++$_i662)
              {
                $elem663 = null;
                $elem663 = new \concourse\thrift\data\TObject();
                $xfer += $elem663->read($input);
                if (is_scalar($elem663)) {
                  $val657 []= $elem663;
                } else {
                  $val657 []= $elem663;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key656) && !is_integer($key656)) ? serialize($key656) : $key656] = $val657;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyRecordStartstrEndstr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I32, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter664 => $viter665)
          {
            $xfer += $output->writeI32($kiter664);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter665));
              {
                foreach ($viter665 as $iter666 => $iter667)
                {
                  if (is_scalar($iter667)) {
                  $xfer += $iter666->write($output);
                  } else {
                  $xfer += $iter667->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyStart_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $start = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'start',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyStart_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::I64, 2);
      $xfer += $output->writeI64($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyStart_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRUCT,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::I32,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::I32,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::I64,
              'elem' => array(
                'type' => TType::I64,
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size668 = 0;
            $_ktype669 = 0;
            $_vtype670 = 0;
            $xfer += $input->readMapBegin($_ktype669, $_vtype670, $_size668);
            for ($_i672 = 0; $_i672 < $_size668; ++$_i672)
            {
              $key673 = new \concourse\thrift\data\TObject();
              $val674 = array();
              $key673 = new \concourse\thrift\data\TObject();
              $xfer += $key673->read($input);
              $val674 = array();
              $_size675 = 0;
              $_ktype676 = 0;
              $_vtype677 = 0;
              $xfer += $input->readMapBegin($_ktype676, $_vtype677, $_size675);
              for ($_i679 = 0; $_i679 < $_size675; ++$_i679)
              {
                $key680 = 0;
                $val681 = array();
                $xfer += $input->readI32($key680);
                $val681 = array();
                $_size682 = 0;
                $_etype685 = 0;
                $xfer += $input->readSetBegin($_etype685, $_size682);
                for ($_i686 = 0; $_i686 < $_size682; ++$_i686)
                {
                  $elem687 = null;
                  $xfer += $input->readI64($elem687);
                  if (is_scalar($elem687)) {
                    $val681 []= $elem687;
                  } else {
                    $val681 []= $elem687;
                  }
                }
                $xfer += $input->readSetEnd();
                $val674[(!is_string($key680) && !is_integer($key680)) ? serialize($key680) : $key680] = $val681;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key673) && !is_integer($key673)) ? serialize($key673) : $key673] = $val674;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyStart_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRUCT, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter688 => $viter689)
          {
            $xfer += $kiter688->write($output);
            {
              $output->writeMapBegin(TType::I32, TType::SET, count($viter689));
              {
                foreach ($viter689 as $kiter690 => $viter691)
                {
                  $xfer += $output->writeI32($kiter690);
                  {
                    $output->writeSetBegin(TType::I64, count($viter691));
                    {
                      foreach ($viter691 as $iter692 => $iter693)
                      {
                        if (is_scalar($iter693)) {
                        $xfer += $output->writeI64($iter692);
                        } else {
                        $xfer += $output->writeI64($iter693);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyStartstr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $start = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'start',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyStartstr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::STRING, 2);
      $xfer += $output->writeString($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyStartstr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRUCT,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::I32,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::I32,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::I64,
              'elem' => array(
                'type' => TType::I64,
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size694 = 0;
            $_ktype695 = 0;
            $_vtype696 = 0;
            $xfer += $input->readMapBegin($_ktype695, $_vtype696, $_size694);
            for ($_i698 = 0; $_i698 < $_size694; ++$_i698)
            {
              $key699 = new \concourse\thrift\data\TObject();
              $val700 = array();
              $key699 = new \concourse\thrift\data\TObject();
              $xfer += $key699->read($input);
              $val700 = array();
              $_size701 = 0;
              $_ktype702 = 0;
              $_vtype703 = 0;
              $xfer += $input->readMapBegin($_ktype702, $_vtype703, $_size701);
              for ($_i705 = 0; $_i705 < $_size701; ++$_i705)
              {
                $key706 = 0;
                $val707 = array();
                $xfer += $input->readI32($key706);
                $val707 = array();
                $_size708 = 0;
                $_etype711 = 0;
                $xfer += $input->readSetBegin($_etype711, $_size708);
                for ($_i712 = 0; $_i712 < $_size708; ++$_i712)
                {
                  $elem713 = null;
                  $xfer += $input->readI64($elem713);
                  if (is_scalar($elem713)) {
                    $val707 []= $elem713;
                  } else {
                    $val707 []= $elem713;
                  }
                }
                $xfer += $input->readSetEnd();
                $val700[(!is_string($key706) && !is_integer($key706)) ? serialize($key706) : $key706] = $val707;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key699) && !is_integer($key699)) ? serialize($key699) : $key699] = $val700;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyStartstr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRUCT, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter714 => $viter715)
          {
            $xfer += $kiter714->write($output);
            {
              $output->writeMapBegin(TType::I32, TType::SET, count($viter715));
              {
                foreach ($viter715 as $kiter716 => $viter717)
                {
                  $xfer += $output->writeI32($kiter716);
                  {
                    $output->writeSetBegin(TType::I64, count($viter717));
                    {
                      foreach ($viter717 as $iter718 => $iter719)
                      {
                        if (is_scalar($iter719)) {
                        $xfer += $output->writeI64($iter718);
                        } else {
                        $xfer += $output->writeI64($iter719);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyStartEnd_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $start = null;
  /**
   * @var int
   */
  public $tend = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'start',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'tend',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['tend'])) {
        $this->tend = $vals['tend'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->tend);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyStartEnd_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::I64, 2);
      $xfer += $output->writeI64($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->tend !== null) {
      $xfer += $output->writeFieldBegin('tend', TType::I64, 3);
      $xfer += $output->writeI64($this->tend);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyStartEnd_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRUCT,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::I32,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::I32,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::I64,
              'elem' => array(
                'type' => TType::I64,
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size720 = 0;
            $_ktype721 = 0;
            $_vtype722 = 0;
            $xfer += $input->readMapBegin($_ktype721, $_vtype722, $_size720);
            for ($_i724 = 0; $_i724 < $_size720; ++$_i724)
            {
              $key725 = new \concourse\thrift\data\TObject();
              $val726 = array();
              $key725 = new \concourse\thrift\data\TObject();
              $xfer += $key725->read($input);
              $val726 = array();
              $_size727 = 0;
              $_ktype728 = 0;
              $_vtype729 = 0;
              $xfer += $input->readMapBegin($_ktype728, $_vtype729, $_size727);
              for ($_i731 = 0; $_i731 < $_size727; ++$_i731)
              {
                $key732 = 0;
                $val733 = array();
                $xfer += $input->readI32($key732);
                $val733 = array();
                $_size734 = 0;
                $_etype737 = 0;
                $xfer += $input->readSetBegin($_etype737, $_size734);
                for ($_i738 = 0; $_i738 < $_size734; ++$_i738)
                {
                  $elem739 = null;
                  $xfer += $input->readI64($elem739);
                  if (is_scalar($elem739)) {
                    $val733 []= $elem739;
                  } else {
                    $val733 []= $elem739;
                  }
                }
                $xfer += $input->readSetEnd();
                $val726[(!is_string($key732) && !is_integer($key732)) ? serialize($key732) : $key732] = $val733;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key725) && !is_integer($key725)) ? serialize($key725) : $key725] = $val726;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyStartEnd_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRUCT, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter740 => $viter741)
          {
            $xfer += $kiter740->write($output);
            {
              $output->writeMapBegin(TType::I32, TType::SET, count($viter741));
              {
                foreach ($viter741 as $kiter742 => $viter743)
                {
                  $xfer += $output->writeI32($kiter742);
                  {
                    $output->writeSetBegin(TType::I64, count($viter743));
                    {
                      foreach ($viter743 as $iter744 => $iter745)
                      {
                        if (is_scalar($iter745)) {
                        $xfer += $output->writeI64($iter744);
                        } else {
                        $xfer += $output->writeI64($iter745);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyStartstrEndstr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $start = null;
  /**
   * @var string
   */
  public $tend = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'start',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'tend',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['start'])) {
        $this->start = $vals['start'];
      }
      if (isset($vals['tend'])) {
        $this->tend = $vals['tend'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->start);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->tend);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyStartstrEndstr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->start !== null) {
      $xfer += $output->writeFieldBegin('start', TType::STRING, 2);
      $xfer += $output->writeString($this->start);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->tend !== null) {
      $xfer += $output->writeFieldBegin('tend', TType::STRING, 3);
      $xfer += $output->writeString($this->tend);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_diffKeyStartstrEndstr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRUCT,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::I32,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::I32,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::I64,
              'elem' => array(
                'type' => TType::I64,
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size746 = 0;
            $_ktype747 = 0;
            $_vtype748 = 0;
            $xfer += $input->readMapBegin($_ktype747, $_vtype748, $_size746);
            for ($_i750 = 0; $_i750 < $_size746; ++$_i750)
            {
              $key751 = new \concourse\thrift\data\TObject();
              $val752 = array();
              $key751 = new \concourse\thrift\data\TObject();
              $xfer += $key751->read($input);
              $val752 = array();
              $_size753 = 0;
              $_ktype754 = 0;
              $_vtype755 = 0;
              $xfer += $input->readMapBegin($_ktype754, $_vtype755, $_size753);
              for ($_i757 = 0; $_i757 < $_size753; ++$_i757)
              {
                $key758 = 0;
                $val759 = array();
                $xfer += $input->readI32($key758);
                $val759 = array();
                $_size760 = 0;
                $_etype763 = 0;
                $xfer += $input->readSetBegin($_etype763, $_size760);
                for ($_i764 = 0; $_i764 < $_size760; ++$_i764)
                {
                  $elem765 = null;
                  $xfer += $input->readI64($elem765);
                  if (is_scalar($elem765)) {
                    $val759 []= $elem765;
                  } else {
                    $val759 []= $elem765;
                  }
                }
                $xfer += $input->readSetEnd();
                $val752[(!is_string($key758) && !is_integer($key758)) ? serialize($key758) : $key758] = $val759;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key751) && !is_integer($key751)) ? serialize($key751) : $key751] = $val752;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_diffKeyStartstrEndstr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRUCT, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter766 => $viter767)
          {
            $xfer += $kiter766->write($output);
            {
              $output->writeMapBegin(TType::I32, TType::SET, count($viter767));
              {
                foreach ($viter767 as $kiter768 => $viter769)
                {
                  $xfer += $output->writeI32($kiter768);
                  {
                    $output->writeSetBegin(TType::I64, count($viter769));
                    {
                      foreach ($viter769 as $iter770 => $iter771)
                      {
                        if (is_scalar($iter771)) {
                        $xfer += $output->writeI64($iter770);
                        } else {
                        $xfer += $output->writeI64($iter771);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_invokePlugin_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $id = null;
  /**
   * @var string
   */
  public $method = null;
  /**
   * @var \concourse\thrift\complex\ComplexTObject[]
   */
  public $params = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'id',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'method',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'params',
          'type' => TType::LST,
          'etype' => TType::STRUCT,
          'elem' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\complex\ComplexTObject',
            ),
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['id'])) {
        $this->id = $vals['id'];
      }
      if (isset($vals['method'])) {
        $this->method = $vals['method'];
      }
      if (isset($vals['params'])) {
        $this->params = $vals['params'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->id);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->method);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::LST) {
            $this->params = array();
            $_size772 = 0;
            $_etype775 = 0;
            $xfer += $input->readListBegin($_etype775, $_size772);
            for ($_i776 = 0; $_i776 < $_size772; ++$_i776)
            {
              $elem777 = null;
              $elem777 = new \concourse\thrift\complex\ComplexTObject();
              $xfer += $elem777->read($input);
              $this->params []= $elem777;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_invokePlugin_args');
    if ($this->id !== null) {
      $xfer += $output->writeFieldBegin('id', TType::STRING, 1);
      $xfer += $output->writeString($this->id);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->method !== null) {
      $xfer += $output->writeFieldBegin('method', TType::STRING, 2);
      $xfer += $output->writeString($this->method);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->params !== null) {
      if (!is_array($this->params)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('params', TType::LST, 3);
      {
        $output->writeListBegin(TType::STRUCT, count($this->params));
        {
          foreach ($this->params as $iter778)
          {
            $xfer += $iter778->write($output);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_invokePlugin_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\complex\ComplexTObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\InvalidArgumentException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\complex\ComplexTObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\InvalidArgumentException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\complex\ComplexTObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\InvalidArgumentException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_invokePlugin_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_login_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $username = null;
  /**
   * @var string
   */
  public $password = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'username',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'password',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['username'])) {
        $this->username = $vals['username'];
      }
      if (isset($vals['password'])) {
        $this->password = $vals['password'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->username);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->password);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_login_args');
    if ($this->username !== null) {
      $xfer += $output->writeFieldBegin('username', TType::STRING, 1);
      $xfer += $output->writeString($this->username);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->password !== null) {
      $xfer += $output->writeFieldBegin('password', TType::STRING, 2);
      $xfer += $output->writeString($this->password);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 3);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_login_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_login_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_logout_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $token = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'token',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        2 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['token'])) {
        $this->token = $vals['token'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->token = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->token->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_logout_args');
    if ($this->token !== null) {
      if (!is_object($this->token)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('token', TType::STRUCT, 1);
      $xfer += $this->token->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 2);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_logout_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_logout_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_stage_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $token = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'token',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        2 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['token'])) {
        $this->token = $vals['token'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->token = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->token->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_stage_args');
    if ($this->token !== null) {
      if (!is_object($this->token)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('token', TType::STRUCT, 1);
      $xfer += $this->token->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 2);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_stage_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_stage_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_insertJson_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $json = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'json',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['json'])) {
        $this->json = $vals['json'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->json);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_insertJson_args');
    if ($this->json !== null) {
      $xfer += $output->writeFieldBegin('json', TType::STRING, 1);
      $xfer += $output->writeString($this->json);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_insertJson_result {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size779 = 0;
            $_etype782 = 0;
            $xfer += $input->readSetBegin($_etype782, $_size779);
            for ($_i783 = 0; $_i783 < $_size779; ++$_i783)
            {
              $elem784 = null;
              $xfer += $input->readI64($elem784);
              if (is_scalar($elem784)) {
                $this->success []= $elem784;
              } else {
                $this->success []= $elem784;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_insertJson_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::I64, count($this->success));
        {
          foreach ($this->success as $iter785 => $iter786)
          {
            if (is_scalar($iter786)) {
            $xfer += $output->writeI64($iter785);
            } else {
            $xfer += $output->writeI64($iter786);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_insertJsonRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $json = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'json',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['json'])) {
        $this->json = $vals['json'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->json);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_insertJsonRecord_args');
    if ($this->json !== null) {
      $xfer += $output->writeFieldBegin('json', TType::STRING, 1);
      $xfer += $output->writeString($this->json);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_insertJsonRecord_result {
  static $_TSPEC;

  /**
   * @var bool
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::BOOL,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::BOOL) {
            $xfer += $input->readBool($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_insertJsonRecord_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
      $xfer += $output->writeBool($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_insertJsonRecords_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $json = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'json',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['json'])) {
        $this->json = $vals['json'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->json);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size787 = 0;
            $_etype790 = 0;
            $xfer += $input->readListBegin($_etype790, $_size787);
            for ($_i791 = 0; $_i791 < $_size787; ++$_i791)
            {
              $elem792 = null;
              $xfer += $input->readI64($elem792);
              $this->records []= $elem792;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_insertJsonRecords_args');
    if ($this->json !== null) {
      $xfer += $output->writeFieldBegin('json', TType::STRING, 1);
      $xfer += $output->writeString($this->json);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter793)
          {
            $xfer += $output->writeI64($iter793);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_insertJsonRecords_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::BOOL,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::BOOL,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size794 = 0;
            $_ktype795 = 0;
            $_vtype796 = 0;
            $xfer += $input->readMapBegin($_ktype795, $_vtype796, $_size794);
            for ($_i798 = 0; $_i798 < $_size794; ++$_i798)
            {
              $key799 = 0;
              $val800 = false;
              $xfer += $input->readI64($key799);
              $xfer += $input->readBool($val800);
              $this->success[(!is_string($key799) && !is_integer($key799)) ? serialize($key799) : $key799] = $val800;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_insertJsonRecords_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::BOOL, count($this->success));
        {
          foreach ($this->success as $kiter801 => $viter802)
          {
            $xfer += $output->writeI64($kiter801);
            $xfer += $output->writeBool($viter802);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_removeKeyValueRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $value = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'value',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['value'])) {
        $this->value = $vals['value'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->value = new \concourse\thrift\data\TObject();
            $xfer += $this->value->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_removeKeyValueRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->value !== null) {
      if (!is_object($this->value)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('value', TType::STRUCT, 2);
      $xfer += $this->value->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 3);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_removeKeyValueRecord_result {
  static $_TSPEC;

  /**
   * @var bool
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\InvalidArgumentException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::BOOL,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\InvalidArgumentException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::BOOL) {
            $xfer += $input->readBool($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\InvalidArgumentException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_removeKeyValueRecord_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
      $xfer += $output->writeBool($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_removeKeyValueRecords_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $value = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'value',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['value'])) {
        $this->value = $vals['value'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->value = new \concourse\thrift\data\TObject();
            $xfer += $this->value->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size803 = 0;
            $_etype806 = 0;
            $xfer += $input->readListBegin($_etype806, $_size803);
            for ($_i807 = 0; $_i807 < $_size803; ++$_i807)
            {
              $elem808 = null;
              $xfer += $input->readI64($elem808);
              $this->records []= $elem808;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_removeKeyValueRecords_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->value !== null) {
      if (!is_object($this->value)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('value', TType::STRUCT, 2);
      $xfer += $this->value->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 3);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter809)
          {
            $xfer += $output->writeI64($iter809);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_removeKeyValueRecords_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\InvalidArgumentException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::BOOL,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::BOOL,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\InvalidArgumentException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size810 = 0;
            $_ktype811 = 0;
            $_vtype812 = 0;
            $xfer += $input->readMapBegin($_ktype811, $_vtype812, $_size810);
            for ($_i814 = 0; $_i814 < $_size810; ++$_i814)
            {
              $key815 = 0;
              $val816 = false;
              $xfer += $input->readI64($key815);
              $xfer += $input->readBool($val816);
              $this->success[(!is_string($key815) && !is_integer($key815)) ? serialize($key815) : $key815] = $val816;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\InvalidArgumentException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_removeKeyValueRecords_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::BOOL, count($this->success));
        {
          foreach ($this->success as $kiter817 => $viter818)
          {
            $xfer += $output->writeI64($kiter817);
            $xfer += $output->writeBool($viter818);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_setKeyValueRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $value = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'value',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['value'])) {
        $this->value = $vals['value'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->value = new \concourse\thrift\data\TObject();
            $xfer += $this->value->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_setKeyValueRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->value !== null) {
      if (!is_object($this->value)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('value', TType::STRUCT, 2);
      $xfer += $this->value->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 3);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_setKeyValueRecord_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\InvalidArgumentException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\InvalidArgumentException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\InvalidArgumentException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_setKeyValueRecord_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_setKeyValue_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $value = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'value',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['value'])) {
        $this->value = $vals['value'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->value = new \concourse\thrift\data\TObject();
            $xfer += $this->value->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_setKeyValue_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->value !== null) {
      if (!is_object($this->value)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('value', TType::STRUCT, 2);
      $xfer += $this->value->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_setKeyValue_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\InvalidArgumentException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\InvalidArgumentException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\InvalidArgumentException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_setKeyValue_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_setKeyValueRecords_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $value = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'value',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['value'])) {
        $this->value = $vals['value'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->value = new \concourse\thrift\data\TObject();
            $xfer += $this->value->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size819 = 0;
            $_etype822 = 0;
            $xfer += $input->readListBegin($_etype822, $_size819);
            for ($_i823 = 0; $_i823 < $_size819; ++$_i823)
            {
              $elem824 = null;
              $xfer += $input->readI64($elem824);
              $this->records []= $elem824;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_setKeyValueRecords_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->value !== null) {
      if (!is_object($this->value)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('value', TType::STRUCT, 2);
      $xfer += $this->value->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 3);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter825)
          {
            $xfer += $output->writeI64($iter825);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_setKeyValueRecords_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\InvalidArgumentException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\InvalidArgumentException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\InvalidArgumentException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_setKeyValueRecords_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_reconcileKeyRecordValues_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\data\TObject[]
   */
  public $values = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'values',
          'type' => TType::SET,
          'etype' => TType::STRUCT,
          'elem' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['values'])) {
        $this->values = $vals['values'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::SET) {
            $this->values = array();
            $_size826 = 0;
            $_etype829 = 0;
            $xfer += $input->readSetBegin($_etype829, $_size826);
            for ($_i830 = 0; $_i830 < $_size826; ++$_i830)
            {
              $elem831 = null;
              $elem831 = new \concourse\thrift\data\TObject();
              $xfer += $elem831->read($input);
              if (is_scalar($elem831)) {
                $this->values []= $elem831;
              } else {
                $this->values []= $elem831;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_reconcileKeyRecordValues_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->values !== null) {
      if (!is_array($this->values)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('values', TType::SET, 3);
      {
        $output->writeSetBegin(TType::STRUCT, count($this->values));
        {
          foreach ($this->values as $iter832 => $iter833)
          {
            if (is_scalar($iter833)) {
            $xfer += $iter832->write($output);
            } else {
            $xfer += $iter833->write($output);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_reconcileKeyRecordValues_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\InvalidArgumentException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\InvalidArgumentException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\InvalidArgumentException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_reconcileKeyRecordValues_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_inventory_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        2 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        3 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_inventory_args');
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 1);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 2);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 3);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_inventory_result {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size834 = 0;
            $_etype837 = 0;
            $xfer += $input->readSetBegin($_etype837, $_size834);
            for ($_i838 = 0; $_i838 < $_size834; ++$_i838)
            {
              $elem839 = null;
              $xfer += $input->readI64($elem839);
              if (is_scalar($elem839)) {
                $this->success []= $elem839;
              } else {
                $this->success []= $elem839;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_inventory_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::I64, count($this->success));
        {
          foreach ($this->success as $iter840 => $iter841)
          {
            if (is_scalar($iter841)) {
            $xfer += $output->writeI64($iter840);
            } else {
            $xfer += $output->writeI64($iter841);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectRecord_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectRecord_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectRecord_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size842 = 0;
            $_ktype843 = 0;
            $_vtype844 = 0;
            $xfer += $input->readMapBegin($_ktype843, $_vtype844, $_size842);
            for ($_i846 = 0; $_i846 < $_size842; ++$_i846)
            {
              $key847 = '';
              $val848 = array();
              $xfer += $input->readString($key847);
              $val848 = array();
              $_size849 = 0;
              $_etype852 = 0;
              $xfer += $input->readSetBegin($_etype852, $_size849);
              for ($_i853 = 0; $_i853 < $_size849; ++$_i853)
              {
                $elem854 = null;
                $elem854 = new \concourse\thrift\data\TObject();
                $xfer += $elem854->read($input);
                if (is_scalar($elem854)) {
                  $val848 []= $elem854;
                } else {
                  $val848 []= $elem854;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key847) && !is_integer($key847)) ? serialize($key847) : $key847] = $val848;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectRecord_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter855 => $viter856)
          {
            $xfer += $output->writeString($kiter855);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter856));
              {
                foreach ($viter856 as $iter857 => $iter858)
                {
                  if (is_scalar($iter858)) {
                  $xfer += $iter857->write($output);
                  } else {
                  $xfer += $iter858->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectRecords_args {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size859 = 0;
            $_etype862 = 0;
            $xfer += $input->readListBegin($_etype862, $_size859);
            for ($_i863 = 0; $_i863 < $_size859; ++$_i863)
            {
              $elem864 = null;
              $xfer += $input->readI64($elem864);
              $this->records []= $elem864;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectRecords_args');
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 1);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter865)
          {
            $xfer += $output->writeI64($iter865);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectRecords_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size866 = 0;
            $_ktype867 = 0;
            $_vtype868 = 0;
            $xfer += $input->readMapBegin($_ktype867, $_vtype868, $_size866);
            for ($_i870 = 0; $_i870 < $_size866; ++$_i870)
            {
              $key871 = 0;
              $val872 = array();
              $xfer += $input->readI64($key871);
              $val872 = array();
              $_size873 = 0;
              $_ktype874 = 0;
              $_vtype875 = 0;
              $xfer += $input->readMapBegin($_ktype874, $_vtype875, $_size873);
              for ($_i877 = 0; $_i877 < $_size873; ++$_i877)
              {
                $key878 = '';
                $val879 = array();
                $xfer += $input->readString($key878);
                $val879 = array();
                $_size880 = 0;
                $_etype883 = 0;
                $xfer += $input->readSetBegin($_etype883, $_size880);
                for ($_i884 = 0; $_i884 < $_size880; ++$_i884)
                {
                  $elem885 = null;
                  $elem885 = new \concourse\thrift\data\TObject();
                  $xfer += $elem885->read($input);
                  if (is_scalar($elem885)) {
                    $val879 []= $elem885;
                  } else {
                    $val879 []= $elem885;
                  }
                }
                $xfer += $input->readSetEnd();
                $val872[(!is_string($key878) && !is_integer($key878)) ? serialize($key878) : $key878] = $val879;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key871) && !is_integer($key871)) ? serialize($key871) : $key871] = $val872;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectRecords_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter886 => $viter887)
          {
            $xfer += $output->writeI64($kiter886);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter887));
              {
                foreach ($viter887 as $kiter888 => $viter889)
                {
                  $xfer += $output->writeString($kiter888);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter889));
                    {
                      foreach ($viter889 as $iter890 => $iter891)
                      {
                        if (is_scalar($iter891)) {
                        $xfer += $iter890->write($output);
                        } else {
                        $xfer += $iter891->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectRecordTime_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectRecordTime_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectRecordTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size892 = 0;
            $_ktype893 = 0;
            $_vtype894 = 0;
            $xfer += $input->readMapBegin($_ktype893, $_vtype894, $_size892);
            for ($_i896 = 0; $_i896 < $_size892; ++$_i896)
            {
              $key897 = '';
              $val898 = array();
              $xfer += $input->readString($key897);
              $val898 = array();
              $_size899 = 0;
              $_etype902 = 0;
              $xfer += $input->readSetBegin($_etype902, $_size899);
              for ($_i903 = 0; $_i903 < $_size899; ++$_i903)
              {
                $elem904 = null;
                $elem904 = new \concourse\thrift\data\TObject();
                $xfer += $elem904->read($input);
                if (is_scalar($elem904)) {
                  $val898 []= $elem904;
                } else {
                  $val898 []= $elem904;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key897) && !is_integer($key897)) ? serialize($key897) : $key897] = $val898;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectRecordTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter905 => $viter906)
          {
            $xfer += $output->writeString($kiter905);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter906));
              {
                foreach ($viter906 as $iter907 => $iter908)
                {
                  if (is_scalar($iter908)) {
                  $xfer += $iter907->write($output);
                  } else {
                  $xfer += $iter908->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectRecordTimestr_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size909 = 0;
            $_ktype910 = 0;
            $_vtype911 = 0;
            $xfer += $input->readMapBegin($_ktype910, $_vtype911, $_size909);
            for ($_i913 = 0; $_i913 < $_size909; ++$_i913)
            {
              $key914 = '';
              $val915 = array();
              $xfer += $input->readString($key914);
              $val915 = array();
              $_size916 = 0;
              $_etype919 = 0;
              $xfer += $input->readSetBegin($_etype919, $_size916);
              for ($_i920 = 0; $_i920 < $_size916; ++$_i920)
              {
                $elem921 = null;
                $elem921 = new \concourse\thrift\data\TObject();
                $xfer += $elem921->read($input);
                if (is_scalar($elem921)) {
                  $val915 []= $elem921;
                } else {
                  $val915 []= $elem921;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key914) && !is_integer($key914)) ? serialize($key914) : $key914] = $val915;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectRecordTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter922 => $viter923)
          {
            $xfer += $output->writeString($kiter922);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter923));
              {
                foreach ($viter923 as $iter924 => $iter925)
                {
                  if (is_scalar($iter925)) {
                  $xfer += $iter924->write($output);
                  } else {
                  $xfer += $iter925->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectRecordsTime_args {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size926 = 0;
            $_etype929 = 0;
            $xfer += $input->readListBegin($_etype929, $_size926);
            for ($_i930 = 0; $_i930 < $_size926; ++$_i930)
            {
              $elem931 = null;
              $xfer += $input->readI64($elem931);
              $this->records []= $elem931;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectRecordsTime_args');
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 1);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter932)
          {
            $xfer += $output->writeI64($iter932);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectRecordsTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size933 = 0;
            $_ktype934 = 0;
            $_vtype935 = 0;
            $xfer += $input->readMapBegin($_ktype934, $_vtype935, $_size933);
            for ($_i937 = 0; $_i937 < $_size933; ++$_i937)
            {
              $key938 = 0;
              $val939 = array();
              $xfer += $input->readI64($key938);
              $val939 = array();
              $_size940 = 0;
              $_ktype941 = 0;
              $_vtype942 = 0;
              $xfer += $input->readMapBegin($_ktype941, $_vtype942, $_size940);
              for ($_i944 = 0; $_i944 < $_size940; ++$_i944)
              {
                $key945 = '';
                $val946 = array();
                $xfer += $input->readString($key945);
                $val946 = array();
                $_size947 = 0;
                $_etype950 = 0;
                $xfer += $input->readSetBegin($_etype950, $_size947);
                for ($_i951 = 0; $_i951 < $_size947; ++$_i951)
                {
                  $elem952 = null;
                  $elem952 = new \concourse\thrift\data\TObject();
                  $xfer += $elem952->read($input);
                  if (is_scalar($elem952)) {
                    $val946 []= $elem952;
                  } else {
                    $val946 []= $elem952;
                  }
                }
                $xfer += $input->readSetEnd();
                $val939[(!is_string($key945) && !is_integer($key945)) ? serialize($key945) : $key945] = $val946;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key938) && !is_integer($key938)) ? serialize($key938) : $key938] = $val939;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectRecordsTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter953 => $viter954)
          {
            $xfer += $output->writeI64($kiter953);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter954));
              {
                foreach ($viter954 as $kiter955 => $viter956)
                {
                  $xfer += $output->writeString($kiter955);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter956));
                    {
                      foreach ($viter956 as $iter957 => $iter958)
                      {
                        if (is_scalar($iter958)) {
                        $xfer += $iter957->write($output);
                        } else {
                        $xfer += $iter958->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size959 = 0;
            $_etype962 = 0;
            $xfer += $input->readListBegin($_etype962, $_size959);
            for ($_i963 = 0; $_i963 < $_size959; ++$_i963)
            {
              $elem964 = null;
              $xfer += $input->readI64($elem964);
              $this->records []= $elem964;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectRecordsTimestr_args');
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 1);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter965)
          {
            $xfer += $output->writeI64($iter965);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size966 = 0;
            $_ktype967 = 0;
            $_vtype968 = 0;
            $xfer += $input->readMapBegin($_ktype967, $_vtype968, $_size966);
            for ($_i970 = 0; $_i970 < $_size966; ++$_i970)
            {
              $key971 = 0;
              $val972 = array();
              $xfer += $input->readI64($key971);
              $val972 = array();
              $_size973 = 0;
              $_ktype974 = 0;
              $_vtype975 = 0;
              $xfer += $input->readMapBegin($_ktype974, $_vtype975, $_size973);
              for ($_i977 = 0; $_i977 < $_size973; ++$_i977)
              {
                $key978 = '';
                $val979 = array();
                $xfer += $input->readString($key978);
                $val979 = array();
                $_size980 = 0;
                $_etype983 = 0;
                $xfer += $input->readSetBegin($_etype983, $_size980);
                for ($_i984 = 0; $_i984 < $_size980; ++$_i984)
                {
                  $elem985 = null;
                  $elem985 = new \concourse\thrift\data\TObject();
                  $xfer += $elem985->read($input);
                  if (is_scalar($elem985)) {
                    $val979 []= $elem985;
                  } else {
                    $val979 []= $elem985;
                  }
                }
                $xfer += $input->readSetEnd();
                $val972[(!is_string($key978) && !is_integer($key978)) ? serialize($key978) : $key978] = $val979;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key971) && !is_integer($key971)) ? serialize($key971) : $key971] = $val972;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectRecordsTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter986 => $viter987)
          {
            $xfer += $output->writeI64($kiter986);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter987));
              {
                foreach ($viter987 as $kiter988 => $viter989)
                {
                  $xfer += $output->writeString($kiter988);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter989));
                    {
                      foreach ($viter989 as $iter990 => $iter991)
                      {
                        if (is_scalar($iter991)) {
                        $xfer += $iter990->write($output);
                        } else {
                        $xfer += $iter991->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyRecord_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::STRUCT,
          'elem' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size992 = 0;
            $_etype995 = 0;
            $xfer += $input->readSetBegin($_etype995, $_size992);
            for ($_i996 = 0; $_i996 < $_size992; ++$_i996)
            {
              $elem997 = null;
              $elem997 = new \concourse\thrift\data\TObject();
              $xfer += $elem997->read($input);
              if (is_scalar($elem997)) {
                $this->success []= $elem997;
              } else {
                $this->success []= $elem997;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyRecord_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $iter998 => $iter999)
          {
            if (is_scalar($iter999)) {
            $xfer += $iter998->write($output);
            } else {
            $xfer += $iter999->write($output);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyRecordTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyRecordTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyRecordTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::STRUCT,
          'elem' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size1000 = 0;
            $_etype1003 = 0;
            $xfer += $input->readSetBegin($_etype1003, $_size1000);
            for ($_i1004 = 0; $_i1004 < $_size1000; ++$_i1004)
            {
              $elem1005 = null;
              $elem1005 = new \concourse\thrift\data\TObject();
              $xfer += $elem1005->read($input);
              if (is_scalar($elem1005)) {
                $this->success []= $elem1005;
              } else {
                $this->success []= $elem1005;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyRecordTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $iter1006 => $iter1007)
          {
            if (is_scalar($iter1007)) {
            $xfer += $iter1006->write($output);
            } else {
            $xfer += $iter1007->write($output);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyRecordTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::STRUCT,
          'elem' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size1008 = 0;
            $_etype1011 = 0;
            $xfer += $input->readSetBegin($_etype1011, $_size1008);
            for ($_i1012 = 0; $_i1012 < $_size1008; ++$_i1012)
            {
              $elem1013 = null;
              $elem1013 = new \concourse\thrift\data\TObject();
              $xfer += $elem1013->read($input);
              if (is_scalar($elem1013)) {
                $this->success []= $elem1013;
              } else {
                $this->success []= $elem1013;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyRecordTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $iter1014 => $iter1015)
          {
            if (is_scalar($iter1015)) {
            $xfer += $iter1014->write($output);
            } else {
            $xfer += $iter1015->write($output);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysRecord_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1016 = 0;
            $_etype1019 = 0;
            $xfer += $input->readListBegin($_etype1019, $_size1016);
            for ($_i1020 = 0; $_i1020 < $_size1016; ++$_i1020)
            {
              $elem1021 = null;
              $xfer += $input->readString($elem1021);
              $this->keys []= $elem1021;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysRecord_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1022)
          {
            $xfer += $output->writeString($iter1022);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysRecord_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1023 = 0;
            $_ktype1024 = 0;
            $_vtype1025 = 0;
            $xfer += $input->readMapBegin($_ktype1024, $_vtype1025, $_size1023);
            for ($_i1027 = 0; $_i1027 < $_size1023; ++$_i1027)
            {
              $key1028 = '';
              $val1029 = array();
              $xfer += $input->readString($key1028);
              $val1029 = array();
              $_size1030 = 0;
              $_etype1033 = 0;
              $xfer += $input->readSetBegin($_etype1033, $_size1030);
              for ($_i1034 = 0; $_i1034 < $_size1030; ++$_i1034)
              {
                $elem1035 = null;
                $elem1035 = new \concourse\thrift\data\TObject();
                $xfer += $elem1035->read($input);
                if (is_scalar($elem1035)) {
                  $val1029 []= $elem1035;
                } else {
                  $val1029 []= $elem1035;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key1028) && !is_integer($key1028)) ? serialize($key1028) : $key1028] = $val1029;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysRecord_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter1036 => $viter1037)
          {
            $xfer += $output->writeString($kiter1036);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter1037));
              {
                foreach ($viter1037 as $iter1038 => $iter1039)
                {
                  if (is_scalar($iter1039)) {
                  $xfer += $iter1038->write($output);
                  } else {
                  $xfer += $iter1039->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysRecordTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1040 = 0;
            $_etype1043 = 0;
            $xfer += $input->readListBegin($_etype1043, $_size1040);
            for ($_i1044 = 0; $_i1044 < $_size1040; ++$_i1044)
            {
              $elem1045 = null;
              $xfer += $input->readString($elem1045);
              $this->keys []= $elem1045;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysRecordTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1046)
          {
            $xfer += $output->writeString($iter1046);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysRecordTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1047 = 0;
            $_ktype1048 = 0;
            $_vtype1049 = 0;
            $xfer += $input->readMapBegin($_ktype1048, $_vtype1049, $_size1047);
            for ($_i1051 = 0; $_i1051 < $_size1047; ++$_i1051)
            {
              $key1052 = '';
              $val1053 = array();
              $xfer += $input->readString($key1052);
              $val1053 = array();
              $_size1054 = 0;
              $_etype1057 = 0;
              $xfer += $input->readSetBegin($_etype1057, $_size1054);
              for ($_i1058 = 0; $_i1058 < $_size1054; ++$_i1058)
              {
                $elem1059 = null;
                $elem1059 = new \concourse\thrift\data\TObject();
                $xfer += $elem1059->read($input);
                if (is_scalar($elem1059)) {
                  $val1053 []= $elem1059;
                } else {
                  $val1053 []= $elem1059;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key1052) && !is_integer($key1052)) ? serialize($key1052) : $key1052] = $val1053;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysRecordTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter1060 => $viter1061)
          {
            $xfer += $output->writeString($kiter1060);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter1061));
              {
                foreach ($viter1061 as $iter1062 => $iter1063)
                {
                  if (is_scalar($iter1063)) {
                  $xfer += $iter1062->write($output);
                  } else {
                  $xfer += $iter1063->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1064 = 0;
            $_etype1067 = 0;
            $xfer += $input->readListBegin($_etype1067, $_size1064);
            for ($_i1068 = 0; $_i1068 < $_size1064; ++$_i1068)
            {
              $elem1069 = null;
              $xfer += $input->readString($elem1069);
              $this->keys []= $elem1069;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysRecordTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1070)
          {
            $xfer += $output->writeString($iter1070);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1071 = 0;
            $_ktype1072 = 0;
            $_vtype1073 = 0;
            $xfer += $input->readMapBegin($_ktype1072, $_vtype1073, $_size1071);
            for ($_i1075 = 0; $_i1075 < $_size1071; ++$_i1075)
            {
              $key1076 = '';
              $val1077 = array();
              $xfer += $input->readString($key1076);
              $val1077 = array();
              $_size1078 = 0;
              $_etype1081 = 0;
              $xfer += $input->readSetBegin($_etype1081, $_size1078);
              for ($_i1082 = 0; $_i1082 < $_size1078; ++$_i1082)
              {
                $elem1083 = null;
                $elem1083 = new \concourse\thrift\data\TObject();
                $xfer += $elem1083->read($input);
                if (is_scalar($elem1083)) {
                  $val1077 []= $elem1083;
                } else {
                  $val1077 []= $elem1083;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key1076) && !is_integer($key1076)) ? serialize($key1076) : $key1076] = $val1077;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysRecordTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter1084 => $viter1085)
          {
            $xfer += $output->writeString($kiter1084);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter1085));
              {
                foreach ($viter1085 as $iter1086 => $iter1087)
                {
                  if (is_scalar($iter1087)) {
                  $xfer += $iter1086->write($output);
                  } else {
                  $xfer += $iter1087->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysRecords_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1088 = 0;
            $_etype1091 = 0;
            $xfer += $input->readListBegin($_etype1091, $_size1088);
            for ($_i1092 = 0; $_i1092 < $_size1088; ++$_i1092)
            {
              $elem1093 = null;
              $xfer += $input->readString($elem1093);
              $this->keys []= $elem1093;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size1094 = 0;
            $_etype1097 = 0;
            $xfer += $input->readListBegin($_etype1097, $_size1094);
            for ($_i1098 = 0; $_i1098 < $_size1094; ++$_i1098)
            {
              $elem1099 = null;
              $xfer += $input->readI64($elem1099);
              $this->records []= $elem1099;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysRecords_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1100)
          {
            $xfer += $output->writeString($iter1100);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter1101)
          {
            $xfer += $output->writeI64($iter1101);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysRecords_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1102 = 0;
            $_ktype1103 = 0;
            $_vtype1104 = 0;
            $xfer += $input->readMapBegin($_ktype1103, $_vtype1104, $_size1102);
            for ($_i1106 = 0; $_i1106 < $_size1102; ++$_i1106)
            {
              $key1107 = 0;
              $val1108 = array();
              $xfer += $input->readI64($key1107);
              $val1108 = array();
              $_size1109 = 0;
              $_ktype1110 = 0;
              $_vtype1111 = 0;
              $xfer += $input->readMapBegin($_ktype1110, $_vtype1111, $_size1109);
              for ($_i1113 = 0; $_i1113 < $_size1109; ++$_i1113)
              {
                $key1114 = '';
                $val1115 = array();
                $xfer += $input->readString($key1114);
                $val1115 = array();
                $_size1116 = 0;
                $_etype1119 = 0;
                $xfer += $input->readSetBegin($_etype1119, $_size1116);
                for ($_i1120 = 0; $_i1120 < $_size1116; ++$_i1120)
                {
                  $elem1121 = null;
                  $elem1121 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1121->read($input);
                  if (is_scalar($elem1121)) {
                    $val1115 []= $elem1121;
                  } else {
                    $val1115 []= $elem1121;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1108[(!is_string($key1114) && !is_integer($key1114)) ? serialize($key1114) : $key1114] = $val1115;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1107) && !is_integer($key1107)) ? serialize($key1107) : $key1107] = $val1108;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysRecords_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1122 => $viter1123)
          {
            $xfer += $output->writeI64($kiter1122);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1123));
              {
                foreach ($viter1123 as $kiter1124 => $viter1125)
                {
                  $xfer += $output->writeString($kiter1124);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1125));
                    {
                      foreach ($viter1125 as $iter1126 => $iter1127)
                      {
                        if (is_scalar($iter1127)) {
                        $xfer += $iter1126->write($output);
                        } else {
                        $xfer += $iter1127->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyRecords_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size1128 = 0;
            $_etype1131 = 0;
            $xfer += $input->readListBegin($_etype1131, $_size1128);
            for ($_i1132 = 0; $_i1132 < $_size1128; ++$_i1132)
            {
              $elem1133 = null;
              $xfer += $input->readI64($elem1133);
              $this->records []= $elem1133;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyRecords_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter1134)
          {
            $xfer += $output->writeI64($iter1134);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyRecords_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1135 = 0;
            $_ktype1136 = 0;
            $_vtype1137 = 0;
            $xfer += $input->readMapBegin($_ktype1136, $_vtype1137, $_size1135);
            for ($_i1139 = 0; $_i1139 < $_size1135; ++$_i1139)
            {
              $key1140 = 0;
              $val1141 = array();
              $xfer += $input->readI64($key1140);
              $val1141 = array();
              $_size1142 = 0;
              $_etype1145 = 0;
              $xfer += $input->readSetBegin($_etype1145, $_size1142);
              for ($_i1146 = 0; $_i1146 < $_size1142; ++$_i1146)
              {
                $elem1147 = null;
                $elem1147 = new \concourse\thrift\data\TObject();
                $xfer += $elem1147->read($input);
                if (is_scalar($elem1147)) {
                  $val1141 []= $elem1147;
                } else {
                  $val1141 []= $elem1147;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key1140) && !is_integer($key1140)) ? serialize($key1140) : $key1140] = $val1141;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyRecords_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter1148 => $viter1149)
          {
            $xfer += $output->writeI64($kiter1148);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter1149));
              {
                foreach ($viter1149 as $iter1150 => $iter1151)
                {
                  if (is_scalar($iter1151)) {
                  $xfer += $iter1150->write($output);
                  } else {
                  $xfer += $iter1151->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyRecordsTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size1152 = 0;
            $_etype1155 = 0;
            $xfer += $input->readListBegin($_etype1155, $_size1152);
            for ($_i1156 = 0; $_i1156 < $_size1152; ++$_i1156)
            {
              $elem1157 = null;
              $xfer += $input->readI64($elem1157);
              $this->records []= $elem1157;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyRecordsTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter1158)
          {
            $xfer += $output->writeI64($iter1158);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyRecordsTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1159 = 0;
            $_ktype1160 = 0;
            $_vtype1161 = 0;
            $xfer += $input->readMapBegin($_ktype1160, $_vtype1161, $_size1159);
            for ($_i1163 = 0; $_i1163 < $_size1159; ++$_i1163)
            {
              $key1164 = 0;
              $val1165 = array();
              $xfer += $input->readI64($key1164);
              $val1165 = array();
              $_size1166 = 0;
              $_etype1169 = 0;
              $xfer += $input->readSetBegin($_etype1169, $_size1166);
              for ($_i1170 = 0; $_i1170 < $_size1166; ++$_i1170)
              {
                $elem1171 = null;
                $elem1171 = new \concourse\thrift\data\TObject();
                $xfer += $elem1171->read($input);
                if (is_scalar($elem1171)) {
                  $val1165 []= $elem1171;
                } else {
                  $val1165 []= $elem1171;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key1164) && !is_integer($key1164)) ? serialize($key1164) : $key1164] = $val1165;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyRecordsTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter1172 => $viter1173)
          {
            $xfer += $output->writeI64($kiter1172);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter1173));
              {
                foreach ($viter1173 as $iter1174 => $iter1175)
                {
                  if (is_scalar($iter1175)) {
                  $xfer += $iter1174->write($output);
                  } else {
                  $xfer += $iter1175->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size1176 = 0;
            $_etype1179 = 0;
            $xfer += $input->readListBegin($_etype1179, $_size1176);
            for ($_i1180 = 0; $_i1180 < $_size1176; ++$_i1180)
            {
              $elem1181 = null;
              $xfer += $input->readI64($elem1181);
              $this->records []= $elem1181;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyRecordsTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter1182)
          {
            $xfer += $output->writeI64($iter1182);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1183 = 0;
            $_ktype1184 = 0;
            $_vtype1185 = 0;
            $xfer += $input->readMapBegin($_ktype1184, $_vtype1185, $_size1183);
            for ($_i1187 = 0; $_i1187 < $_size1183; ++$_i1187)
            {
              $key1188 = 0;
              $val1189 = array();
              $xfer += $input->readI64($key1188);
              $val1189 = array();
              $_size1190 = 0;
              $_etype1193 = 0;
              $xfer += $input->readSetBegin($_etype1193, $_size1190);
              for ($_i1194 = 0; $_i1194 < $_size1190; ++$_i1194)
              {
                $elem1195 = null;
                $elem1195 = new \concourse\thrift\data\TObject();
                $xfer += $elem1195->read($input);
                if (is_scalar($elem1195)) {
                  $val1189 []= $elem1195;
                } else {
                  $val1189 []= $elem1195;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key1188) && !is_integer($key1188)) ? serialize($key1188) : $key1188] = $val1189;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyRecordsTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter1196 => $viter1197)
          {
            $xfer += $output->writeI64($kiter1196);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter1197));
              {
                foreach ($viter1197 as $iter1198 => $iter1199)
                {
                  if (is_scalar($iter1199)) {
                  $xfer += $iter1198->write($output);
                  } else {
                  $xfer += $iter1199->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysRecordsTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1200 = 0;
            $_etype1203 = 0;
            $xfer += $input->readListBegin($_etype1203, $_size1200);
            for ($_i1204 = 0; $_i1204 < $_size1200; ++$_i1204)
            {
              $elem1205 = null;
              $xfer += $input->readString($elem1205);
              $this->keys []= $elem1205;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size1206 = 0;
            $_etype1209 = 0;
            $xfer += $input->readListBegin($_etype1209, $_size1206);
            for ($_i1210 = 0; $_i1210 < $_size1206; ++$_i1210)
            {
              $elem1211 = null;
              $xfer += $input->readI64($elem1211);
              $this->records []= $elem1211;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysRecordsTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1212)
          {
            $xfer += $output->writeString($iter1212);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter1213)
          {
            $xfer += $output->writeI64($iter1213);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysRecordsTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1214 = 0;
            $_ktype1215 = 0;
            $_vtype1216 = 0;
            $xfer += $input->readMapBegin($_ktype1215, $_vtype1216, $_size1214);
            for ($_i1218 = 0; $_i1218 < $_size1214; ++$_i1218)
            {
              $key1219 = 0;
              $val1220 = array();
              $xfer += $input->readI64($key1219);
              $val1220 = array();
              $_size1221 = 0;
              $_ktype1222 = 0;
              $_vtype1223 = 0;
              $xfer += $input->readMapBegin($_ktype1222, $_vtype1223, $_size1221);
              for ($_i1225 = 0; $_i1225 < $_size1221; ++$_i1225)
              {
                $key1226 = '';
                $val1227 = array();
                $xfer += $input->readString($key1226);
                $val1227 = array();
                $_size1228 = 0;
                $_etype1231 = 0;
                $xfer += $input->readSetBegin($_etype1231, $_size1228);
                for ($_i1232 = 0; $_i1232 < $_size1228; ++$_i1232)
                {
                  $elem1233 = null;
                  $elem1233 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1233->read($input);
                  if (is_scalar($elem1233)) {
                    $val1227 []= $elem1233;
                  } else {
                    $val1227 []= $elem1233;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1220[(!is_string($key1226) && !is_integer($key1226)) ? serialize($key1226) : $key1226] = $val1227;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1219) && !is_integer($key1219)) ? serialize($key1219) : $key1219] = $val1220;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysRecordsTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1234 => $viter1235)
          {
            $xfer += $output->writeI64($kiter1234);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1235));
              {
                foreach ($viter1235 as $kiter1236 => $viter1237)
                {
                  $xfer += $output->writeString($kiter1236);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1237));
                    {
                      foreach ($viter1237 as $iter1238 => $iter1239)
                      {
                        if (is_scalar($iter1239)) {
                        $xfer += $iter1238->write($output);
                        } else {
                        $xfer += $iter1239->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1240 = 0;
            $_etype1243 = 0;
            $xfer += $input->readListBegin($_etype1243, $_size1240);
            for ($_i1244 = 0; $_i1244 < $_size1240; ++$_i1244)
            {
              $elem1245 = null;
              $xfer += $input->readString($elem1245);
              $this->keys []= $elem1245;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size1246 = 0;
            $_etype1249 = 0;
            $xfer += $input->readListBegin($_etype1249, $_size1246);
            for ($_i1250 = 0; $_i1250 < $_size1246; ++$_i1250)
            {
              $elem1251 = null;
              $xfer += $input->readI64($elem1251);
              $this->records []= $elem1251;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysRecordsTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1252)
          {
            $xfer += $output->writeString($iter1252);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter1253)
          {
            $xfer += $output->writeI64($iter1253);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1254 = 0;
            $_ktype1255 = 0;
            $_vtype1256 = 0;
            $xfer += $input->readMapBegin($_ktype1255, $_vtype1256, $_size1254);
            for ($_i1258 = 0; $_i1258 < $_size1254; ++$_i1258)
            {
              $key1259 = 0;
              $val1260 = array();
              $xfer += $input->readI64($key1259);
              $val1260 = array();
              $_size1261 = 0;
              $_ktype1262 = 0;
              $_vtype1263 = 0;
              $xfer += $input->readMapBegin($_ktype1262, $_vtype1263, $_size1261);
              for ($_i1265 = 0; $_i1265 < $_size1261; ++$_i1265)
              {
                $key1266 = '';
                $val1267 = array();
                $xfer += $input->readString($key1266);
                $val1267 = array();
                $_size1268 = 0;
                $_etype1271 = 0;
                $xfer += $input->readSetBegin($_etype1271, $_size1268);
                for ($_i1272 = 0; $_i1272 < $_size1268; ++$_i1272)
                {
                  $elem1273 = null;
                  $elem1273 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1273->read($input);
                  if (is_scalar($elem1273)) {
                    $val1267 []= $elem1273;
                  } else {
                    $val1267 []= $elem1273;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1260[(!is_string($key1266) && !is_integer($key1266)) ? serialize($key1266) : $key1266] = $val1267;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1259) && !is_integer($key1259)) ? serialize($key1259) : $key1259] = $val1260;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysRecordsTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1274 => $viter1275)
          {
            $xfer += $output->writeI64($kiter1274);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1275));
              {
                foreach ($viter1275 as $kiter1276 => $viter1277)
                {
                  $xfer += $output->writeString($kiter1276);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1277));
                    {
                      foreach ($viter1277 as $iter1278 => $iter1279)
                      {
                        if (is_scalar($iter1279)) {
                        $xfer += $iter1278->write($output);
                        } else {
                        $xfer += $iter1279->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectCriteria_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectCriteria_args');
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 1);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectCriteria_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1280 = 0;
            $_ktype1281 = 0;
            $_vtype1282 = 0;
            $xfer += $input->readMapBegin($_ktype1281, $_vtype1282, $_size1280);
            for ($_i1284 = 0; $_i1284 < $_size1280; ++$_i1284)
            {
              $key1285 = 0;
              $val1286 = array();
              $xfer += $input->readI64($key1285);
              $val1286 = array();
              $_size1287 = 0;
              $_ktype1288 = 0;
              $_vtype1289 = 0;
              $xfer += $input->readMapBegin($_ktype1288, $_vtype1289, $_size1287);
              for ($_i1291 = 0; $_i1291 < $_size1287; ++$_i1291)
              {
                $key1292 = '';
                $val1293 = array();
                $xfer += $input->readString($key1292);
                $val1293 = array();
                $_size1294 = 0;
                $_etype1297 = 0;
                $xfer += $input->readSetBegin($_etype1297, $_size1294);
                for ($_i1298 = 0; $_i1298 < $_size1294; ++$_i1298)
                {
                  $elem1299 = null;
                  $elem1299 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1299->read($input);
                  if (is_scalar($elem1299)) {
                    $val1293 []= $elem1299;
                  } else {
                    $val1293 []= $elem1299;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1286[(!is_string($key1292) && !is_integer($key1292)) ? serialize($key1292) : $key1292] = $val1293;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1285) && !is_integer($key1285)) ? serialize($key1285) : $key1285] = $val1286;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectCriteria_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1300 => $viter1301)
          {
            $xfer += $output->writeI64($kiter1300);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1301));
              {
                foreach ($viter1301 as $kiter1302 => $viter1303)
                {
                  $xfer += $output->writeString($kiter1302);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1303));
                    {
                      foreach ($viter1303 as $iter1304 => $iter1305)
                      {
                        if (is_scalar($iter1305)) {
                        $xfer += $iter1304->write($output);
                        } else {
                        $xfer += $iter1305->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectCcl_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectCcl_args');
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 1);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectCcl_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1306 = 0;
            $_ktype1307 = 0;
            $_vtype1308 = 0;
            $xfer += $input->readMapBegin($_ktype1307, $_vtype1308, $_size1306);
            for ($_i1310 = 0; $_i1310 < $_size1306; ++$_i1310)
            {
              $key1311 = 0;
              $val1312 = array();
              $xfer += $input->readI64($key1311);
              $val1312 = array();
              $_size1313 = 0;
              $_ktype1314 = 0;
              $_vtype1315 = 0;
              $xfer += $input->readMapBegin($_ktype1314, $_vtype1315, $_size1313);
              for ($_i1317 = 0; $_i1317 < $_size1313; ++$_i1317)
              {
                $key1318 = '';
                $val1319 = array();
                $xfer += $input->readString($key1318);
                $val1319 = array();
                $_size1320 = 0;
                $_etype1323 = 0;
                $xfer += $input->readSetBegin($_etype1323, $_size1320);
                for ($_i1324 = 0; $_i1324 < $_size1320; ++$_i1324)
                {
                  $elem1325 = null;
                  $elem1325 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1325->read($input);
                  if (is_scalar($elem1325)) {
                    $val1319 []= $elem1325;
                  } else {
                    $val1319 []= $elem1325;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1312[(!is_string($key1318) && !is_integer($key1318)) ? serialize($key1318) : $key1318] = $val1319;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1311) && !is_integer($key1311)) ? serialize($key1311) : $key1311] = $val1312;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectCcl_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1326 => $viter1327)
          {
            $xfer += $output->writeI64($kiter1326);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1327));
              {
                foreach ($viter1327 as $kiter1328 => $viter1329)
                {
                  $xfer += $output->writeString($kiter1328);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1329));
                    {
                      foreach ($viter1329 as $iter1330 => $iter1331)
                      {
                        if (is_scalar($iter1331)) {
                        $xfer += $iter1330->write($output);
                        } else {
                        $xfer += $iter1331->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectCriteriaTime_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectCriteriaTime_args');
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 1);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectCriteriaTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1332 = 0;
            $_ktype1333 = 0;
            $_vtype1334 = 0;
            $xfer += $input->readMapBegin($_ktype1333, $_vtype1334, $_size1332);
            for ($_i1336 = 0; $_i1336 < $_size1332; ++$_i1336)
            {
              $key1337 = 0;
              $val1338 = array();
              $xfer += $input->readI64($key1337);
              $val1338 = array();
              $_size1339 = 0;
              $_ktype1340 = 0;
              $_vtype1341 = 0;
              $xfer += $input->readMapBegin($_ktype1340, $_vtype1341, $_size1339);
              for ($_i1343 = 0; $_i1343 < $_size1339; ++$_i1343)
              {
                $key1344 = '';
                $val1345 = array();
                $xfer += $input->readString($key1344);
                $val1345 = array();
                $_size1346 = 0;
                $_etype1349 = 0;
                $xfer += $input->readSetBegin($_etype1349, $_size1346);
                for ($_i1350 = 0; $_i1350 < $_size1346; ++$_i1350)
                {
                  $elem1351 = null;
                  $elem1351 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1351->read($input);
                  if (is_scalar($elem1351)) {
                    $val1345 []= $elem1351;
                  } else {
                    $val1345 []= $elem1351;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1338[(!is_string($key1344) && !is_integer($key1344)) ? serialize($key1344) : $key1344] = $val1345;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1337) && !is_integer($key1337)) ? serialize($key1337) : $key1337] = $val1338;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectCriteriaTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1352 => $viter1353)
          {
            $xfer += $output->writeI64($kiter1352);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1353));
              {
                foreach ($viter1353 as $kiter1354 => $viter1355)
                {
                  $xfer += $output->writeString($kiter1354);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1355));
                    {
                      foreach ($viter1355 as $iter1356 => $iter1357)
                      {
                        if (is_scalar($iter1357)) {
                        $xfer += $iter1356->write($output);
                        } else {
                        $xfer += $iter1357->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectCriteriaTimestr_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectCriteriaTimestr_args');
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 1);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectCriteriaTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1358 = 0;
            $_ktype1359 = 0;
            $_vtype1360 = 0;
            $xfer += $input->readMapBegin($_ktype1359, $_vtype1360, $_size1358);
            for ($_i1362 = 0; $_i1362 < $_size1358; ++$_i1362)
            {
              $key1363 = 0;
              $val1364 = array();
              $xfer += $input->readI64($key1363);
              $val1364 = array();
              $_size1365 = 0;
              $_ktype1366 = 0;
              $_vtype1367 = 0;
              $xfer += $input->readMapBegin($_ktype1366, $_vtype1367, $_size1365);
              for ($_i1369 = 0; $_i1369 < $_size1365; ++$_i1369)
              {
                $key1370 = '';
                $val1371 = array();
                $xfer += $input->readString($key1370);
                $val1371 = array();
                $_size1372 = 0;
                $_etype1375 = 0;
                $xfer += $input->readSetBegin($_etype1375, $_size1372);
                for ($_i1376 = 0; $_i1376 < $_size1372; ++$_i1376)
                {
                  $elem1377 = null;
                  $elem1377 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1377->read($input);
                  if (is_scalar($elem1377)) {
                    $val1371 []= $elem1377;
                  } else {
                    $val1371 []= $elem1377;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1364[(!is_string($key1370) && !is_integer($key1370)) ? serialize($key1370) : $key1370] = $val1371;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1363) && !is_integer($key1363)) ? serialize($key1363) : $key1363] = $val1364;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectCriteriaTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1378 => $viter1379)
          {
            $xfer += $output->writeI64($kiter1378);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1379));
              {
                foreach ($viter1379 as $kiter1380 => $viter1381)
                {
                  $xfer += $output->writeString($kiter1380);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1381));
                    {
                      foreach ($viter1381 as $iter1382 => $iter1383)
                      {
                        if (is_scalar($iter1383)) {
                        $xfer += $iter1382->write($output);
                        } else {
                        $xfer += $iter1383->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectCclTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectCclTime_args');
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 1);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectCclTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1384 = 0;
            $_ktype1385 = 0;
            $_vtype1386 = 0;
            $xfer += $input->readMapBegin($_ktype1385, $_vtype1386, $_size1384);
            for ($_i1388 = 0; $_i1388 < $_size1384; ++$_i1388)
            {
              $key1389 = 0;
              $val1390 = array();
              $xfer += $input->readI64($key1389);
              $val1390 = array();
              $_size1391 = 0;
              $_ktype1392 = 0;
              $_vtype1393 = 0;
              $xfer += $input->readMapBegin($_ktype1392, $_vtype1393, $_size1391);
              for ($_i1395 = 0; $_i1395 < $_size1391; ++$_i1395)
              {
                $key1396 = '';
                $val1397 = array();
                $xfer += $input->readString($key1396);
                $val1397 = array();
                $_size1398 = 0;
                $_etype1401 = 0;
                $xfer += $input->readSetBegin($_etype1401, $_size1398);
                for ($_i1402 = 0; $_i1402 < $_size1398; ++$_i1402)
                {
                  $elem1403 = null;
                  $elem1403 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1403->read($input);
                  if (is_scalar($elem1403)) {
                    $val1397 []= $elem1403;
                  } else {
                    $val1397 []= $elem1403;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1390[(!is_string($key1396) && !is_integer($key1396)) ? serialize($key1396) : $key1396] = $val1397;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1389) && !is_integer($key1389)) ? serialize($key1389) : $key1389] = $val1390;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectCclTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1404 => $viter1405)
          {
            $xfer += $output->writeI64($kiter1404);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1405));
              {
                foreach ($viter1405 as $kiter1406 => $viter1407)
                {
                  $xfer += $output->writeString($kiter1406);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1407));
                    {
                      foreach ($viter1407 as $iter1408 => $iter1409)
                      {
                        if (is_scalar($iter1409)) {
                        $xfer += $iter1408->write($output);
                        } else {
                        $xfer += $iter1409->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectCclTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectCclTimestr_args');
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 1);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectCclTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1410 = 0;
            $_ktype1411 = 0;
            $_vtype1412 = 0;
            $xfer += $input->readMapBegin($_ktype1411, $_vtype1412, $_size1410);
            for ($_i1414 = 0; $_i1414 < $_size1410; ++$_i1414)
            {
              $key1415 = 0;
              $val1416 = array();
              $xfer += $input->readI64($key1415);
              $val1416 = array();
              $_size1417 = 0;
              $_ktype1418 = 0;
              $_vtype1419 = 0;
              $xfer += $input->readMapBegin($_ktype1418, $_vtype1419, $_size1417);
              for ($_i1421 = 0; $_i1421 < $_size1417; ++$_i1421)
              {
                $key1422 = '';
                $val1423 = array();
                $xfer += $input->readString($key1422);
                $val1423 = array();
                $_size1424 = 0;
                $_etype1427 = 0;
                $xfer += $input->readSetBegin($_etype1427, $_size1424);
                for ($_i1428 = 0; $_i1428 < $_size1424; ++$_i1428)
                {
                  $elem1429 = null;
                  $elem1429 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1429->read($input);
                  if (is_scalar($elem1429)) {
                    $val1423 []= $elem1429;
                  } else {
                    $val1423 []= $elem1429;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1416[(!is_string($key1422) && !is_integer($key1422)) ? serialize($key1422) : $key1422] = $val1423;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1415) && !is_integer($key1415)) ? serialize($key1415) : $key1415] = $val1416;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectCclTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1430 => $viter1431)
          {
            $xfer += $output->writeI64($kiter1430);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1431));
              {
                foreach ($viter1431 as $kiter1432 => $viter1433)
                {
                  $xfer += $output->writeString($kiter1432);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1433));
                    {
                      foreach ($viter1433 as $iter1434 => $iter1435)
                      {
                        if (is_scalar($iter1435)) {
                        $xfer += $iter1434->write($output);
                        } else {
                        $xfer += $iter1435->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyCriteria_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyCriteria_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyCriteria_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1436 = 0;
            $_ktype1437 = 0;
            $_vtype1438 = 0;
            $xfer += $input->readMapBegin($_ktype1437, $_vtype1438, $_size1436);
            for ($_i1440 = 0; $_i1440 < $_size1436; ++$_i1440)
            {
              $key1441 = 0;
              $val1442 = array();
              $xfer += $input->readI64($key1441);
              $val1442 = array();
              $_size1443 = 0;
              $_etype1446 = 0;
              $xfer += $input->readSetBegin($_etype1446, $_size1443);
              for ($_i1447 = 0; $_i1447 < $_size1443; ++$_i1447)
              {
                $elem1448 = null;
                $elem1448 = new \concourse\thrift\data\TObject();
                $xfer += $elem1448->read($input);
                if (is_scalar($elem1448)) {
                  $val1442 []= $elem1448;
                } else {
                  $val1442 []= $elem1448;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key1441) && !is_integer($key1441)) ? serialize($key1441) : $key1441] = $val1442;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyCriteria_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter1449 => $viter1450)
          {
            $xfer += $output->writeI64($kiter1449);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter1450));
              {
                foreach ($viter1450 as $iter1451 => $iter1452)
                {
                  if (is_scalar($iter1452)) {
                  $xfer += $iter1451->write($output);
                  } else {
                  $xfer += $iter1452->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyCcl_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyCcl_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyCcl_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1453 = 0;
            $_ktype1454 = 0;
            $_vtype1455 = 0;
            $xfer += $input->readMapBegin($_ktype1454, $_vtype1455, $_size1453);
            for ($_i1457 = 0; $_i1457 < $_size1453; ++$_i1457)
            {
              $key1458 = 0;
              $val1459 = array();
              $xfer += $input->readI64($key1458);
              $val1459 = array();
              $_size1460 = 0;
              $_etype1463 = 0;
              $xfer += $input->readSetBegin($_etype1463, $_size1460);
              for ($_i1464 = 0; $_i1464 < $_size1460; ++$_i1464)
              {
                $elem1465 = null;
                $elem1465 = new \concourse\thrift\data\TObject();
                $xfer += $elem1465->read($input);
                if (is_scalar($elem1465)) {
                  $val1459 []= $elem1465;
                } else {
                  $val1459 []= $elem1465;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key1458) && !is_integer($key1458)) ? serialize($key1458) : $key1458] = $val1459;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyCcl_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter1466 => $viter1467)
          {
            $xfer += $output->writeI64($kiter1466);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter1467));
              {
                foreach ($viter1467 as $iter1468 => $iter1469)
                {
                  if (is_scalar($iter1469)) {
                  $xfer += $iter1468->write($output);
                  } else {
                  $xfer += $iter1469->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyCriteriaTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyCriteriaTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyCriteriaTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1470 = 0;
            $_ktype1471 = 0;
            $_vtype1472 = 0;
            $xfer += $input->readMapBegin($_ktype1471, $_vtype1472, $_size1470);
            for ($_i1474 = 0; $_i1474 < $_size1470; ++$_i1474)
            {
              $key1475 = 0;
              $val1476 = array();
              $xfer += $input->readI64($key1475);
              $val1476 = array();
              $_size1477 = 0;
              $_etype1480 = 0;
              $xfer += $input->readSetBegin($_etype1480, $_size1477);
              for ($_i1481 = 0; $_i1481 < $_size1477; ++$_i1481)
              {
                $elem1482 = null;
                $elem1482 = new \concourse\thrift\data\TObject();
                $xfer += $elem1482->read($input);
                if (is_scalar($elem1482)) {
                  $val1476 []= $elem1482;
                } else {
                  $val1476 []= $elem1482;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key1475) && !is_integer($key1475)) ? serialize($key1475) : $key1475] = $val1476;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyCriteriaTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter1483 => $viter1484)
          {
            $xfer += $output->writeI64($kiter1483);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter1484));
              {
                foreach ($viter1484 as $iter1485 => $iter1486)
                {
                  if (is_scalar($iter1486)) {
                  $xfer += $iter1485->write($output);
                  } else {
                  $xfer += $iter1486->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyCriteriaTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyCriteriaTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyCriteriaTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1487 = 0;
            $_ktype1488 = 0;
            $_vtype1489 = 0;
            $xfer += $input->readMapBegin($_ktype1488, $_vtype1489, $_size1487);
            for ($_i1491 = 0; $_i1491 < $_size1487; ++$_i1491)
            {
              $key1492 = 0;
              $val1493 = array();
              $xfer += $input->readI64($key1492);
              $val1493 = array();
              $_size1494 = 0;
              $_etype1497 = 0;
              $xfer += $input->readSetBegin($_etype1497, $_size1494);
              for ($_i1498 = 0; $_i1498 < $_size1494; ++$_i1498)
              {
                $elem1499 = null;
                $elem1499 = new \concourse\thrift\data\TObject();
                $xfer += $elem1499->read($input);
                if (is_scalar($elem1499)) {
                  $val1493 []= $elem1499;
                } else {
                  $val1493 []= $elem1499;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key1492) && !is_integer($key1492)) ? serialize($key1492) : $key1492] = $val1493;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyCriteriaTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter1500 => $viter1501)
          {
            $xfer += $output->writeI64($kiter1500);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter1501));
              {
                foreach ($viter1501 as $iter1502 => $iter1503)
                {
                  if (is_scalar($iter1503)) {
                  $xfer += $iter1502->write($output);
                  } else {
                  $xfer += $iter1503->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyCclTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyCclTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyCclTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1504 = 0;
            $_ktype1505 = 0;
            $_vtype1506 = 0;
            $xfer += $input->readMapBegin($_ktype1505, $_vtype1506, $_size1504);
            for ($_i1508 = 0; $_i1508 < $_size1504; ++$_i1508)
            {
              $key1509 = 0;
              $val1510 = array();
              $xfer += $input->readI64($key1509);
              $val1510 = array();
              $_size1511 = 0;
              $_etype1514 = 0;
              $xfer += $input->readSetBegin($_etype1514, $_size1511);
              for ($_i1515 = 0; $_i1515 < $_size1511; ++$_i1515)
              {
                $elem1516 = null;
                $elem1516 = new \concourse\thrift\data\TObject();
                $xfer += $elem1516->read($input);
                if (is_scalar($elem1516)) {
                  $val1510 []= $elem1516;
                } else {
                  $val1510 []= $elem1516;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key1509) && !is_integer($key1509)) ? serialize($key1509) : $key1509] = $val1510;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyCclTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter1517 => $viter1518)
          {
            $xfer += $output->writeI64($kiter1517);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter1518));
              {
                foreach ($viter1518 as $iter1519 => $iter1520)
                {
                  if (is_scalar($iter1520)) {
                  $xfer += $iter1519->write($output);
                  } else {
                  $xfer += $iter1520->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyCclTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyCclTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeyCclTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1521 = 0;
            $_ktype1522 = 0;
            $_vtype1523 = 0;
            $xfer += $input->readMapBegin($_ktype1522, $_vtype1523, $_size1521);
            for ($_i1525 = 0; $_i1525 < $_size1521; ++$_i1525)
            {
              $key1526 = 0;
              $val1527 = array();
              $xfer += $input->readI64($key1526);
              $val1527 = array();
              $_size1528 = 0;
              $_etype1531 = 0;
              $xfer += $input->readSetBegin($_etype1531, $_size1528);
              for ($_i1532 = 0; $_i1532 < $_size1528; ++$_i1532)
              {
                $elem1533 = null;
                $elem1533 = new \concourse\thrift\data\TObject();
                $xfer += $elem1533->read($input);
                if (is_scalar($elem1533)) {
                  $val1527 []= $elem1533;
                } else {
                  $val1527 []= $elem1533;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key1526) && !is_integer($key1526)) ? serialize($key1526) : $key1526] = $val1527;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeyCclTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter1534 => $viter1535)
          {
            $xfer += $output->writeI64($kiter1534);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter1535));
              {
                foreach ($viter1535 as $iter1536 => $iter1537)
                {
                  if (is_scalar($iter1537)) {
                  $xfer += $iter1536->write($output);
                  } else {
                  $xfer += $iter1537->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysCriteria_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1538 = 0;
            $_etype1541 = 0;
            $xfer += $input->readListBegin($_etype1541, $_size1538);
            for ($_i1542 = 0; $_i1542 < $_size1538; ++$_i1542)
            {
              $elem1543 = null;
              $xfer += $input->readString($elem1543);
              $this->keys []= $elem1543;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysCriteria_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1544)
          {
            $xfer += $output->writeString($iter1544);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysCriteria_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1545 = 0;
            $_ktype1546 = 0;
            $_vtype1547 = 0;
            $xfer += $input->readMapBegin($_ktype1546, $_vtype1547, $_size1545);
            for ($_i1549 = 0; $_i1549 < $_size1545; ++$_i1549)
            {
              $key1550 = 0;
              $val1551 = array();
              $xfer += $input->readI64($key1550);
              $val1551 = array();
              $_size1552 = 0;
              $_ktype1553 = 0;
              $_vtype1554 = 0;
              $xfer += $input->readMapBegin($_ktype1553, $_vtype1554, $_size1552);
              for ($_i1556 = 0; $_i1556 < $_size1552; ++$_i1556)
              {
                $key1557 = '';
                $val1558 = array();
                $xfer += $input->readString($key1557);
                $val1558 = array();
                $_size1559 = 0;
                $_etype1562 = 0;
                $xfer += $input->readSetBegin($_etype1562, $_size1559);
                for ($_i1563 = 0; $_i1563 < $_size1559; ++$_i1563)
                {
                  $elem1564 = null;
                  $elem1564 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1564->read($input);
                  if (is_scalar($elem1564)) {
                    $val1558 []= $elem1564;
                  } else {
                    $val1558 []= $elem1564;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1551[(!is_string($key1557) && !is_integer($key1557)) ? serialize($key1557) : $key1557] = $val1558;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1550) && !is_integer($key1550)) ? serialize($key1550) : $key1550] = $val1551;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysCriteria_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1565 => $viter1566)
          {
            $xfer += $output->writeI64($kiter1565);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1566));
              {
                foreach ($viter1566 as $kiter1567 => $viter1568)
                {
                  $xfer += $output->writeString($kiter1567);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1568));
                    {
                      foreach ($viter1568 as $iter1569 => $iter1570)
                      {
                        if (is_scalar($iter1570)) {
                        $xfer += $iter1569->write($output);
                        } else {
                        $xfer += $iter1570->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysCcl_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1571 = 0;
            $_etype1574 = 0;
            $xfer += $input->readListBegin($_etype1574, $_size1571);
            for ($_i1575 = 0; $_i1575 < $_size1571; ++$_i1575)
            {
              $elem1576 = null;
              $xfer += $input->readString($elem1576);
              $this->keys []= $elem1576;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysCcl_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1577)
          {
            $xfer += $output->writeString($iter1577);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysCcl_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1578 = 0;
            $_ktype1579 = 0;
            $_vtype1580 = 0;
            $xfer += $input->readMapBegin($_ktype1579, $_vtype1580, $_size1578);
            for ($_i1582 = 0; $_i1582 < $_size1578; ++$_i1582)
            {
              $key1583 = 0;
              $val1584 = array();
              $xfer += $input->readI64($key1583);
              $val1584 = array();
              $_size1585 = 0;
              $_ktype1586 = 0;
              $_vtype1587 = 0;
              $xfer += $input->readMapBegin($_ktype1586, $_vtype1587, $_size1585);
              for ($_i1589 = 0; $_i1589 < $_size1585; ++$_i1589)
              {
                $key1590 = '';
                $val1591 = array();
                $xfer += $input->readString($key1590);
                $val1591 = array();
                $_size1592 = 0;
                $_etype1595 = 0;
                $xfer += $input->readSetBegin($_etype1595, $_size1592);
                for ($_i1596 = 0; $_i1596 < $_size1592; ++$_i1596)
                {
                  $elem1597 = null;
                  $elem1597 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1597->read($input);
                  if (is_scalar($elem1597)) {
                    $val1591 []= $elem1597;
                  } else {
                    $val1591 []= $elem1597;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1584[(!is_string($key1590) && !is_integer($key1590)) ? serialize($key1590) : $key1590] = $val1591;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1583) && !is_integer($key1583)) ? serialize($key1583) : $key1583] = $val1584;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysCcl_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1598 => $viter1599)
          {
            $xfer += $output->writeI64($kiter1598);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1599));
              {
                foreach ($viter1599 as $kiter1600 => $viter1601)
                {
                  $xfer += $output->writeString($kiter1600);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1601));
                    {
                      foreach ($viter1601 as $iter1602 => $iter1603)
                      {
                        if (is_scalar($iter1603)) {
                        $xfer += $iter1602->write($output);
                        } else {
                        $xfer += $iter1603->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysCriteriaTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1604 = 0;
            $_etype1607 = 0;
            $xfer += $input->readListBegin($_etype1607, $_size1604);
            for ($_i1608 = 0; $_i1608 < $_size1604; ++$_i1608)
            {
              $elem1609 = null;
              $xfer += $input->readString($elem1609);
              $this->keys []= $elem1609;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysCriteriaTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1610)
          {
            $xfer += $output->writeString($iter1610);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysCriteriaTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1611 = 0;
            $_ktype1612 = 0;
            $_vtype1613 = 0;
            $xfer += $input->readMapBegin($_ktype1612, $_vtype1613, $_size1611);
            for ($_i1615 = 0; $_i1615 < $_size1611; ++$_i1615)
            {
              $key1616 = 0;
              $val1617 = array();
              $xfer += $input->readI64($key1616);
              $val1617 = array();
              $_size1618 = 0;
              $_ktype1619 = 0;
              $_vtype1620 = 0;
              $xfer += $input->readMapBegin($_ktype1619, $_vtype1620, $_size1618);
              for ($_i1622 = 0; $_i1622 < $_size1618; ++$_i1622)
              {
                $key1623 = '';
                $val1624 = array();
                $xfer += $input->readString($key1623);
                $val1624 = array();
                $_size1625 = 0;
                $_etype1628 = 0;
                $xfer += $input->readSetBegin($_etype1628, $_size1625);
                for ($_i1629 = 0; $_i1629 < $_size1625; ++$_i1629)
                {
                  $elem1630 = null;
                  $elem1630 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1630->read($input);
                  if (is_scalar($elem1630)) {
                    $val1624 []= $elem1630;
                  } else {
                    $val1624 []= $elem1630;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1617[(!is_string($key1623) && !is_integer($key1623)) ? serialize($key1623) : $key1623] = $val1624;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1616) && !is_integer($key1616)) ? serialize($key1616) : $key1616] = $val1617;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysCriteriaTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1631 => $viter1632)
          {
            $xfer += $output->writeI64($kiter1631);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1632));
              {
                foreach ($viter1632 as $kiter1633 => $viter1634)
                {
                  $xfer += $output->writeString($kiter1633);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1634));
                    {
                      foreach ($viter1634 as $iter1635 => $iter1636)
                      {
                        if (is_scalar($iter1636)) {
                        $xfer += $iter1635->write($output);
                        } else {
                        $xfer += $iter1636->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysCriteriaTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1637 = 0;
            $_etype1640 = 0;
            $xfer += $input->readListBegin($_etype1640, $_size1637);
            for ($_i1641 = 0; $_i1641 < $_size1637; ++$_i1641)
            {
              $elem1642 = null;
              $xfer += $input->readString($elem1642);
              $this->keys []= $elem1642;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysCriteriaTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1643)
          {
            $xfer += $output->writeString($iter1643);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysCriteriaTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1644 = 0;
            $_ktype1645 = 0;
            $_vtype1646 = 0;
            $xfer += $input->readMapBegin($_ktype1645, $_vtype1646, $_size1644);
            for ($_i1648 = 0; $_i1648 < $_size1644; ++$_i1648)
            {
              $key1649 = 0;
              $val1650 = array();
              $xfer += $input->readI64($key1649);
              $val1650 = array();
              $_size1651 = 0;
              $_ktype1652 = 0;
              $_vtype1653 = 0;
              $xfer += $input->readMapBegin($_ktype1652, $_vtype1653, $_size1651);
              for ($_i1655 = 0; $_i1655 < $_size1651; ++$_i1655)
              {
                $key1656 = '';
                $val1657 = array();
                $xfer += $input->readString($key1656);
                $val1657 = array();
                $_size1658 = 0;
                $_etype1661 = 0;
                $xfer += $input->readSetBegin($_etype1661, $_size1658);
                for ($_i1662 = 0; $_i1662 < $_size1658; ++$_i1662)
                {
                  $elem1663 = null;
                  $elem1663 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1663->read($input);
                  if (is_scalar($elem1663)) {
                    $val1657 []= $elem1663;
                  } else {
                    $val1657 []= $elem1663;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1650[(!is_string($key1656) && !is_integer($key1656)) ? serialize($key1656) : $key1656] = $val1657;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1649) && !is_integer($key1649)) ? serialize($key1649) : $key1649] = $val1650;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysCriteriaTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1664 => $viter1665)
          {
            $xfer += $output->writeI64($kiter1664);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1665));
              {
                foreach ($viter1665 as $kiter1666 => $viter1667)
                {
                  $xfer += $output->writeString($kiter1666);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1667));
                    {
                      foreach ($viter1667 as $iter1668 => $iter1669)
                      {
                        if (is_scalar($iter1669)) {
                        $xfer += $iter1668->write($output);
                        } else {
                        $xfer += $iter1669->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysCclTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1670 = 0;
            $_etype1673 = 0;
            $xfer += $input->readListBegin($_etype1673, $_size1670);
            for ($_i1674 = 0; $_i1674 < $_size1670; ++$_i1674)
            {
              $elem1675 = null;
              $xfer += $input->readString($elem1675);
              $this->keys []= $elem1675;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysCclTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1676)
          {
            $xfer += $output->writeString($iter1676);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysCclTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1677 = 0;
            $_ktype1678 = 0;
            $_vtype1679 = 0;
            $xfer += $input->readMapBegin($_ktype1678, $_vtype1679, $_size1677);
            for ($_i1681 = 0; $_i1681 < $_size1677; ++$_i1681)
            {
              $key1682 = 0;
              $val1683 = array();
              $xfer += $input->readI64($key1682);
              $val1683 = array();
              $_size1684 = 0;
              $_ktype1685 = 0;
              $_vtype1686 = 0;
              $xfer += $input->readMapBegin($_ktype1685, $_vtype1686, $_size1684);
              for ($_i1688 = 0; $_i1688 < $_size1684; ++$_i1688)
              {
                $key1689 = '';
                $val1690 = array();
                $xfer += $input->readString($key1689);
                $val1690 = array();
                $_size1691 = 0;
                $_etype1694 = 0;
                $xfer += $input->readSetBegin($_etype1694, $_size1691);
                for ($_i1695 = 0; $_i1695 < $_size1691; ++$_i1695)
                {
                  $elem1696 = null;
                  $elem1696 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1696->read($input);
                  if (is_scalar($elem1696)) {
                    $val1690 []= $elem1696;
                  } else {
                    $val1690 []= $elem1696;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1683[(!is_string($key1689) && !is_integer($key1689)) ? serialize($key1689) : $key1689] = $val1690;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1682) && !is_integer($key1682)) ? serialize($key1682) : $key1682] = $val1683;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysCclTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1697 => $viter1698)
          {
            $xfer += $output->writeI64($kiter1697);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1698));
              {
                foreach ($viter1698 as $kiter1699 => $viter1700)
                {
                  $xfer += $output->writeString($kiter1699);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1700));
                    {
                      foreach ($viter1700 as $iter1701 => $iter1702)
                      {
                        if (is_scalar($iter1702)) {
                        $xfer += $iter1701->write($output);
                        } else {
                        $xfer += $iter1702->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysCclTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1703 = 0;
            $_etype1706 = 0;
            $xfer += $input->readListBegin($_etype1706, $_size1703);
            for ($_i1707 = 0; $_i1707 < $_size1703; ++$_i1707)
            {
              $elem1708 = null;
              $xfer += $input->readString($elem1708);
              $this->keys []= $elem1708;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysCclTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1709)
          {
            $xfer += $output->writeString($iter1709);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_selectKeysCclTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1710 = 0;
            $_ktype1711 = 0;
            $_vtype1712 = 0;
            $xfer += $input->readMapBegin($_ktype1711, $_vtype1712, $_size1710);
            for ($_i1714 = 0; $_i1714 < $_size1710; ++$_i1714)
            {
              $key1715 = 0;
              $val1716 = array();
              $xfer += $input->readI64($key1715);
              $val1716 = array();
              $_size1717 = 0;
              $_ktype1718 = 0;
              $_vtype1719 = 0;
              $xfer += $input->readMapBegin($_ktype1718, $_vtype1719, $_size1717);
              for ($_i1721 = 0; $_i1721 < $_size1717; ++$_i1721)
              {
                $key1722 = '';
                $val1723 = array();
                $xfer += $input->readString($key1722);
                $val1723 = array();
                $_size1724 = 0;
                $_etype1727 = 0;
                $xfer += $input->readSetBegin($_etype1727, $_size1724);
                for ($_i1728 = 0; $_i1728 < $_size1724; ++$_i1728)
                {
                  $elem1729 = null;
                  $elem1729 = new \concourse\thrift\data\TObject();
                  $xfer += $elem1729->read($input);
                  if (is_scalar($elem1729)) {
                    $val1723 []= $elem1729;
                  } else {
                    $val1723 []= $elem1729;
                  }
                }
                $xfer += $input->readSetEnd();
                $val1716[(!is_string($key1722) && !is_integer($key1722)) ? serialize($key1722) : $key1722] = $val1723;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1715) && !is_integer($key1715)) ? serialize($key1715) : $key1715] = $val1716;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_selectKeysCclTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1730 => $viter1731)
          {
            $xfer += $output->writeI64($kiter1730);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter1731));
              {
                foreach ($viter1731 as $kiter1732 => $viter1733)
                {
                  $xfer += $output->writeString($kiter1732);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter1733));
                    {
                      foreach ($viter1733 as $iter1734 => $iter1735)
                      {
                        if (is_scalar($iter1735)) {
                        $xfer += $iter1734->write($output);
                        } else {
                        $xfer += $iter1735->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyRecord_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyRecord_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyRecordTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyRecordTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyRecordTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyRecordTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyRecordTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyRecordTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysRecord_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1736 = 0;
            $_etype1739 = 0;
            $xfer += $input->readListBegin($_etype1739, $_size1736);
            for ($_i1740 = 0; $_i1740 < $_size1736; ++$_i1740)
            {
              $elem1741 = null;
              $xfer += $input->readString($elem1741);
              $this->keys []= $elem1741;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysRecord_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1742)
          {
            $xfer += $output->writeString($iter1742);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysRecord_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::STRUCT,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1743 = 0;
            $_ktype1744 = 0;
            $_vtype1745 = 0;
            $xfer += $input->readMapBegin($_ktype1744, $_vtype1745, $_size1743);
            for ($_i1747 = 0; $_i1747 < $_size1743; ++$_i1747)
            {
              $key1748 = '';
              $val1749 = new \concourse\thrift\data\TObject();
              $xfer += $input->readString($key1748);
              $val1749 = new \concourse\thrift\data\TObject();
              $xfer += $val1749->read($input);
              $this->success[(!is_string($key1748) && !is_integer($key1748)) ? serialize($key1748) : $key1748] = $val1749;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysRecord_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $kiter1750 => $viter1751)
          {
            $xfer += $output->writeString($kiter1750);
            $xfer += $viter1751->write($output);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysRecordTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1752 = 0;
            $_etype1755 = 0;
            $xfer += $input->readListBegin($_etype1755, $_size1752);
            for ($_i1756 = 0; $_i1756 < $_size1752; ++$_i1756)
            {
              $elem1757 = null;
              $xfer += $input->readString($elem1757);
              $this->keys []= $elem1757;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysRecordTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1758)
          {
            $xfer += $output->writeString($iter1758);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysRecordTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::STRUCT,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1759 = 0;
            $_ktype1760 = 0;
            $_vtype1761 = 0;
            $xfer += $input->readMapBegin($_ktype1760, $_vtype1761, $_size1759);
            for ($_i1763 = 0; $_i1763 < $_size1759; ++$_i1763)
            {
              $key1764 = '';
              $val1765 = new \concourse\thrift\data\TObject();
              $xfer += $input->readString($key1764);
              $val1765 = new \concourse\thrift\data\TObject();
              $xfer += $val1765->read($input);
              $this->success[(!is_string($key1764) && !is_integer($key1764)) ? serialize($key1764) : $key1764] = $val1765;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysRecordTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $kiter1766 => $viter1767)
          {
            $xfer += $output->writeString($kiter1766);
            $xfer += $viter1767->write($output);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1768 = 0;
            $_etype1771 = 0;
            $xfer += $input->readListBegin($_etype1771, $_size1768);
            for ($_i1772 = 0; $_i1772 < $_size1768; ++$_i1772)
            {
              $elem1773 = null;
              $xfer += $input->readString($elem1773);
              $this->keys []= $elem1773;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysRecordTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1774)
          {
            $xfer += $output->writeString($iter1774);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::STRING,
          'vtype' => TType::STRUCT,
          'key' => array(
            'type' => TType::STRING,
          ),
          'val' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1775 = 0;
            $_ktype1776 = 0;
            $_vtype1777 = 0;
            $xfer += $input->readMapBegin($_ktype1776, $_vtype1777, $_size1775);
            for ($_i1779 = 0; $_i1779 < $_size1775; ++$_i1779)
            {
              $key1780 = '';
              $val1781 = new \concourse\thrift\data\TObject();
              $xfer += $input->readString($key1780);
              $val1781 = new \concourse\thrift\data\TObject();
              $xfer += $val1781->read($input);
              $this->success[(!is_string($key1780) && !is_integer($key1780)) ? serialize($key1780) : $key1780] = $val1781;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysRecordTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $kiter1782 => $viter1783)
          {
            $xfer += $output->writeString($kiter1782);
            $xfer += $viter1783->write($output);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysRecords_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1784 = 0;
            $_etype1787 = 0;
            $xfer += $input->readListBegin($_etype1787, $_size1784);
            for ($_i1788 = 0; $_i1788 < $_size1784; ++$_i1788)
            {
              $elem1789 = null;
              $xfer += $input->readString($elem1789);
              $this->keys []= $elem1789;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size1790 = 0;
            $_etype1793 = 0;
            $xfer += $input->readListBegin($_etype1793, $_size1790);
            for ($_i1794 = 0; $_i1794 < $_size1790; ++$_i1794)
            {
              $elem1795 = null;
              $xfer += $input->readI64($elem1795);
              $this->records []= $elem1795;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysRecords_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1796)
          {
            $xfer += $output->writeString($iter1796);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter1797)
          {
            $xfer += $output->writeI64($iter1797);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysRecords_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1798 = 0;
            $_ktype1799 = 0;
            $_vtype1800 = 0;
            $xfer += $input->readMapBegin($_ktype1799, $_vtype1800, $_size1798);
            for ($_i1802 = 0; $_i1802 < $_size1798; ++$_i1802)
            {
              $key1803 = 0;
              $val1804 = array();
              $xfer += $input->readI64($key1803);
              $val1804 = array();
              $_size1805 = 0;
              $_ktype1806 = 0;
              $_vtype1807 = 0;
              $xfer += $input->readMapBegin($_ktype1806, $_vtype1807, $_size1805);
              for ($_i1809 = 0; $_i1809 < $_size1805; ++$_i1809)
              {
                $key1810 = '';
                $val1811 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key1810);
                $val1811 = new \concourse\thrift\data\TObject();
                $xfer += $val1811->read($input);
                $val1804[(!is_string($key1810) && !is_integer($key1810)) ? serialize($key1810) : $key1810] = $val1811;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1803) && !is_integer($key1803)) ? serialize($key1803) : $key1803] = $val1804;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysRecords_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1812 => $viter1813)
          {
            $xfer += $output->writeI64($kiter1812);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter1813));
              {
                foreach ($viter1813 as $kiter1814 => $viter1815)
                {
                  $xfer += $output->writeString($kiter1814);
                  $xfer += $viter1815->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyRecords_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size1816 = 0;
            $_etype1819 = 0;
            $xfer += $input->readListBegin($_etype1819, $_size1816);
            for ($_i1820 = 0; $_i1820 < $_size1816; ++$_i1820)
            {
              $elem1821 = null;
              $xfer += $input->readI64($elem1821);
              $this->records []= $elem1821;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyRecords_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter1822)
          {
            $xfer += $output->writeI64($iter1822);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyRecords_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRUCT,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1823 = 0;
            $_ktype1824 = 0;
            $_vtype1825 = 0;
            $xfer += $input->readMapBegin($_ktype1824, $_vtype1825, $_size1823);
            for ($_i1827 = 0; $_i1827 < $_size1823; ++$_i1827)
            {
              $key1828 = 0;
              $val1829 = new \concourse\thrift\data\TObject();
              $xfer += $input->readI64($key1828);
              $val1829 = new \concourse\thrift\data\TObject();
              $xfer += $val1829->read($input);
              $this->success[(!is_string($key1828) && !is_integer($key1828)) ? serialize($key1828) : $key1828] = $val1829;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyRecords_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $kiter1830 => $viter1831)
          {
            $xfer += $output->writeI64($kiter1830);
            $xfer += $viter1831->write($output);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyRecordsTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size1832 = 0;
            $_etype1835 = 0;
            $xfer += $input->readListBegin($_etype1835, $_size1832);
            for ($_i1836 = 0; $_i1836 < $_size1832; ++$_i1836)
            {
              $elem1837 = null;
              $xfer += $input->readI64($elem1837);
              $this->records []= $elem1837;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyRecordsTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter1838)
          {
            $xfer += $output->writeI64($iter1838);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyRecordsTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRUCT,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1839 = 0;
            $_ktype1840 = 0;
            $_vtype1841 = 0;
            $xfer += $input->readMapBegin($_ktype1840, $_vtype1841, $_size1839);
            for ($_i1843 = 0; $_i1843 < $_size1839; ++$_i1843)
            {
              $key1844 = 0;
              $val1845 = new \concourse\thrift\data\TObject();
              $xfer += $input->readI64($key1844);
              $val1845 = new \concourse\thrift\data\TObject();
              $xfer += $val1845->read($input);
              $this->success[(!is_string($key1844) && !is_integer($key1844)) ? serialize($key1844) : $key1844] = $val1845;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyRecordsTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $kiter1846 => $viter1847)
          {
            $xfer += $output->writeI64($kiter1846);
            $xfer += $viter1847->write($output);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size1848 = 0;
            $_etype1851 = 0;
            $xfer += $input->readListBegin($_etype1851, $_size1848);
            for ($_i1852 = 0; $_i1852 < $_size1848; ++$_i1852)
            {
              $elem1853 = null;
              $xfer += $input->readI64($elem1853);
              $this->records []= $elem1853;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyRecordsTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter1854)
          {
            $xfer += $output->writeI64($iter1854);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRUCT,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1855 = 0;
            $_ktype1856 = 0;
            $_vtype1857 = 0;
            $xfer += $input->readMapBegin($_ktype1856, $_vtype1857, $_size1855);
            for ($_i1859 = 0; $_i1859 < $_size1855; ++$_i1859)
            {
              $key1860 = 0;
              $val1861 = new \concourse\thrift\data\TObject();
              $xfer += $input->readI64($key1860);
              $val1861 = new \concourse\thrift\data\TObject();
              $xfer += $val1861->read($input);
              $this->success[(!is_string($key1860) && !is_integer($key1860)) ? serialize($key1860) : $key1860] = $val1861;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyRecordsTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $kiter1862 => $viter1863)
          {
            $xfer += $output->writeI64($kiter1862);
            $xfer += $viter1863->write($output);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysRecordsTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1864 = 0;
            $_etype1867 = 0;
            $xfer += $input->readListBegin($_etype1867, $_size1864);
            for ($_i1868 = 0; $_i1868 < $_size1864; ++$_i1868)
            {
              $elem1869 = null;
              $xfer += $input->readString($elem1869);
              $this->keys []= $elem1869;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size1870 = 0;
            $_etype1873 = 0;
            $xfer += $input->readListBegin($_etype1873, $_size1870);
            for ($_i1874 = 0; $_i1874 < $_size1870; ++$_i1874)
            {
              $elem1875 = null;
              $xfer += $input->readI64($elem1875);
              $this->records []= $elem1875;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysRecordsTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1876)
          {
            $xfer += $output->writeString($iter1876);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter1877)
          {
            $xfer += $output->writeI64($iter1877);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysRecordsTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1878 = 0;
            $_ktype1879 = 0;
            $_vtype1880 = 0;
            $xfer += $input->readMapBegin($_ktype1879, $_vtype1880, $_size1878);
            for ($_i1882 = 0; $_i1882 < $_size1878; ++$_i1882)
            {
              $key1883 = 0;
              $val1884 = array();
              $xfer += $input->readI64($key1883);
              $val1884 = array();
              $_size1885 = 0;
              $_ktype1886 = 0;
              $_vtype1887 = 0;
              $xfer += $input->readMapBegin($_ktype1886, $_vtype1887, $_size1885);
              for ($_i1889 = 0; $_i1889 < $_size1885; ++$_i1889)
              {
                $key1890 = '';
                $val1891 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key1890);
                $val1891 = new \concourse\thrift\data\TObject();
                $xfer += $val1891->read($input);
                $val1884[(!is_string($key1890) && !is_integer($key1890)) ? serialize($key1890) : $key1890] = $val1891;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1883) && !is_integer($key1883)) ? serialize($key1883) : $key1883] = $val1884;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysRecordsTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1892 => $viter1893)
          {
            $xfer += $output->writeI64($kiter1892);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter1893));
              {
                foreach ($viter1893 as $kiter1894 => $viter1895)
                {
                  $xfer += $output->writeString($kiter1894);
                  $xfer += $viter1895->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size1896 = 0;
            $_etype1899 = 0;
            $xfer += $input->readListBegin($_etype1899, $_size1896);
            for ($_i1900 = 0; $_i1900 < $_size1896; ++$_i1900)
            {
              $elem1901 = null;
              $xfer += $input->readString($elem1901);
              $this->keys []= $elem1901;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size1902 = 0;
            $_etype1905 = 0;
            $xfer += $input->readListBegin($_etype1905, $_size1902);
            for ($_i1906 = 0; $_i1906 < $_size1902; ++$_i1906)
            {
              $elem1907 = null;
              $xfer += $input->readI64($elem1907);
              $this->records []= $elem1907;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysRecordsTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter1908)
          {
            $xfer += $output->writeString($iter1908);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter1909)
          {
            $xfer += $output->writeI64($iter1909);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1910 = 0;
            $_ktype1911 = 0;
            $_vtype1912 = 0;
            $xfer += $input->readMapBegin($_ktype1911, $_vtype1912, $_size1910);
            for ($_i1914 = 0; $_i1914 < $_size1910; ++$_i1914)
            {
              $key1915 = 0;
              $val1916 = array();
              $xfer += $input->readI64($key1915);
              $val1916 = array();
              $_size1917 = 0;
              $_ktype1918 = 0;
              $_vtype1919 = 0;
              $xfer += $input->readMapBegin($_ktype1918, $_vtype1919, $_size1917);
              for ($_i1921 = 0; $_i1921 < $_size1917; ++$_i1921)
              {
                $key1922 = '';
                $val1923 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key1922);
                $val1923 = new \concourse\thrift\data\TObject();
                $xfer += $val1923->read($input);
                $val1916[(!is_string($key1922) && !is_integer($key1922)) ? serialize($key1922) : $key1922] = $val1923;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1915) && !is_integer($key1915)) ? serialize($key1915) : $key1915] = $val1916;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysRecordsTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1924 => $viter1925)
          {
            $xfer += $output->writeI64($kiter1924);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter1925));
              {
                foreach ($viter1925 as $kiter1926 => $viter1927)
                {
                  $xfer += $output->writeString($kiter1926);
                  $xfer += $viter1927->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyCriteria_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyCriteria_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyCriteria_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRUCT,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1928 = 0;
            $_ktype1929 = 0;
            $_vtype1930 = 0;
            $xfer += $input->readMapBegin($_ktype1929, $_vtype1930, $_size1928);
            for ($_i1932 = 0; $_i1932 < $_size1928; ++$_i1932)
            {
              $key1933 = 0;
              $val1934 = new \concourse\thrift\data\TObject();
              $xfer += $input->readI64($key1933);
              $val1934 = new \concourse\thrift\data\TObject();
              $xfer += $val1934->read($input);
              $this->success[(!is_string($key1933) && !is_integer($key1933)) ? serialize($key1933) : $key1933] = $val1934;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyCriteria_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $kiter1935 => $viter1936)
          {
            $xfer += $output->writeI64($kiter1935);
            $xfer += $viter1936->write($output);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getCriteria_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getCriteria_args');
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 1);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getCriteria_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1937 = 0;
            $_ktype1938 = 0;
            $_vtype1939 = 0;
            $xfer += $input->readMapBegin($_ktype1938, $_vtype1939, $_size1937);
            for ($_i1941 = 0; $_i1941 < $_size1937; ++$_i1941)
            {
              $key1942 = 0;
              $val1943 = array();
              $xfer += $input->readI64($key1942);
              $val1943 = array();
              $_size1944 = 0;
              $_ktype1945 = 0;
              $_vtype1946 = 0;
              $xfer += $input->readMapBegin($_ktype1945, $_vtype1946, $_size1944);
              for ($_i1948 = 0; $_i1948 < $_size1944; ++$_i1948)
              {
                $key1949 = '';
                $val1950 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key1949);
                $val1950 = new \concourse\thrift\data\TObject();
                $xfer += $val1950->read($input);
                $val1943[(!is_string($key1949) && !is_integer($key1949)) ? serialize($key1949) : $key1949] = $val1950;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1942) && !is_integer($key1942)) ? serialize($key1942) : $key1942] = $val1943;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getCriteria_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1951 => $viter1952)
          {
            $xfer += $output->writeI64($kiter1951);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter1952));
              {
                foreach ($viter1952 as $kiter1953 => $viter1954)
                {
                  $xfer += $output->writeString($kiter1953);
                  $xfer += $viter1954->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getCcl_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getCcl_args');
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 1);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getCcl_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1955 = 0;
            $_ktype1956 = 0;
            $_vtype1957 = 0;
            $xfer += $input->readMapBegin($_ktype1956, $_vtype1957, $_size1955);
            for ($_i1959 = 0; $_i1959 < $_size1955; ++$_i1959)
            {
              $key1960 = 0;
              $val1961 = array();
              $xfer += $input->readI64($key1960);
              $val1961 = array();
              $_size1962 = 0;
              $_ktype1963 = 0;
              $_vtype1964 = 0;
              $xfer += $input->readMapBegin($_ktype1963, $_vtype1964, $_size1962);
              for ($_i1966 = 0; $_i1966 < $_size1962; ++$_i1966)
              {
                $key1967 = '';
                $val1968 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key1967);
                $val1968 = new \concourse\thrift\data\TObject();
                $xfer += $val1968->read($input);
                $val1961[(!is_string($key1967) && !is_integer($key1967)) ? serialize($key1967) : $key1967] = $val1968;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1960) && !is_integer($key1960)) ? serialize($key1960) : $key1960] = $val1961;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getCcl_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1969 => $viter1970)
          {
            $xfer += $output->writeI64($kiter1969);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter1970));
              {
                foreach ($viter1970 as $kiter1971 => $viter1972)
                {
                  $xfer += $output->writeString($kiter1971);
                  $xfer += $viter1972->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getCriteriaTime_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getCriteriaTime_args');
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 1);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getCriteriaTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1973 = 0;
            $_ktype1974 = 0;
            $_vtype1975 = 0;
            $xfer += $input->readMapBegin($_ktype1974, $_vtype1975, $_size1973);
            for ($_i1977 = 0; $_i1977 < $_size1973; ++$_i1977)
            {
              $key1978 = 0;
              $val1979 = array();
              $xfer += $input->readI64($key1978);
              $val1979 = array();
              $_size1980 = 0;
              $_ktype1981 = 0;
              $_vtype1982 = 0;
              $xfer += $input->readMapBegin($_ktype1981, $_vtype1982, $_size1980);
              for ($_i1984 = 0; $_i1984 < $_size1980; ++$_i1984)
              {
                $key1985 = '';
                $val1986 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key1985);
                $val1986 = new \concourse\thrift\data\TObject();
                $xfer += $val1986->read($input);
                $val1979[(!is_string($key1985) && !is_integer($key1985)) ? serialize($key1985) : $key1985] = $val1986;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1978) && !is_integer($key1978)) ? serialize($key1978) : $key1978] = $val1979;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getCriteriaTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter1987 => $viter1988)
          {
            $xfer += $output->writeI64($kiter1987);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter1988));
              {
                foreach ($viter1988 as $kiter1989 => $viter1990)
                {
                  $xfer += $output->writeString($kiter1989);
                  $xfer += $viter1990->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getCriteriaTimestr_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getCriteriaTimestr_args');
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 1);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getCriteriaTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size1991 = 0;
            $_ktype1992 = 0;
            $_vtype1993 = 0;
            $xfer += $input->readMapBegin($_ktype1992, $_vtype1993, $_size1991);
            for ($_i1995 = 0; $_i1995 < $_size1991; ++$_i1995)
            {
              $key1996 = 0;
              $val1997 = array();
              $xfer += $input->readI64($key1996);
              $val1997 = array();
              $_size1998 = 0;
              $_ktype1999 = 0;
              $_vtype2000 = 0;
              $xfer += $input->readMapBegin($_ktype1999, $_vtype2000, $_size1998);
              for ($_i2002 = 0; $_i2002 < $_size1998; ++$_i2002)
              {
                $key2003 = '';
                $val2004 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key2003);
                $val2004 = new \concourse\thrift\data\TObject();
                $xfer += $val2004->read($input);
                $val1997[(!is_string($key2003) && !is_integer($key2003)) ? serialize($key2003) : $key2003] = $val2004;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key1996) && !is_integer($key1996)) ? serialize($key1996) : $key1996] = $val1997;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getCriteriaTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2005 => $viter2006)
          {
            $xfer += $output->writeI64($kiter2005);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter2006));
              {
                foreach ($viter2006 as $kiter2007 => $viter2008)
                {
                  $xfer += $output->writeString($kiter2007);
                  $xfer += $viter2008->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getCclTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getCclTime_args');
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 1);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getCclTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2009 = 0;
            $_ktype2010 = 0;
            $_vtype2011 = 0;
            $xfer += $input->readMapBegin($_ktype2010, $_vtype2011, $_size2009);
            for ($_i2013 = 0; $_i2013 < $_size2009; ++$_i2013)
            {
              $key2014 = 0;
              $val2015 = array();
              $xfer += $input->readI64($key2014);
              $val2015 = array();
              $_size2016 = 0;
              $_ktype2017 = 0;
              $_vtype2018 = 0;
              $xfer += $input->readMapBegin($_ktype2017, $_vtype2018, $_size2016);
              for ($_i2020 = 0; $_i2020 < $_size2016; ++$_i2020)
              {
                $key2021 = '';
                $val2022 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key2021);
                $val2022 = new \concourse\thrift\data\TObject();
                $xfer += $val2022->read($input);
                $val2015[(!is_string($key2021) && !is_integer($key2021)) ? serialize($key2021) : $key2021] = $val2022;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2014) && !is_integer($key2014)) ? serialize($key2014) : $key2014] = $val2015;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getCclTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2023 => $viter2024)
          {
            $xfer += $output->writeI64($kiter2023);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter2024));
              {
                foreach ($viter2024 as $kiter2025 => $viter2026)
                {
                  $xfer += $output->writeString($kiter2025);
                  $xfer += $viter2026->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getCclTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getCclTimestr_args');
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 1);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getCclTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2027 = 0;
            $_ktype2028 = 0;
            $_vtype2029 = 0;
            $xfer += $input->readMapBegin($_ktype2028, $_vtype2029, $_size2027);
            for ($_i2031 = 0; $_i2031 < $_size2027; ++$_i2031)
            {
              $key2032 = 0;
              $val2033 = array();
              $xfer += $input->readI64($key2032);
              $val2033 = array();
              $_size2034 = 0;
              $_ktype2035 = 0;
              $_vtype2036 = 0;
              $xfer += $input->readMapBegin($_ktype2035, $_vtype2036, $_size2034);
              for ($_i2038 = 0; $_i2038 < $_size2034; ++$_i2038)
              {
                $key2039 = '';
                $val2040 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key2039);
                $val2040 = new \concourse\thrift\data\TObject();
                $xfer += $val2040->read($input);
                $val2033[(!is_string($key2039) && !is_integer($key2039)) ? serialize($key2039) : $key2039] = $val2040;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2032) && !is_integer($key2032)) ? serialize($key2032) : $key2032] = $val2033;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getCclTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2041 => $viter2042)
          {
            $xfer += $output->writeI64($kiter2041);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter2042));
              {
                foreach ($viter2042 as $kiter2043 => $viter2044)
                {
                  $xfer += $output->writeString($kiter2043);
                  $xfer += $viter2044->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyCcl_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyCcl_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyCcl_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRUCT,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2045 = 0;
            $_ktype2046 = 0;
            $_vtype2047 = 0;
            $xfer += $input->readMapBegin($_ktype2046, $_vtype2047, $_size2045);
            for ($_i2049 = 0; $_i2049 < $_size2045; ++$_i2049)
            {
              $key2050 = 0;
              $val2051 = new \concourse\thrift\data\TObject();
              $xfer += $input->readI64($key2050);
              $val2051 = new \concourse\thrift\data\TObject();
              $xfer += $val2051->read($input);
              $this->success[(!is_string($key2050) && !is_integer($key2050)) ? serialize($key2050) : $key2050] = $val2051;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyCcl_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $kiter2052 => $viter2053)
          {
            $xfer += $output->writeI64($kiter2052);
            $xfer += $viter2053->write($output);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyCriteriaTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyCriteriaTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyCriteriaTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRUCT,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2054 = 0;
            $_ktype2055 = 0;
            $_vtype2056 = 0;
            $xfer += $input->readMapBegin($_ktype2055, $_vtype2056, $_size2054);
            for ($_i2058 = 0; $_i2058 < $_size2054; ++$_i2058)
            {
              $key2059 = 0;
              $val2060 = new \concourse\thrift\data\TObject();
              $xfer += $input->readI64($key2059);
              $val2060 = new \concourse\thrift\data\TObject();
              $xfer += $val2060->read($input);
              $this->success[(!is_string($key2059) && !is_integer($key2059)) ? serialize($key2059) : $key2059] = $val2060;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyCriteriaTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $kiter2061 => $viter2062)
          {
            $xfer += $output->writeI64($kiter2061);
            $xfer += $viter2062->write($output);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyCriteriaTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyCriteriaTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyCriteriaTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRUCT,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2063 = 0;
            $_ktype2064 = 0;
            $_vtype2065 = 0;
            $xfer += $input->readMapBegin($_ktype2064, $_vtype2065, $_size2063);
            for ($_i2067 = 0; $_i2067 < $_size2063; ++$_i2067)
            {
              $key2068 = 0;
              $val2069 = new \concourse\thrift\data\TObject();
              $xfer += $input->readI64($key2068);
              $val2069 = new \concourse\thrift\data\TObject();
              $xfer += $val2069->read($input);
              $this->success[(!is_string($key2068) && !is_integer($key2068)) ? serialize($key2068) : $key2068] = $val2069;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyCriteriaTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $kiter2070 => $viter2071)
          {
            $xfer += $output->writeI64($kiter2070);
            $xfer += $viter2071->write($output);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyCclTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyCclTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyCclTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRUCT,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2072 = 0;
            $_ktype2073 = 0;
            $_vtype2074 = 0;
            $xfer += $input->readMapBegin($_ktype2073, $_vtype2074, $_size2072);
            for ($_i2076 = 0; $_i2076 < $_size2072; ++$_i2076)
            {
              $key2077 = 0;
              $val2078 = new \concourse\thrift\data\TObject();
              $xfer += $input->readI64($key2077);
              $val2078 = new \concourse\thrift\data\TObject();
              $xfer += $val2078->read($input);
              $this->success[(!is_string($key2077) && !is_integer($key2077)) ? serialize($key2077) : $key2077] = $val2078;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyCclTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $kiter2079 => $viter2080)
          {
            $xfer += $output->writeI64($kiter2079);
            $xfer += $viter2080->write($output);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyCclTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyCclTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeyCclTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::STRUCT,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2081 = 0;
            $_ktype2082 = 0;
            $_vtype2083 = 0;
            $xfer += $input->readMapBegin($_ktype2082, $_vtype2083, $_size2081);
            for ($_i2085 = 0; $_i2085 < $_size2081; ++$_i2085)
            {
              $key2086 = 0;
              $val2087 = new \concourse\thrift\data\TObject();
              $xfer += $input->readI64($key2086);
              $val2087 = new \concourse\thrift\data\TObject();
              $xfer += $val2087->read($input);
              $this->success[(!is_string($key2086) && !is_integer($key2086)) ? serialize($key2086) : $key2086] = $val2087;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeyCclTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::STRUCT, count($this->success));
        {
          foreach ($this->success as $kiter2088 => $viter2089)
          {
            $xfer += $output->writeI64($kiter2088);
            $xfer += $viter2089->write($output);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysCriteria_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2090 = 0;
            $_etype2093 = 0;
            $xfer += $input->readListBegin($_etype2093, $_size2090);
            for ($_i2094 = 0; $_i2094 < $_size2090; ++$_i2094)
            {
              $elem2095 = null;
              $xfer += $input->readString($elem2095);
              $this->keys []= $elem2095;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysCriteria_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2096)
          {
            $xfer += $output->writeString($iter2096);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysCriteria_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2097 = 0;
            $_ktype2098 = 0;
            $_vtype2099 = 0;
            $xfer += $input->readMapBegin($_ktype2098, $_vtype2099, $_size2097);
            for ($_i2101 = 0; $_i2101 < $_size2097; ++$_i2101)
            {
              $key2102 = 0;
              $val2103 = array();
              $xfer += $input->readI64($key2102);
              $val2103 = array();
              $_size2104 = 0;
              $_ktype2105 = 0;
              $_vtype2106 = 0;
              $xfer += $input->readMapBegin($_ktype2105, $_vtype2106, $_size2104);
              for ($_i2108 = 0; $_i2108 < $_size2104; ++$_i2108)
              {
                $key2109 = '';
                $val2110 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key2109);
                $val2110 = new \concourse\thrift\data\TObject();
                $xfer += $val2110->read($input);
                $val2103[(!is_string($key2109) && !is_integer($key2109)) ? serialize($key2109) : $key2109] = $val2110;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2102) && !is_integer($key2102)) ? serialize($key2102) : $key2102] = $val2103;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysCriteria_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2111 => $viter2112)
          {
            $xfer += $output->writeI64($kiter2111);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter2112));
              {
                foreach ($viter2112 as $kiter2113 => $viter2114)
                {
                  $xfer += $output->writeString($kiter2113);
                  $xfer += $viter2114->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysCcl_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2115 = 0;
            $_etype2118 = 0;
            $xfer += $input->readListBegin($_etype2118, $_size2115);
            for ($_i2119 = 0; $_i2119 < $_size2115; ++$_i2119)
            {
              $elem2120 = null;
              $xfer += $input->readString($elem2120);
              $this->keys []= $elem2120;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysCcl_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2121)
          {
            $xfer += $output->writeString($iter2121);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysCcl_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2122 = 0;
            $_ktype2123 = 0;
            $_vtype2124 = 0;
            $xfer += $input->readMapBegin($_ktype2123, $_vtype2124, $_size2122);
            for ($_i2126 = 0; $_i2126 < $_size2122; ++$_i2126)
            {
              $key2127 = 0;
              $val2128 = array();
              $xfer += $input->readI64($key2127);
              $val2128 = array();
              $_size2129 = 0;
              $_ktype2130 = 0;
              $_vtype2131 = 0;
              $xfer += $input->readMapBegin($_ktype2130, $_vtype2131, $_size2129);
              for ($_i2133 = 0; $_i2133 < $_size2129; ++$_i2133)
              {
                $key2134 = '';
                $val2135 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key2134);
                $val2135 = new \concourse\thrift\data\TObject();
                $xfer += $val2135->read($input);
                $val2128[(!is_string($key2134) && !is_integer($key2134)) ? serialize($key2134) : $key2134] = $val2135;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2127) && !is_integer($key2127)) ? serialize($key2127) : $key2127] = $val2128;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysCcl_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2136 => $viter2137)
          {
            $xfer += $output->writeI64($kiter2136);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter2137));
              {
                foreach ($viter2137 as $kiter2138 => $viter2139)
                {
                  $xfer += $output->writeString($kiter2138);
                  $xfer += $viter2139->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysCriteriaTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2140 = 0;
            $_etype2143 = 0;
            $xfer += $input->readListBegin($_etype2143, $_size2140);
            for ($_i2144 = 0; $_i2144 < $_size2140; ++$_i2144)
            {
              $elem2145 = null;
              $xfer += $input->readString($elem2145);
              $this->keys []= $elem2145;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysCriteriaTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2146)
          {
            $xfer += $output->writeString($iter2146);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysCriteriaTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2147 = 0;
            $_ktype2148 = 0;
            $_vtype2149 = 0;
            $xfer += $input->readMapBegin($_ktype2148, $_vtype2149, $_size2147);
            for ($_i2151 = 0; $_i2151 < $_size2147; ++$_i2151)
            {
              $key2152 = 0;
              $val2153 = array();
              $xfer += $input->readI64($key2152);
              $val2153 = array();
              $_size2154 = 0;
              $_ktype2155 = 0;
              $_vtype2156 = 0;
              $xfer += $input->readMapBegin($_ktype2155, $_vtype2156, $_size2154);
              for ($_i2158 = 0; $_i2158 < $_size2154; ++$_i2158)
              {
                $key2159 = '';
                $val2160 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key2159);
                $val2160 = new \concourse\thrift\data\TObject();
                $xfer += $val2160->read($input);
                $val2153[(!is_string($key2159) && !is_integer($key2159)) ? serialize($key2159) : $key2159] = $val2160;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2152) && !is_integer($key2152)) ? serialize($key2152) : $key2152] = $val2153;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysCriteriaTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2161 => $viter2162)
          {
            $xfer += $output->writeI64($kiter2161);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter2162));
              {
                foreach ($viter2162 as $kiter2163 => $viter2164)
                {
                  $xfer += $output->writeString($kiter2163);
                  $xfer += $viter2164->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysCriteriaTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2165 = 0;
            $_etype2168 = 0;
            $xfer += $input->readListBegin($_etype2168, $_size2165);
            for ($_i2169 = 0; $_i2169 < $_size2165; ++$_i2169)
            {
              $elem2170 = null;
              $xfer += $input->readString($elem2170);
              $this->keys []= $elem2170;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysCriteriaTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2171)
          {
            $xfer += $output->writeString($iter2171);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysCriteriaTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2172 = 0;
            $_ktype2173 = 0;
            $_vtype2174 = 0;
            $xfer += $input->readMapBegin($_ktype2173, $_vtype2174, $_size2172);
            for ($_i2176 = 0; $_i2176 < $_size2172; ++$_i2176)
            {
              $key2177 = 0;
              $val2178 = array();
              $xfer += $input->readI64($key2177);
              $val2178 = array();
              $_size2179 = 0;
              $_ktype2180 = 0;
              $_vtype2181 = 0;
              $xfer += $input->readMapBegin($_ktype2180, $_vtype2181, $_size2179);
              for ($_i2183 = 0; $_i2183 < $_size2179; ++$_i2183)
              {
                $key2184 = '';
                $val2185 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key2184);
                $val2185 = new \concourse\thrift\data\TObject();
                $xfer += $val2185->read($input);
                $val2178[(!is_string($key2184) && !is_integer($key2184)) ? serialize($key2184) : $key2184] = $val2185;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2177) && !is_integer($key2177)) ? serialize($key2177) : $key2177] = $val2178;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysCriteriaTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2186 => $viter2187)
          {
            $xfer += $output->writeI64($kiter2186);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter2187));
              {
                foreach ($viter2187 as $kiter2188 => $viter2189)
                {
                  $xfer += $output->writeString($kiter2188);
                  $xfer += $viter2189->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysCclTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2190 = 0;
            $_etype2193 = 0;
            $xfer += $input->readListBegin($_etype2193, $_size2190);
            for ($_i2194 = 0; $_i2194 < $_size2190; ++$_i2194)
            {
              $elem2195 = null;
              $xfer += $input->readString($elem2195);
              $this->keys []= $elem2195;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysCclTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2196)
          {
            $xfer += $output->writeString($iter2196);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysCclTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2197 = 0;
            $_ktype2198 = 0;
            $_vtype2199 = 0;
            $xfer += $input->readMapBegin($_ktype2198, $_vtype2199, $_size2197);
            for ($_i2201 = 0; $_i2201 < $_size2197; ++$_i2201)
            {
              $key2202 = 0;
              $val2203 = array();
              $xfer += $input->readI64($key2202);
              $val2203 = array();
              $_size2204 = 0;
              $_ktype2205 = 0;
              $_vtype2206 = 0;
              $xfer += $input->readMapBegin($_ktype2205, $_vtype2206, $_size2204);
              for ($_i2208 = 0; $_i2208 < $_size2204; ++$_i2208)
              {
                $key2209 = '';
                $val2210 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key2209);
                $val2210 = new \concourse\thrift\data\TObject();
                $xfer += $val2210->read($input);
                $val2203[(!is_string($key2209) && !is_integer($key2209)) ? serialize($key2209) : $key2209] = $val2210;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2202) && !is_integer($key2202)) ? serialize($key2202) : $key2202] = $val2203;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysCclTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2211 => $viter2212)
          {
            $xfer += $output->writeI64($kiter2211);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter2212));
              {
                foreach ($viter2212 as $kiter2213 => $viter2214)
                {
                  $xfer += $output->writeString($kiter2213);
                  $xfer += $viter2214->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysCclTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2215 = 0;
            $_etype2218 = 0;
            $xfer += $input->readListBegin($_etype2218, $_size2215);
            for ($_i2219 = 0; $_i2219 < $_size2215; ++$_i2219)
            {
              $elem2220 = null;
              $xfer += $input->readString($elem2220);
              $this->keys []= $elem2220;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysCclTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2221)
          {
            $xfer += $output->writeString($iter2221);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getKeysCclTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::STRUCT,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2222 = 0;
            $_ktype2223 = 0;
            $_vtype2224 = 0;
            $xfer += $input->readMapBegin($_ktype2223, $_vtype2224, $_size2222);
            for ($_i2226 = 0; $_i2226 < $_size2222; ++$_i2226)
            {
              $key2227 = 0;
              $val2228 = array();
              $xfer += $input->readI64($key2227);
              $val2228 = array();
              $_size2229 = 0;
              $_ktype2230 = 0;
              $_vtype2231 = 0;
              $xfer += $input->readMapBegin($_ktype2230, $_vtype2231, $_size2229);
              for ($_i2233 = 0; $_i2233 < $_size2229; ++$_i2233)
              {
                $key2234 = '';
                $val2235 = new \concourse\thrift\data\TObject();
                $xfer += $input->readString($key2234);
                $val2235 = new \concourse\thrift\data\TObject();
                $xfer += $val2235->read($input);
                $val2228[(!is_string($key2234) && !is_integer($key2234)) ? serialize($key2234) : $key2234] = $val2235;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2227) && !is_integer($key2227)) ? serialize($key2227) : $key2227] = $val2228;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getKeysCclTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2236 => $viter2237)
          {
            $xfer += $output->writeI64($kiter2236);
            {
              $output->writeMapBegin(TType::STRING, TType::STRUCT, count($viter2237));
              {
                foreach ($viter2237 as $kiter2238 => $viter2239)
                {
                  $xfer += $output->writeString($kiter2238);
                  $xfer += $viter2239->write($output);
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_verifyKeyValueRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $value = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'value',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['value'])) {
        $this->value = $vals['value'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->value = new \concourse\thrift\data\TObject();
            $xfer += $this->value->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_verifyKeyValueRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->value !== null) {
      if (!is_object($this->value)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('value', TType::STRUCT, 2);
      $xfer += $this->value->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 3);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_verifyKeyValueRecord_result {
  static $_TSPEC;

  /**
   * @var bool
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::BOOL,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::BOOL) {
            $xfer += $input->readBool($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_verifyKeyValueRecord_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
      $xfer += $output->writeBool($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_verifyKeyValueRecordTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $value = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'value',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        5 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        6 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        7 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['value'])) {
        $this->value = $vals['value'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->value = new \concourse\thrift\data\TObject();
            $xfer += $this->value->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_verifyKeyValueRecordTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->value !== null) {
      if (!is_object($this->value)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('value', TType::STRUCT, 2);
      $xfer += $this->value->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 3);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 5);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 6);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 7);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_verifyKeyValueRecordTime_result {
  static $_TSPEC;

  /**
   * @var bool
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::BOOL,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::BOOL) {
            $xfer += $input->readBool($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_verifyKeyValueRecordTime_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
      $xfer += $output->writeBool($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_verifyKeyValueRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $value = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'value',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        5 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        6 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        7 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['value'])) {
        $this->value = $vals['value'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->value = new \concourse\thrift\data\TObject();
            $xfer += $this->value->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_verifyKeyValueRecordTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->value !== null) {
      if (!is_object($this->value)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('value', TType::STRUCT, 2);
      $xfer += $this->value->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 3);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 4);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 5);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 6);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 7);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_verifyKeyValueRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var bool
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::BOOL,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::BOOL) {
            $xfer += $input->readBool($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_verifyKeyValueRecordTimestr_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
      $xfer += $output->writeBool($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_jsonifyRecords_args {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var bool
   */
  public $identifier = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        2 => array(
          'var' => 'identifier',
          'type' => TType::BOOL,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['identifier'])) {
        $this->identifier = $vals['identifier'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2240 = 0;
            $_etype2243 = 0;
            $xfer += $input->readListBegin($_etype2243, $_size2240);
            for ($_i2244 = 0; $_i2244 < $_size2240; ++$_i2244)
            {
              $elem2245 = null;
              $xfer += $input->readI64($elem2245);
              $this->records []= $elem2245;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::BOOL) {
            $xfer += $input->readBool($this->identifier);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_jsonifyRecords_args');
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 1);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2246)
          {
            $xfer += $output->writeI64($iter2246);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->identifier !== null) {
      $xfer += $output->writeFieldBegin('identifier', TType::BOOL, 2);
      $xfer += $output->writeBool($this->identifier);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_jsonifyRecords_result {
  static $_TSPEC;

  /**
   * @var string
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRING,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_jsonifyRecords_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
      $xfer += $output->writeString($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_jsonifyRecordsTime_args {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var bool
   */
  public $identifier = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'identifier',
          'type' => TType::BOOL,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['identifier'])) {
        $this->identifier = $vals['identifier'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2247 = 0;
            $_etype2250 = 0;
            $xfer += $input->readListBegin($_etype2250, $_size2247);
            for ($_i2251 = 0; $_i2251 < $_size2247; ++$_i2251)
            {
              $elem2252 = null;
              $xfer += $input->readI64($elem2252);
              $this->records []= $elem2252;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::BOOL) {
            $xfer += $input->readBool($this->identifier);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_jsonifyRecordsTime_args');
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 1);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2253)
          {
            $xfer += $output->writeI64($iter2253);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->identifier !== null) {
      $xfer += $output->writeFieldBegin('identifier', TType::BOOL, 3);
      $xfer += $output->writeBool($this->identifier);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_jsonifyRecordsTime_result {
  static $_TSPEC;

  /**
   * @var string
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRING,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_jsonifyRecordsTime_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
      $xfer += $output->writeString($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_jsonifyRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var bool
   */
  public $identifier = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'identifier',
          'type' => TType::BOOL,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['identifier'])) {
        $this->identifier = $vals['identifier'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2254 = 0;
            $_etype2257 = 0;
            $xfer += $input->readListBegin($_etype2257, $_size2254);
            for ($_i2258 = 0; $_i2258 < $_size2254; ++$_i2258)
            {
              $elem2259 = null;
              $xfer += $input->readI64($elem2259);
              $this->records []= $elem2259;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::BOOL) {
            $xfer += $input->readBool($this->identifier);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_jsonifyRecordsTimestr_args');
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 1);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2260)
          {
            $xfer += $output->writeI64($iter2260);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->identifier !== null) {
      $xfer += $output->writeFieldBegin('identifier', TType::BOOL, 3);
      $xfer += $output->writeBool($this->identifier);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_jsonifyRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var string
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRING,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_jsonifyRecordsTimestr_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
      $xfer += $output->writeString($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findCriteria_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findCriteria_args');
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 1);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findCriteria_result {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size2261 = 0;
            $_etype2264 = 0;
            $xfer += $input->readSetBegin($_etype2264, $_size2261);
            for ($_i2265 = 0; $_i2265 < $_size2261; ++$_i2265)
            {
              $elem2266 = null;
              $xfer += $input->readI64($elem2266);
              if (is_scalar($elem2266)) {
                $this->success []= $elem2266;
              } else {
                $this->success []= $elem2266;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findCriteria_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::I64, count($this->success));
        {
          foreach ($this->success as $iter2267 => $iter2268)
          {
            if (is_scalar($iter2268)) {
            $xfer += $output->writeI64($iter2267);
            } else {
            $xfer += $output->writeI64($iter2268);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findCcl_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findCcl_args');
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 1);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findCcl_result {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size2269 = 0;
            $_etype2272 = 0;
            $xfer += $input->readSetBegin($_etype2272, $_size2269);
            for ($_i2273 = 0; $_i2273 < $_size2269; ++$_i2273)
            {
              $elem2274 = null;
              $xfer += $input->readI64($elem2274);
              if (is_scalar($elem2274)) {
                $this->success []= $elem2274;
              } else {
                $this->success []= $elem2274;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findCcl_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::I64, count($this->success));
        {
          foreach ($this->success as $iter2275 => $iter2276)
          {
            if (is_scalar($iter2276)) {
            $xfer += $output->writeI64($iter2275);
            } else {
            $xfer += $output->writeI64($iter2276);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findKeyOperatorValues_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $operator = null;
  /**
   * @var \concourse\thrift\data\TObject[]
   */
  public $values = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'operator',
          'type' => TType::I32,
          ),
        3 => array(
          'var' => 'values',
          'type' => TType::LST,
          'etype' => TType::STRUCT,
          'elem' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['operator'])) {
        $this->operator = $vals['operator'];
      }
      if (isset($vals['values'])) {
        $this->values = $vals['values'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->operator);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::LST) {
            $this->values = array();
            $_size2277 = 0;
            $_etype2280 = 0;
            $xfer += $input->readListBegin($_etype2280, $_size2277);
            for ($_i2281 = 0; $_i2281 < $_size2277; ++$_i2281)
            {
              $elem2282 = null;
              $elem2282 = new \concourse\thrift\data\TObject();
              $xfer += $elem2282->read($input);
              $this->values []= $elem2282;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findKeyOperatorValues_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->operator !== null) {
      $xfer += $output->writeFieldBegin('operator', TType::I32, 2);
      $xfer += $output->writeI32($this->operator);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->values !== null) {
      if (!is_array($this->values)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('values', TType::LST, 3);
      {
        $output->writeListBegin(TType::STRUCT, count($this->values));
        {
          foreach ($this->values as $iter2283)
          {
            $xfer += $iter2283->write($output);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findKeyOperatorValues_result {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size2284 = 0;
            $_etype2287 = 0;
            $xfer += $input->readSetBegin($_etype2287, $_size2284);
            for ($_i2288 = 0; $_i2288 < $_size2284; ++$_i2288)
            {
              $elem2289 = null;
              $xfer += $input->readI64($elem2289);
              if (is_scalar($elem2289)) {
                $this->success []= $elem2289;
              } else {
                $this->success []= $elem2289;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findKeyOperatorValues_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::I64, count($this->success));
        {
          foreach ($this->success as $iter2290 => $iter2291)
          {
            if (is_scalar($iter2291)) {
            $xfer += $output->writeI64($iter2290);
            } else {
            $xfer += $output->writeI64($iter2291);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findKeyOperatorValuesTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $operator = null;
  /**
   * @var \concourse\thrift\data\TObject[]
   */
  public $values = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'operator',
          'type' => TType::I32,
          ),
        3 => array(
          'var' => 'values',
          'type' => TType::LST,
          'etype' => TType::STRUCT,
          'elem' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        4 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        5 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        6 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        7 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['operator'])) {
        $this->operator = $vals['operator'];
      }
      if (isset($vals['values'])) {
        $this->values = $vals['values'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->operator);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::LST) {
            $this->values = array();
            $_size2292 = 0;
            $_etype2295 = 0;
            $xfer += $input->readListBegin($_etype2295, $_size2292);
            for ($_i2296 = 0; $_i2296 < $_size2292; ++$_i2296)
            {
              $elem2297 = null;
              $elem2297 = new \concourse\thrift\data\TObject();
              $xfer += $elem2297->read($input);
              $this->values []= $elem2297;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findKeyOperatorValuesTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->operator !== null) {
      $xfer += $output->writeFieldBegin('operator', TType::I32, 2);
      $xfer += $output->writeI32($this->operator);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->values !== null) {
      if (!is_array($this->values)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('values', TType::LST, 3);
      {
        $output->writeListBegin(TType::STRUCT, count($this->values));
        {
          foreach ($this->values as $iter2298)
          {
            $xfer += $iter2298->write($output);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 5);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 6);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 7);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findKeyOperatorValuesTime_result {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size2299 = 0;
            $_etype2302 = 0;
            $xfer += $input->readSetBegin($_etype2302, $_size2299);
            for ($_i2303 = 0; $_i2303 < $_size2299; ++$_i2303)
            {
              $elem2304 = null;
              $xfer += $input->readI64($elem2304);
              if (is_scalar($elem2304)) {
                $this->success []= $elem2304;
              } else {
                $this->success []= $elem2304;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findKeyOperatorValuesTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::I64, count($this->success));
        {
          foreach ($this->success as $iter2305 => $iter2306)
          {
            if (is_scalar($iter2306)) {
            $xfer += $output->writeI64($iter2305);
            } else {
            $xfer += $output->writeI64($iter2306);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findKeyOperatorValuesTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $operator = null;
  /**
   * @var \concourse\thrift\data\TObject[]
   */
  public $values = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'operator',
          'type' => TType::I32,
          ),
        3 => array(
          'var' => 'values',
          'type' => TType::LST,
          'etype' => TType::STRUCT,
          'elem' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        4 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        5 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        6 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        7 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['operator'])) {
        $this->operator = $vals['operator'];
      }
      if (isset($vals['values'])) {
        $this->values = $vals['values'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I32) {
            $xfer += $input->readI32($this->operator);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::LST) {
            $this->values = array();
            $_size2307 = 0;
            $_etype2310 = 0;
            $xfer += $input->readListBegin($_etype2310, $_size2307);
            for ($_i2311 = 0; $_i2311 < $_size2307; ++$_i2311)
            {
              $elem2312 = null;
              $elem2312 = new \concourse\thrift\data\TObject();
              $xfer += $elem2312->read($input);
              $this->values []= $elem2312;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findKeyOperatorValuesTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->operator !== null) {
      $xfer += $output->writeFieldBegin('operator', TType::I32, 2);
      $xfer += $output->writeI32($this->operator);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->values !== null) {
      if (!is_array($this->values)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('values', TType::LST, 3);
      {
        $output->writeListBegin(TType::STRUCT, count($this->values));
        {
          foreach ($this->values as $iter2313)
          {
            $xfer += $iter2313->write($output);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 4);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 5);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 6);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 7);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findKeyOperatorValuesTimestr_result {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size2314 = 0;
            $_etype2317 = 0;
            $xfer += $input->readSetBegin($_etype2317, $_size2314);
            for ($_i2318 = 0; $_i2318 < $_size2314; ++$_i2318)
            {
              $elem2319 = null;
              $xfer += $input->readI64($elem2319);
              if (is_scalar($elem2319)) {
                $this->success []= $elem2319;
              } else {
                $this->success []= $elem2319;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findKeyOperatorValuesTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::I64, count($this->success));
        {
          foreach ($this->success as $iter2320 => $iter2321)
          {
            if (is_scalar($iter2321)) {
            $xfer += $output->writeI64($iter2320);
            } else {
            $xfer += $output->writeI64($iter2321);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findKeyOperatorstrValues_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $operator = null;
  /**
   * @var \concourse\thrift\data\TObject[]
   */
  public $values = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'operator',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'values',
          'type' => TType::LST,
          'etype' => TType::STRUCT,
          'elem' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['operator'])) {
        $this->operator = $vals['operator'];
      }
      if (isset($vals['values'])) {
        $this->values = $vals['values'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->operator);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::LST) {
            $this->values = array();
            $_size2322 = 0;
            $_etype2325 = 0;
            $xfer += $input->readListBegin($_etype2325, $_size2322);
            for ($_i2326 = 0; $_i2326 < $_size2322; ++$_i2326)
            {
              $elem2327 = null;
              $elem2327 = new \concourse\thrift\data\TObject();
              $xfer += $elem2327->read($input);
              $this->values []= $elem2327;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findKeyOperatorstrValues_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->operator !== null) {
      $xfer += $output->writeFieldBegin('operator', TType::STRING, 2);
      $xfer += $output->writeString($this->operator);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->values !== null) {
      if (!is_array($this->values)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('values', TType::LST, 3);
      {
        $output->writeListBegin(TType::STRUCT, count($this->values));
        {
          foreach ($this->values as $iter2328)
          {
            $xfer += $iter2328->write($output);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findKeyOperatorstrValues_result {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size2329 = 0;
            $_etype2332 = 0;
            $xfer += $input->readSetBegin($_etype2332, $_size2329);
            for ($_i2333 = 0; $_i2333 < $_size2329; ++$_i2333)
            {
              $elem2334 = null;
              $xfer += $input->readI64($elem2334);
              if (is_scalar($elem2334)) {
                $this->success []= $elem2334;
              } else {
                $this->success []= $elem2334;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findKeyOperatorstrValues_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::I64, count($this->success));
        {
          foreach ($this->success as $iter2335 => $iter2336)
          {
            if (is_scalar($iter2336)) {
            $xfer += $output->writeI64($iter2335);
            } else {
            $xfer += $output->writeI64($iter2336);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findKeyOperatorstrValuesTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $operator = null;
  /**
   * @var \concourse\thrift\data\TObject[]
   */
  public $values = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'operator',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'values',
          'type' => TType::LST,
          'etype' => TType::STRUCT,
          'elem' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        4 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        5 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        6 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        7 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['operator'])) {
        $this->operator = $vals['operator'];
      }
      if (isset($vals['values'])) {
        $this->values = $vals['values'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->operator);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::LST) {
            $this->values = array();
            $_size2337 = 0;
            $_etype2340 = 0;
            $xfer += $input->readListBegin($_etype2340, $_size2337);
            for ($_i2341 = 0; $_i2341 < $_size2337; ++$_i2341)
            {
              $elem2342 = null;
              $elem2342 = new \concourse\thrift\data\TObject();
              $xfer += $elem2342->read($input);
              $this->values []= $elem2342;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findKeyOperatorstrValuesTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->operator !== null) {
      $xfer += $output->writeFieldBegin('operator', TType::STRING, 2);
      $xfer += $output->writeString($this->operator);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->values !== null) {
      if (!is_array($this->values)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('values', TType::LST, 3);
      {
        $output->writeListBegin(TType::STRUCT, count($this->values));
        {
          foreach ($this->values as $iter2343)
          {
            $xfer += $iter2343->write($output);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 5);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 6);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 7);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findKeyOperatorstrValuesTime_result {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size2344 = 0;
            $_etype2347 = 0;
            $xfer += $input->readSetBegin($_etype2347, $_size2344);
            for ($_i2348 = 0; $_i2348 < $_size2344; ++$_i2348)
            {
              $elem2349 = null;
              $xfer += $input->readI64($elem2349);
              if (is_scalar($elem2349)) {
                $this->success []= $elem2349;
              } else {
                $this->success []= $elem2349;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findKeyOperatorstrValuesTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::I64, count($this->success));
        {
          foreach ($this->success as $iter2350 => $iter2351)
          {
            if (is_scalar($iter2351)) {
            $xfer += $output->writeI64($iter2350);
            } else {
            $xfer += $output->writeI64($iter2351);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findKeyOperatorstrValuesTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $operator = null;
  /**
   * @var \concourse\thrift\data\TObject[]
   */
  public $values = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'operator',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'values',
          'type' => TType::LST,
          'etype' => TType::STRUCT,
          'elem' => array(
            'type' => TType::STRUCT,
            'class' => '\concourse\thrift\data\TObject',
            ),
          ),
        4 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        5 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        6 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        7 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['operator'])) {
        $this->operator = $vals['operator'];
      }
      if (isset($vals['values'])) {
        $this->values = $vals['values'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->operator);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::LST) {
            $this->values = array();
            $_size2352 = 0;
            $_etype2355 = 0;
            $xfer += $input->readListBegin($_etype2355, $_size2352);
            for ($_i2356 = 0; $_i2356 < $_size2352; ++$_i2356)
            {
              $elem2357 = null;
              $elem2357 = new \concourse\thrift\data\TObject();
              $xfer += $elem2357->read($input);
              $this->values []= $elem2357;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findKeyOperatorstrValuesTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->operator !== null) {
      $xfer += $output->writeFieldBegin('operator', TType::STRING, 2);
      $xfer += $output->writeString($this->operator);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->values !== null) {
      if (!is_array($this->values)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('values', TType::LST, 3);
      {
        $output->writeListBegin(TType::STRUCT, count($this->values));
        {
          foreach ($this->values as $iter2358)
          {
            $xfer += $iter2358->write($output);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 4);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 5);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 6);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 7);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findKeyOperatorstrValuesTimestr_result {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size2359 = 0;
            $_etype2362 = 0;
            $xfer += $input->readSetBegin($_etype2362, $_size2359);
            for ($_i2363 = 0; $_i2363 < $_size2359; ++$_i2363)
            {
              $elem2364 = null;
              $xfer += $input->readI64($elem2364);
              if (is_scalar($elem2364)) {
                $this->success []= $elem2364;
              } else {
                $this->success []= $elem2364;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findKeyOperatorstrValuesTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::I64, count($this->success));
        {
          foreach ($this->success as $iter2365 => $iter2366)
          {
            if (is_scalar($iter2366)) {
            $xfer += $output->writeI64($iter2365);
            } else {
            $xfer += $output->writeI64($iter2366);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_search_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $query = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'query',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['query'])) {
        $this->query = $vals['query'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->query);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_search_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->query !== null) {
      $xfer += $output->writeFieldBegin('query', TType::STRING, 2);
      $xfer += $output->writeString($this->query);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_search_result {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::SET,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::SET) {
            $this->success = array();
            $_size2367 = 0;
            $_etype2370 = 0;
            $xfer += $input->readSetBegin($_etype2370, $_size2367);
            for ($_i2371 = 0; $_i2371 < $_size2367; ++$_i2371)
            {
              $elem2372 = null;
              $xfer += $input->readI64($elem2372);
              if (is_scalar($elem2372)) {
                $this->success []= $elem2372;
              } else {
                $this->success []= $elem2372;
              }
            }
            $xfer += $input->readSetEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_search_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::SET, 0);
      {
        $output->writeSetBegin(TType::I64, count($this->success));
        {
          foreach ($this->success as $iter2373 => $iter2374)
          {
            if (is_scalar($iter2374)) {
            $xfer += $output->writeI64($iter2373);
            } else {
            $xfer += $output->writeI64($iter2374);
            }
          }
        }
        $output->writeSetEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeysRecordsTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2375 = 0;
            $_etype2378 = 0;
            $xfer += $input->readListBegin($_etype2378, $_size2375);
            for ($_i2379 = 0; $_i2379 < $_size2375; ++$_i2379)
            {
              $elem2380 = null;
              $xfer += $input->readString($elem2380);
              $this->keys []= $elem2380;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2381 = 0;
            $_etype2384 = 0;
            $xfer += $input->readListBegin($_etype2384, $_size2381);
            for ($_i2385 = 0; $_i2385 < $_size2381; ++$_i2385)
            {
              $elem2386 = null;
              $xfer += $input->readI64($elem2386);
              $this->records []= $elem2386;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeysRecordsTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2387)
          {
            $xfer += $output->writeString($iter2387);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2388)
          {
            $xfer += $output->writeI64($iter2388);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeysRecordsTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeysRecordsTime_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeysRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2389 = 0;
            $_etype2392 = 0;
            $xfer += $input->readListBegin($_etype2392, $_size2389);
            for ($_i2393 = 0; $_i2393 < $_size2389; ++$_i2393)
            {
              $elem2394 = null;
              $xfer += $input->readString($elem2394);
              $this->keys []= $elem2394;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2395 = 0;
            $_etype2398 = 0;
            $xfer += $input->readListBegin($_etype2398, $_size2395);
            for ($_i2399 = 0; $_i2399 < $_size2395; ++$_i2399)
            {
              $elem2400 = null;
              $xfer += $input->readI64($elem2400);
              $this->records []= $elem2400;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeysRecordsTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2401)
          {
            $xfer += $output->writeString($iter2401);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2402)
          {
            $xfer += $output->writeI64($iter2402);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeysRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeysRecordsTimestr_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeysRecordTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2403 = 0;
            $_etype2406 = 0;
            $xfer += $input->readListBegin($_etype2406, $_size2403);
            for ($_i2407 = 0; $_i2407 < $_size2403; ++$_i2407)
            {
              $elem2408 = null;
              $xfer += $input->readString($elem2408);
              $this->keys []= $elem2408;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeysRecordTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2409)
          {
            $xfer += $output->writeString($iter2409);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeysRecordTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeysRecordTime_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeysRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2410 = 0;
            $_etype2413 = 0;
            $xfer += $input->readListBegin($_etype2413, $_size2410);
            for ($_i2414 = 0; $_i2414 < $_size2410; ++$_i2414)
            {
              $elem2415 = null;
              $xfer += $input->readString($elem2415);
              $this->keys []= $elem2415;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeysRecordTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2416)
          {
            $xfer += $output->writeString($iter2416);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeysRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeysRecordTimestr_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeyRecordsTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2417 = 0;
            $_etype2420 = 0;
            $xfer += $input->readListBegin($_etype2420, $_size2417);
            for ($_i2421 = 0; $_i2421 < $_size2417; ++$_i2421)
            {
              $elem2422 = null;
              $xfer += $input->readI64($elem2422);
              $this->records []= $elem2422;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeyRecordsTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2423)
          {
            $xfer += $output->writeI64($iter2423);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeyRecordsTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeyRecordsTime_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeyRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2424 = 0;
            $_etype2427 = 0;
            $xfer += $input->readListBegin($_etype2427, $_size2424);
            for ($_i2428 = 0; $_i2428 < $_size2424; ++$_i2428)
            {
              $elem2429 = null;
              $xfer += $input->readI64($elem2429);
              $this->records []= $elem2429;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeyRecordsTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2430)
          {
            $xfer += $output->writeI64($iter2430);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeyRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeyRecordsTimestr_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeyRecordTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeyRecordTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeyRecordTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeyRecordTime_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeyRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeyRecordTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_revertKeyRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_revertKeyRecordTimestr_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_pingRecords_args {
  static $_TSPEC;

  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2431 = 0;
            $_etype2434 = 0;
            $xfer += $input->readListBegin($_etype2434, $_size2431);
            for ($_i2435 = 0; $_i2435 < $_size2431; ++$_i2435)
            {
              $elem2436 = null;
              $xfer += $input->readI64($elem2436);
              $this->records []= $elem2436;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_pingRecords_args');
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 1);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2437)
          {
            $xfer += $output->writeI64($iter2437);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_pingRecords_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::BOOL,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::BOOL,
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2438 = 0;
            $_ktype2439 = 0;
            $_vtype2440 = 0;
            $xfer += $input->readMapBegin($_ktype2439, $_vtype2440, $_size2438);
            for ($_i2442 = 0; $_i2442 < $_size2438; ++$_i2442)
            {
              $key2443 = 0;
              $val2444 = false;
              $xfer += $input->readI64($key2443);
              $xfer += $input->readBool($val2444);
              $this->success[(!is_string($key2443) && !is_integer($key2443)) ? serialize($key2443) : $key2443] = $val2444;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_pingRecords_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::BOOL, count($this->success));
        {
          foreach ($this->success as $kiter2445 => $viter2446)
          {
            $xfer += $output->writeI64($kiter2445);
            $xfer += $output->writeBool($viter2446);
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_pingRecord_args {
  static $_TSPEC;

  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_pingRecord_args');
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 1);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_pingRecord_result {
  static $_TSPEC;

  /**
   * @var bool
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::BOOL,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::BOOL) {
            $xfer += $input->readBool($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_pingRecord_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
      $xfer += $output->writeBool($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_verifyAndSwap_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $expected = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $replacement = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'expected',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'replacement',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        5 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        6 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        7 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['expected'])) {
        $this->expected = $vals['expected'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['replacement'])) {
        $this->replacement = $vals['replacement'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->expected = new \concourse\thrift\data\TObject();
            $xfer += $this->expected->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->replacement = new \concourse\thrift\data\TObject();
            $xfer += $this->replacement->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 7:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_verifyAndSwap_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->expected !== null) {
      if (!is_object($this->expected)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('expected', TType::STRUCT, 2);
      $xfer += $this->expected->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 3);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->replacement !== null) {
      if (!is_object($this->replacement)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('replacement', TType::STRUCT, 4);
      $xfer += $this->replacement->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 5);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 6);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 7);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_verifyAndSwap_result {
  static $_TSPEC;

  /**
   * @var bool
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::BOOL,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::BOOL) {
            $xfer += $input->readBool($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_verifyAndSwap_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
      $xfer += $output->writeBool($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_verifyOrSet_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $value = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'value',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['value'])) {
        $this->value = $vals['value'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->value = new \concourse\thrift\data\TObject();
            $xfer += $this->value->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_verifyOrSet_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->value !== null) {
      if (!is_object($this->value)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('value', TType::STRUCT, 2);
      $xfer += $this->value->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 3);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_verifyOrSet_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\InvalidArgumentException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\InvalidArgumentException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\InvalidArgumentException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_verifyOrSet_result');
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findOrAddKeyValue_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TObject
   */
  public $value = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'value',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['value'])) {
        $this->value = $vals['value'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->value = new \concourse\thrift\data\TObject();
            $xfer += $this->value->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findOrAddKeyValue_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->value !== null) {
      if (!is_object($this->value)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('value', TType::STRUCT, 2);
      $xfer += $this->value->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findOrAddKeyValue_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\DuplicateEntryException
   */
  public $ex3 = null;
  /**
   * @var \concourse\thrift\exceptions\InvalidArgumentException
   */
  public $ex4 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\DuplicateEntryException',
          ),
        4 => array(
          'var' => 'ex4',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\InvalidArgumentException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
      if (isset($vals['ex4'])) {
        $this->ex4 = $vals['ex4'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\DuplicateEntryException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->ex4 = new \concourse\thrift\exceptions\InvalidArgumentException();
            $xfer += $this->ex4->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findOrAddKeyValue_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex4 !== null) {
      $xfer += $output->writeFieldBegin('ex4', TType::STRUCT, 4);
      $xfer += $this->ex4->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findOrInsertCriteriaJson_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $json = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        2 => array(
          'var' => 'json',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['json'])) {
        $this->json = $vals['json'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->json);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findOrInsertCriteriaJson_args');
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 1);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->json !== null) {
      $xfer += $output->writeFieldBegin('json', TType::STRING, 2);
      $xfer += $output->writeString($this->json);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findOrInsertCriteriaJson_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\DuplicateEntryException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\DuplicateEntryException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\DuplicateEntryException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findOrInsertCriteriaJson_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findOrInsertCclJson_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $json = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'json',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['json'])) {
        $this->json = $vals['json'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->json);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findOrInsertCclJson_args');
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 1);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->json !== null) {
      $xfer += $output->writeFieldBegin('json', TType::STRING, 2);
      $xfer += $output->writeString($this->json);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_findOrInsertCclJson_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;
  /**
   * @var \concourse\thrift\exceptions\DuplicateEntryException
   */
  public $ex4 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        4 => array(
          'var' => 'ex4',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\DuplicateEntryException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
      if (isset($vals['ex4'])) {
        $this->ex4 = $vals['ex4'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->ex4 = new \concourse\thrift\exceptions\DuplicateEntryException();
            $xfer += $this->ex4->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_findOrInsertCclJson_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex4 !== null) {
      $xfer += $output->writeFieldBegin('ex4', TType::STRUCT, 4);
      $xfer += $this->ex4->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyRecord_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyRecord_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyRecordTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyRecordTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyRecordTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyRecordTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyRecordTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyRecordTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyRecords_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2447 = 0;
            $_etype2450 = 0;
            $xfer += $input->readListBegin($_etype2450, $_size2447);
            for ($_i2451 = 0; $_i2451 < $_size2447; ++$_i2451)
            {
              $elem2452 = null;
              $xfer += $input->readI64($elem2452);
              $this->records []= $elem2452;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyRecords_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2453)
          {
            $xfer += $output->writeI64($iter2453);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyRecords_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyRecords_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyRecordsTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2454 = 0;
            $_etype2457 = 0;
            $xfer += $input->readListBegin($_etype2457, $_size2454);
            for ($_i2458 = 0; $_i2458 < $_size2454; ++$_i2458)
            {
              $elem2459 = null;
              $xfer += $input->readI64($elem2459);
              $this->records []= $elem2459;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyRecordsTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2460)
          {
            $xfer += $output->writeI64($iter2460);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyRecordsTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyRecordsTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2461 = 0;
            $_etype2464 = 0;
            $xfer += $input->readListBegin($_etype2464, $_size2461);
            for ($_i2465 = 0; $_i2465 < $_size2461; ++$_i2465)
            {
              $elem2466 = null;
              $xfer += $input->readI64($elem2466);
              $this->records []= $elem2466;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyRecordsTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2467)
          {
            $xfer += $output->writeI64($iter2467);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyRecordsTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKey_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKey_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKey_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKey_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyCriteria_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyCriteria_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyCriteria_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyCriteria_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyCriteriaTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyCriteriaTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyCriteriaTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyCriteriaTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyCriteriaTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyCriteriaTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyCriteriaTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyCriteriaTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyCcl_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyCcl_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyCcl_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyCcl_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyCclTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyCclTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyCclTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyCclTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyCclTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyCclTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_sumKeyCclTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_sumKeyCclTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyRecord_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyRecord_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyRecordTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyRecordTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyRecordTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyRecordTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyRecordTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyRecordTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyRecords_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2468 = 0;
            $_etype2471 = 0;
            $xfer += $input->readListBegin($_etype2471, $_size2468);
            for ($_i2472 = 0; $_i2472 < $_size2468; ++$_i2472)
            {
              $elem2473 = null;
              $xfer += $input->readI64($elem2473);
              $this->records []= $elem2473;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyRecords_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2474)
          {
            $xfer += $output->writeI64($iter2474);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyRecords_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyRecords_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyRecordsTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2475 = 0;
            $_etype2478 = 0;
            $xfer += $input->readListBegin($_etype2478, $_size2475);
            for ($_i2479 = 0; $_i2479 < $_size2475; ++$_i2479)
            {
              $elem2480 = null;
              $xfer += $input->readI64($elem2480);
              $this->records []= $elem2480;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyRecordsTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2481)
          {
            $xfer += $output->writeI64($iter2481);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyRecordsTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyRecordsTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2482 = 0;
            $_etype2485 = 0;
            $xfer += $input->readListBegin($_etype2485, $_size2482);
            for ($_i2486 = 0; $_i2486 < $_size2482; ++$_i2486)
            {
              $elem2487 = null;
              $xfer += $input->readI64($elem2487);
              $this->records []= $elem2487;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyRecordsTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2488)
          {
            $xfer += $output->writeI64($iter2488);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyRecordsTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKey_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKey_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKey_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKey_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyCriteria_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyCriteria_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyCriteria_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyCriteria_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyCriteriaTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyCriteriaTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyCriteriaTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyCriteriaTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyCriteriaTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyCriteriaTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyCriteriaTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyCriteriaTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyCcl_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyCcl_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyCcl_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyCcl_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyCclTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyCclTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyCclTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyCclTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyCclTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyCclTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_averageKeyCclTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_averageKeyCclTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyRecord_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyRecord_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyRecordTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyRecordTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyRecordTime_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyRecordTime_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyRecordTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyRecordTimestr_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyRecords_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2489 = 0;
            $_etype2492 = 0;
            $xfer += $input->readListBegin($_etype2492, $_size2489);
            for ($_i2493 = 0; $_i2493 < $_size2489; ++$_i2493)
            {
              $elem2494 = null;
              $xfer += $input->readI64($elem2494);
              $this->records []= $elem2494;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyRecords_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2495)
          {
            $xfer += $output->writeI64($iter2495);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyRecords_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyRecords_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyRecordsTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2496 = 0;
            $_etype2499 = 0;
            $xfer += $input->readListBegin($_etype2499, $_size2496);
            for ($_i2500 = 0; $_i2500 < $_size2496; ++$_i2500)
            {
              $elem2501 = null;
              $xfer += $input->readI64($elem2501);
              $this->records []= $elem2501;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyRecordsTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2502)
          {
            $xfer += $output->writeI64($iter2502);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyRecordsTime_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyRecordsTime_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2503 = 0;
            $_etype2506 = 0;
            $xfer += $input->readListBegin($_etype2506, $_size2503);
            for ($_i2507 = 0; $_i2507 < $_size2503; ++$_i2507)
            {
              $elem2508 = null;
              $xfer += $input->readI64($elem2508);
              $this->records []= $elem2508;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyRecordsTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2509)
          {
            $xfer += $output->writeI64($iter2509);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyRecordsTimestr_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKey_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKey_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKey_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKey_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyTime_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyTime_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyTimestr_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyTimestr_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyCriteria_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyCriteria_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyCriteria_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyCriteria_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyCriteriaTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyCriteriaTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyCriteriaTime_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyCriteriaTime_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyCriteriaTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyCriteriaTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyCriteriaTimestr_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyCriteriaTimestr_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyCcl_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyCcl_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyCcl_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyCcl_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyCclTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyCclTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyCclTime_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyCclTime_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyCclTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyCclTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_countKeyCclTimestr_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_countKeyCclTimestr_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyRecord_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyRecord_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyRecordTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyRecordTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyRecordTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyRecordTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyRecordTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyRecordTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyRecords_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2510 = 0;
            $_etype2513 = 0;
            $xfer += $input->readListBegin($_etype2513, $_size2510);
            for ($_i2514 = 0; $_i2514 < $_size2510; ++$_i2514)
            {
              $elem2515 = null;
              $xfer += $input->readI64($elem2515);
              $this->records []= $elem2515;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyRecords_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2516)
          {
            $xfer += $output->writeI64($iter2516);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyRecords_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyRecords_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyRecordsTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2517 = 0;
            $_etype2520 = 0;
            $xfer += $input->readListBegin($_etype2520, $_size2517);
            for ($_i2521 = 0; $_i2521 < $_size2517; ++$_i2521)
            {
              $elem2522 = null;
              $xfer += $input->readI64($elem2522);
              $this->records []= $elem2522;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyRecordsTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2523)
          {
            $xfer += $output->writeI64($iter2523);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyRecordsTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyRecordsTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2524 = 0;
            $_etype2527 = 0;
            $xfer += $input->readListBegin($_etype2527, $_size2524);
            for ($_i2528 = 0; $_i2528 < $_size2524; ++$_i2528)
            {
              $elem2529 = null;
              $xfer += $input->readI64($elem2529);
              $this->records []= $elem2529;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyRecordsTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2530)
          {
            $xfer += $output->writeI64($iter2530);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyRecordsTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyCriteria_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyCriteria_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyCriteria_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyCriteria_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyCriteriaTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyCriteriaTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyCriteriaTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyCriteriaTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyCriteriaTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyCriteriaTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyCriteriaTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyCriteriaTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyCcl_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyCcl_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyCcl_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyCcl_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyCclTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyCclTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyCclTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyCclTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyCclTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyCclTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyCclTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyCclTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKey_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKey_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKey_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKey_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_maxKeyTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_maxKeyTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyRecord_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyRecord_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyRecordTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyRecordTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyRecordTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyRecordTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyRecordTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyRecordTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKey_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKey_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 3);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKey_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKey_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyRecordsTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2531 = 0;
            $_etype2534 = 0;
            $xfer += $input->readListBegin($_etype2534, $_size2531);
            for ($_i2535 = 0; $_i2535 < $_size2531; ++$_i2535)
            {
              $elem2536 = null;
              $xfer += $input->readI64($elem2536);
              $this->records []= $elem2536;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyRecordsTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2537)
          {
            $xfer += $output->writeI64($iter2537);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyRecordsTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyRecordsTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2538 = 0;
            $_etype2541 = 0;
            $xfer += $input->readListBegin($_etype2541, $_size2538);
            for ($_i2542 = 0; $_i2542 < $_size2538; ++$_i2542)
            {
              $elem2543 = null;
              $xfer += $input->readI64($elem2543);
              $this->records []= $elem2543;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyRecordsTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2544)
          {
            $xfer += $output->writeI64($iter2544);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyRecordsTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyCriteria_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyCriteria_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyCriteria_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyCriteria_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyCriteriaTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyCriteriaTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyCriteriaTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyCriteriaTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyCriteriaTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyCriteriaTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyCriteriaTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyCriteriaTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyCcl_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyCcl_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyCcl_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyCcl_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyCclTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyCclTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyCclTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyCclTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyCclTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyCclTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyCclTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyCclTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyTime_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyTime_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 2);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyTimestr_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyTimestr_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyRecords_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2545 = 0;
            $_etype2548 = 0;
            $xfer += $input->readListBegin($_etype2548, $_size2545);
            for ($_i2549 = 0; $_i2549 < $_size2545; ++$_i2549)
            {
              $elem2550 = null;
              $xfer += $input->readI64($elem2550);
              $this->records []= $elem2550;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyRecords_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2551)
          {
            $xfer += $output->writeI64($iter2551);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_minKeyRecords_result {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\data\TObject
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TObject',
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRUCT) {
            $this->success = new \concourse\thrift\data\TObject();
            $xfer += $this->success->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_minKeyRecords_result');
    if ($this->success !== null) {
      if (!is_object($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
      $xfer += $this->success->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyRecord_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyRecord_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyRecord_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2552 = 0;
            $_ktype2553 = 0;
            $_vtype2554 = 0;
            $xfer += $input->readMapBegin($_ktype2553, $_vtype2554, $_size2552);
            for ($_i2556 = 0; $_i2556 < $_size2552; ++$_i2556)
            {
              $key2557 = 0;
              $val2558 = array();
              $xfer += $input->readI64($key2557);
              $val2558 = array();
              $_size2559 = 0;
              $_etype2562 = 0;
              $xfer += $input->readSetBegin($_etype2562, $_size2559);
              for ($_i2563 = 0; $_i2563 < $_size2559; ++$_i2563)
              {
                $elem2564 = null;
                $elem2564 = new \concourse\thrift\data\TObject();
                $xfer += $elem2564->read($input);
                if (is_scalar($elem2564)) {
                  $val2558 []= $elem2564;
                } else {
                  $val2558 []= $elem2564;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key2557) && !is_integer($key2557)) ? serialize($key2557) : $key2557] = $val2558;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyRecord_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter2565 => $viter2566)
          {
            $xfer += $output->writeI64($kiter2565);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter2566));
              {
                foreach ($viter2566 as $iter2567 => $iter2568)
                {
                  if (is_scalar($iter2568)) {
                  $xfer += $iter2567->write($output);
                  } else {
                  $xfer += $iter2568->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyRecordTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyRecordTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyRecordTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2569 = 0;
            $_ktype2570 = 0;
            $_vtype2571 = 0;
            $xfer += $input->readMapBegin($_ktype2570, $_vtype2571, $_size2569);
            for ($_i2573 = 0; $_i2573 < $_size2569; ++$_i2573)
            {
              $key2574 = 0;
              $val2575 = array();
              $xfer += $input->readI64($key2574);
              $val2575 = array();
              $_size2576 = 0;
              $_etype2579 = 0;
              $xfer += $input->readSetBegin($_etype2579, $_size2576);
              for ($_i2580 = 0; $_i2580 < $_size2576; ++$_i2580)
              {
                $elem2581 = null;
                $elem2581 = new \concourse\thrift\data\TObject();
                $xfer += $elem2581->read($input);
                if (is_scalar($elem2581)) {
                  $val2575 []= $elem2581;
                } else {
                  $val2575 []= $elem2581;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key2574) && !is_integer($key2574)) ? serialize($key2574) : $key2574] = $val2575;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyRecordTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter2582 => $viter2583)
          {
            $xfer += $output->writeI64($kiter2582);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter2583));
              {
                foreach ($viter2583 as $iter2584 => $iter2585)
                {
                  if (is_scalar($iter2585)) {
                  $xfer += $iter2584->write($output);
                  } else {
                  $xfer += $iter2585->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyRecordTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2586 = 0;
            $_ktype2587 = 0;
            $_vtype2588 = 0;
            $xfer += $input->readMapBegin($_ktype2587, $_vtype2588, $_size2586);
            for ($_i2590 = 0; $_i2590 < $_size2586; ++$_i2590)
            {
              $key2591 = 0;
              $val2592 = array();
              $xfer += $input->readI64($key2591);
              $val2592 = array();
              $_size2593 = 0;
              $_etype2596 = 0;
              $xfer += $input->readSetBegin($_etype2596, $_size2593);
              for ($_i2597 = 0; $_i2597 < $_size2593; ++$_i2597)
              {
                $elem2598 = null;
                $elem2598 = new \concourse\thrift\data\TObject();
                $xfer += $elem2598->read($input);
                if (is_scalar($elem2598)) {
                  $val2592 []= $elem2598;
                } else {
                  $val2592 []= $elem2598;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key2591) && !is_integer($key2591)) ? serialize($key2591) : $key2591] = $val2592;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyRecordTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter2599 => $viter2600)
          {
            $xfer += $output->writeI64($kiter2599);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter2600));
              {
                foreach ($viter2600 as $iter2601 => $iter2602)
                {
                  if (is_scalar($iter2602)) {
                  $xfer += $iter2601->write($output);
                  } else {
                  $xfer += $iter2602->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysRecord_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2603 = 0;
            $_etype2606 = 0;
            $xfer += $input->readListBegin($_etype2606, $_size2603);
            for ($_i2607 = 0; $_i2607 < $_size2603; ++$_i2607)
            {
              $elem2608 = null;
              $xfer += $input->readString($elem2608);
              $this->keys []= $elem2608;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysRecord_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2609)
          {
            $xfer += $output->writeString($iter2609);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysRecord_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2610 = 0;
            $_ktype2611 = 0;
            $_vtype2612 = 0;
            $xfer += $input->readMapBegin($_ktype2611, $_vtype2612, $_size2610);
            for ($_i2614 = 0; $_i2614 < $_size2610; ++$_i2614)
            {
              $key2615 = 0;
              $val2616 = array();
              $xfer += $input->readI64($key2615);
              $val2616 = array();
              $_size2617 = 0;
              $_ktype2618 = 0;
              $_vtype2619 = 0;
              $xfer += $input->readMapBegin($_ktype2618, $_vtype2619, $_size2617);
              for ($_i2621 = 0; $_i2621 < $_size2617; ++$_i2621)
              {
                $key2622 = '';
                $val2623 = array();
                $xfer += $input->readString($key2622);
                $val2623 = array();
                $_size2624 = 0;
                $_etype2627 = 0;
                $xfer += $input->readSetBegin($_etype2627, $_size2624);
                for ($_i2628 = 0; $_i2628 < $_size2624; ++$_i2628)
                {
                  $elem2629 = null;
                  $elem2629 = new \concourse\thrift\data\TObject();
                  $xfer += $elem2629->read($input);
                  if (is_scalar($elem2629)) {
                    $val2623 []= $elem2629;
                  } else {
                    $val2623 []= $elem2629;
                  }
                }
                $xfer += $input->readSetEnd();
                $val2616[(!is_string($key2622) && !is_integer($key2622)) ? serialize($key2622) : $key2622] = $val2623;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2615) && !is_integer($key2615)) ? serialize($key2615) : $key2615] = $val2616;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysRecord_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2630 => $viter2631)
          {
            $xfer += $output->writeI64($kiter2630);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter2631));
              {
                foreach ($viter2631 as $kiter2632 => $viter2633)
                {
                  $xfer += $output->writeString($kiter2632);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter2633));
                    {
                      foreach ($viter2633 as $iter2634 => $iter2635)
                      {
                        if (is_scalar($iter2635)) {
                        $xfer += $iter2634->write($output);
                        } else {
                        $xfer += $iter2635->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysRecordTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2636 = 0;
            $_etype2639 = 0;
            $xfer += $input->readListBegin($_etype2639, $_size2636);
            for ($_i2640 = 0; $_i2640 < $_size2636; ++$_i2640)
            {
              $elem2641 = null;
              $xfer += $input->readString($elem2641);
              $this->keys []= $elem2641;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysRecordTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2642)
          {
            $xfer += $output->writeString($iter2642);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysRecordTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2643 = 0;
            $_ktype2644 = 0;
            $_vtype2645 = 0;
            $xfer += $input->readMapBegin($_ktype2644, $_vtype2645, $_size2643);
            for ($_i2647 = 0; $_i2647 < $_size2643; ++$_i2647)
            {
              $key2648 = 0;
              $val2649 = array();
              $xfer += $input->readI64($key2648);
              $val2649 = array();
              $_size2650 = 0;
              $_ktype2651 = 0;
              $_vtype2652 = 0;
              $xfer += $input->readMapBegin($_ktype2651, $_vtype2652, $_size2650);
              for ($_i2654 = 0; $_i2654 < $_size2650; ++$_i2654)
              {
                $key2655 = '';
                $val2656 = array();
                $xfer += $input->readString($key2655);
                $val2656 = array();
                $_size2657 = 0;
                $_etype2660 = 0;
                $xfer += $input->readSetBegin($_etype2660, $_size2657);
                for ($_i2661 = 0; $_i2661 < $_size2657; ++$_i2661)
                {
                  $elem2662 = null;
                  $elem2662 = new \concourse\thrift\data\TObject();
                  $xfer += $elem2662->read($input);
                  if (is_scalar($elem2662)) {
                    $val2656 []= $elem2662;
                  } else {
                    $val2656 []= $elem2662;
                  }
                }
                $xfer += $input->readSetEnd();
                $val2649[(!is_string($key2655) && !is_integer($key2655)) ? serialize($key2655) : $key2655] = $val2656;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2648) && !is_integer($key2648)) ? serialize($key2648) : $key2648] = $val2649;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysRecordTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2663 => $viter2664)
          {
            $xfer += $output->writeI64($kiter2663);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter2664));
              {
                foreach ($viter2664 as $kiter2665 => $viter2666)
                {
                  $xfer += $output->writeString($kiter2665);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter2666));
                    {
                      foreach ($viter2666 as $iter2667 => $iter2668)
                      {
                        if (is_scalar($iter2668)) {
                        $xfer += $iter2667->write($output);
                        } else {
                        $xfer += $iter2668->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysRecordTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int
   */
  public $record = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'record',
          'type' => TType::I64,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['record'])) {
        $this->record = $vals['record'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2669 = 0;
            $_etype2672 = 0;
            $xfer += $input->readListBegin($_etype2672, $_size2669);
            for ($_i2673 = 0; $_i2673 < $_size2669; ++$_i2673)
            {
              $elem2674 = null;
              $xfer += $input->readString($elem2674);
              $this->keys []= $elem2674;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->record);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysRecordTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2675)
          {
            $xfer += $output->writeString($iter2675);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->record !== null) {
      $xfer += $output->writeFieldBegin('record', TType::I64, 2);
      $xfer += $output->writeI64($this->record);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysRecordTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2676 = 0;
            $_ktype2677 = 0;
            $_vtype2678 = 0;
            $xfer += $input->readMapBegin($_ktype2677, $_vtype2678, $_size2676);
            for ($_i2680 = 0; $_i2680 < $_size2676; ++$_i2680)
            {
              $key2681 = 0;
              $val2682 = array();
              $xfer += $input->readI64($key2681);
              $val2682 = array();
              $_size2683 = 0;
              $_ktype2684 = 0;
              $_vtype2685 = 0;
              $xfer += $input->readMapBegin($_ktype2684, $_vtype2685, $_size2683);
              for ($_i2687 = 0; $_i2687 < $_size2683; ++$_i2687)
              {
                $key2688 = '';
                $val2689 = array();
                $xfer += $input->readString($key2688);
                $val2689 = array();
                $_size2690 = 0;
                $_etype2693 = 0;
                $xfer += $input->readSetBegin($_etype2693, $_size2690);
                for ($_i2694 = 0; $_i2694 < $_size2690; ++$_i2694)
                {
                  $elem2695 = null;
                  $elem2695 = new \concourse\thrift\data\TObject();
                  $xfer += $elem2695->read($input);
                  if (is_scalar($elem2695)) {
                    $val2689 []= $elem2695;
                  } else {
                    $val2689 []= $elem2695;
                  }
                }
                $xfer += $input->readSetEnd();
                $val2682[(!is_string($key2688) && !is_integer($key2688)) ? serialize($key2688) : $key2688] = $val2689;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2681) && !is_integer($key2681)) ? serialize($key2681) : $key2681] = $val2682;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysRecordTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2696 => $viter2697)
          {
            $xfer += $output->writeI64($kiter2696);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter2697));
              {
                foreach ($viter2697 as $kiter2698 => $viter2699)
                {
                  $xfer += $output->writeString($kiter2698);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter2699));
                    {
                      foreach ($viter2699 as $iter2700 => $iter2701)
                      {
                        if (is_scalar($iter2701)) {
                        $xfer += $iter2700->write($output);
                        } else {
                        $xfer += $iter2701->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysRecords_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2702 = 0;
            $_etype2705 = 0;
            $xfer += $input->readListBegin($_etype2705, $_size2702);
            for ($_i2706 = 0; $_i2706 < $_size2702; ++$_i2706)
            {
              $elem2707 = null;
              $xfer += $input->readString($elem2707);
              $this->keys []= $elem2707;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2708 = 0;
            $_etype2711 = 0;
            $xfer += $input->readListBegin($_etype2711, $_size2708);
            for ($_i2712 = 0; $_i2712 < $_size2708; ++$_i2712)
            {
              $elem2713 = null;
              $xfer += $input->readI64($elem2713);
              $this->records []= $elem2713;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysRecords_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2714)
          {
            $xfer += $output->writeString($iter2714);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2715)
          {
            $xfer += $output->writeI64($iter2715);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysRecords_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2716 = 0;
            $_ktype2717 = 0;
            $_vtype2718 = 0;
            $xfer += $input->readMapBegin($_ktype2717, $_vtype2718, $_size2716);
            for ($_i2720 = 0; $_i2720 < $_size2716; ++$_i2720)
            {
              $key2721 = 0;
              $val2722 = array();
              $xfer += $input->readI64($key2721);
              $val2722 = array();
              $_size2723 = 0;
              $_ktype2724 = 0;
              $_vtype2725 = 0;
              $xfer += $input->readMapBegin($_ktype2724, $_vtype2725, $_size2723);
              for ($_i2727 = 0; $_i2727 < $_size2723; ++$_i2727)
              {
                $key2728 = '';
                $val2729 = array();
                $xfer += $input->readString($key2728);
                $val2729 = array();
                $_size2730 = 0;
                $_etype2733 = 0;
                $xfer += $input->readSetBegin($_etype2733, $_size2730);
                for ($_i2734 = 0; $_i2734 < $_size2730; ++$_i2734)
                {
                  $elem2735 = null;
                  $elem2735 = new \concourse\thrift\data\TObject();
                  $xfer += $elem2735->read($input);
                  if (is_scalar($elem2735)) {
                    $val2729 []= $elem2735;
                  } else {
                    $val2729 []= $elem2735;
                  }
                }
                $xfer += $input->readSetEnd();
                $val2722[(!is_string($key2728) && !is_integer($key2728)) ? serialize($key2728) : $key2728] = $val2729;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2721) && !is_integer($key2721)) ? serialize($key2721) : $key2721] = $val2722;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysRecords_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2736 => $viter2737)
          {
            $xfer += $output->writeI64($kiter2736);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter2737));
              {
                foreach ($viter2737 as $kiter2738 => $viter2739)
                {
                  $xfer += $output->writeString($kiter2738);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter2739));
                    {
                      foreach ($viter2739 as $iter2740 => $iter2741)
                      {
                        if (is_scalar($iter2741)) {
                        $xfer += $iter2740->write($output);
                        } else {
                        $xfer += $iter2741->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyRecords_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2742 = 0;
            $_etype2745 = 0;
            $xfer += $input->readListBegin($_etype2745, $_size2742);
            for ($_i2746 = 0; $_i2746 < $_size2742; ++$_i2746)
            {
              $elem2747 = null;
              $xfer += $input->readI64($elem2747);
              $this->records []= $elem2747;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyRecords_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2748)
          {
            $xfer += $output->writeI64($iter2748);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyRecords_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2749 = 0;
            $_ktype2750 = 0;
            $_vtype2751 = 0;
            $xfer += $input->readMapBegin($_ktype2750, $_vtype2751, $_size2749);
            for ($_i2753 = 0; $_i2753 < $_size2749; ++$_i2753)
            {
              $key2754 = 0;
              $val2755 = array();
              $xfer += $input->readI64($key2754);
              $val2755 = array();
              $_size2756 = 0;
              $_etype2759 = 0;
              $xfer += $input->readSetBegin($_etype2759, $_size2756);
              for ($_i2760 = 0; $_i2760 < $_size2756; ++$_i2760)
              {
                $elem2761 = null;
                $elem2761 = new \concourse\thrift\data\TObject();
                $xfer += $elem2761->read($input);
                if (is_scalar($elem2761)) {
                  $val2755 []= $elem2761;
                } else {
                  $val2755 []= $elem2761;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key2754) && !is_integer($key2754)) ? serialize($key2754) : $key2754] = $val2755;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyRecords_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter2762 => $viter2763)
          {
            $xfer += $output->writeI64($kiter2762);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter2763));
              {
                foreach ($viter2763 as $iter2764 => $iter2765)
                {
                  if (is_scalar($iter2765)) {
                  $xfer += $iter2764->write($output);
                  } else {
                  $xfer += $iter2765->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyRecordsTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2766 = 0;
            $_etype2769 = 0;
            $xfer += $input->readListBegin($_etype2769, $_size2766);
            for ($_i2770 = 0; $_i2770 < $_size2766; ++$_i2770)
            {
              $elem2771 = null;
              $xfer += $input->readI64($elem2771);
              $this->records []= $elem2771;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyRecordsTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2772)
          {
            $xfer += $output->writeI64($iter2772);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyRecordsTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2773 = 0;
            $_ktype2774 = 0;
            $_vtype2775 = 0;
            $xfer += $input->readMapBegin($_ktype2774, $_vtype2775, $_size2773);
            for ($_i2777 = 0; $_i2777 < $_size2773; ++$_i2777)
            {
              $key2778 = 0;
              $val2779 = array();
              $xfer += $input->readI64($key2778);
              $val2779 = array();
              $_size2780 = 0;
              $_etype2783 = 0;
              $xfer += $input->readSetBegin($_etype2783, $_size2780);
              for ($_i2784 = 0; $_i2784 < $_size2780; ++$_i2784)
              {
                $elem2785 = null;
                $elem2785 = new \concourse\thrift\data\TObject();
                $xfer += $elem2785->read($input);
                if (is_scalar($elem2785)) {
                  $val2779 []= $elem2785;
                } else {
                  $val2779 []= $elem2785;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key2778) && !is_integer($key2778)) ? serialize($key2778) : $key2778] = $val2779;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyRecordsTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter2786 => $viter2787)
          {
            $xfer += $output->writeI64($kiter2786);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter2787));
              {
                foreach ($viter2787 as $iter2788 => $iter2789)
                {
                  if (is_scalar($iter2789)) {
                  $xfer += $iter2788->write($output);
                  } else {
                  $xfer += $iter2789->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2790 = 0;
            $_etype2793 = 0;
            $xfer += $input->readListBegin($_etype2793, $_size2790);
            for ($_i2794 = 0; $_i2794 < $_size2790; ++$_i2794)
            {
              $elem2795 = null;
              $xfer += $input->readI64($elem2795);
              $this->records []= $elem2795;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyRecordsTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2796)
          {
            $xfer += $output->writeI64($iter2796);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2797 = 0;
            $_ktype2798 = 0;
            $_vtype2799 = 0;
            $xfer += $input->readMapBegin($_ktype2798, $_vtype2799, $_size2797);
            for ($_i2801 = 0; $_i2801 < $_size2797; ++$_i2801)
            {
              $key2802 = 0;
              $val2803 = array();
              $xfer += $input->readI64($key2802);
              $val2803 = array();
              $_size2804 = 0;
              $_etype2807 = 0;
              $xfer += $input->readSetBegin($_etype2807, $_size2804);
              for ($_i2808 = 0; $_i2808 < $_size2804; ++$_i2808)
              {
                $elem2809 = null;
                $elem2809 = new \concourse\thrift\data\TObject();
                $xfer += $elem2809->read($input);
                if (is_scalar($elem2809)) {
                  $val2803 []= $elem2809;
                } else {
                  $val2803 []= $elem2809;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key2802) && !is_integer($key2802)) ? serialize($key2802) : $key2802] = $val2803;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyRecordsTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter2810 => $viter2811)
          {
            $xfer += $output->writeI64($kiter2810);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter2811));
              {
                foreach ($viter2811 as $iter2812 => $iter2813)
                {
                  if (is_scalar($iter2813)) {
                  $xfer += $iter2812->write($output);
                  } else {
                  $xfer += $iter2813->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysRecordsTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2814 = 0;
            $_etype2817 = 0;
            $xfer += $input->readListBegin($_etype2817, $_size2814);
            for ($_i2818 = 0; $_i2818 < $_size2814; ++$_i2818)
            {
              $elem2819 = null;
              $xfer += $input->readString($elem2819);
              $this->keys []= $elem2819;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2820 = 0;
            $_etype2823 = 0;
            $xfer += $input->readListBegin($_etype2823, $_size2820);
            for ($_i2824 = 0; $_i2824 < $_size2820; ++$_i2824)
            {
              $elem2825 = null;
              $xfer += $input->readI64($elem2825);
              $this->records []= $elem2825;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysRecordsTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2826)
          {
            $xfer += $output->writeString($iter2826);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2827)
          {
            $xfer += $output->writeI64($iter2827);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysRecordsTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2828 = 0;
            $_ktype2829 = 0;
            $_vtype2830 = 0;
            $xfer += $input->readMapBegin($_ktype2829, $_vtype2830, $_size2828);
            for ($_i2832 = 0; $_i2832 < $_size2828; ++$_i2832)
            {
              $key2833 = 0;
              $val2834 = array();
              $xfer += $input->readI64($key2833);
              $val2834 = array();
              $_size2835 = 0;
              $_ktype2836 = 0;
              $_vtype2837 = 0;
              $xfer += $input->readMapBegin($_ktype2836, $_vtype2837, $_size2835);
              for ($_i2839 = 0; $_i2839 < $_size2835; ++$_i2839)
              {
                $key2840 = '';
                $val2841 = array();
                $xfer += $input->readString($key2840);
                $val2841 = array();
                $_size2842 = 0;
                $_etype2845 = 0;
                $xfer += $input->readSetBegin($_etype2845, $_size2842);
                for ($_i2846 = 0; $_i2846 < $_size2842; ++$_i2846)
                {
                  $elem2847 = null;
                  $elem2847 = new \concourse\thrift\data\TObject();
                  $xfer += $elem2847->read($input);
                  if (is_scalar($elem2847)) {
                    $val2841 []= $elem2847;
                  } else {
                    $val2841 []= $elem2847;
                  }
                }
                $xfer += $input->readSetEnd();
                $val2834[(!is_string($key2840) && !is_integer($key2840)) ? serialize($key2840) : $key2840] = $val2841;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2833) && !is_integer($key2833)) ? serialize($key2833) : $key2833] = $val2834;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysRecordsTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2848 => $viter2849)
          {
            $xfer += $output->writeI64($kiter2848);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter2849));
              {
                foreach ($viter2849 as $kiter2850 => $viter2851)
                {
                  $xfer += $output->writeString($kiter2850);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter2851));
                    {
                      foreach ($viter2851 as $iter2852 => $iter2853)
                      {
                        if (is_scalar($iter2853)) {
                        $xfer += $iter2852->write($output);
                        } else {
                        $xfer += $iter2853->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysRecordsTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var int[]
   */
  public $records = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'records',
          'type' => TType::LST,
          'etype' => TType::I64,
          'elem' => array(
            'type' => TType::I64,
            ),
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['records'])) {
        $this->records = $vals['records'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2854 = 0;
            $_etype2857 = 0;
            $xfer += $input->readListBegin($_etype2857, $_size2854);
            for ($_i2858 = 0; $_i2858 < $_size2854; ++$_i2858)
            {
              $elem2859 = null;
              $xfer += $input->readString($elem2859);
              $this->keys []= $elem2859;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::LST) {
            $this->records = array();
            $_size2860 = 0;
            $_etype2863 = 0;
            $xfer += $input->readListBegin($_etype2863, $_size2860);
            for ($_i2864 = 0; $_i2864 < $_size2860; ++$_i2864)
            {
              $elem2865 = null;
              $xfer += $input->readI64($elem2865);
              $this->records []= $elem2865;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysRecordsTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2866)
          {
            $xfer += $output->writeString($iter2866);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->records !== null) {
      if (!is_array($this->records)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('records', TType::LST, 2);
      {
        $output->writeListBegin(TType::I64, count($this->records));
        {
          foreach ($this->records as $iter2867)
          {
            $xfer += $output->writeI64($iter2867);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysRecordsTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2868 = 0;
            $_ktype2869 = 0;
            $_vtype2870 = 0;
            $xfer += $input->readMapBegin($_ktype2869, $_vtype2870, $_size2868);
            for ($_i2872 = 0; $_i2872 < $_size2868; ++$_i2872)
            {
              $key2873 = 0;
              $val2874 = array();
              $xfer += $input->readI64($key2873);
              $val2874 = array();
              $_size2875 = 0;
              $_ktype2876 = 0;
              $_vtype2877 = 0;
              $xfer += $input->readMapBegin($_ktype2876, $_vtype2877, $_size2875);
              for ($_i2879 = 0; $_i2879 < $_size2875; ++$_i2879)
              {
                $key2880 = '';
                $val2881 = array();
                $xfer += $input->readString($key2880);
                $val2881 = array();
                $_size2882 = 0;
                $_etype2885 = 0;
                $xfer += $input->readSetBegin($_etype2885, $_size2882);
                for ($_i2886 = 0; $_i2886 < $_size2882; ++$_i2886)
                {
                  $elem2887 = null;
                  $elem2887 = new \concourse\thrift\data\TObject();
                  $xfer += $elem2887->read($input);
                  if (is_scalar($elem2887)) {
                    $val2881 []= $elem2887;
                  } else {
                    $val2881 []= $elem2887;
                  }
                }
                $xfer += $input->readSetEnd();
                $val2874[(!is_string($key2880) && !is_integer($key2880)) ? serialize($key2880) : $key2880] = $val2881;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2873) && !is_integer($key2873)) ? serialize($key2873) : $key2873] = $val2874;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysRecordsTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2888 => $viter2889)
          {
            $xfer += $output->writeI64($kiter2888);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter2889));
              {
                foreach ($viter2889 as $kiter2890 => $viter2891)
                {
                  $xfer += $output->writeString($kiter2890);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter2891));
                    {
                      foreach ($viter2891 as $iter2892 => $iter2893)
                      {
                        if (is_scalar($iter2893)) {
                        $xfer += $iter2892->write($output);
                        } else {
                        $xfer += $iter2893->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyCcl_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyCcl_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyCcl_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2894 = 0;
            $_ktype2895 = 0;
            $_vtype2896 = 0;
            $xfer += $input->readMapBegin($_ktype2895, $_vtype2896, $_size2894);
            for ($_i2898 = 0; $_i2898 < $_size2894; ++$_i2898)
            {
              $key2899 = 0;
              $val2900 = array();
              $xfer += $input->readI64($key2899);
              $val2900 = array();
              $_size2901 = 0;
              $_etype2904 = 0;
              $xfer += $input->readSetBegin($_etype2904, $_size2901);
              for ($_i2905 = 0; $_i2905 < $_size2901; ++$_i2905)
              {
                $elem2906 = null;
                $elem2906 = new \concourse\thrift\data\TObject();
                $xfer += $elem2906->read($input);
                if (is_scalar($elem2906)) {
                  $val2900 []= $elem2906;
                } else {
                  $val2900 []= $elem2906;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key2899) && !is_integer($key2899)) ? serialize($key2899) : $key2899] = $val2900;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyCcl_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter2907 => $viter2908)
          {
            $xfer += $output->writeI64($kiter2907);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter2908));
              {
                foreach ($viter2908 as $iter2909 => $iter2910)
                {
                  if (is_scalar($iter2910)) {
                  $xfer += $iter2909->write($output);
                  } else {
                  $xfer += $iter2910->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyCclTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyCclTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyCclTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2911 = 0;
            $_ktype2912 = 0;
            $_vtype2913 = 0;
            $xfer += $input->readMapBegin($_ktype2912, $_vtype2913, $_size2911);
            for ($_i2915 = 0; $_i2915 < $_size2911; ++$_i2915)
            {
              $key2916 = 0;
              $val2917 = array();
              $xfer += $input->readI64($key2916);
              $val2917 = array();
              $_size2918 = 0;
              $_etype2921 = 0;
              $xfer += $input->readSetBegin($_etype2921, $_size2918);
              for ($_i2922 = 0; $_i2922 < $_size2918; ++$_i2922)
              {
                $elem2923 = null;
                $elem2923 = new \concourse\thrift\data\TObject();
                $xfer += $elem2923->read($input);
                if (is_scalar($elem2923)) {
                  $val2917 []= $elem2923;
                } else {
                  $val2917 []= $elem2923;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key2916) && !is_integer($key2916)) ? serialize($key2916) : $key2916] = $val2917;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyCclTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter2924 => $viter2925)
          {
            $xfer += $output->writeI64($kiter2924);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter2925));
              {
                foreach ($viter2925 as $iter2926 => $iter2927)
                {
                  if (is_scalar($iter2927)) {
                  $xfer += $iter2926->write($output);
                  } else {
                  $xfer += $iter2927->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyCclTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyCclTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyCclTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2928 = 0;
            $_ktype2929 = 0;
            $_vtype2930 = 0;
            $xfer += $input->readMapBegin($_ktype2929, $_vtype2930, $_size2928);
            for ($_i2932 = 0; $_i2932 < $_size2928; ++$_i2932)
            {
              $key2933 = 0;
              $val2934 = array();
              $xfer += $input->readI64($key2933);
              $val2934 = array();
              $_size2935 = 0;
              $_etype2938 = 0;
              $xfer += $input->readSetBegin($_etype2938, $_size2935);
              for ($_i2939 = 0; $_i2939 < $_size2935; ++$_i2939)
              {
                $elem2940 = null;
                $elem2940 = new \concourse\thrift\data\TObject();
                $xfer += $elem2940->read($input);
                if (is_scalar($elem2940)) {
                  $val2934 []= $elem2940;
                } else {
                  $val2934 []= $elem2940;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key2933) && !is_integer($key2933)) ? serialize($key2933) : $key2933] = $val2934;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyCclTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter2941 => $viter2942)
          {
            $xfer += $output->writeI64($kiter2941);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter2942));
              {
                foreach ($viter2942 as $iter2943 => $iter2944)
                {
                  if (is_scalar($iter2944)) {
                  $xfer += $iter2943->write($output);
                  } else {
                  $xfer += $iter2944->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysCcl_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2945 = 0;
            $_etype2948 = 0;
            $xfer += $input->readListBegin($_etype2948, $_size2945);
            for ($_i2949 = 0; $_i2949 < $_size2945; ++$_i2949)
            {
              $elem2950 = null;
              $xfer += $input->readString($elem2950);
              $this->keys []= $elem2950;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysCcl_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2951)
          {
            $xfer += $output->writeString($iter2951);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysCcl_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2952 = 0;
            $_ktype2953 = 0;
            $_vtype2954 = 0;
            $xfer += $input->readMapBegin($_ktype2953, $_vtype2954, $_size2952);
            for ($_i2956 = 0; $_i2956 < $_size2952; ++$_i2956)
            {
              $key2957 = 0;
              $val2958 = array();
              $xfer += $input->readI64($key2957);
              $val2958 = array();
              $_size2959 = 0;
              $_ktype2960 = 0;
              $_vtype2961 = 0;
              $xfer += $input->readMapBegin($_ktype2960, $_vtype2961, $_size2959);
              for ($_i2963 = 0; $_i2963 < $_size2959; ++$_i2963)
              {
                $key2964 = '';
                $val2965 = array();
                $xfer += $input->readString($key2964);
                $val2965 = array();
                $_size2966 = 0;
                $_etype2969 = 0;
                $xfer += $input->readSetBegin($_etype2969, $_size2966);
                for ($_i2970 = 0; $_i2970 < $_size2966; ++$_i2970)
                {
                  $elem2971 = null;
                  $elem2971 = new \concourse\thrift\data\TObject();
                  $xfer += $elem2971->read($input);
                  if (is_scalar($elem2971)) {
                    $val2965 []= $elem2971;
                  } else {
                    $val2965 []= $elem2971;
                  }
                }
                $xfer += $input->readSetEnd();
                $val2958[(!is_string($key2964) && !is_integer($key2964)) ? serialize($key2964) : $key2964] = $val2965;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2957) && !is_integer($key2957)) ? serialize($key2957) : $key2957] = $val2958;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysCcl_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter2972 => $viter2973)
          {
            $xfer += $output->writeI64($kiter2972);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter2973));
              {
                foreach ($viter2973 as $kiter2974 => $viter2975)
                {
                  $xfer += $output->writeString($kiter2974);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter2975));
                    {
                      foreach ($viter2975 as $iter2976 => $iter2977)
                      {
                        if (is_scalar($iter2977)) {
                        $xfer += $iter2976->write($output);
                        } else {
                        $xfer += $iter2977->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysCclTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size2978 = 0;
            $_etype2981 = 0;
            $xfer += $input->readListBegin($_etype2981, $_size2978);
            for ($_i2982 = 0; $_i2982 < $_size2978; ++$_i2982)
            {
              $elem2983 = null;
              $xfer += $input->readString($elem2983);
              $this->keys []= $elem2983;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysCclTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter2984)
          {
            $xfer += $output->writeString($iter2984);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysCclTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size2985 = 0;
            $_ktype2986 = 0;
            $_vtype2987 = 0;
            $xfer += $input->readMapBegin($_ktype2986, $_vtype2987, $_size2985);
            for ($_i2989 = 0; $_i2989 < $_size2985; ++$_i2989)
            {
              $key2990 = 0;
              $val2991 = array();
              $xfer += $input->readI64($key2990);
              $val2991 = array();
              $_size2992 = 0;
              $_ktype2993 = 0;
              $_vtype2994 = 0;
              $xfer += $input->readMapBegin($_ktype2993, $_vtype2994, $_size2992);
              for ($_i2996 = 0; $_i2996 < $_size2992; ++$_i2996)
              {
                $key2997 = '';
                $val2998 = array();
                $xfer += $input->readString($key2997);
                $val2998 = array();
                $_size2999 = 0;
                $_etype3002 = 0;
                $xfer += $input->readSetBegin($_etype3002, $_size2999);
                for ($_i3003 = 0; $_i3003 < $_size2999; ++$_i3003)
                {
                  $elem3004 = null;
                  $elem3004 = new \concourse\thrift\data\TObject();
                  $xfer += $elem3004->read($input);
                  if (is_scalar($elem3004)) {
                    $val2998 []= $elem3004;
                  } else {
                    $val2998 []= $elem3004;
                  }
                }
                $xfer += $input->readSetEnd();
                $val2991[(!is_string($key2997) && !is_integer($key2997)) ? serialize($key2997) : $key2997] = $val2998;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key2990) && !is_integer($key2990)) ? serialize($key2990) : $key2990] = $val2991;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysCclTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter3005 => $viter3006)
          {
            $xfer += $output->writeI64($kiter3005);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter3006));
              {
                foreach ($viter3006 as $kiter3007 => $viter3008)
                {
                  $xfer += $output->writeString($kiter3007);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter3008));
                    {
                      foreach ($viter3008 as $iter3009 => $iter3010)
                      {
                        if (is_scalar($iter3010)) {
                        $xfer += $iter3009->write($output);
                        } else {
                        $xfer += $iter3010->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysCclTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var string
   */
  public $ccl = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'ccl',
          'type' => TType::STRING,
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['ccl'])) {
        $this->ccl = $vals['ccl'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size3011 = 0;
            $_etype3014 = 0;
            $xfer += $input->readListBegin($_etype3014, $_size3011);
            for ($_i3015 = 0; $_i3015 < $_size3011; ++$_i3015)
            {
              $elem3016 = null;
              $xfer += $input->readString($elem3016);
              $this->keys []= $elem3016;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->ccl);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysCclTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter3017)
          {
            $xfer += $output->writeString($iter3017);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ccl !== null) {
      $xfer += $output->writeFieldBegin('ccl', TType::STRING, 2);
      $xfer += $output->writeString($this->ccl);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysCclTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size3018 = 0;
            $_ktype3019 = 0;
            $_vtype3020 = 0;
            $xfer += $input->readMapBegin($_ktype3019, $_vtype3020, $_size3018);
            for ($_i3022 = 0; $_i3022 < $_size3018; ++$_i3022)
            {
              $key3023 = 0;
              $val3024 = array();
              $xfer += $input->readI64($key3023);
              $val3024 = array();
              $_size3025 = 0;
              $_ktype3026 = 0;
              $_vtype3027 = 0;
              $xfer += $input->readMapBegin($_ktype3026, $_vtype3027, $_size3025);
              for ($_i3029 = 0; $_i3029 < $_size3025; ++$_i3029)
              {
                $key3030 = '';
                $val3031 = array();
                $xfer += $input->readString($key3030);
                $val3031 = array();
                $_size3032 = 0;
                $_etype3035 = 0;
                $xfer += $input->readSetBegin($_etype3035, $_size3032);
                for ($_i3036 = 0; $_i3036 < $_size3032; ++$_i3036)
                {
                  $elem3037 = null;
                  $elem3037 = new \concourse\thrift\data\TObject();
                  $xfer += $elem3037->read($input);
                  if (is_scalar($elem3037)) {
                    $val3031 []= $elem3037;
                  } else {
                    $val3031 []= $elem3037;
                  }
                }
                $xfer += $input->readSetEnd();
                $val3024[(!is_string($key3030) && !is_integer($key3030)) ? serialize($key3030) : $key3030] = $val3031;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key3023) && !is_integer($key3023)) ? serialize($key3023) : $key3023] = $val3024;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysCclTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter3038 => $viter3039)
          {
            $xfer += $output->writeI64($kiter3038);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter3039));
              {
                foreach ($viter3039 as $kiter3040 => $viter3041)
                {
                  $xfer += $output->writeString($kiter3040);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter3041));
                    {
                      foreach ($viter3041 as $iter3042 => $iter3043)
                      {
                        if (is_scalar($iter3043)) {
                        $xfer += $iter3042->write($output);
                        } else {
                        $xfer += $iter3043->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyCriteria_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyCriteria_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyCriteria_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size3044 = 0;
            $_ktype3045 = 0;
            $_vtype3046 = 0;
            $xfer += $input->readMapBegin($_ktype3045, $_vtype3046, $_size3044);
            for ($_i3048 = 0; $_i3048 < $_size3044; ++$_i3048)
            {
              $key3049 = 0;
              $val3050 = array();
              $xfer += $input->readI64($key3049);
              $val3050 = array();
              $_size3051 = 0;
              $_etype3054 = 0;
              $xfer += $input->readSetBegin($_etype3054, $_size3051);
              for ($_i3055 = 0; $_i3055 < $_size3051; ++$_i3055)
              {
                $elem3056 = null;
                $elem3056 = new \concourse\thrift\data\TObject();
                $xfer += $elem3056->read($input);
                if (is_scalar($elem3056)) {
                  $val3050 []= $elem3056;
                } else {
                  $val3050 []= $elem3056;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key3049) && !is_integer($key3049)) ? serialize($key3049) : $key3049] = $val3050;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyCriteria_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter3057 => $viter3058)
          {
            $xfer += $output->writeI64($kiter3057);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter3058));
              {
                foreach ($viter3058 as $iter3059 => $iter3060)
                {
                  if (is_scalar($iter3060)) {
                  $xfer += $iter3059->write($output);
                  } else {
                  $xfer += $iter3060->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyCriteriaTime_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyCriteriaTime_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyCriteriaTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size3061 = 0;
            $_ktype3062 = 0;
            $_vtype3063 = 0;
            $xfer += $input->readMapBegin($_ktype3062, $_vtype3063, $_size3061);
            for ($_i3065 = 0; $_i3065 < $_size3061; ++$_i3065)
            {
              $key3066 = 0;
              $val3067 = array();
              $xfer += $input->readI64($key3066);
              $val3067 = array();
              $_size3068 = 0;
              $_etype3071 = 0;
              $xfer += $input->readSetBegin($_etype3071, $_size3068);
              for ($_i3072 = 0; $_i3072 < $_size3068; ++$_i3072)
              {
                $elem3073 = null;
                $elem3073 = new \concourse\thrift\data\TObject();
                $xfer += $elem3073->read($input);
                if (is_scalar($elem3073)) {
                  $val3067 []= $elem3073;
                } else {
                  $val3067 []= $elem3073;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key3066) && !is_integer($key3066)) ? serialize($key3066) : $key3066] = $val3067;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyCriteriaTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter3074 => $viter3075)
          {
            $xfer += $output->writeI64($kiter3074);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter3075));
              {
                foreach ($viter3075 as $iter3076 => $iter3077)
                {
                  if (is_scalar($iter3077)) {
                  $xfer += $iter3076->write($output);
                  } else {
                  $xfer += $iter3077->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyCriteriaTimestr_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $key = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'key',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['key'])) {
        $this->key = $vals['key'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->key);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyCriteriaTimestr_args');
    if ($this->key !== null) {
      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
      $xfer += $output->writeString($this->key);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeyCriteriaTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::SET,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::SET,
            'etype' => TType::STRUCT,
            'elem' => array(
              'type' => TType::STRUCT,
              'class' => '\concourse\thrift\data\TObject',
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size3078 = 0;
            $_ktype3079 = 0;
            $_vtype3080 = 0;
            $xfer += $input->readMapBegin($_ktype3079, $_vtype3080, $_size3078);
            for ($_i3082 = 0; $_i3082 < $_size3078; ++$_i3082)
            {
              $key3083 = 0;
              $val3084 = array();
              $xfer += $input->readI64($key3083);
              $val3084 = array();
              $_size3085 = 0;
              $_etype3088 = 0;
              $xfer += $input->readSetBegin($_etype3088, $_size3085);
              for ($_i3089 = 0; $_i3089 < $_size3085; ++$_i3089)
              {
                $elem3090 = null;
                $elem3090 = new \concourse\thrift\data\TObject();
                $xfer += $elem3090->read($input);
                if (is_scalar($elem3090)) {
                  $val3084 []= $elem3090;
                } else {
                  $val3084 []= $elem3090;
                }
              }
              $xfer += $input->readSetEnd();
              $this->success[(!is_string($key3083) && !is_integer($key3083)) ? serialize($key3083) : $key3083] = $val3084;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeyCriteriaTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::SET, count($this->success));
        {
          foreach ($this->success as $kiter3091 => $viter3092)
          {
            $xfer += $output->writeI64($kiter3091);
            {
              $output->writeSetBegin(TType::STRUCT, count($viter3092));
              {
                foreach ($viter3092 as $iter3093 => $iter3094)
                {
                  if (is_scalar($iter3094)) {
                  $xfer += $iter3093->write($output);
                  } else {
                  $xfer += $iter3094->write($output);
                  }
                }
              }
              $output->writeSetEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysCriteria_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        4 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        5 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size3095 = 0;
            $_etype3098 = 0;
            $xfer += $input->readListBegin($_etype3098, $_size3095);
            for ($_i3099 = 0; $_i3099 < $_size3095; ++$_i3099)
            {
              $elem3100 = null;
              $xfer += $input->readString($elem3100);
              $this->keys []= $elem3100;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysCriteria_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter3101)
          {
            $xfer += $output->writeString($iter3101);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 3);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 4);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 5);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysCriteria_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size3102 = 0;
            $_ktype3103 = 0;
            $_vtype3104 = 0;
            $xfer += $input->readMapBegin($_ktype3103, $_vtype3104, $_size3102);
            for ($_i3106 = 0; $_i3106 < $_size3102; ++$_i3106)
            {
              $key3107 = 0;
              $val3108 = array();
              $xfer += $input->readI64($key3107);
              $val3108 = array();
              $_size3109 = 0;
              $_ktype3110 = 0;
              $_vtype3111 = 0;
              $xfer += $input->readMapBegin($_ktype3110, $_vtype3111, $_size3109);
              for ($_i3113 = 0; $_i3113 < $_size3109; ++$_i3113)
              {
                $key3114 = '';
                $val3115 = array();
                $xfer += $input->readString($key3114);
                $val3115 = array();
                $_size3116 = 0;
                $_etype3119 = 0;
                $xfer += $input->readSetBegin($_etype3119, $_size3116);
                for ($_i3120 = 0; $_i3120 < $_size3116; ++$_i3120)
                {
                  $elem3121 = null;
                  $elem3121 = new \concourse\thrift\data\TObject();
                  $xfer += $elem3121->read($input);
                  if (is_scalar($elem3121)) {
                    $val3115 []= $elem3121;
                  } else {
                    $val3115 []= $elem3121;
                  }
                }
                $xfer += $input->readSetEnd();
                $val3108[(!is_string($key3114) && !is_integer($key3114)) ? serialize($key3114) : $key3114] = $val3115;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key3107) && !is_integer($key3107)) ? serialize($key3107) : $key3107] = $val3108;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysCriteria_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter3122 => $viter3123)
          {
            $xfer += $output->writeI64($kiter3122);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter3123));
              {
                foreach ($viter3123 as $kiter3124 => $viter3125)
                {
                  $xfer += $output->writeString($kiter3124);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter3125));
                    {
                      foreach ($viter3125 as $iter3126 => $iter3127)
                      {
                        if (is_scalar($iter3127)) {
                        $xfer += $iter3126->write($output);
                        } else {
                        $xfer += $iter3127->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysCriteriaTime_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var int
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::I64,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size3128 = 0;
            $_etype3131 = 0;
            $xfer += $input->readListBegin($_etype3131, $_size3128);
            for ($_i3132 = 0; $_i3132 < $_size3128; ++$_i3132)
            {
              $elem3133 = null;
              $xfer += $input->readString($elem3133);
              $this->keys []= $elem3133;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysCriteriaTime_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter3134)
          {
            $xfer += $output->writeString($iter3134);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3);
      $xfer += $output->writeI64($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysCriteriaTime_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size3135 = 0;
            $_ktype3136 = 0;
            $_vtype3137 = 0;
            $xfer += $input->readMapBegin($_ktype3136, $_vtype3137, $_size3135);
            for ($_i3139 = 0; $_i3139 < $_size3135; ++$_i3139)
            {
              $key3140 = 0;
              $val3141 = array();
              $xfer += $input->readI64($key3140);
              $val3141 = array();
              $_size3142 = 0;
              $_ktype3143 = 0;
              $_vtype3144 = 0;
              $xfer += $input->readMapBegin($_ktype3143, $_vtype3144, $_size3142);
              for ($_i3146 = 0; $_i3146 < $_size3142; ++$_i3146)
              {
                $key3147 = '';
                $val3148 = array();
                $xfer += $input->readString($key3147);
                $val3148 = array();
                $_size3149 = 0;
                $_etype3152 = 0;
                $xfer += $input->readSetBegin($_etype3152, $_size3149);
                for ($_i3153 = 0; $_i3153 < $_size3149; ++$_i3153)
                {
                  $elem3154 = null;
                  $elem3154 = new \concourse\thrift\data\TObject();
                  $xfer += $elem3154->read($input);
                  if (is_scalar($elem3154)) {
                    $val3148 []= $elem3154;
                  } else {
                    $val3148 []= $elem3154;
                  }
                }
                $xfer += $input->readSetEnd();
                $val3141[(!is_string($key3147) && !is_integer($key3147)) ? serialize($key3147) : $key3147] = $val3148;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key3140) && !is_integer($key3140)) ? serialize($key3140) : $key3140] = $val3141;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysCriteriaTime_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter3155 => $viter3156)
          {
            $xfer += $output->writeI64($kiter3155);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter3156));
              {
                foreach ($viter3156 as $kiter3157 => $viter3158)
                {
                  $xfer += $output->writeString($kiter3157);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter3158));
                    {
                      foreach ($viter3158 as $iter3159 => $iter3160)
                      {
                        if (is_scalar($iter3160)) {
                        $xfer += $iter3159->write($output);
                        } else {
                        $xfer += $iter3160->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysCriteriaTimestr_args {
  static $_TSPEC;

  /**
   * @var string[]
   */
  public $keys = null;
  /**
   * @var \concourse\thrift\data\TCriteria
   */
  public $criteria = null;
  /**
   * @var string
   */
  public $timestamp = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $transaction = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'keys',
          'type' => TType::LST,
          'etype' => TType::STRING,
          'elem' => array(
            'type' => TType::STRING,
            ),
          ),
        2 => array(
          'var' => 'criteria',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\data\TCriteria',
          ),
        3 => array(
          'var' => 'timestamp',
          'type' => TType::STRING,
          ),
        4 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        5 => array(
          'var' => 'transaction',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        6 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['keys'])) {
        $this->keys = $vals['keys'];
      }
      if (isset($vals['criteria'])) {
        $this->criteria = $vals['criteria'];
      }
      if (isset($vals['timestamp'])) {
        $this->timestamp = $vals['timestamp'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['transaction'])) {
        $this->transaction = $vals['transaction'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::LST) {
            $this->keys = array();
            $_size3161 = 0;
            $_etype3164 = 0;
            $xfer += $input->readListBegin($_etype3164, $_size3161);
            for ($_i3165 = 0; $_i3165 < $_size3161; ++$_i3165)
            {
              $elem3166 = null;
              $xfer += $input->readString($elem3166);
              $this->keys []= $elem3166;
            }
            $xfer += $input->readListEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->criteria = new \concourse\thrift\data\TCriteria();
            $xfer += $this->criteria->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->timestamp);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 5:
          if ($ftype == TType::STRUCT) {
            $this->transaction = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->transaction->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 6:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysCriteriaTimestr_args');
    if ($this->keys !== null) {
      if (!is_array($this->keys)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('keys', TType::LST, 1);
      {
        $output->writeListBegin(TType::STRING, count($this->keys));
        {
          foreach ($this->keys as $iter3167)
          {
            $xfer += $output->writeString($iter3167);
          }
        }
        $output->writeListEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->criteria !== null) {
      if (!is_object($this->criteria)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('criteria', TType::STRUCT, 2);
      $xfer += $this->criteria->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->timestamp !== null) {
      $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 3);
      $xfer += $output->writeString($this->timestamp);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 4);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->transaction !== null) {
      if (!is_object($this->transaction)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('transaction', TType::STRUCT, 5);
      $xfer += $this->transaction->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 6);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_navigateKeysCriteriaTimestr_result {
  static $_TSPEC;

  /**
   * @var array
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::MAP,
          'ktype' => TType::I64,
          'vtype' => TType::MAP,
          'key' => array(
            'type' => TType::I64,
          ),
          'val' => array(
            'type' => TType::MAP,
            'ktype' => TType::STRING,
            'vtype' => TType::SET,
            'key' => array(
              'type' => TType::STRING,
            ),
            'val' => array(
              'type' => TType::SET,
              'etype' => TType::STRUCT,
              'elem' => array(
                'type' => TType::STRUCT,
                'class' => '\concourse\thrift\data\TObject',
                ),
              ),
            ),
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::MAP) {
            $this->success = array();
            $_size3168 = 0;
            $_ktype3169 = 0;
            $_vtype3170 = 0;
            $xfer += $input->readMapBegin($_ktype3169, $_vtype3170, $_size3168);
            for ($_i3172 = 0; $_i3172 < $_size3168; ++$_i3172)
            {
              $key3173 = 0;
              $val3174 = array();
              $xfer += $input->readI64($key3173);
              $val3174 = array();
              $_size3175 = 0;
              $_ktype3176 = 0;
              $_vtype3177 = 0;
              $xfer += $input->readMapBegin($_ktype3176, $_vtype3177, $_size3175);
              for ($_i3179 = 0; $_i3179 < $_size3175; ++$_i3179)
              {
                $key3180 = '';
                $val3181 = array();
                $xfer += $input->readString($key3180);
                $val3181 = array();
                $_size3182 = 0;
                $_etype3185 = 0;
                $xfer += $input->readSetBegin($_etype3185, $_size3182);
                for ($_i3186 = 0; $_i3186 < $_size3182; ++$_i3186)
                {
                  $elem3187 = null;
                  $elem3187 = new \concourse\thrift\data\TObject();
                  $xfer += $elem3187->read($input);
                  if (is_scalar($elem3187)) {
                    $val3181 []= $elem3187;
                  } else {
                    $val3181 []= $elem3187;
                  }
                }
                $xfer += $input->readSetEnd();
                $val3174[(!is_string($key3180) && !is_integer($key3180)) ? serialize($key3180) : $key3180] = $val3181;
              }
              $xfer += $input->readMapEnd();
              $this->success[(!is_string($key3173) && !is_integer($key3173)) ? serialize($key3173) : $key3173] = $val3174;
            }
            $xfer += $input->readMapEnd();
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_navigateKeysCriteriaTimestr_result');
    if ($this->success !== null) {
      if (!is_array($this->success)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
      {
        $output->writeMapBegin(TType::I64, TType::MAP, count($this->success));
        {
          foreach ($this->success as $kiter3188 => $viter3189)
          {
            $xfer += $output->writeI64($kiter3188);
            {
              $output->writeMapBegin(TType::STRING, TType::SET, count($viter3189));
              {
                foreach ($viter3189 as $kiter3190 => $viter3191)
                {
                  $xfer += $output->writeString($kiter3190);
                  {
                    $output->writeSetBegin(TType::STRUCT, count($viter3191));
                    {
                      foreach ($viter3191 as $iter3192 => $iter3193)
                      {
                        if (is_scalar($iter3193)) {
                        $xfer += $iter3192->write($output);
                        } else {
                        $xfer += $iter3193->write($output);
                        }
                      }
                    }
                    $output->writeSetEnd();
                  }
                }
              }
              $output->writeMapEnd();
            }
          }
        }
        $output->writeMapEnd();
      }
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getServerEnvironment_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $token = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        2 => array(
          'var' => 'token',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        3 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['token'])) {
        $this->token = $vals['token'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->token = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->token->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getServerEnvironment_args');
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 1);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->token !== null) {
      if (!is_object($this->token)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('token', TType::STRUCT, 2);
      $xfer += $this->token->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 3);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getServerEnvironment_result {
  static $_TSPEC;

  /**
   * @var string
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRING,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getServerEnvironment_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
      $xfer += $output->writeString($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getServerVersion_args {
  static $_TSPEC;


  public function __construct() {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        );
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getServerVersion_args');
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_getServerVersion_result {
  static $_TSPEC;

  /**
   * @var string
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::STRING,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_getServerVersion_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
      $xfer += $output->writeString($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_time_args {
  static $_TSPEC;

  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $token = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        2 => array(
          'var' => 'token',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        3 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['token'])) {
        $this->token = $vals['token'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->token = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->token->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_time_args');
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 1);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->token !== null) {
      if (!is_object($this->token)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('token', TType::STRUCT, 2);
      $xfer += $this->token->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 3);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_time_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_time_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_timePhrase_args {
  static $_TSPEC;

  /**
   * @var string
   */
  public $phrase = null;
  /**
   * @var \concourse\thrift\shared\AccessToken
   */
  public $creds = null;
  /**
   * @var \concourse\thrift\shared\TransactionToken
   */
  public $token = null;
  /**
   * @var string
   */
  public $environment = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        1 => array(
          'var' => 'phrase',
          'type' => TType::STRING,
          ),
        2 => array(
          'var' => 'creds',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\AccessToken',
          ),
        3 => array(
          'var' => 'token',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\shared\TransactionToken',
          ),
        4 => array(
          'var' => 'environment',
          'type' => TType::STRING,
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['phrase'])) {
        $this->phrase = $vals['phrase'];
      }
      if (isset($vals['creds'])) {
        $this->creds = $vals['creds'];
      }
      if (isset($vals['token'])) {
        $this->token = $vals['token'];
      }
      if (isset($vals['environment'])) {
        $this->environment = $vals['environment'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 1:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->phrase);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->creds = new \concourse\thrift\shared\AccessToken();
            $xfer += $this->creds->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->token = new \concourse\thrift\shared\TransactionToken();
            $xfer += $this->token->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 4:
          if ($ftype == TType::STRING) {
            $xfer += $input->readString($this->environment);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_timePhrase_args');
    if ($this->phrase !== null) {
      $xfer += $output->writeFieldBegin('phrase', TType::STRING, 1);
      $xfer += $output->writeString($this->phrase);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->creds !== null) {
      if (!is_object($this->creds)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('creds', TType::STRUCT, 2);
      $xfer += $this->creds->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->token !== null) {
      if (!is_object($this->token)) {
        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
      }
      $xfer += $output->writeFieldBegin('token', TType::STRUCT, 3);
      $xfer += $this->token->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->environment !== null) {
      $xfer += $output->writeFieldBegin('environment', TType::STRING, 4);
      $xfer += $output->writeString($this->environment);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}

class ConcourseService_timePhrase_result {
  static $_TSPEC;

  /**
   * @var int
   */
  public $success = null;
  /**
   * @var \concourse\thrift\exceptions\SecurityException
   */
  public $ex = null;
  /**
   * @var \concourse\thrift\exceptions\TransactionException
   */
  public $ex2 = null;
  /**
   * @var \concourse\thrift\exceptions\ParseException
   */
  public $ex3 = null;

  public function __construct($vals=null) {
    if (!isset(self::$_TSPEC)) {
      self::$_TSPEC = array(
        0 => array(
          'var' => 'success',
          'type' => TType::I64,
          ),
        1 => array(
          'var' => 'ex',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\SecurityException',
          ),
        2 => array(
          'var' => 'ex2',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\TransactionException',
          ),
        3 => array(
          'var' => 'ex3',
          'type' => TType::STRUCT,
          'class' => '\concourse\thrift\exceptions\ParseException',
          ),
        );
    }
    if (is_array($vals)) {
      if (isset($vals['success'])) {
        $this->success = $vals['success'];
      }
      if (isset($vals['ex'])) {
        $this->ex = $vals['ex'];
      }
      if (isset($vals['ex2'])) {
        $this->ex2 = $vals['ex2'];
      }
      if (isset($vals['ex3'])) {
        $this->ex3 = $vals['ex3'];
      }
    }
  }

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

  public function read($input)
  {
    $xfer = 0;
    $fname = null;
    $ftype = 0;
    $fid = 0;
    $xfer += $input->readStructBegin($fname);
    while (true)
    {
      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
      if ($ftype == TType::STOP) {
        break;
      }
      switch ($fid)
      {
        case 0:
          if ($ftype == TType::I64) {
            $xfer += $input->readI64($this->success);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 1:
          if ($ftype == TType::STRUCT) {
            $this->ex = new \concourse\thrift\exceptions\SecurityException();
            $xfer += $this->ex->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 2:
          if ($ftype == TType::STRUCT) {
            $this->ex2 = new \concourse\thrift\exceptions\TransactionException();
            $xfer += $this->ex2->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        case 3:
          if ($ftype == TType::STRUCT) {
            $this->ex3 = new \concourse\thrift\exceptions\ParseException();
            $xfer += $this->ex3->read($input);
          } else {
            $xfer += $input->skip($ftype);
          }
          break;
        default:
          $xfer += $input->skip($ftype);
          break;
      }
      $xfer += $input->readFieldEnd();
    }
    $xfer += $input->readStructEnd();
    return $xfer;
  }

  public function write($output) {
    $xfer = 0;
    $xfer += $output->writeStructBegin('ConcourseService_timePhrase_result');
    if ($this->success !== null) {
      $xfer += $output->writeFieldBegin('success', TType::I64, 0);
      $xfer += $output->writeI64($this->success);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex !== null) {
      $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
      $xfer += $this->ex->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex2 !== null) {
      $xfer += $output->writeFieldBegin('ex2', TType::STRUCT, 2);
      $xfer += $this->ex2->write($output);
      $xfer += $output->writeFieldEnd();
    }
    if ($this->ex3 !== null) {
      $xfer += $output->writeFieldBegin('ex3', TType::STRUCT, 3);
      $xfer += $this->ex3->write($output);
      $xfer += $output->writeFieldEnd();
    }
    $xfer += $output->writeFieldStop();
    $xfer += $output->writeStructEnd();
    return $xfer;
  }

}


