<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PredefinedLocation StructType
 * @subpackage Structs
 */
class PredefinedLocation extends AbstractStructBase
{
    /**
     * The id
     * Meta informations extracted from the WSDL
     * - use: required
     * @var string
     */
    public $id;
    /**
     * The predefinedLocationName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\MultilingualString
     */
    public $predefinedLocationName;
    /**
     * The predefinedLocation
     * @var \StructType\Location
     */
    public $predefinedLocation;
    /**
     * The predefinedLocationExtension
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\ExtensionType
     */
    public $predefinedLocationExtension;
    /**
     * Constructor method for PredefinedLocation
     * @uses PredefinedLocation::setId()
     * @uses PredefinedLocation::setPredefinedLocationName()
     * @uses PredefinedLocation::setPredefinedLocation()
     * @uses PredefinedLocation::setPredefinedLocationExtension()
     * @param string $id
     * @param \StructType\MultilingualString $predefinedLocationName
     * @param \StructType\Location $predefinedLocation
     * @param \StructType\ExtensionType $predefinedLocationExtension
     */
    public function __construct($id = null, \StructType\MultilingualString $predefinedLocationName = null, \StructType\Location $predefinedLocation = null, \StructType\ExtensionType $predefinedLocationExtension = null)
    {
        $this
            ->setId($id)
            ->setPredefinedLocationName($predefinedLocationName)
            ->setPredefinedLocation($predefinedLocation)
            ->setPredefinedLocationExtension($predefinedLocationExtension);
    }
    /**
     * Get id value
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * Set id value
     * @param string $id
     * @return \StructType\PredefinedLocation
     */
    public function setId($id = null)
    {
        // validation for constraint: string
        if (!is_null($id) && !is_string($id)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($id)), __LINE__);
        }
        $this->id = $id;
        return $this;
    }
    /**
     * Get predefinedLocationName value
     * @return \StructType\MultilingualString|null
     */
    public function getPredefinedLocationName()
    {
        return $this->predefinedLocationName;
    }
    /**
     * Set predefinedLocationName value
     * @param \StructType\MultilingualString $predefinedLocationName
     * @return \StructType\PredefinedLocation
     */
    public function setPredefinedLocationName(\StructType\MultilingualString $predefinedLocationName = null)
    {
        $this->predefinedLocationName = $predefinedLocationName;
        return $this;
    }
    /**
     * Get predefinedLocation value
     * @return \StructType\Location|null
     */
    public function getPredefinedLocation()
    {
        return $this->predefinedLocation;
    }
    /**
     * Set predefinedLocation value
     * @param \StructType\Location $predefinedLocation
     * @return \StructType\PredefinedLocation
     */
    public function setPredefinedLocation(\StructType\Location $predefinedLocation = null)
    {
        $this->predefinedLocation = $predefinedLocation;
        return $this;
    }
    /**
     * Get predefinedLocationExtension value
     * @return \StructType\ExtensionType|null
     */
    public function getPredefinedLocationExtension()
    {
        return $this->predefinedLocationExtension;
    }
    /**
     * Set predefinedLocationExtension value
     * @param \StructType\ExtensionType $predefinedLocationExtension
     * @return \StructType\PredefinedLocation
     */
    public function setPredefinedLocationExtension(\StructType\ExtensionType $predefinedLocationExtension = null)
    {
        $this->predefinedLocationExtension = $predefinedLocationExtension;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \StructType\PredefinedLocation
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
