<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Put_Car_Rental_Agency_ResponseType StructType
 * Meta information extracted from the WSDL
 * - documentation: Element containing the Car Rental Agency Reference and Data that is sent in the response
 * @subpackage Structs
 */
class Put_Car_Rental_Agency_ResponseType extends AbstractStructBase
{
    /**
     * The Car_Rental_Agency_Reference
     * Meta information extracted from the WSDL
     * - documentation: Car Rental Agency Reference
     * - minOccurs: 0
     * @var \StructType\Car_Rental_AgencyObjectType
     */
    public $Car_Rental_Agency_Reference;
    /**
     * The version
     * Meta information extracted from the WSDL
     * - ref: wd:version
     * @var string
     */
    public $version;
    /**
     * Constructor method for Put_Car_Rental_Agency_ResponseType
     * @uses Put_Car_Rental_Agency_ResponseType::setCar_Rental_Agency_Reference()
     * @uses Put_Car_Rental_Agency_ResponseType::setVersion()
     * @param \StructType\Car_Rental_AgencyObjectType $car_Rental_Agency_Reference
     * @param string $version
     */
    public function __construct(\StructType\Car_Rental_AgencyObjectType $car_Rental_Agency_Reference = null, $version = null)
    {
        $this
            ->setCar_Rental_Agency_Reference($car_Rental_Agency_Reference)
            ->setVersion($version);
    }
    /**
     * Get Car_Rental_Agency_Reference value
     * @return \StructType\Car_Rental_AgencyObjectType|null
     */
    public function getCar_Rental_Agency_Reference()
    {
        return $this->Car_Rental_Agency_Reference;
    }
    /**
     * Set Car_Rental_Agency_Reference value
     * @param \StructType\Car_Rental_AgencyObjectType $car_Rental_Agency_Reference
     * @return \StructType\Put_Car_Rental_Agency_ResponseType
     */
    public function setCar_Rental_Agency_Reference(\StructType\Car_Rental_AgencyObjectType $car_Rental_Agency_Reference = null)
    {
        $this->Car_Rental_Agency_Reference = $car_Rental_Agency_Reference;
        return $this;
    }
    /**
     * Get version value
     * @return string|null
     */
    public function getVersion()
    {
        return $this->version;
    }
    /**
     * Set version value
     * @param string $version
     * @return \StructType\Put_Car_Rental_Agency_ResponseType
     */
    public function setVersion($version = null)
    {
        // validation for constraint: string
        if (!is_null($version) && !is_string($version)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($version, true), gettype($version)), __LINE__);
        }
        $this->version = $version;
        return $this;
    }
}
