<?php

namespace Sabre\OTAAirPrice\Structs;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PersonName Structs
 * @subpackage Structs
 */
class PersonName extends AbstractStructBase
{
    /**
     * The GivenName
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \Sabre\OTAAirPrice\Structs\GivenName
     */
    public $GivenName;
    /**
     * The Surname
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \Sabre\OTAAirPrice\Structs\Surname
     */
    public $Surname;
    /**
     * Constructor method for PersonName
     * @uses PersonName::setGivenName()
     * @uses PersonName::setSurname()
     * @param \Sabre\OTAAirPrice\Structs\GivenName $givenName
     * @param \Sabre\OTAAirPrice\Structs\Surname $surname
     */
    public function __construct(\Sabre\OTAAirPrice\Structs\GivenName $givenName = null, \Sabre\OTAAirPrice\Structs\Surname $surname = null)
    {
        $this
            ->setGivenName($givenName)
            ->setSurname($surname);
    }
    /**
     * Get GivenName value
     * @return \Sabre\OTAAirPrice\Structs\GivenName|null
     */
    public function getGivenName()
    {
        return $this->GivenName;
    }
    /**
     * Set GivenName value
     * @param \Sabre\OTAAirPrice\Structs\GivenName $givenName
     * @return \Sabre\OTAAirPrice\Structs\PersonName
     */
    public function setGivenName(\Sabre\OTAAirPrice\Structs\GivenName $givenName = null)
    {
        $this->GivenName = $givenName;
        return $this;
    }
    /**
     * Get Surname value
     * @return \Sabre\OTAAirPrice\Structs\Surname|null
     */
    public function getSurname()
    {
        return $this->Surname;
    }
    /**
     * Set Surname value
     * @param \Sabre\OTAAirPrice\Structs\Surname $surname
     * @return \Sabre\OTAAirPrice\Structs\PersonName
     */
    public function setSurname(\Sabre\OTAAirPrice\Structs\Surname $surname = null)
    {
        $this->Surname = $surname;
        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\OTAAirPrice\Structs\PersonName
     */
    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__;
    }
}
