<?php

namespace Struct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for CommandRestriction Struct
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:CommandRestriction
 * @subpackage Structs
 * @date 2019-10-21
 */
class CommandRestriction extends AbstractStructBase
{
    /**
     * The AtWalletLevel
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $AtWalletLevel;
    /**
     * The ChannelId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ChannelId;
    /**
     * The CommandId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $CommandId;
    /**
     * The CustomerTypeId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $CustomerTypeId;
    /**
     * The FidelityLevelId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $FidelityLevelId;
    /**
     * The Id
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var int
     */
    public $Id;
    /**
     * The MaxCommandsPerIntervalAmount
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $MaxCommandsPerIntervalAmount;
    /**
     * The MaxCommandsPerIntervalFrequencyDescription
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $MaxCommandsPerIntervalFrequencyDescription;
    /**
     * The MaxCommandsPerIntervalFrequencyId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $MaxCommandsPerIntervalFrequencyId;
    /**
     * The MaxCommandsPerIntervalFrequencyValue
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $MaxCommandsPerIntervalFrequencyValue;
    /**
     * The MaxPointsPerCommandAmount
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $MaxPointsPerCommandAmount;
    /**
     * The MaxPointsPerIntervalAmount
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $MaxPointsPerIntervalAmount;
    /**
     * The MaxPointsPerIntervalFrequencyDescription
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $MaxPointsPerIntervalFrequencyDescription;
    /**
     * The MaxPointsPerIntervalFrequencyId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $MaxPointsPerIntervalFrequencyId;
    /**
     * The MaxPointsPerIntervalFrequencyValue
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $MaxPointsPerIntervalFrequencyValue;
    /**
     * The MinIntervalFromRegistrationFrequencyDescription
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $MinIntervalFromRegistrationFrequencyDescription;
    /**
     * The MinIntervalFromRegistrationFrequencyId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $MinIntervalFromRegistrationFrequencyId;
    /**
     * The MinIntervalFromRegistrationFrequencyValue
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $MinIntervalFromRegistrationFrequencyValue;
    /**
     * The MinPointsBalanceAmount
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $MinPointsBalanceAmount;
    /**
     * The MinPointsPerCommandAmount
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $MinPointsPerCommandAmount;
    /**
     * The RedemptionMaxItemsPerCommandAmount
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $RedemptionMaxItemsPerCommandAmount;
    /**
     * The SourceId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $SourceId;
    /**
     * The TransferKeepPointsValidity
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $TransferKeepPointsValidity;
    /**
     * The WalletType
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \Struct\WalletType
     */
    public $WalletType;
    /**
     * The WalletTypeId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $WalletTypeId;
    /**
     * Constructor method for CommandRestriction
     * @uses CommandRestriction::setAtWalletLevel()
     * @uses CommandRestriction::setChannelId()
     * @uses CommandRestriction::setCommandId()
     * @uses CommandRestriction::setCustomerTypeId()
     * @uses CommandRestriction::setFidelityLevelId()
     * @uses CommandRestriction::setId()
     * @uses CommandRestriction::setMaxCommandsPerIntervalAmount()
     * @uses CommandRestriction::setMaxCommandsPerIntervalFrequencyDescription()
     * @uses CommandRestriction::setMaxCommandsPerIntervalFrequencyId()
     * @uses CommandRestriction::setMaxCommandsPerIntervalFrequencyValue()
     * @uses CommandRestriction::setMaxPointsPerCommandAmount()
     * @uses CommandRestriction::setMaxPointsPerIntervalAmount()
     * @uses CommandRestriction::setMaxPointsPerIntervalFrequencyDescription()
     * @uses CommandRestriction::setMaxPointsPerIntervalFrequencyId()
     * @uses CommandRestriction::setMaxPointsPerIntervalFrequencyValue()
     * @uses CommandRestriction::setMinIntervalFromRegistrationFrequencyDescription()
     * @uses CommandRestriction::setMinIntervalFromRegistrationFrequencyId()
     * @uses CommandRestriction::setMinIntervalFromRegistrationFrequencyValue()
     * @uses CommandRestriction::setMinPointsBalanceAmount()
     * @uses CommandRestriction::setMinPointsPerCommandAmount()
     * @uses CommandRestriction::setRedemptionMaxItemsPerCommandAmount()
     * @uses CommandRestriction::setSourceId()
     * @uses CommandRestriction::setTransferKeepPointsValidity()
     * @uses CommandRestriction::setWalletType()
     * @uses CommandRestriction::setWalletTypeId()
     * @param bool $atWalletLevel
     * @param string $channelId
     * @param string $commandId
     * @param int $customerTypeId
     * @param int $fidelityLevelId
     * @param int $id
     * @param int $maxCommandsPerIntervalAmount
     * @param string $maxCommandsPerIntervalFrequencyDescription
     * @param string $maxCommandsPerIntervalFrequencyId
     * @param int $maxCommandsPerIntervalFrequencyValue
     * @param int $maxPointsPerCommandAmount
     * @param int $maxPointsPerIntervalAmount
     * @param string $maxPointsPerIntervalFrequencyDescription
     * @param string $maxPointsPerIntervalFrequencyId
     * @param int $maxPointsPerIntervalFrequencyValue
     * @param string $minIntervalFromRegistrationFrequencyDescription
     * @param string $minIntervalFromRegistrationFrequencyId
     * @param int $minIntervalFromRegistrationFrequencyValue
     * @param int $minPointsBalanceAmount
     * @param int $minPointsPerCommandAmount
     * @param int $redemptionMaxItemsPerCommandAmount
     * @param string $sourceId
     * @param bool $transferKeepPointsValidity
     * @param \Struct\WalletType $walletType
     * @param int $walletTypeId
     */
    public function __construct($atWalletLevel = null, $channelId = null, $commandId = null, $customerTypeId = null, $fidelityLevelId = null, $id = null, $maxCommandsPerIntervalAmount = null, $maxCommandsPerIntervalFrequencyDescription = null, $maxCommandsPerIntervalFrequencyId = null, $maxCommandsPerIntervalFrequencyValue = null, $maxPointsPerCommandAmount = null, $maxPointsPerIntervalAmount = null, $maxPointsPerIntervalFrequencyDescription = null, $maxPointsPerIntervalFrequencyId = null, $maxPointsPerIntervalFrequencyValue = null, $minIntervalFromRegistrationFrequencyDescription = null, $minIntervalFromRegistrationFrequencyId = null, $minIntervalFromRegistrationFrequencyValue = null, $minPointsBalanceAmount = null, $minPointsPerCommandAmount = null, $redemptionMaxItemsPerCommandAmount = null, $sourceId = null, $transferKeepPointsValidity = null, \Struct\WalletType $walletType = null, $walletTypeId = null)
    {
        $this
            ->setAtWalletLevel($atWalletLevel)
            ->setChannelId($channelId)
            ->setCommandId($commandId)
            ->setCustomerTypeId($customerTypeId)
            ->setFidelityLevelId($fidelityLevelId)
            ->setId($id)
            ->setMaxCommandsPerIntervalAmount($maxCommandsPerIntervalAmount)
            ->setMaxCommandsPerIntervalFrequencyDescription($maxCommandsPerIntervalFrequencyDescription)
            ->setMaxCommandsPerIntervalFrequencyId($maxCommandsPerIntervalFrequencyId)
            ->setMaxCommandsPerIntervalFrequencyValue($maxCommandsPerIntervalFrequencyValue)
            ->setMaxPointsPerCommandAmount($maxPointsPerCommandAmount)
            ->setMaxPointsPerIntervalAmount($maxPointsPerIntervalAmount)
            ->setMaxPointsPerIntervalFrequencyDescription($maxPointsPerIntervalFrequencyDescription)
            ->setMaxPointsPerIntervalFrequencyId($maxPointsPerIntervalFrequencyId)
            ->setMaxPointsPerIntervalFrequencyValue($maxPointsPerIntervalFrequencyValue)
            ->setMinIntervalFromRegistrationFrequencyDescription($minIntervalFromRegistrationFrequencyDescription)
            ->setMinIntervalFromRegistrationFrequencyId($minIntervalFromRegistrationFrequencyId)
            ->setMinIntervalFromRegistrationFrequencyValue($minIntervalFromRegistrationFrequencyValue)
            ->setMinPointsBalanceAmount($minPointsBalanceAmount)
            ->setMinPointsPerCommandAmount($minPointsPerCommandAmount)
            ->setRedemptionMaxItemsPerCommandAmount($redemptionMaxItemsPerCommandAmount)
            ->setSourceId($sourceId)
            ->setTransferKeepPointsValidity($transferKeepPointsValidity)
            ->setWalletType($walletType)
            ->setWalletTypeId($walletTypeId);
    }
    /**
     * Get AtWalletLevel value
     * @return bool|null
     */
    public function getAtWalletLevel()
    {
        return $this->AtWalletLevel;
    }
    /**
     * Set AtWalletLevel value
     * @param bool $atWalletLevel
     * @return \Struct\CommandRestriction
     */
    public function setAtWalletLevel($atWalletLevel = null)
    {
        // validation for constraint: boolean
        if (!is_null($atWalletLevel) && !is_bool($atWalletLevel)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($atWalletLevel, true), gettype($atWalletLevel)), __LINE__);
        }
        $this->AtWalletLevel = $atWalletLevel;
        return $this;
    }
    /**
     * Get ChannelId 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 getChannelId()
    {
        return isset($this->ChannelId) ? $this->ChannelId : null;
    }
    /**
     * Set ChannelId 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 $channelId
     * @return \Struct\CommandRestriction
     */
    public function setChannelId($channelId = null)
    {
        // validation for constraint: string
        if (!is_null($channelId) && !is_string($channelId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($channelId, true), gettype($channelId)), __LINE__);
        }
        if (is_null($channelId) || (is_array($channelId) && empty($channelId))) {
            unset($this->ChannelId);
        } else {
            $this->ChannelId = $channelId;
        }
        return $this;
    }
    /**
     * Get CommandId value
     * @return string|null
     */
    public function getCommandId()
    {
        return $this->CommandId;
    }
    /**
     * Set CommandId value
     * @param string $commandId
     * @return \Struct\CommandRestriction
     */
    public function setCommandId($commandId = null)
    {
        // validation for constraint: string
        if (!is_null($commandId) && !is_string($commandId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($commandId, true), gettype($commandId)), __LINE__);
        }
        $this->CommandId = $commandId;
        return $this;
    }
    /**
     * Get CustomerTypeId 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 getCustomerTypeId()
    {
        return isset($this->CustomerTypeId) ? $this->CustomerTypeId : null;
    }
    /**
     * Set CustomerTypeId 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 $customerTypeId
     * @return \Struct\CommandRestriction
     */
    public function setCustomerTypeId($customerTypeId = null)
    {
        // validation for constraint: int
        if (!is_null($customerTypeId) && !(is_int($customerTypeId) || ctype_digit($customerTypeId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($customerTypeId, true), gettype($customerTypeId)), __LINE__);
        }
        if (is_null($customerTypeId) || (is_array($customerTypeId) && empty($customerTypeId))) {
            unset($this->CustomerTypeId);
        } else {
            $this->CustomerTypeId = $customerTypeId;
        }
        return $this;
    }
    /**
     * Get FidelityLevelId 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 getFidelityLevelId()
    {
        return isset($this->FidelityLevelId) ? $this->FidelityLevelId : null;
    }
    /**
     * Set FidelityLevelId 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 $fidelityLevelId
     * @return \Struct\CommandRestriction
     */
    public function setFidelityLevelId($fidelityLevelId = null)
    {
        // validation for constraint: int
        if (!is_null($fidelityLevelId) && !(is_int($fidelityLevelId) || ctype_digit($fidelityLevelId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($fidelityLevelId, true), gettype($fidelityLevelId)), __LINE__);
        }
        if (is_null($fidelityLevelId) || (is_array($fidelityLevelId) && empty($fidelityLevelId))) {
            unset($this->FidelityLevelId);
        } else {
            $this->FidelityLevelId = $fidelityLevelId;
        }
        return $this;
    }
    /**
     * Get Id value
     * @return int|null
     */
    public function getId()
    {
        return $this->Id;
    }
    /**
     * Set Id value
     * @param int $id
     * @return \Struct\CommandRestriction
     */
    public function setId($id = null)
    {
        // validation for constraint: int
        if (!is_null($id) && !(is_int($id) || ctype_digit($id))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($id, true), gettype($id)), __LINE__);
        }
        $this->Id = $id;
        return $this;
    }
    /**
     * Get MaxCommandsPerIntervalAmount 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 getMaxCommandsPerIntervalAmount()
    {
        return isset($this->MaxCommandsPerIntervalAmount) ? $this->MaxCommandsPerIntervalAmount : null;
    }
    /**
     * Set MaxCommandsPerIntervalAmount 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 $maxCommandsPerIntervalAmount
     * @return \Struct\CommandRestriction
     */
    public function setMaxCommandsPerIntervalAmount($maxCommandsPerIntervalAmount = null)
    {
        // validation for constraint: int
        if (!is_null($maxCommandsPerIntervalAmount) && !(is_int($maxCommandsPerIntervalAmount) || ctype_digit($maxCommandsPerIntervalAmount))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($maxCommandsPerIntervalAmount, true), gettype($maxCommandsPerIntervalAmount)), __LINE__);
        }
        if (is_null($maxCommandsPerIntervalAmount) || (is_array($maxCommandsPerIntervalAmount) && empty($maxCommandsPerIntervalAmount))) {
            unset($this->MaxCommandsPerIntervalAmount);
        } else {
            $this->MaxCommandsPerIntervalAmount = $maxCommandsPerIntervalAmount;
        }
        return $this;
    }
    /**
     * Get MaxCommandsPerIntervalFrequencyDescription 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 getMaxCommandsPerIntervalFrequencyDescription()
    {
        return isset($this->MaxCommandsPerIntervalFrequencyDescription) ? $this->MaxCommandsPerIntervalFrequencyDescription : null;
    }
    /**
     * Set MaxCommandsPerIntervalFrequencyDescription 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 $maxCommandsPerIntervalFrequencyDescription
     * @return \Struct\CommandRestriction
     */
    public function setMaxCommandsPerIntervalFrequencyDescription($maxCommandsPerIntervalFrequencyDescription = null)
    {
        // validation for constraint: string
        if (!is_null($maxCommandsPerIntervalFrequencyDescription) && !is_string($maxCommandsPerIntervalFrequencyDescription)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($maxCommandsPerIntervalFrequencyDescription, true), gettype($maxCommandsPerIntervalFrequencyDescription)), __LINE__);
        }
        if (is_null($maxCommandsPerIntervalFrequencyDescription) || (is_array($maxCommandsPerIntervalFrequencyDescription) && empty($maxCommandsPerIntervalFrequencyDescription))) {
            unset($this->MaxCommandsPerIntervalFrequencyDescription);
        } else {
            $this->MaxCommandsPerIntervalFrequencyDescription = $maxCommandsPerIntervalFrequencyDescription;
        }
        return $this;
    }
    /**
     * Get MaxCommandsPerIntervalFrequencyId 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 getMaxCommandsPerIntervalFrequencyId()
    {
        return isset($this->MaxCommandsPerIntervalFrequencyId) ? $this->MaxCommandsPerIntervalFrequencyId : null;
    }
    /**
     * Set MaxCommandsPerIntervalFrequencyId 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 $maxCommandsPerIntervalFrequencyId
     * @return \Struct\CommandRestriction
     */
    public function setMaxCommandsPerIntervalFrequencyId($maxCommandsPerIntervalFrequencyId = null)
    {
        // validation for constraint: string
        if (!is_null($maxCommandsPerIntervalFrequencyId) && !is_string($maxCommandsPerIntervalFrequencyId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($maxCommandsPerIntervalFrequencyId, true), gettype($maxCommandsPerIntervalFrequencyId)), __LINE__);
        }
        if (is_null($maxCommandsPerIntervalFrequencyId) || (is_array($maxCommandsPerIntervalFrequencyId) && empty($maxCommandsPerIntervalFrequencyId))) {
            unset($this->MaxCommandsPerIntervalFrequencyId);
        } else {
            $this->MaxCommandsPerIntervalFrequencyId = $maxCommandsPerIntervalFrequencyId;
        }
        return $this;
    }
    /**
     * Get MaxCommandsPerIntervalFrequencyValue 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 getMaxCommandsPerIntervalFrequencyValue()
    {
        return isset($this->MaxCommandsPerIntervalFrequencyValue) ? $this->MaxCommandsPerIntervalFrequencyValue : null;
    }
    /**
     * Set MaxCommandsPerIntervalFrequencyValue 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 $maxCommandsPerIntervalFrequencyValue
     * @return \Struct\CommandRestriction
     */
    public function setMaxCommandsPerIntervalFrequencyValue($maxCommandsPerIntervalFrequencyValue = null)
    {
        // validation for constraint: int
        if (!is_null($maxCommandsPerIntervalFrequencyValue) && !(is_int($maxCommandsPerIntervalFrequencyValue) || ctype_digit($maxCommandsPerIntervalFrequencyValue))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($maxCommandsPerIntervalFrequencyValue, true), gettype($maxCommandsPerIntervalFrequencyValue)), __LINE__);
        }
        if (is_null($maxCommandsPerIntervalFrequencyValue) || (is_array($maxCommandsPerIntervalFrequencyValue) && empty($maxCommandsPerIntervalFrequencyValue))) {
            unset($this->MaxCommandsPerIntervalFrequencyValue);
        } else {
            $this->MaxCommandsPerIntervalFrequencyValue = $maxCommandsPerIntervalFrequencyValue;
        }
        return $this;
    }
    /**
     * Get MaxPointsPerCommandAmount 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 getMaxPointsPerCommandAmount()
    {
        return isset($this->MaxPointsPerCommandAmount) ? $this->MaxPointsPerCommandAmount : null;
    }
    /**
     * Set MaxPointsPerCommandAmount 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 $maxPointsPerCommandAmount
     * @return \Struct\CommandRestriction
     */
    public function setMaxPointsPerCommandAmount($maxPointsPerCommandAmount = null)
    {
        // validation for constraint: int
        if (!is_null($maxPointsPerCommandAmount) && !(is_int($maxPointsPerCommandAmount) || ctype_digit($maxPointsPerCommandAmount))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($maxPointsPerCommandAmount, true), gettype($maxPointsPerCommandAmount)), __LINE__);
        }
        if (is_null($maxPointsPerCommandAmount) || (is_array($maxPointsPerCommandAmount) && empty($maxPointsPerCommandAmount))) {
            unset($this->MaxPointsPerCommandAmount);
        } else {
            $this->MaxPointsPerCommandAmount = $maxPointsPerCommandAmount;
        }
        return $this;
    }
    /**
     * Get MaxPointsPerIntervalAmount 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 getMaxPointsPerIntervalAmount()
    {
        return isset($this->MaxPointsPerIntervalAmount) ? $this->MaxPointsPerIntervalAmount : null;
    }
    /**
     * Set MaxPointsPerIntervalAmount 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 $maxPointsPerIntervalAmount
     * @return \Struct\CommandRestriction
     */
    public function setMaxPointsPerIntervalAmount($maxPointsPerIntervalAmount = null)
    {
        // validation for constraint: int
        if (!is_null($maxPointsPerIntervalAmount) && !(is_int($maxPointsPerIntervalAmount) || ctype_digit($maxPointsPerIntervalAmount))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($maxPointsPerIntervalAmount, true), gettype($maxPointsPerIntervalAmount)), __LINE__);
        }
        if (is_null($maxPointsPerIntervalAmount) || (is_array($maxPointsPerIntervalAmount) && empty($maxPointsPerIntervalAmount))) {
            unset($this->MaxPointsPerIntervalAmount);
        } else {
            $this->MaxPointsPerIntervalAmount = $maxPointsPerIntervalAmount;
        }
        return $this;
    }
    /**
     * Get MaxPointsPerIntervalFrequencyDescription 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 getMaxPointsPerIntervalFrequencyDescription()
    {
        return isset($this->MaxPointsPerIntervalFrequencyDescription) ? $this->MaxPointsPerIntervalFrequencyDescription : null;
    }
    /**
     * Set MaxPointsPerIntervalFrequencyDescription 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 $maxPointsPerIntervalFrequencyDescription
     * @return \Struct\CommandRestriction
     */
    public function setMaxPointsPerIntervalFrequencyDescription($maxPointsPerIntervalFrequencyDescription = null)
    {
        // validation for constraint: string
        if (!is_null($maxPointsPerIntervalFrequencyDescription) && !is_string($maxPointsPerIntervalFrequencyDescription)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($maxPointsPerIntervalFrequencyDescription, true), gettype($maxPointsPerIntervalFrequencyDescription)), __LINE__);
        }
        if (is_null($maxPointsPerIntervalFrequencyDescription) || (is_array($maxPointsPerIntervalFrequencyDescription) && empty($maxPointsPerIntervalFrequencyDescription))) {
            unset($this->MaxPointsPerIntervalFrequencyDescription);
        } else {
            $this->MaxPointsPerIntervalFrequencyDescription = $maxPointsPerIntervalFrequencyDescription;
        }
        return $this;
    }
    /**
     * Get MaxPointsPerIntervalFrequencyId 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 getMaxPointsPerIntervalFrequencyId()
    {
        return isset($this->MaxPointsPerIntervalFrequencyId) ? $this->MaxPointsPerIntervalFrequencyId : null;
    }
    /**
     * Set MaxPointsPerIntervalFrequencyId 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 $maxPointsPerIntervalFrequencyId
     * @return \Struct\CommandRestriction
     */
    public function setMaxPointsPerIntervalFrequencyId($maxPointsPerIntervalFrequencyId = null)
    {
        // validation for constraint: string
        if (!is_null($maxPointsPerIntervalFrequencyId) && !is_string($maxPointsPerIntervalFrequencyId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($maxPointsPerIntervalFrequencyId, true), gettype($maxPointsPerIntervalFrequencyId)), __LINE__);
        }
        if (is_null($maxPointsPerIntervalFrequencyId) || (is_array($maxPointsPerIntervalFrequencyId) && empty($maxPointsPerIntervalFrequencyId))) {
            unset($this->MaxPointsPerIntervalFrequencyId);
        } else {
            $this->MaxPointsPerIntervalFrequencyId = $maxPointsPerIntervalFrequencyId;
        }
        return $this;
    }
    /**
     * Get MaxPointsPerIntervalFrequencyValue 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 getMaxPointsPerIntervalFrequencyValue()
    {
        return isset($this->MaxPointsPerIntervalFrequencyValue) ? $this->MaxPointsPerIntervalFrequencyValue : null;
    }
    /**
     * Set MaxPointsPerIntervalFrequencyValue 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 $maxPointsPerIntervalFrequencyValue
     * @return \Struct\CommandRestriction
     */
    public function setMaxPointsPerIntervalFrequencyValue($maxPointsPerIntervalFrequencyValue = null)
    {
        // validation for constraint: int
        if (!is_null($maxPointsPerIntervalFrequencyValue) && !(is_int($maxPointsPerIntervalFrequencyValue) || ctype_digit($maxPointsPerIntervalFrequencyValue))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($maxPointsPerIntervalFrequencyValue, true), gettype($maxPointsPerIntervalFrequencyValue)), __LINE__);
        }
        if (is_null($maxPointsPerIntervalFrequencyValue) || (is_array($maxPointsPerIntervalFrequencyValue) && empty($maxPointsPerIntervalFrequencyValue))) {
            unset($this->MaxPointsPerIntervalFrequencyValue);
        } else {
            $this->MaxPointsPerIntervalFrequencyValue = $maxPointsPerIntervalFrequencyValue;
        }
        return $this;
    }
    /**
     * Get MinIntervalFromRegistrationFrequencyDescription 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 getMinIntervalFromRegistrationFrequencyDescription()
    {
        return isset($this->MinIntervalFromRegistrationFrequencyDescription) ? $this->MinIntervalFromRegistrationFrequencyDescription : null;
    }
    /**
     * Set MinIntervalFromRegistrationFrequencyDescription 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 $minIntervalFromRegistrationFrequencyDescription
     * @return \Struct\CommandRestriction
     */
    public function setMinIntervalFromRegistrationFrequencyDescription($minIntervalFromRegistrationFrequencyDescription = null)
    {
        // validation for constraint: string
        if (!is_null($minIntervalFromRegistrationFrequencyDescription) && !is_string($minIntervalFromRegistrationFrequencyDescription)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($minIntervalFromRegistrationFrequencyDescription, true), gettype($minIntervalFromRegistrationFrequencyDescription)), __LINE__);
        }
        if (is_null($minIntervalFromRegistrationFrequencyDescription) || (is_array($minIntervalFromRegistrationFrequencyDescription) && empty($minIntervalFromRegistrationFrequencyDescription))) {
            unset($this->MinIntervalFromRegistrationFrequencyDescription);
        } else {
            $this->MinIntervalFromRegistrationFrequencyDescription = $minIntervalFromRegistrationFrequencyDescription;
        }
        return $this;
    }
    /**
     * Get MinIntervalFromRegistrationFrequencyId 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 getMinIntervalFromRegistrationFrequencyId()
    {
        return isset($this->MinIntervalFromRegistrationFrequencyId) ? $this->MinIntervalFromRegistrationFrequencyId : null;
    }
    /**
     * Set MinIntervalFromRegistrationFrequencyId 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 $minIntervalFromRegistrationFrequencyId
     * @return \Struct\CommandRestriction
     */
    public function setMinIntervalFromRegistrationFrequencyId($minIntervalFromRegistrationFrequencyId = null)
    {
        // validation for constraint: string
        if (!is_null($minIntervalFromRegistrationFrequencyId) && !is_string($minIntervalFromRegistrationFrequencyId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($minIntervalFromRegistrationFrequencyId, true), gettype($minIntervalFromRegistrationFrequencyId)), __LINE__);
        }
        if (is_null($minIntervalFromRegistrationFrequencyId) || (is_array($minIntervalFromRegistrationFrequencyId) && empty($minIntervalFromRegistrationFrequencyId))) {
            unset($this->MinIntervalFromRegistrationFrequencyId);
        } else {
            $this->MinIntervalFromRegistrationFrequencyId = $minIntervalFromRegistrationFrequencyId;
        }
        return $this;
    }
    /**
     * Get MinIntervalFromRegistrationFrequencyValue 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 getMinIntervalFromRegistrationFrequencyValue()
    {
        return isset($this->MinIntervalFromRegistrationFrequencyValue) ? $this->MinIntervalFromRegistrationFrequencyValue : null;
    }
    /**
     * Set MinIntervalFromRegistrationFrequencyValue 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 $minIntervalFromRegistrationFrequencyValue
     * @return \Struct\CommandRestriction
     */
    public function setMinIntervalFromRegistrationFrequencyValue($minIntervalFromRegistrationFrequencyValue = null)
    {
        // validation for constraint: int
        if (!is_null($minIntervalFromRegistrationFrequencyValue) && !(is_int($minIntervalFromRegistrationFrequencyValue) || ctype_digit($minIntervalFromRegistrationFrequencyValue))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($minIntervalFromRegistrationFrequencyValue, true), gettype($minIntervalFromRegistrationFrequencyValue)), __LINE__);
        }
        if (is_null($minIntervalFromRegistrationFrequencyValue) || (is_array($minIntervalFromRegistrationFrequencyValue) && empty($minIntervalFromRegistrationFrequencyValue))) {
            unset($this->MinIntervalFromRegistrationFrequencyValue);
        } else {
            $this->MinIntervalFromRegistrationFrequencyValue = $minIntervalFromRegistrationFrequencyValue;
        }
        return $this;
    }
    /**
     * Get MinPointsBalanceAmount 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 getMinPointsBalanceAmount()
    {
        return isset($this->MinPointsBalanceAmount) ? $this->MinPointsBalanceAmount : null;
    }
    /**
     * Set MinPointsBalanceAmount 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 $minPointsBalanceAmount
     * @return \Struct\CommandRestriction
     */
    public function setMinPointsBalanceAmount($minPointsBalanceAmount = null)
    {
        // validation for constraint: int
        if (!is_null($minPointsBalanceAmount) && !(is_int($minPointsBalanceAmount) || ctype_digit($minPointsBalanceAmount))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($minPointsBalanceAmount, true), gettype($minPointsBalanceAmount)), __LINE__);
        }
        if (is_null($minPointsBalanceAmount) || (is_array($minPointsBalanceAmount) && empty($minPointsBalanceAmount))) {
            unset($this->MinPointsBalanceAmount);
        } else {
            $this->MinPointsBalanceAmount = $minPointsBalanceAmount;
        }
        return $this;
    }
    /**
     * Get MinPointsPerCommandAmount 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 getMinPointsPerCommandAmount()
    {
        return isset($this->MinPointsPerCommandAmount) ? $this->MinPointsPerCommandAmount : null;
    }
    /**
     * Set MinPointsPerCommandAmount 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 $minPointsPerCommandAmount
     * @return \Struct\CommandRestriction
     */
    public function setMinPointsPerCommandAmount($minPointsPerCommandAmount = null)
    {
        // validation for constraint: int
        if (!is_null($minPointsPerCommandAmount) && !(is_int($minPointsPerCommandAmount) || ctype_digit($minPointsPerCommandAmount))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($minPointsPerCommandAmount, true), gettype($minPointsPerCommandAmount)), __LINE__);
        }
        if (is_null($minPointsPerCommandAmount) || (is_array($minPointsPerCommandAmount) && empty($minPointsPerCommandAmount))) {
            unset($this->MinPointsPerCommandAmount);
        } else {
            $this->MinPointsPerCommandAmount = $minPointsPerCommandAmount;
        }
        return $this;
    }
    /**
     * Get RedemptionMaxItemsPerCommandAmount 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 getRedemptionMaxItemsPerCommandAmount()
    {
        return isset($this->RedemptionMaxItemsPerCommandAmount) ? $this->RedemptionMaxItemsPerCommandAmount : null;
    }
    /**
     * Set RedemptionMaxItemsPerCommandAmount 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 $redemptionMaxItemsPerCommandAmount
     * @return \Struct\CommandRestriction
     */
    public function setRedemptionMaxItemsPerCommandAmount($redemptionMaxItemsPerCommandAmount = null)
    {
        // validation for constraint: int
        if (!is_null($redemptionMaxItemsPerCommandAmount) && !(is_int($redemptionMaxItemsPerCommandAmount) || ctype_digit($redemptionMaxItemsPerCommandAmount))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($redemptionMaxItemsPerCommandAmount, true), gettype($redemptionMaxItemsPerCommandAmount)), __LINE__);
        }
        if (is_null($redemptionMaxItemsPerCommandAmount) || (is_array($redemptionMaxItemsPerCommandAmount) && empty($redemptionMaxItemsPerCommandAmount))) {
            unset($this->RedemptionMaxItemsPerCommandAmount);
        } else {
            $this->RedemptionMaxItemsPerCommandAmount = $redemptionMaxItemsPerCommandAmount;
        }
        return $this;
    }
    /**
     * Get SourceId 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 getSourceId()
    {
        return isset($this->SourceId) ? $this->SourceId : null;
    }
    /**
     * Set SourceId 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 $sourceId
     * @return \Struct\CommandRestriction
     */
    public function setSourceId($sourceId = null)
    {
        // validation for constraint: string
        if (!is_null($sourceId) && !is_string($sourceId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($sourceId, true), gettype($sourceId)), __LINE__);
        }
        if (is_null($sourceId) || (is_array($sourceId) && empty($sourceId))) {
            unset($this->SourceId);
        } else {
            $this->SourceId = $sourceId;
        }
        return $this;
    }
    /**
     * Get TransferKeepPointsValidity 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 getTransferKeepPointsValidity()
    {
        return isset($this->TransferKeepPointsValidity) ? $this->TransferKeepPointsValidity : null;
    }
    /**
     * Set TransferKeepPointsValidity 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 $transferKeepPointsValidity
     * @return \Struct\CommandRestriction
     */
    public function setTransferKeepPointsValidity($transferKeepPointsValidity = null)
    {
        // validation for constraint: boolean
        if (!is_null($transferKeepPointsValidity) && !is_bool($transferKeepPointsValidity)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($transferKeepPointsValidity, true), gettype($transferKeepPointsValidity)), __LINE__);
        }
        if (is_null($transferKeepPointsValidity) || (is_array($transferKeepPointsValidity) && empty($transferKeepPointsValidity))) {
            unset($this->TransferKeepPointsValidity);
        } else {
            $this->TransferKeepPointsValidity = $transferKeepPointsValidity;
        }
        return $this;
    }
    /**
     * Get WalletType 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 \Struct\WalletType|null
     */
    public function getWalletType()
    {
        return isset($this->WalletType) ? $this->WalletType : null;
    }
    /**
     * Set WalletType 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 \Struct\WalletType $walletType
     * @return \Struct\CommandRestriction
     */
    public function setWalletType(\Struct\WalletType $walletType = null)
    {
        if (is_null($walletType) || (is_array($walletType) && empty($walletType))) {
            unset($this->WalletType);
        } else {
            $this->WalletType = $walletType;
        }
        return $this;
    }
    /**
     * Get WalletTypeId 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 getWalletTypeId()
    {
        return isset($this->WalletTypeId) ? $this->WalletTypeId : null;
    }
    /**
     * Set WalletTypeId 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 $walletTypeId
     * @return \Struct\CommandRestriction
     */
    public function setWalletTypeId($walletTypeId = null)
    {
        // validation for constraint: int
        if (!is_null($walletTypeId) && !(is_int($walletTypeId) || ctype_digit($walletTypeId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($walletTypeId, true), gettype($walletTypeId)), __LINE__);
        }
        if (is_null($walletTypeId) || (is_array($walletTypeId) && empty($walletTypeId))) {
            unset($this->WalletTypeId);
        } else {
            $this->WalletTypeId = $walletTypeId;
        }
        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\CommandRestriction
     */
    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__;
    }
}
