<?php

namespace Pepitelabs\PWS\PickUpService;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for SchedulePickUpResponseContainer PickUpService
 * Meta information extracted from the WSDL
 * - documentation: SchedulePickUpRespone
 * - nillable: true
 * - type: tns:SchedulePickUpResponseContainer
 * @subpackage Structs
 */
class SchedulePickUpResponseContainer extends ResponseContainer
{
    /**
     * The PickUpConfirmationNumber
     * Meta information extracted from the WSDL
     * - documentation: PickUpConfirmationNumber - string
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $PickUpConfirmationNumber;
    /**
     * Constructor method for SchedulePickUpResponseContainer
     * @uses SchedulePickUpResponseContainer::setPickUpConfirmationNumber()
     * @param string $pickUpConfirmationNumber
     */
    public function __construct($pickUpConfirmationNumber = null)
    {
        $this
            ->setPickUpConfirmationNumber($pickUpConfirmationNumber);
    }
    /**
     * Get PickUpConfirmationNumber value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getPickUpConfirmationNumber()
    {
        return isset($this->PickUpConfirmationNumber) ? $this->PickUpConfirmationNumber : null;
    }
    /**
     * Set PickUpConfirmationNumber value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $pickUpConfirmationNumber
     * @return \Pepitelabs\PWS\PickUpService\SchedulePickUpResponseContainer
     */
    public function setPickUpConfirmationNumber($pickUpConfirmationNumber = null)
    {
        // validation for constraint: string
        if (!is_null($pickUpConfirmationNumber) && !is_string($pickUpConfirmationNumber)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($pickUpConfirmationNumber, true), gettype($pickUpConfirmationNumber)), __LINE__);
        }
        if (is_null($pickUpConfirmationNumber) || (is_array($pickUpConfirmationNumber) && empty($pickUpConfirmationNumber))) {
            unset($this->PickUpConfirmationNumber);
        } else {
            $this->PickUpConfirmationNumber = $pickUpConfirmationNumber;
        }
        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 \Pepitelabs\PWS\PickUpService\SchedulePickUpResponseContainer
     */
    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__;
    }
}
