<?php

namespace Struct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for QueryDefaultAvailableItems Struct
 * @subpackage Structs
 * @date 2019-10-21
 */
class QueryDefaultAvailableItems extends AbstractStructBase
{
    /**
     * The source
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $source;
    /**
     * The channel
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $channel;
    /**
     * The language
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $language;
    /**
     * The redeemableItemCatalogueId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $redeemableItemCatalogueId;
    /**
     * The redeemableItemCategoryId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $redeemableItemCategoryId;
    /**
     * Constructor method for QueryDefaultAvailableItems
     * @uses QueryDefaultAvailableItems::setSource()
     * @uses QueryDefaultAvailableItems::setChannel()
     * @uses QueryDefaultAvailableItems::setLanguage()
     * @uses QueryDefaultAvailableItems::setRedeemableItemCatalogueId()
     * @uses QueryDefaultAvailableItems::setRedeemableItemCategoryId()
     * @param string $source
     * @param string $channel
     * @param string $language
     * @param int $redeemableItemCatalogueId
     * @param int $redeemableItemCategoryId
     */
    public function __construct($source = null, $channel = null, $language = null, $redeemableItemCatalogueId = null, $redeemableItemCategoryId = null)
    {
        $this
            ->setSource($source)
            ->setChannel($channel)
            ->setLanguage($language)
            ->setRedeemableItemCatalogueId($redeemableItemCatalogueId)
            ->setRedeemableItemCategoryId($redeemableItemCategoryId);
    }
    /**
     * Get source 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 getSource()
    {
        return isset($this->source) ? $this->source : null;
    }
    /**
     * Set source 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 $source
     * @return \Struct\QueryDefaultAvailableItems
     */
    public function setSource($source = null)
    {
        // validation for constraint: string
        if (!is_null($source) && !is_string($source)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($source, true), gettype($source)), __LINE__);
        }
        if (is_null($source) || (is_array($source) && empty($source))) {
            unset($this->source);
        } else {
            $this->source = $source;
        }
        return $this;
    }
    /**
     * Get channel 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 getChannel()
    {
        return isset($this->channel) ? $this->channel : null;
    }
    /**
     * Set channel 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 $channel
     * @return \Struct\QueryDefaultAvailableItems
     */
    public function setChannel($channel = null)
    {
        // validation for constraint: string
        if (!is_null($channel) && !is_string($channel)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($channel, true), gettype($channel)), __LINE__);
        }
        if (is_null($channel) || (is_array($channel) && empty($channel))) {
            unset($this->channel);
        } else {
            $this->channel = $channel;
        }
        return $this;
    }
    /**
     * Get language 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 getLanguage()
    {
        return isset($this->language) ? $this->language : null;
    }
    /**
     * Set language 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 $language
     * @return \Struct\QueryDefaultAvailableItems
     */
    public function setLanguage($language = null)
    {
        // validation for constraint: string
        if (!is_null($language) && !is_string($language)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($language, true), gettype($language)), __LINE__);
        }
        if (is_null($language) || (is_array($language) && empty($language))) {
            unset($this->language);
        } else {
            $this->language = $language;
        }
        return $this;
    }
    /**
     * Get redeemableItemCatalogueId 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 int|null
     */
    public function getRedeemableItemCatalogueId()
    {
        return isset($this->redeemableItemCatalogueId) ? $this->redeemableItemCatalogueId : null;
    }
    /**
     * Set redeemableItemCatalogueId 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 int $redeemableItemCatalogueId
     * @return \Struct\QueryDefaultAvailableItems
     */
    public function setRedeemableItemCatalogueId($redeemableItemCatalogueId = null)
    {
        // validation for constraint: int
        if (!is_null($redeemableItemCatalogueId) && !(is_int($redeemableItemCatalogueId) || ctype_digit($redeemableItemCatalogueId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($redeemableItemCatalogueId, true), gettype($redeemableItemCatalogueId)), __LINE__);
        }
        if (is_null($redeemableItemCatalogueId) || (is_array($redeemableItemCatalogueId) && empty($redeemableItemCatalogueId))) {
            unset($this->redeemableItemCatalogueId);
        } else {
            $this->redeemableItemCatalogueId = $redeemableItemCatalogueId;
        }
        return $this;
    }
    /**
     * Get redeemableItemCategoryId 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 int|null
     */
    public function getRedeemableItemCategoryId()
    {
        return isset($this->redeemableItemCategoryId) ? $this->redeemableItemCategoryId : null;
    }
    /**
     * Set redeemableItemCategoryId 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 int $redeemableItemCategoryId
     * @return \Struct\QueryDefaultAvailableItems
     */
    public function setRedeemableItemCategoryId($redeemableItemCategoryId = null)
    {
        // validation for constraint: int
        if (!is_null($redeemableItemCategoryId) && !(is_int($redeemableItemCategoryId) || ctype_digit($redeemableItemCategoryId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($redeemableItemCategoryId, true), gettype($redeemableItemCategoryId)), __LINE__);
        }
        if (is_null($redeemableItemCategoryId) || (is_array($redeemableItemCategoryId) && empty($redeemableItemCategoryId))) {
            unset($this->redeemableItemCategoryId);
        } else {
            $this->redeemableItemCategoryId = $redeemableItemCategoryId;
        }
        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 \Struct\QueryDefaultAvailableItems
     */
    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__;
    }
}
