<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Printing.PrintableItem.GiftCardPayment StructType
 * @subpackage Structs
 */
class Printing_PrintableItem_GiftCardPayment extends Printing_PrintableItem_PaymentItemWithPaymentSession
{
    /**
     * The GiftCard
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Payment_PrintableItem_GiftCard
     */
    public $GiftCard;
    /**
     * Constructor method for Printing.PrintableItem.GiftCardPayment
     * @uses Printing_PrintableItem_GiftCardPayment::setGiftCard()
     * @param \patest\StructType\Payment_PrintableItem_GiftCard $giftCard
     */
    public function __construct(\patest\StructType\Payment_PrintableItem_GiftCard $giftCard = null)
    {
        $this
            ->setGiftCard($giftCard);
    }
    /**
     * Get GiftCard 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\StructType\Payment_PrintableItem_GiftCard|null
     */
    public function getGiftCard()
    {
        return isset($this->GiftCard) ? $this->GiftCard : null;
    }
    /**
     * Set GiftCard 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\StructType\Payment_PrintableItem_GiftCard $giftCard
     * @return \patest\StructType\Printing_PrintableItem_GiftCardPayment
     */
    public function setGiftCard(\patest\StructType\Payment_PrintableItem_GiftCard $giftCard = null)
    {
        if (is_null($giftCard) || (is_array($giftCard) && empty($giftCard))) {
            unset($this->GiftCard);
        } else {
            $this->GiftCard = $giftCard;
        }
        return $this;
    }
}
