<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for IdentifierVehicleExtra StructType
 * @subpackage Structs
 */
class IdentifierVehicleExtra extends AbstractStructBase
{
    /**
     * The IdentifierVehicleType
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $IdentifierVehicleType;
    /**
     * The Id
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Id;
    /**
     * Constructor method for IdentifierVehicleExtra
     * @uses IdentifierVehicleExtra::setIdentifierVehicleType()
     * @uses IdentifierVehicleExtra::setId()
     * @param string $identifierVehicleType
     * @param string $id
     */
    public function __construct($identifierVehicleType = null, $id = null)
    {
        $this
            ->setIdentifierVehicleType($identifierVehicleType)
            ->setId($id);
    }
    /**
     * Get IdentifierVehicleType value
     * @return string
     */
    public function getIdentifierVehicleType()
    {
        return $this->IdentifierVehicleType;
    }
    /**
     * Set IdentifierVehicleType value
     * @uses \EnumType\EnumIdentifierVehicleTypeExtra::valueIsValid()
     * @uses \EnumType\EnumIdentifierVehicleTypeExtra::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $identifierVehicleType
     * @return \StructType\IdentifierVehicleExtra
     */
    public function setIdentifierVehicleType($identifierVehicleType = null)
    {
        // validation for constraint: enumeration
        if (!\EnumType\EnumIdentifierVehicleTypeExtra::valueIsValid($identifierVehicleType)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \EnumType\EnumIdentifierVehicleTypeExtra', is_array($identifierVehicleType) ? implode(', ', $identifierVehicleType) : var_export($identifierVehicleType, true), implode(', ', \EnumType\EnumIdentifierVehicleTypeExtra::getValidValues())), __LINE__);
        }
        $this->IdentifierVehicleType = $identifierVehicleType;
        return $this;
    }
    /**
     * Get Id value
     * @return string|null
     */
    public function getId()
    {
        return $this->Id;
    }
    /**
     * Set Id value
     * @param string $id
     * @return \StructType\IdentifierVehicleExtra
     */
    public function setId($id = null)
    {
        // validation for constraint: string
        if (!is_null($id) && !is_string($id)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($id, true), gettype($id)), __LINE__);
        }
        $this->Id = $id;
        return $this;
    }
}
