<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for InterfaceTrailerInsert StructType
 * @subpackage Structs
 */
class InterfaceTrailerInsert extends VehicleInsert
{
    /**
     * The TrailerRecognition
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $TrailerRecognition;
    /**
     * Constructor method for InterfaceTrailerInsert
     * @uses InterfaceTrailerInsert::setTrailerRecognition()
     * @param string $trailerRecognition
     */
    public function __construct($trailerRecognition = null)
    {
        $this
            ->setTrailerRecognition($trailerRecognition);
    }
    /**
     * Get TrailerRecognition value
     * @return string|null
     */
    public function getTrailerRecognition()
    {
        return $this->TrailerRecognition;
    }
    /**
     * Set TrailerRecognition value
     * @param string $trailerRecognition
     * @return \StructType\InterfaceTrailerInsert
     */
    public function setTrailerRecognition($trailerRecognition = null)
    {
        // validation for constraint: string
        if (!is_null($trailerRecognition) && !is_string($trailerRecognition)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($trailerRecognition, true), gettype($trailerRecognition)), __LINE__);
        }
        $this->TrailerRecognition = $trailerRecognition;
        return $this;
    }
}
