<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_RentacarContract StructType
 * @subpackage Structs
 */
class JP_RentacarContract extends AbstractStructBase
{
    /**
     * The Code
     * @var string
     */
    public $Code;
    /**
     * The DiscountCode
     * @var string
     */
    public $DiscountCode;
    /**
     * The IATA
     * @var string
     */
    public $IATA;
    /**
     * The SubSupplier
     * @var string
     */
    public $SubSupplier;
    /**
     * Constructor method for JP_RentacarContract
     * @uses JP_RentacarContract::setCode()
     * @uses JP_RentacarContract::setDiscountCode()
     * @uses JP_RentacarContract::setIATA()
     * @uses JP_RentacarContract::setSubSupplier()
     * @param string $code
     * @param string $discountCode
     * @param string $iATA
     * @param string $subSupplier
     */
    public function __construct($code = null, $discountCode = null, $iATA = null, $subSupplier = null)
    {
        $this
            ->setCode($code)
            ->setDiscountCode($discountCode)
            ->setIATA($iATA)
            ->setSubSupplier($subSupplier);
    }
    /**
     * Get Code value
     * @return string|null
     */
    public function getCode()
    {
        return $this->Code;
    }
    /**
     * Set Code value
     * @param string $code
     * @return \StructType\JP_RentacarContract
     */
    public function setCode($code = null)
    {
        // validation for constraint: string
        if (!is_null($code) && !is_string($code)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($code)), __LINE__);
        }
        $this->Code = $code;
        return $this;
    }
    /**
     * Get DiscountCode value
     * @return string|null
     */
    public function getDiscountCode()
    {
        return $this->DiscountCode;
    }
    /**
     * Set DiscountCode value
     * @param string $discountCode
     * @return \StructType\JP_RentacarContract
     */
    public function setDiscountCode($discountCode = null)
    {
        // validation for constraint: string
        if (!is_null($discountCode) && !is_string($discountCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($discountCode)), __LINE__);
        }
        $this->DiscountCode = $discountCode;
        return $this;
    }
    /**
     * Get IATA value
     * @return string|null
     */
    public function getIATA()
    {
        return $this->IATA;
    }
    /**
     * Set IATA value
     * @param string $iATA
     * @return \StructType\JP_RentacarContract
     */
    public function setIATA($iATA = null)
    {
        // validation for constraint: string
        if (!is_null($iATA) && !is_string($iATA)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($iATA)), __LINE__);
        }
        $this->IATA = $iATA;
        return $this;
    }
    /**
     * Get SubSupplier value
     * @return string|null
     */
    public function getSubSupplier()
    {
        return $this->SubSupplier;
    }
    /**
     * Set SubSupplier value
     * @param string $subSupplier
     * @return \StructType\JP_RentacarContract
     */
    public function setSubSupplier($subSupplier = null)
    {
        // validation for constraint: string
        if (!is_null($subSupplier) && !is_string($subSupplier)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($subSupplier)), __LINE__);
        }
        $this->SubSupplier = $subSupplier;
        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 \StructType\JP_RentacarContract
     */
    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__;
    }
}
