<?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 %s, please provide a string, %s given', var_export($code, true), 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 %s, please provide a string, %s given', var_export($discountCode, true), 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 %s, please provide a string, %s given', var_export($iATA, true), 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 %s, please provide a string, %s given', var_export($subSupplier, true), gettype($subSupplier)), __LINE__);
        }
        $this->SubSupplier = $subSupplier;
        return $this;
    }
}
