<?php

namespace Sabre\CreatePassengerNameRecord\Structs;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for MiscSegment Structs
 * @subpackage Structs
 */
class MiscSegment extends AbstractStructBase
{
    /**
     * The OriginLocation
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \Sabre\CreatePassengerNameRecord\Structs\OriginLocation
     */
    public $OriginLocation;
    /**
     * The Text
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var string[]
     */
    public $Text;
    /**
     * The VendorPrefs
     * @var \Sabre\CreatePassengerNameRecord\Structs\VendorPrefs
     */
    public $VendorPrefs;
    /**
     * The DepartureDateTime
     * Meta informations extracted from the WSDL
     * - documentation: "DepartureDateTime" is used to return the date of the segment associated with the particular segment. "DepartureDateTime" follows this format: MM:DD | A simple date type. Allows specifying a date without a year. Accepted formats:
     * "yyyy-mm-dd" or "mm-dd"
     * - use: optional
     * - pattern:
     * (((((0[1-9])|(1[0-2]))-((0[1-9])|(1\d)|(2[0-9])))|((((0[13578])|(1[02]))-31)|(((0[1,3-9])|(1[0-2]))-30)))|(((19|20)(([02468][048])|([13579][26]))-02-29))|((20[0-9][0-9])|(19[0-9][0-9]))-((((0[1-9])|(1[0-2]))-((0[1-9])|(1\d)|(2[0-8])))|((((0[13578])|(
     * 1[02]))-31)|(((0[1,3-9])|(1[0-2]))-(29|30)))))
     * @var string
     */
    public $DepartureDateTime;
    /**
     * The InsertAfter
     * Meta informations extracted from the WSDL
     * - use: optional
     * @var int
     */
    public $InsertAfter;
    /**
     * The NumberInParty
     * Meta informations extracted from the WSDL
     * - documentation: "NumberInParty" is used to return the number of passengers associated with the particular rail segment.
     * - use: optional
     * @var int
     */
    public $NumberInParty;
    /**
     * The Status
     * Meta informations extracted from the WSDL
     * - documentation: "Status" is used to return the status code associated with the particular itinerary segment.
     * - use: optional
     * @var string
     */
    public $Status;
    /**
     * The Type
     * Meta informations extracted from the WSDL
     * - documentation: "Type" is used to return the type of segment.
     * - use: optional
     * @var string
     */
    public $Type;
    /**
     * The Vendor
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \Sabre\CreatePassengerNameRecord\Structs\Vendor
     */
    public $Vendor;
    /**
     * The DayOfWeekInd
     * Meta informations extracted from the WSDL
     * - documentation: "DayOfWeekInd" is used to return the day of the week indicator.
     * - use: optional
     * @var string
     */
    public $DayOfWeekInd;
    /**
     * The LinkCode
     * Meta informations extracted from the WSDL
     * - documentation: "LinkCode" is used to return the link code
     * - use: optional
     * @var string
     */
    public $LinkCode;
    /**
     * The SegmentNumber
     * Meta informations extracted from the WSDL
     * - documentation: "SegmentNumber" is used to return the itinerary segment number.
     * - use: optional
     * @var string
     */
    public $SegmentNumber;
    /**
     * The IsPast
     * Meta informations extracted from the WSDL
     * - documentation: It returns information if current segment is past or not. Attribute is populated based on MiscSegment - @DepartureDateTime, MiscSegment - OriginLocation - @LocationCode. There is no end date, thus it will be calculated like air
     * segment.
     * - use: optional
     * @var bool
     */
    public $IsPast;
    /**
     * Constructor method for MiscSegment
     * @uses MiscSegment::setOriginLocation()
     * @uses MiscSegment::setText()
     * @uses MiscSegment::setVendorPrefs()
     * @uses MiscSegment::setDepartureDateTime()
     * @uses MiscSegment::setInsertAfter()
     * @uses MiscSegment::setNumberInParty()
     * @uses MiscSegment::setStatus()
     * @uses MiscSegment::setType()
     * @uses MiscSegment::setVendor()
     * @uses MiscSegment::setDayOfWeekInd()
     * @uses MiscSegment::setLinkCode()
     * @uses MiscSegment::setSegmentNumber()
     * @uses MiscSegment::setIsPast()
     * @param \Sabre\CreatePassengerNameRecord\Structs\OriginLocation $originLocation
     * @param string[] $text
     * @param \Sabre\CreatePassengerNameRecord\Structs\VendorPrefs $vendorPrefs
     * @param string $departureDateTime
     * @param int $insertAfter
     * @param int $numberInParty
     * @param string $status
     * @param string $type
     * @param \Sabre\CreatePassengerNameRecord\Structs\Vendor $vendor
     * @param string $dayOfWeekInd
     * @param string $linkCode
     * @param string $segmentNumber
     * @param bool $isPast
     */
    public function __construct(\Sabre\CreatePassengerNameRecord\Structs\OriginLocation $originLocation = null, array $text = array(), \Sabre\CreatePassengerNameRecord\Structs\VendorPrefs $vendorPrefs = null, $departureDateTime = null, $insertAfter = null, $numberInParty = null, $status = null, $type = null, \Sabre\CreatePassengerNameRecord\Structs\Vendor $vendor = null, $dayOfWeekInd = null, $linkCode = null, $segmentNumber = null, $isPast = null)
    {
        $this
            ->setOriginLocation($originLocation)
            ->setText($text)
            ->setVendorPrefs($vendorPrefs)
            ->setDepartureDateTime($departureDateTime)
            ->setInsertAfter($insertAfter)
            ->setNumberInParty($numberInParty)
            ->setStatus($status)
            ->setType($type)
            ->setVendor($vendor)
            ->setDayOfWeekInd($dayOfWeekInd)
            ->setLinkCode($linkCode)
            ->setSegmentNumber($segmentNumber)
            ->setIsPast($isPast);
    }
    /**
     * Get OriginLocation value
     * @return \Sabre\CreatePassengerNameRecord\Structs\OriginLocation|null
     */
    public function getOriginLocation()
    {
        return $this->OriginLocation;
    }
    /**
     * Set OriginLocation value
     * @param \Sabre\CreatePassengerNameRecord\Structs\OriginLocation $originLocation
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function setOriginLocation(\Sabre\CreatePassengerNameRecord\Structs\OriginLocation $originLocation = null)
    {
        $this->OriginLocation = $originLocation;
        return $this;
    }
    /**
     * Get Text value
     * @return string[]|null
     */
    public function getText()
    {
        return $this->Text;
    }
    /**
     * Set Text value
     * @throws \InvalidArgumentException
     * @param string[] $text
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function setText(array $text = array())
    {
        $this->Text = $text;
        return $this;
    }
    /**
     * Add item to Text value
     * @throws \InvalidArgumentException
     * @param string $item
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function addToText($item)
    {
        $this->Text[] = $item;
        return $this;
    }
    /**
     * Get VendorPrefs value
     * @return \Sabre\CreatePassengerNameRecord\Structs\VendorPrefs|null
     */
    public function getVendorPrefs()
    {
        return $this->VendorPrefs;
    }
    /**
     * Set VendorPrefs value
     * @param \Sabre\CreatePassengerNameRecord\Structs\VendorPrefs $vendorPrefs
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function setVendorPrefs(\Sabre\CreatePassengerNameRecord\Structs\VendorPrefs $vendorPrefs = null)
    {
        $this->VendorPrefs = $vendorPrefs;
        return $this;
    }
    /**
     * Get DepartureDateTime value
     * @return string|null
     */
    public function getDepartureDateTime()
    {
        return $this->DepartureDateTime;
    }
    /**
     * Set DepartureDateTime value
     * @param string $departureDateTime
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function setDepartureDateTime($departureDateTime = null)
    {
        $this->DepartureDateTime = $departureDateTime;
        return $this;
    }
    /**
     * Get InsertAfter value
     * @return int|null
     */
    public function getInsertAfter()
    {
        return $this->InsertAfter;
    }
    /**
     * Set InsertAfter value
     * @param int $insertAfter
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function setInsertAfter($insertAfter = null)
    {
        $this->InsertAfter = $insertAfter;
        return $this;
    }
    /**
     * Get NumberInParty value
     * @return int|null
     */
    public function getNumberInParty()
    {
        return $this->NumberInParty;
    }
    /**
     * Set NumberInParty value
     * @param int $numberInParty
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function setNumberInParty($numberInParty = null)
    {
        $this->NumberInParty = $numberInParty;
        return $this;
    }
    /**
     * Get Status value
     * @return string|null
     */
    public function getStatus()
    {
        return $this->Status;
    }
    /**
     * Set Status value
     * @param string $status
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function setStatus($status = null)
    {
        $this->Status = $status;
        return $this;
    }
    /**
     * Get Type value
     * @return string|null
     */
    public function getType()
    {
        return $this->Type;
    }
    /**
     * Set Type value
     * @param string $type
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function setType($type = null)
    {
        $this->Type = $type;
        return $this;
    }
    /**
     * Get Vendor value
     * @return \Sabre\CreatePassengerNameRecord\Structs\Vendor|null
     */
    public function getVendor()
    {
        return $this->Vendor;
    }
    /**
     * Set Vendor value
     * @param \Sabre\CreatePassengerNameRecord\Structs\Vendor $vendor
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function setVendor(\Sabre\CreatePassengerNameRecord\Structs\Vendor $vendor = null)
    {
        $this->Vendor = $vendor;
        return $this;
    }
    /**
     * Get DayOfWeekInd value
     * @return string|null
     */
    public function getDayOfWeekInd()
    {
        return $this->DayOfWeekInd;
    }
    /**
     * Set DayOfWeekInd value
     * @param string $dayOfWeekInd
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function setDayOfWeekInd($dayOfWeekInd = null)
    {
        $this->DayOfWeekInd = $dayOfWeekInd;
        return $this;
    }
    /**
     * Get LinkCode value
     * @return string|null
     */
    public function getLinkCode()
    {
        return $this->LinkCode;
    }
    /**
     * Set LinkCode value
     * @param string $linkCode
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function setLinkCode($linkCode = null)
    {
        $this->LinkCode = $linkCode;
        return $this;
    }
    /**
     * Get SegmentNumber value
     * @return string|null
     */
    public function getSegmentNumber()
    {
        return $this->SegmentNumber;
    }
    /**
     * Set SegmentNumber value
     * @param string $segmentNumber
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function setSegmentNumber($segmentNumber = null)
    {
        $this->SegmentNumber = $segmentNumber;
        return $this;
    }
    /**
     * Get IsPast value
     * @return bool|null
     */
    public function getIsPast()
    {
        return $this->IsPast;
    }
    /**
     * Set IsPast value
     * @param bool $isPast
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public function setIsPast($isPast = null)
    {
        $this->IsPast = $isPast;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \Sabre\CreatePassengerNameRecord\Structs\MiscSegment
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
