<?php

namespace Sabre\TravelItineraryRead\Structs;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Child Structs
 * @subpackage Structs
 */
class Child extends AbstractStructBase
{
    /**
     * The ref
     * Meta informations extracted from the WSDL
     * - use: optional
     * @var string
     */
    public $ref;
    /**
     * The newRef
     * Meta informations extracted from the WSDL
     * - use: optional
     * @var string
     */
    public $newRef;
    /**
     * The key
     * Meta informations extracted from the WSDL
     * - use: optional
     * @var string
     */
    public $key;
    /**
     * The value
     * Meta informations extracted from the WSDL
     * - use: optional
     * @var string
     */
    public $value;
    /**
     * Constructor method for Child
     * @uses Child::setRef()
     * @uses Child::setNewRef()
     * @uses Child::setKey()
     * @uses Child::setValue()
     * @param string $ref
     * @param string $newRef
     * @param string $key
     * @param string $value
     */
    public function __construct($ref = null, $newRef = null, $key = null, $value = null)
    {
        $this
            ->setRef($ref)
            ->setNewRef($newRef)
            ->setKey($key)
            ->setValue($value);
    }
    /**
     * Get ref value
     * @return string|null
     */
    public function getRef()
    {
        return $this->ref;
    }
    /**
     * Set ref value
     * @param string $ref
     * @return \Sabre\TravelItineraryRead\Structs\Child
     */
    public function setRef($ref = null)
    {
        $this->ref = $ref;
        return $this;
    }
    /**
     * Get newRef value
     * @return string|null
     */
    public function getNewRef()
    {
        return $this->newRef;
    }
    /**
     * Set newRef value
     * @param string $newRef
     * @return \Sabre\TravelItineraryRead\Structs\Child
     */
    public function setNewRef($newRef = null)
    {
        $this->newRef = $newRef;
        return $this;
    }
    /**
     * Get key value
     * @return string|null
     */
    public function getKey()
    {
        return $this->key;
    }
    /**
     * Set key value
     * @param string $key
     * @return \Sabre\TravelItineraryRead\Structs\Child
     */
    public function setKey($key = null)
    {
        $this->key = $key;
        return $this;
    }
    /**
     * Get value value
     * @return string|null
     */
    public function getValue()
    {
        return $this->value;
    }
    /**
     * Set value value
     * @param string $value
     * @return \Sabre\TravelItineraryRead\Structs\Child
     */
    public function setValue($value = null)
    {
        $this->value = $value;
        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\TravelItineraryRead\Structs\Child
     */
    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__;
    }
}
