<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetOrderResponse StructType
 * @subpackage Structs
 */
class GetOrderResponse extends AbstractStructBase
{
    /**
     * The return
     * Meta information extracted from the WSDL
     * - nillable: true
     * @var string
     */
    public $return;
    /**
     * The order
     * @var Order
     */
    public $order;
    /**
     * Constructor method for GetOrderResponse
     * @uses GetOrderResponse::setReturn()
     * @uses GetOrderResponse::setOrder()
     * @param string $return
     * @param Order $order
     */
    public function __construct($return = null, Order $order = null)
    {
        $this
            ->setReturn($return)
            ->setOrder($order);
    }
    /**
     * Get return value
     * @return string|null
     */
    public function getReturn()
    {
        return $this->return;
    }
    /**
     * Set return value
     * @param string $return
     * @return GetOrderResponse
     */
    public function setReturn($return = null)
    {
        // validation for constraint: string
        if (!is_null($return) && !is_string($return)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($return, true), gettype($return)), __LINE__);
        }
        $this->return = $return;
        return $this;
    }
    /**
     * Get order value
     * @return Order|null
     */
    public function getOrder()
    {
        return $this->order;
    }
    /**
     * Set order value
     * @param Order $order
     * @return GetOrderResponse
     */
    public function setOrder(Order $order = null)
    {
        $this->order = $order;
        return $this;
    }
}
