<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for CorridorSelection StructType
 * @subpackage Structs
 */
class CorridorSelection extends AbstractStructBase
{
    /**
     * The Activate
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var bool
     */
    public $Activate;
    /**
     * The Name
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Name;
    /**
     * The Vehicle
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\IdentifierVehicle
     */
    public $Vehicle;
    /**
     * Constructor method for CorridorSelection
     * @uses CorridorSelection::setActivate()
     * @uses CorridorSelection::setName()
     * @uses CorridorSelection::setVehicle()
     * @param bool $activate
     * @param string $name
     * @param \StructType\IdentifierVehicle $vehicle
     */
    public function __construct($activate = null, $name = null, \StructType\IdentifierVehicle $vehicle = null)
    {
        $this
            ->setActivate($activate)
            ->setName($name)
            ->setVehicle($vehicle);
    }
    /**
     * Get Activate value
     * @return bool
     */
    public function getActivate()
    {
        return $this->Activate;
    }
    /**
     * Set Activate value
     * @param bool $activate
     * @return \StructType\CorridorSelection
     */
    public function setActivate($activate = null)
    {
        // validation for constraint: boolean
        if (!is_null($activate) && !is_bool($activate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($activate, true), gettype($activate)), __LINE__);
        }
        $this->Activate = $activate;
        return $this;
    }
    /**
     * Get Name value
     * @return string|null
     */
    public function getName()
    {
        return $this->Name;
    }
    /**
     * Set Name value
     * @param string $name
     * @return \StructType\CorridorSelection
     */
    public function setName($name = null)
    {
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($name, true), gettype($name)), __LINE__);
        }
        $this->Name = $name;
        return $this;
    }
    /**
     * Get Vehicle value
     * @return \StructType\IdentifierVehicle|null
     */
    public function getVehicle()
    {
        return $this->Vehicle;
    }
    /**
     * Set Vehicle value
     * @param \StructType\IdentifierVehicle $vehicle
     * @return \StructType\CorridorSelection
     */
    public function setVehicle(\StructType\IdentifierVehicle $vehicle = null)
    {
        $this->Vehicle = $vehicle;
        return $this;
    }
}
