<?php

namespace Speedex\SpeedexStruct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetOrderLastCheckpointResponse SpeedexStruct
 * @package Speedex
 * @subpackage Structs
 */
class SpeedexGetOrderLastCheckpointResponse extends AbstractStructBase
{
    /**
     * The returnCode
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $returnCode;
    /**
     * The Ordercheckpoint
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \Speedex\SpeedexStruct\SpeedexOrderCheckPoint
     */
    public $Ordercheckpoint;
    /**
     * The returnMessage
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $returnMessage;
    /**
     * Constructor method for GetOrderLastCheckpointResponse
     * @uses SpeedexGetOrderLastCheckpointResponse::setReturnCode()
     * @uses SpeedexGetOrderLastCheckpointResponse::setOrdercheckpoint()
     * @uses SpeedexGetOrderLastCheckpointResponse::setReturnMessage()
     * @param int $returnCode
     * @param \Speedex\SpeedexStruct\SpeedexOrderCheckPoint $ordercheckpoint
     * @param string $returnMessage
     */
    public function __construct($returnCode = null, \Speedex\SpeedexStruct\SpeedexOrderCheckPoint $ordercheckpoint = null, $returnMessage = null)
    {
        $this
            ->setReturnCode($returnCode)
            ->setOrdercheckpoint($ordercheckpoint)
            ->setReturnMessage($returnMessage);
    }
    /**
     * Get returnCode value
     * @return int
     */
    public function getReturnCode()
    {
        return $this->returnCode;
    }
    /**
     * Set returnCode value
     * @param int $returnCode
     * @return \Speedex\SpeedexStruct\SpeedexGetOrderLastCheckpointResponse
     */
    public function setReturnCode($returnCode = null)
    {
        // validation for constraint: int
        if (!is_null($returnCode) && !(is_int($returnCode) || ctype_digit($returnCode))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($returnCode, true), gettype($returnCode)), __LINE__);
        }
        $this->returnCode = $returnCode;
        return $this;
    }
    /**
     * Get Ordercheckpoint value
     * @return \Speedex\SpeedexStruct\SpeedexOrderCheckPoint|null
     */
    public function getOrdercheckpoint()
    {
        return $this->Ordercheckpoint;
    }
    /**
     * Set Ordercheckpoint value
     * @param \Speedex\SpeedexStruct\SpeedexOrderCheckPoint $ordercheckpoint
     * @return \Speedex\SpeedexStruct\SpeedexGetOrderLastCheckpointResponse
     */
    public function setOrdercheckpoint(\Speedex\SpeedexStruct\SpeedexOrderCheckPoint $ordercheckpoint = null)
    {
        $this->Ordercheckpoint = $ordercheckpoint;
        return $this;
    }
    /**
     * Get returnMessage value
     * @return string|null
     */
    public function getReturnMessage()
    {
        return $this->returnMessage;
    }
    /**
     * Set returnMessage value
     * @param string $returnMessage
     * @return \Speedex\SpeedexStruct\SpeedexGetOrderLastCheckpointResponse
     */
    public function setReturnMessage($returnMessage = null)
    {
        // validation for constraint: string
        if (!is_null($returnMessage) && !is_string($returnMessage)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($returnMessage, true), gettype($returnMessage)), __LINE__);
        }
        $this->returnMessage = $returnMessage;
        return $this;
    }
}
