<?php
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.2
//
// <auto-generated>
//
// Generated from file `Cdr.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//


namespace
{
    require_once 'Config.php';
    require_once 'Common.php';
    require_once 'Peer/PeerType.php';
    require_once 'Direction.php';
}

namespace Smartswitch\Telephony
{
    global $Smartswitch_Telephony__t_CdrBilling;
    class CdrBilling
    {
        public function __construct($code='', $tollFree=false, $minutes=0.0, $price=0.0, $currency='')
        {
            $this->code = $code;
            $this->tollFree = $tollFree;
            $this->minutes = $minutes;
            $this->price = $price;
            $this->currency = $currency;
        }

        public function __toString()
        {
            global $Smartswitch_Telephony__t_CdrBilling;
            return IcePHP_stringify($this, $Smartswitch_Telephony__t_CdrBilling);
        }

        public $code;
        public $tollFree;
        public $minutes;
        public $price;
        public $currency;
    }

    global $IcePHP__t_string;
    global $IcePHP__t_bool;
    global $IcePHP__t_double;
    $Smartswitch_Telephony__t_CdrBilling = IcePHP_defineStruct('::Smartswitch::Telephony::CdrBilling', '\\Smartswitch\\Telephony\\CdrBilling', array(
        array('code', $IcePHP__t_string),
        array('tollFree', $IcePHP__t_bool),
        array('minutes', $IcePHP__t_double),
        array('price', $IcePHP__t_double),
        array('currency', $IcePHP__t_string)));
}

namespace Smartswitch\Telephony
{
    global $Smartswitch_Telephony__t_CdrBillingOpt;

    if(!isset($Smartswitch_Telephony__t_CdrBillingOpt))
    {
        global $Smartswitch_Telephony__t_CdrBilling;
        $Smartswitch_Telephony__t_CdrBillingOpt = IcePHP_defineSequence('::Smartswitch::Telephony::CdrBillingOpt', $Smartswitch_Telephony__t_CdrBilling);
    }
}

namespace Smartswitch\Telephony
{
    global $Smartswitch_Telephony__t_Cdr;
    class Cdr
    {
        public function __construct($startTime='', $answerTime='', $endTime='', $technology='', $callerId='', $calleeId='', $totalSeconds=0, $answeredSeconds=0, $hangupCause='', $billing=null, $direction=\Smartswitch\Direction::Inbound, $peerType=\Smartswitch\Peer\PeerType::Originator, $peerId=0)
        {
            $this->startTime = $startTime;
            $this->answerTime = $answerTime;
            $this->endTime = $endTime;
            $this->technology = $technology;
            $this->callerId = $callerId;
            $this->calleeId = $calleeId;
            $this->totalSeconds = $totalSeconds;
            $this->answeredSeconds = $answeredSeconds;
            $this->hangupCause = $hangupCause;
            $this->billing = $billing;
            $this->direction = $direction;
            $this->peerType = $peerType;
            $this->peerId = $peerId;
        }

        public function __toString()
        {
            global $Smartswitch_Telephony__t_Cdr;
            return IcePHP_stringify($this, $Smartswitch_Telephony__t_Cdr);
        }

        public $startTime;
        public $answerTime;
        public $endTime;
        public $technology;
        public $callerId;
        public $calleeId;
        public $totalSeconds;
        public $answeredSeconds;
        public $hangupCause;
        public $billing;
        public $direction;
        public $peerType;
        public $peerId;
    }

    global $IcePHP__t_string;
    global $IcePHP__t_int;
    global $Smartswitch_Telephony__t_CdrBillingOpt;
    global $Smartswitch__t_Direction;
    global $Smartswitch_Peer__t_PeerType;
    global $IcePHP__t_long;
    $Smartswitch_Telephony__t_Cdr = IcePHP_defineStruct('::Smartswitch::Telephony::Cdr', '\\Smartswitch\\Telephony\\Cdr', array(
        array('startTime', $IcePHP__t_string),
        array('answerTime', $IcePHP__t_string),
        array('endTime', $IcePHP__t_string),
        array('technology', $IcePHP__t_string),
        array('callerId', $IcePHP__t_string),
        array('calleeId', $IcePHP__t_string),
        array('totalSeconds', $IcePHP__t_int),
        array('answeredSeconds', $IcePHP__t_int),
        array('hangupCause', $IcePHP__t_string),
        array('billing', $Smartswitch_Telephony__t_CdrBillingOpt),
        array('direction', $Smartswitch__t_Direction),
        array('peerType', $Smartswitch_Peer__t_PeerType),
        array('peerId', $IcePHP__t_long)));
}

namespace Smartswitch\Telephony
{
    global $Smartswitch_Telephony__t_CdrSequence;

    if(!isset($Smartswitch_Telephony__t_CdrSequence))
    {
        global $Smartswitch_Telephony__t_Cdr;
        $Smartswitch_Telephony__t_CdrSequence = IcePHP_defineSequence('::Smartswitch::Telephony::CdrSequence', $Smartswitch_Telephony__t_Cdr);
    }
}
?>
