<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for _x0020_WithdrawPendingTransferTickets-Request StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:_x0020_WithdrawPendingTransferTickets-Request
 * @subpackage Structs
 */
class _x0020_WithdrawPendingTransferTickets_Request extends AbstractStructBase
{
    /**
     * The AllowPartialGroupWithdrawal
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $AllowPartialGroupWithdrawal;
    /**
     * The PendingTransferRequestIds
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfguid
     */
    public $PendingTransferRequestIds;
    /**
     * Constructor method for _x0020_WithdrawPendingTransferTickets-Request
     * @uses _x0020_WithdrawPendingTransferTickets_Request::setAllowPartialGroupWithdrawal()
     * @uses _x0020_WithdrawPendingTransferTickets_Request::setPendingTransferRequestIds()
     * @param bool $allowPartialGroupWithdrawal
     * @param \patest\ArrayType\ArrayOfguid $pendingTransferRequestIds
     */
    public function __construct($allowPartialGroupWithdrawal = null, \patest\ArrayType\ArrayOfguid $pendingTransferRequestIds = null)
    {
        $this
            ->setAllowPartialGroupWithdrawal($allowPartialGroupWithdrawal)
            ->setPendingTransferRequestIds($pendingTransferRequestIds);
    }
    /**
     * Get AllowPartialGroupWithdrawal value
     * @return bool|null
     */
    public function getAllowPartialGroupWithdrawal()
    {
        return $this->AllowPartialGroupWithdrawal;
    }
    /**
     * Set AllowPartialGroupWithdrawal value
     * @param bool $allowPartialGroupWithdrawal
     * @return \patest\StructType\_x0020_WithdrawPendingTransferTickets_Request
     */
    public function setAllowPartialGroupWithdrawal($allowPartialGroupWithdrawal = null)
    {
        // validation for constraint: boolean
        if (!is_null($allowPartialGroupWithdrawal) && !is_bool($allowPartialGroupWithdrawal)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($allowPartialGroupWithdrawal, true), gettype($allowPartialGroupWithdrawal)), __LINE__);
        }
        $this->AllowPartialGroupWithdrawal = $allowPartialGroupWithdrawal;
        return $this;
    }
    /**
     * Get PendingTransferRequestIds 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 \patest\ArrayType\ArrayOfguid|null
     */
    public function getPendingTransferRequestIds()
    {
        return isset($this->PendingTransferRequestIds) ? $this->PendingTransferRequestIds : null;
    }
    /**
     * Set PendingTransferRequestIds 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 \patest\ArrayType\ArrayOfguid $pendingTransferRequestIds
     * @return \patest\StructType\_x0020_WithdrawPendingTransferTickets_Request
     */
    public function setPendingTransferRequestIds(\patest\ArrayType\ArrayOfguid $pendingTransferRequestIds = null)
    {
        if (is_null($pendingTransferRequestIds) || (is_array($pendingTransferRequestIds) && empty($pendingTransferRequestIds))) {
            unset($this->PendingTransferRequestIds);
        } else {
            $this->PendingTransferRequestIds = $pendingTransferRequestIds;
        }
        return $this;
    }
}
