<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GiftCertificateItemAuthCodes StructType
 * @subpackage Structs
 */
class GiftCertificateItemAuthCodes extends AbstractStructBase
{
    /**
     * The authCode
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $authCode;
    /**
     * The used
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $used;
    /**
     * Constructor method for GiftCertificateItemAuthCodes
     * @uses GiftCertificateItemAuthCodes::setAuthCode()
     * @uses GiftCertificateItemAuthCodes::setUsed()
     * @param string $authCode
     * @param bool $used
     */
    public function __construct($authCode = null, $used = null)
    {
        $this
            ->setAuthCode($authCode)
            ->setUsed($used);
    }
    /**
     * Get authCode value
     * @return string|null
     */
    public function getAuthCode()
    {
        return $this->authCode;
    }
    /**
     * Set authCode value
     * @param string $authCode
     * @return \StructType\GiftCertificateItemAuthCodes
     */
    public function setAuthCode($authCode = null)
    {
        // validation for constraint: string
        if (!is_null($authCode) && !is_string($authCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($authCode, true), gettype($authCode)), __LINE__);
        }
        $this->authCode = $authCode;
        return $this;
    }
    /**
     * Get used value
     * @return bool|null
     */
    public function getUsed()
    {
        return $this->used;
    }
    /**
     * Set used value
     * @param bool $used
     * @return \StructType\GiftCertificateItemAuthCodes
     */
    public function setUsed($used = null)
    {
        // validation for constraint: boolean
        if (!is_null($used) && !is_bool($used)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($used, true), gettype($used)), __LINE__);
        }
        $this->used = $used;
        return $this;
    }
}
