<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Refer_a_Candidate_ResponseType StructType
 * Meta information extracted from the WSDL
 * - documentation: Response for Refer a Candidate
 * @subpackage Structs
 */
class Refer_a_Candidate_ResponseType extends AbstractStructBase
{
    /**
     * The Referral_Event_Reference
     * Meta information extracted from the WSDL
     * - documentation: Reference for a referral event.
     * - minOccurs: 0
     * @var \StructType\Unique_IdentifierObjectType
     */
    public $Referral_Event_Reference;
    /**
     * The version
     * Meta information extracted from the WSDL
     * - ref: wd:version
     * @var string
     */
    public $version;
    /**
     * Constructor method for Refer_a_Candidate_ResponseType
     * @uses Refer_a_Candidate_ResponseType::setReferral_Event_Reference()
     * @uses Refer_a_Candidate_ResponseType::setVersion()
     * @param \StructType\Unique_IdentifierObjectType $referral_Event_Reference
     * @param string $version
     */
    public function __construct(\StructType\Unique_IdentifierObjectType $referral_Event_Reference = null, $version = null)
    {
        $this
            ->setReferral_Event_Reference($referral_Event_Reference)
            ->setVersion($version);
    }
    /**
     * Get Referral_Event_Reference value
     * @return \StructType\Unique_IdentifierObjectType|null
     */
    public function getReferral_Event_Reference()
    {
        return $this->Referral_Event_Reference;
    }
    /**
     * Set Referral_Event_Reference value
     * @param \StructType\Unique_IdentifierObjectType $referral_Event_Reference
     * @return \StructType\Refer_a_Candidate_ResponseType
     */
    public function setReferral_Event_Reference(\StructType\Unique_IdentifierObjectType $referral_Event_Reference = null)
    {
        $this->Referral_Event_Reference = $referral_Event_Reference;
        return $this;
    }
    /**
     * Get version value
     * @return string|null
     */
    public function getVersion()
    {
        return $this->version;
    }
    /**
     * Set version value
     * @param string $version
     * @return \StructType\Refer_a_Candidate_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;
    }
}
