<?php

namespace GLS;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for adeCourier_Order Struct
 * Meta information extracted from the WSDL
 * - type: tns:adeCourier_Order
 * @subpackage Structs
 */
class AdeCourier_Order extends AbstractStructBase
{
    /**
     * The session
     * @var string
     */
    public $session;
    /**
     * The parcelamount
     * @var int
     */
    public $parcelamount;
    /**
     * The date
     * @var string
     */
    public $date;
    /**
     * The emailnotification
     * @var bool
     */
    public $emailnotification;
    /**
     * Constructor method for adeCourier_Order
     * @uses AdeCourier_Order::setSession()
     * @uses AdeCourier_Order::setParcelamount()
     * @uses AdeCourier_Order::setDate()
     * @uses AdeCourier_Order::setEmailnotification()
     * @param string $session
     * @param int $parcelamount
     * @param string $date
     * @param bool $emailnotification
     */
    public function __construct($session = null, $parcelamount = null, $date = null, $emailnotification = null)
    {
        $this
            ->setSession($session)
            ->setParcelamount($parcelamount)
            ->setDate($date)
            ->setEmailnotification($emailnotification);
    }
    /**
     * Get session value
     * @return string|null
     */
    public function getSession()
    {
        return $this->session;
    }
    /**
     * Set session value
     * @param string $session
     * @return \GLS\AdeCourier_Order
     */
    public function setSession($session = null)
    {
        // validation for constraint: string
        if (!is_null($session) && !is_string($session)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($session, true), gettype($session)), __LINE__);
        }
        $this->session = $session;
        return $this;
    }
    /**
     * Get parcelamount value
     * @return int|null
     */
    public function getParcelamount()
    {
        return $this->parcelamount;
    }
    /**
     * Set parcelamount value
     * @param int $parcelamount
     * @return \GLS\AdeCourier_Order
     */
    public function setParcelamount($parcelamount = null)
    {
        // validation for constraint: int
        if (!is_null($parcelamount) && !(is_int($parcelamount) || ctype_digit($parcelamount))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($parcelamount, true), gettype($parcelamount)), __LINE__);
        }
        $this->parcelamount = $parcelamount;
        return $this;
    }
    /**
     * Get date value
     * @return string|null
     */
    public function getDate()
    {
        return $this->date;
    }
    /**
     * Set date value
     * @param string $date
     * @return \GLS\AdeCourier_Order
     */
    public function setDate($date = null)
    {
        // validation for constraint: string
        if (!is_null($date) && !is_string($date)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($date, true), gettype($date)), __LINE__);
        }
        $this->date = $date;
        return $this;
    }
    /**
     * Get emailnotification value
     * @return bool|null
     */
    public function getEmailnotification()
    {
        return $this->emailnotification;
    }
    /**
     * Set emailnotification value
     * @param bool $emailnotification
     * @return \GLS\AdeCourier_Order
     */
    public function setEmailnotification($emailnotification = null)
    {
        // validation for constraint: boolean
        if (!is_null($emailnotification) && !is_bool($emailnotification)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($emailnotification, true), gettype($emailnotification)), __LINE__);
        }
        $this->emailnotification = $emailnotification;
        return $this;
    }
}
