<?php

namespace GLS;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for cBulkCustomsClearanceLineItemPreferentialTrade Struct
 * @subpackage Structs
 */
class CBulkCustomsClearanceLineItemPreferentialTrade extends AbstractStructBase
{
    /**
     * The isEligibleForPreference
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var bool
     */
    public $isEligibleForPreference;
    /**
     * The proofOfPreference
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $proofOfPreference;
    /**
     * The referenceNumber
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $referenceNumber;
    /**
     * Constructor method for cBulkCustomsClearanceLineItemPreferentialTrade
     * @uses CBulkCustomsClearanceLineItemPreferentialTrade::setIsEligibleForPreference()
     * @uses CBulkCustomsClearanceLineItemPreferentialTrade::setProofOfPreference()
     * @uses CBulkCustomsClearanceLineItemPreferentialTrade::setReferenceNumber()
     * @param bool $isEligibleForPreference
     * @param string $proofOfPreference
     * @param string $referenceNumber
     */
    public function __construct($isEligibleForPreference = null, $proofOfPreference = null, $referenceNumber = null)
    {
        $this
            ->setIsEligibleForPreference($isEligibleForPreference)
            ->setProofOfPreference($proofOfPreference)
            ->setReferenceNumber($referenceNumber);
    }
    /**
     * Get isEligibleForPreference value
     * @return bool|null
     */
    public function getIsEligibleForPreference()
    {
        return $this->isEligibleForPreference;
    }
    /**
     * Set isEligibleForPreference value
     * @param bool $isEligibleForPreference
     * @return \GLS\CBulkCustomsClearanceLineItemPreferentialTrade
     */
    public function setIsEligibleForPreference($isEligibleForPreference = null)
    {
        // validation for constraint: boolean
        if (!is_null($isEligibleForPreference) && !is_bool($isEligibleForPreference)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isEligibleForPreference, true), gettype($isEligibleForPreference)), __LINE__);
        }
        $this->isEligibleForPreference = $isEligibleForPreference;
        return $this;
    }
    /**
     * Get proofOfPreference value
     * @return string|null
     */
    public function getProofOfPreference()
    {
        return $this->proofOfPreference;
    }
    /**
     * Set proofOfPreference value
     * @param string $proofOfPreference
     * @return \GLS\CBulkCustomsClearanceLineItemPreferentialTrade
     */
    public function setProofOfPreference($proofOfPreference = null)
    {
        // validation for constraint: string
        if (!is_null($proofOfPreference) && !is_string($proofOfPreference)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($proofOfPreference, true), gettype($proofOfPreference)), __LINE__);
        }
        $this->proofOfPreference = $proofOfPreference;
        return $this;
    }
    /**
     * Get referenceNumber value
     * @return string|null
     */
    public function getReferenceNumber()
    {
        return $this->referenceNumber;
    }
    /**
     * Set referenceNumber value
     * @param string $referenceNumber
     * @return \GLS\CBulkCustomsClearanceLineItemPreferentialTrade
     */
    public function setReferenceNumber($referenceNumber = null)
    {
        // validation for constraint: string
        if (!is_null($referenceNumber) && !is_string($referenceNumber)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($referenceNumber, true), gettype($referenceNumber)), __LINE__);
        }
        $this->referenceNumber = $referenceNumber;
        return $this;
    }
}
