<?php

namespace Speedex\SpeedexStruct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for CancelBOLandOrder SpeedexStruct
 * @package Speedex
 * @subpackage Structs
 */
class SpeedexCancelBOLandOrder extends AbstractStructBase
{
    /**
     * The type
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $type;
    /**
     * The orderId
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $orderId;
    /**
     * The sessionID
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $sessionID;
    /**
     * The voucherID
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $voucherID;
    /**
     * Constructor method for CancelBOLandOrder
     * @uses SpeedexCancelBOLandOrder::setType()
     * @uses SpeedexCancelBOLandOrder::setOrderId()
     * @uses SpeedexCancelBOLandOrder::setSessionID()
     * @uses SpeedexCancelBOLandOrder::setVoucherID()
     * @param int $type
     * @param int $orderId
     * @param string $sessionID
     * @param string $voucherID
     */
    public function __construct($type = null, $orderId = null, $sessionID = null, $voucherID = null)
    {
        $this
            ->setType($type)
            ->setOrderId($orderId)
            ->setSessionID($sessionID)
            ->setVoucherID($voucherID);
    }
    /**
     * Get type value
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }
    /**
     * Set type value
     * @param int $type
     * @return \Speedex\SpeedexStruct\SpeedexCancelBOLandOrder
     */
    public function setType($type = null)
    {
        // validation for constraint: int
        if (!is_null($type) && !(is_int($type) || ctype_digit($type))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($type, true), gettype($type)), __LINE__);
        }
        $this->type = $type;
        return $this;
    }
    /**
     * Get orderId value
     * @return int
     */
    public function getOrderId()
    {
        return $this->orderId;
    }
    /**
     * Set orderId value
     * @param int $orderId
     * @return \Speedex\SpeedexStruct\SpeedexCancelBOLandOrder
     */
    public function setOrderId($orderId = null)
    {
        // validation for constraint: int
        if (!is_null($orderId) && !(is_int($orderId) || ctype_digit($orderId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($orderId, true), gettype($orderId)), __LINE__);
        }
        $this->orderId = $orderId;
        return $this;
    }
    /**
     * Get sessionID value
     * @return string|null
     */
    public function getSessionID()
    {
        return $this->sessionID;
    }
    /**
     * Set sessionID value
     * @param string $sessionID
     * @return \Speedex\SpeedexStruct\SpeedexCancelBOLandOrder
     */
    public function setSessionID($sessionID = null)
    {
        // validation for constraint: string
        if (!is_null($sessionID) && !is_string($sessionID)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($sessionID, true), gettype($sessionID)), __LINE__);
        }
        $this->sessionID = $sessionID;
        return $this;
    }
    /**
     * Get voucherID value
     * @return string|null
     */
    public function getVoucherID()
    {
        return $this->voucherID;
    }
    /**
     * Set voucherID value
     * @param string $voucherID
     * @return \Speedex\SpeedexStruct\SpeedexCancelBOLandOrder
     */
    public function setVoucherID($voucherID = null)
    {
        // validation for constraint: string
        if (!is_null($voucherID) && !is_string($voucherID)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($voucherID, true), gettype($voucherID)), __LINE__);
        }
        $this->voucherID = $voucherID;
        return $this;
    }
}
