<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BizAction.GiftVoucher.Coupon.CouponActivation.Request
 * StructType
 * @subpackage Structs
 */
class BizAction_GiftVoucher_Coupon_CouponActivation_Request extends AnyEntity
{
    /**
     * The CouponIds
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $CouponIds;
    /**
     * The IsActivationMode
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $IsActivationMode;
    /**
     * Constructor method for BizAction.GiftVoucher.Coupon.CouponActivation.Request
     * @uses BizAction_GiftVoucher_Coupon_CouponActivation_Request::setCouponIds()
     * @uses BizAction_GiftVoucher_Coupon_CouponActivation_Request::setIsActivationMode()
     * @param string $couponIds
     * @param bool $isActivationMode
     */
    public function __construct($couponIds = null, $isActivationMode = null)
    {
        $this
            ->setCouponIds($couponIds)
            ->setIsActivationMode($isActivationMode);
    }
    /**
     * Get CouponIds 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 getCouponIds()
    {
        return isset($this->CouponIds) ? $this->CouponIds : null;
    }
    /**
     * Set CouponIds 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 $couponIds
     * @return \patest\StructType\BizAction_GiftVoucher_Coupon_CouponActivation_Request
     */
    public function setCouponIds($couponIds = null)
    {
        // validation for constraint: string
        if (!is_null($couponIds) && !is_string($couponIds)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($couponIds, true), gettype($couponIds)), __LINE__);
        }
        if (is_null($couponIds) || (is_array($couponIds) && empty($couponIds))) {
            unset($this->CouponIds);
        } else {
            $this->CouponIds = $couponIds;
        }
        return $this;
    }
    /**
     * Get IsActivationMode 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 getIsActivationMode()
    {
        return isset($this->IsActivationMode) ? $this->IsActivationMode : null;
    }
    /**
     * Set IsActivationMode 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 $isActivationMode
     * @return \patest\StructType\BizAction_GiftVoucher_Coupon_CouponActivation_Request
     */
    public function setIsActivationMode($isActivationMode = null)
    {
        // validation for constraint: boolean
        if (!is_null($isActivationMode) && !is_bool($isActivationMode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isActivationMode, true), gettype($isActivationMode)), __LINE__);
        }
        if (is_null($isActivationMode) || (is_array($isActivationMode) && empty($isActivationMode))) {
            unset($this->IsActivationMode);
        } else {
            $this->IsActivationMode = $isActivationMode;
        }
        return $this;
    }
}
