<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for IdentifierPlace StructType
 * @subpackage Structs
 */
class IdentifierPlace extends AbstractStructBase
{
    /**
     * The IdentifierType
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $IdentifierType;
    /**
     * The Id
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Id;
    /**
     * Constructor method for IdentifierPlace
     * @uses IdentifierPlace::setIdentifierType()
     * @uses IdentifierPlace::setId()
     * @param string $identifierType
     * @param string $id
     */
    public function __construct($identifierType = null, $id = null)
    {
        $this
            ->setIdentifierType($identifierType)
            ->setId($id);
    }
    /**
     * Get IdentifierType value
     * @return string
     */
    public function getIdentifierType()
    {
        return $this->IdentifierType;
    }
    /**
     * Set IdentifierType value
     * @uses \EnumType\EnumIdentifierPlace::valueIsValid()
     * @uses \EnumType\EnumIdentifierPlace::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $identifierType
     * @return \StructType\IdentifierPlace
     */
    public function setIdentifierType($identifierType = null)
    {
        // validation for constraint: enumeration
        if (!\EnumType\EnumIdentifierPlace::valueIsValid($identifierType)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \EnumType\EnumIdentifierPlace', is_array($identifierType) ? implode(', ', $identifierType) : var_export($identifierType, true), implode(', ', \EnumType\EnumIdentifierPlace::getValidValues())), __LINE__);
        }
        $this->IdentifierType = $identifierType;
        return $this;
    }
    /**
     * Get Id value
     * @return string|null
     */
    public function getId()
    {
        return $this->Id;
    }
    /**
     * Set Id value
     * @param string $id
     * @return \StructType\IdentifierPlace
     */
    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;
    }
}
