<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for eSRO.Sales.BasketManipulationsGrid StructType
 * @subpackage Structs
 */
class ESRO_Sales_BasketManipulationsGrid extends AnyEntity
{
    /**
     * The Details
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Details;
    /**
     * The Item
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Item;
    /**
     * The Owner
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Owner;
    /**
     * The PType
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $PType;
    /**
     * The ReservationImage
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ReservationImage;
    /**
     * The Type
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Type;
    /**
     * Constructor method for eSRO.Sales.BasketManipulationsGrid
     * @uses ESRO_Sales_BasketManipulationsGrid::setDetails()
     * @uses ESRO_Sales_BasketManipulationsGrid::setItem()
     * @uses ESRO_Sales_BasketManipulationsGrid::setOwner()
     * @uses ESRO_Sales_BasketManipulationsGrid::setPType()
     * @uses ESRO_Sales_BasketManipulationsGrid::setReservationImage()
     * @uses ESRO_Sales_BasketManipulationsGrid::setType()
     * @param string $details
     * @param string $item
     * @param string $owner
     * @param string $pType
     * @param string $reservationImage
     * @param string $type
     */
    public function __construct($details = null, $item = null, $owner = null, $pType = null, $reservationImage = null, $type = null)
    {
        $this
            ->setDetails($details)
            ->setItem($item)
            ->setOwner($owner)
            ->setPType($pType)
            ->setReservationImage($reservationImage)
            ->setType($type);
    }
    /**
     * Get Details 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 getDetails()
    {
        return isset($this->Details) ? $this->Details : null;
    }
    /**
     * Set Details 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 $details
     * @return \patest\StructType\ESRO_Sales_BasketManipulationsGrid
     */
    public function setDetails($details = null)
    {
        // validation for constraint: string
        if (!is_null($details) && !is_string($details)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($details, true), gettype($details)), __LINE__);
        }
        if (is_null($details) || (is_array($details) && empty($details))) {
            unset($this->Details);
        } else {
            $this->Details = $details;
        }
        return $this;
    }
    /**
     * Get Item 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 getItem()
    {
        return isset($this->Item) ? $this->Item : null;
    }
    /**
     * Set Item 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 $item
     * @return \patest\StructType\ESRO_Sales_BasketManipulationsGrid
     */
    public function setItem($item = null)
    {
        // validation for constraint: string
        if (!is_null($item) && !is_string($item)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($item, true), gettype($item)), __LINE__);
        }
        if (is_null($item) || (is_array($item) && empty($item))) {
            unset($this->Item);
        } else {
            $this->Item = $item;
        }
        return $this;
    }
    /**
     * Get Owner 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 getOwner()
    {
        return isset($this->Owner) ? $this->Owner : null;
    }
    /**
     * Set Owner 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 $owner
     * @return \patest\StructType\ESRO_Sales_BasketManipulationsGrid
     */
    public function setOwner($owner = null)
    {
        // validation for constraint: string
        if (!is_null($owner) && !is_string($owner)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($owner, true), gettype($owner)), __LINE__);
        }
        if (is_null($owner) || (is_array($owner) && empty($owner))) {
            unset($this->Owner);
        } else {
            $this->Owner = $owner;
        }
        return $this;
    }
    /**
     * Get PType 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 getPType()
    {
        return isset($this->PType) ? $this->PType : null;
    }
    /**
     * Set PType 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 $pType
     * @return \patest\StructType\ESRO_Sales_BasketManipulationsGrid
     */
    public function setPType($pType = null)
    {
        // validation for constraint: string
        if (!is_null($pType) && !is_string($pType)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($pType, true), gettype($pType)), __LINE__);
        }
        if (is_null($pType) || (is_array($pType) && empty($pType))) {
            unset($this->PType);
        } else {
            $this->PType = $pType;
        }
        return $this;
    }
    /**
     * Get ReservationImage 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 getReservationImage()
    {
        return isset($this->ReservationImage) ? $this->ReservationImage : null;
    }
    /**
     * Set ReservationImage 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 $reservationImage
     * @return \patest\StructType\ESRO_Sales_BasketManipulationsGrid
     */
    public function setReservationImage($reservationImage = null)
    {
        // validation for constraint: string
        if (!is_null($reservationImage) && !is_string($reservationImage)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($reservationImage, true), gettype($reservationImage)), __LINE__);
        }
        if (is_null($reservationImage) || (is_array($reservationImage) && empty($reservationImage))) {
            unset($this->ReservationImage);
        } else {
            $this->ReservationImage = $reservationImage;
        }
        return $this;
    }
    /**
     * Get Type 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 getType()
    {
        return isset($this->Type) ? $this->Type : null;
    }
    /**
     * Set Type 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 $type
     * @return \patest\StructType\ESRO_Sales_BasketManipulationsGrid
     */
    public function setType($type = null)
    {
        // validation for constraint: string
        if (!is_null($type) && !is_string($type)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($type, true), gettype($type)), __LINE__);
        }
        if (is_null($type) || (is_array($type) && empty($type))) {
            unset($this->Type);
        } else {
            $this->Type = $type;
        }
        return $this;
    }
}
