<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GiftVoucher.Printing.GiftVoucherDefinition StructType
 * @subpackage Structs
 */
class GiftVoucher_Printing_GiftVoucherDefinition extends Printing_Item_ComplexProperty_Base
{
    /**
     * The Description
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\GlobalString
     */
    public $Description;
    /**
     * The IsClientMessage
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $IsClientMessage;
    /**
     * The Media
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Printing_Item_ComplexProperty_Media
     */
    public $Media;
    /**
     * The Name
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\GlobalString
     */
    public $Name;
    /**
     * The RedemptionValue
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var float
     */
    public $RedemptionValue;
    /**
     * Constructor method for GiftVoucher.Printing.GiftVoucherDefinition
     * @uses GiftVoucher_Printing_GiftVoucherDefinition::setDescription()
     * @uses GiftVoucher_Printing_GiftVoucherDefinition::setIsClientMessage()
     * @uses GiftVoucher_Printing_GiftVoucherDefinition::setMedia()
     * @uses GiftVoucher_Printing_GiftVoucherDefinition::setName()
     * @uses GiftVoucher_Printing_GiftVoucherDefinition::setRedemptionValue()
     * @param \patest\StructType\GlobalString $description
     * @param bool $isClientMessage
     * @param \patest\StructType\Printing_Item_ComplexProperty_Media $media
     * @param \patest\StructType\GlobalString $name
     * @param float $redemptionValue
     */
    public function __construct(\patest\StructType\GlobalString $description = null, $isClientMessage = null, \patest\StructType\Printing_Item_ComplexProperty_Media $media = null, \patest\StructType\GlobalString $name = null, $redemptionValue = null)
    {
        $this
            ->setDescription($description)
            ->setIsClientMessage($isClientMessage)
            ->setMedia($media)
            ->setName($name)
            ->setRedemptionValue($redemptionValue);
    }
    /**
     * Get Description 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\GlobalString|null
     */
    public function getDescription()
    {
        return isset($this->Description) ? $this->Description : null;
    }
    /**
     * Set Description 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\GlobalString $description
     * @return \patest\StructType\GiftVoucher_Printing_GiftVoucherDefinition
     */
    public function setDescription(\patest\StructType\GlobalString $description = null)
    {
        if (is_null($description) || (is_array($description) && empty($description))) {
            unset($this->Description);
        } else {
            $this->Description = $description;
        }
        return $this;
    }
    /**
     * Get IsClientMessage 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 bool|null
     */
    public function getIsClientMessage()
    {
        return isset($this->IsClientMessage) ? $this->IsClientMessage : null;
    }
    /**
     * Set IsClientMessage 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 bool $isClientMessage
     * @return \patest\StructType\GiftVoucher_Printing_GiftVoucherDefinition
     */
    public function setIsClientMessage($isClientMessage = null)
    {
        // validation for constraint: boolean
        if (!is_null($isClientMessage) && !is_bool($isClientMessage)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isClientMessage, true), gettype($isClientMessage)), __LINE__);
        }
        if (is_null($isClientMessage) || (is_array($isClientMessage) && empty($isClientMessage))) {
            unset($this->IsClientMessage);
        } else {
            $this->IsClientMessage = $isClientMessage;
        }
        return $this;
    }
    /**
     * Get Media 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\Printing_Item_ComplexProperty_Media|null
     */
    public function getMedia()
    {
        return isset($this->Media) ? $this->Media : null;
    }
    /**
     * Set Media 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\Printing_Item_ComplexProperty_Media $media
     * @return \patest\StructType\GiftVoucher_Printing_GiftVoucherDefinition
     */
    public function setMedia(\patest\StructType\Printing_Item_ComplexProperty_Media $media = null)
    {
        if (is_null($media) || (is_array($media) && empty($media))) {
            unset($this->Media);
        } else {
            $this->Media = $media;
        }
        return $this;
    }
    /**
     * Get Name 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\GlobalString|null
     */
    public function getName()
    {
        return isset($this->Name) ? $this->Name : null;
    }
    /**
     * Set Name 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\GlobalString $name
     * @return \patest\StructType\GiftVoucher_Printing_GiftVoucherDefinition
     */
    public function setName(\patest\StructType\GlobalString $name = null)
    {
        if (is_null($name) || (is_array($name) && empty($name))) {
            unset($this->Name);
        } else {
            $this->Name = $name;
        }
        return $this;
    }
    /**
     * Get RedemptionValue 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 float|null
     */
    public function getRedemptionValue()
    {
        return isset($this->RedemptionValue) ? $this->RedemptionValue : null;
    }
    /**
     * Set RedemptionValue 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 float $redemptionValue
     * @return \patest\StructType\GiftVoucher_Printing_GiftVoucherDefinition
     */
    public function setRedemptionValue($redemptionValue = null)
    {
        // validation for constraint: float
        if (!is_null($redemptionValue) && !(is_float($redemptionValue) || is_numeric($redemptionValue))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($redemptionValue, true), gettype($redemptionValue)), __LINE__);
        }
        if (is_null($redemptionValue) || (is_array($redemptionValue) && empty($redemptionValue))) {
            unset($this->RedemptionValue);
        } else {
            $this->RedemptionValue = $redemptionValue;
        }
        return $this;
    }
}
