<?php
/**
 * QueryCinemaOrderResponseDTO
 *
 * PHP version 5
 *
 * @category Class
 * @package  Yeepay\Yop\Sdk\
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * 旅游资源
 *
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 1.0
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 * Swagger Codegen version: 3.0.13
 */

/**
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen
 * Do not edit the class manually.
 */

namespace Yeepay\Yop\Sdk\Service\TravelResources\Model;

use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;

/**
 * QueryCinemaOrderResponseDTO Class Doc Comment
 *
 * @category Class
 * @description 查询电影票订单信息
 * @package  Yeepay\Yop\Sdk\
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class QueryCinemaOrderResponseDTO implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $swaggerModelName = 'QueryCinemaOrderResponseDTO';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'code' => 'string',
        'data' => '\Yeepay\Yop\Sdk\Service\TravelResources\Model\QueryCinemaOrderDataBeanDTO',
        'orderStatus' => 'string',
        'supplierChannel' => 'string',
        'message' => 'string',
        'paymentUniqueOrderNo' => 'string',
        'orderAmount' => 'float',
        'complateTime' => 'string',
        'cancelTime' => 'string',
        'orderSuccessTime' => 'string',
        'systemOrderNo' => 'string',
        'paySuccessTime' => 'string',
        'parentMerchantNo' => 'string',
        'merchantNo' => 'string',
        'merchantRequestNo' => 'string',
        'parentMerchantRequestNo' => 'string',
        'supplierOrderNo' => 'string',
        'trxType' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'code' => null,
        'data' => null,
        'orderStatus' => null,
        'supplierChannel' => null,
        'message' => null,
        'paymentUniqueOrderNo' => null,
        'orderAmount' => null,
        'complateTime' => null,
        'cancelTime' => null,
        'orderSuccessTime' => null,
        'systemOrderNo' => null,
        'paySuccessTime' => null,
        'parentMerchantNo' => null,
        'merchantNo' => null,
        'merchantRequestNo' => null,
        'parentMerchantRequestNo' => null,
        'supplierOrderNo' => null,
        'trxType' => null
    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerTypes()
    {
        return self::$swaggerTypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function swaggerFormats()
    {
        return self::$swaggerFormats;
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'code' => 'code',
        'data' => 'data',
        'orderStatus' => 'orderStatus',
        'supplierChannel' => 'supplierChannel',
        'message' => 'message',
        'paymentUniqueOrderNo' => 'paymentUniqueOrderNo',
        'orderAmount' => 'orderAmount',
        'complateTime' => 'complateTime',
        'cancelTime' => 'cancelTime',
        'orderSuccessTime' => 'orderSuccessTime',
        'systemOrderNo' => 'systemOrderNo',
        'paySuccessTime' => 'paySuccessTime',
        'parentMerchantNo' => 'parentMerchantNo',
        'merchantNo' => 'merchantNo',
        'merchantRequestNo' => 'merchantRequestNo',
        'parentMerchantRequestNo' => 'parentMerchantRequestNo',
        'supplierOrderNo' => 'supplierOrderNo',
        'trxType' => 'trxType'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'code' => 'setCode',
        'data' => 'setData',
        'orderStatus' => 'setOrderStatus',
        'supplierChannel' => 'setSupplierChannel',
        'message' => 'setMessage',
        'paymentUniqueOrderNo' => 'setPaymentUniqueOrderNo',
        'orderAmount' => 'setOrderAmount',
        'complateTime' => 'setComplateTime',
        'cancelTime' => 'setCancelTime',
        'orderSuccessTime' => 'setOrderSuccessTime',
        'systemOrderNo' => 'setSystemOrderNo',
        'paySuccessTime' => 'setPaySuccessTime',
        'parentMerchantNo' => 'setParentMerchantNo',
        'merchantNo' => 'setMerchantNo',
        'merchantRequestNo' => 'setMerchantRequestNo',
        'parentMerchantRequestNo' => 'setParentMerchantRequestNo',
        'supplierOrderNo' => 'setSupplierOrderNo',
        'trxType' => 'setTrxType'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'code' => 'getCode',
        'data' => 'getData',
        'orderStatus' => 'getOrderStatus',
        'supplierChannel' => 'getSupplierChannel',
        'message' => 'getMessage',
        'paymentUniqueOrderNo' => 'getPaymentUniqueOrderNo',
        'orderAmount' => 'getOrderAmount',
        'complateTime' => 'getComplateTime',
        'cancelTime' => 'getCancelTime',
        'orderSuccessTime' => 'getOrderSuccessTime',
        'systemOrderNo' => 'getSystemOrderNo',
        'paySuccessTime' => 'getPaySuccessTime',
        'parentMerchantNo' => 'getParentMerchantNo',
        'merchantNo' => 'getMerchantNo',
        'merchantRequestNo' => 'getMerchantRequestNo',
        'parentMerchantRequestNo' => 'getParentMerchantRequestNo',
        'supplierOrderNo' => 'getSupplierOrderNo',
        'trxType' => 'getTrxType'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$swaggerModelName;
    }

    

    

    /**
     * Associative array for storing property values
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     *
     * @param mixed[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(array $data = null)
    {
        $this->container['code'] = isset($data['code']) ? $data['code'] : null;
        $this->container['data'] = isset($data['data']) ? $data['data'] : null;
        $this->container['orderStatus'] = isset($data['orderStatus']) ? $data['orderStatus'] : null;
        $this->container['supplierChannel'] = isset($data['supplierChannel']) ? $data['supplierChannel'] : null;
        $this->container['message'] = isset($data['message']) ? $data['message'] : null;
        $this->container['paymentUniqueOrderNo'] = isset($data['paymentUniqueOrderNo']) ? $data['paymentUniqueOrderNo'] : null;
        $this->container['orderAmount'] = isset($data['orderAmount']) ? $data['orderAmount'] : null;
        $this->container['complateTime'] = isset($data['complateTime']) ? $data['complateTime'] : null;
        $this->container['cancelTime'] = isset($data['cancelTime']) ? $data['cancelTime'] : null;
        $this->container['orderSuccessTime'] = isset($data['orderSuccessTime']) ? $data['orderSuccessTime'] : null;
        $this->container['systemOrderNo'] = isset($data['systemOrderNo']) ? $data['systemOrderNo'] : null;
        $this->container['paySuccessTime'] = isset($data['paySuccessTime']) ? $data['paySuccessTime'] : null;
        $this->container['parentMerchantNo'] = isset($data['parentMerchantNo']) ? $data['parentMerchantNo'] : null;
        $this->container['merchantNo'] = isset($data['merchantNo']) ? $data['merchantNo'] : null;
        $this->container['merchantRequestNo'] = isset($data['merchantRequestNo']) ? $data['merchantRequestNo'] : null;
        $this->container['parentMerchantRequestNo'] = isset($data['parentMerchantRequestNo']) ? $data['parentMerchantRequestNo'] : null;
        $this->container['supplierOrderNo'] = isset($data['supplierOrderNo']) ? $data['supplierOrderNo'] : null;
        $this->container['trxType'] = isset($data['trxType']) ? $data['trxType'] : null;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        if ($this->container['supplierChannel'] === null) {
            $invalidProperties[] = "'supplierChannel' can't be null";
        }
        if ($this->container['orderAmount'] === null) {
            $invalidProperties[] = "'orderAmount' can't be null";
        }
        if ($this->container['systemOrderNo'] === null) {
            $invalidProperties[] = "'systemOrderNo' can't be null";
        }
        if ($this->container['parentMerchantNo'] === null) {
            $invalidProperties[] = "'parentMerchantNo' can't be null";
        }
        if ($this->container['merchantNo'] === null) {
            $invalidProperties[] = "'merchantNo' can't be null";
        }
        if ($this->container['merchantRequestNo'] === null) {
            $invalidProperties[] = "'merchantRequestNo' can't be null";
        }
        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets code
     *
     * @return string
     */
    public function getCode()
    {
        return $this->container['code'];
    }

    /**
     * Sets code
     *
     * @param string $code <p>代表本次请求成功，订单状态需要关注orderStatus</p>
     *
     * @return $this
     */
    public function setCode($code)
    {
        $this->container['code'] = $code;

        return $this;
    }

    /**
     * Gets data
     *
     * @return \Yeepay\Yop\Sdk\Service\TravelResources\Model\QueryCinemaOrderDataBeanDTO
     */
    public function getData()
    {
        return $this->container['data'];
    }

    /**
     * Sets data
     *
     * @param \Yeepay\Yop\Sdk\Service\TravelResources\Model\QueryCinemaOrderDataBeanDTO $data data
     *
     * @return $this
     */
    public function setData($data)
    {
        $this->container['data'] = $data;

        return $this;
    }

    /**
     * Gets orderStatus
     *
     * @return string
     */
    public function getOrderStatus()
    {
        return $this->container['orderStatus'];
    }

    /**
     * Sets orderStatus
     *
     * @param string $orderStatus <pre>/_**<br /> * 订单状态:<br /> * 0:待支付<br /> * 1:待出货（已支付）<br /> * 2:已出货<br /> * 3:已取消<br /> * 4:交易完成<br /> * 部分退款/取消，对应已出货；全部退款，对应已取消<br /> *_/</pre>
     *
     * @return $this
     */
    public function setOrderStatus($orderStatus)
    {
        $this->container['orderStatus'] = $orderStatus;

        return $this;
    }

    /**
     * Gets supplierChannel
     *
     * @return string
     */
    public function getSupplierChannel()
    {
        return $this->container['supplierChannel'];
    }

    /**
     * Sets supplierChannel
     *
     * @param string $supplierChannel <pre>供应商渠道</pre>
     *
     * @return $this
     */
    public function setSupplierChannel($supplierChannel)
    {
        $this->container['supplierChannel'] = $supplierChannel;

        return $this;
    }

    /**
     * Gets message
     *
     * @return string
     */
    public function getMessage()
    {
        return $this->container['message'];
    }

    /**
     * Sets message
     *
     * @param string $message message
     *
     * @return $this
     */
    public function setMessage($message)
    {
        $this->container['message'] = $message;

        return $this;
    }

    /**
     * Gets paymentUniqueOrderNo
     *
     * @return string
     */
    public function getPaymentUniqueOrderNo()
    {
        return $this->container['paymentUniqueOrderNo'];
    }

    /**
     * Sets paymentUniqueOrderNo
     *
     * @param string $paymentUniqueOrderNo <pre>支付请求流水号</pre>
     *
     * @return $this
     */
    public function setPaymentUniqueOrderNo($paymentUniqueOrderNo)
    {
        $this->container['paymentUniqueOrderNo'] = $paymentUniqueOrderNo;

        return $this;
    }

    /**
     * Gets orderAmount
     *
     * @return float
     */
    public function getOrderAmount()
    {
        return $this->container['orderAmount'];
    }

    /**
     * Sets orderAmount
     *
     * @param float $orderAmount <pre>订单金额</pre>
     *
     * @return $this
     */
    public function setOrderAmount($orderAmount)
    {
        $this->container['orderAmount'] = $orderAmount;

        return $this;
    }

    /**
     * Gets complateTime
     *
     * @return string
     */
    public function getComplateTime()
    {
        return $this->container['complateTime'];
    }

    /**
     * Sets complateTime
     *
     * @param string $complateTime <pre>完成时间。订单出货成功时返回</pre>
     *
     * @return $this
     */
    public function setComplateTime($complateTime)
    {
        $this->container['complateTime'] = $complateTime;

        return $this;
    }

    /**
     * Gets cancelTime
     *
     * @return string
     */
    public function getCancelTime()
    {
        return $this->container['cancelTime'];
    }

    /**
     * Sets cancelTime
     *
     * @param string $cancelTime <p>订单取消时返回,取消时间</p>
     *
     * @return $this
     */
    public function setCancelTime($cancelTime)
    {
        $this->container['cancelTime'] = $cancelTime;

        return $this;
    }

    /**
     * Gets orderSuccessTime
     *
     * @return string
     */
    public function getOrderSuccessTime()
    {
        return $this->container['orderSuccessTime'];
    }

    /**
     * Sets orderSuccessTime
     *
     * @param string $orderSuccessTime <pre>下单成功时间。下单成功时返回</pre>
     *
     * @return $this
     */
    public function setOrderSuccessTime($orderSuccessTime)
    {
        $this->container['orderSuccessTime'] = $orderSuccessTime;

        return $this;
    }

    /**
     * Gets systemOrderNo
     *
     * @return string
     */
    public function getSystemOrderNo()
    {
        return $this->container['systemOrderNo'];
    }

    /**
     * Sets systemOrderNo
     *
     * @param string $systemOrderNo <pre>系统返回唯一订单号</pre>
     *
     * @return $this
     */
    public function setSystemOrderNo($systemOrderNo)
    {
        $this->container['systemOrderNo'] = $systemOrderNo;

        return $this;
    }

    /**
     * Gets paySuccessTime
     *
     * @return string
     */
    public function getPaySuccessTime()
    {
        return $this->container['paySuccessTime'];
    }

    /**
     * Sets paySuccessTime
     *
     * @param string $paySuccessTime <pre>支付成功时间。支付成功时返回</pre>
     *
     * @return $this
     */
    public function setPaySuccessTime($paySuccessTime)
    {
        $this->container['paySuccessTime'] = $paySuccessTime;

        return $this;
    }

    /**
     * Gets parentMerchantNo
     *
     * @return string
     */
    public function getParentMerchantNo()
    {
        return $this->container['parentMerchantNo'];
    }

    /**
     * Sets parentMerchantNo
     *
     * @param string $parentMerchantNo <p>请求商编</p>
     *
     * @return $this
     */
    public function setParentMerchantNo($parentMerchantNo)
    {
        $this->container['parentMerchantNo'] = $parentMerchantNo;

        return $this;
    }

    /**
     * Gets merchantNo
     *
     * @return string
     */
    public function getMerchantNo()
    {
        return $this->container['merchantNo'];
    }

    /**
     * Sets merchantNo
     *
     * @param string $merchantNo <p>业务商编</p>
     *
     * @return $this
     */
    public function setMerchantNo($merchantNo)
    {
        $this->container['merchantNo'] = $merchantNo;

        return $this;
    }

    /**
     * Gets merchantRequestNo
     *
     * @return string
     */
    public function getMerchantRequestNo()
    {
        return $this->container['merchantRequestNo'];
    }

    /**
     * Sets merchantRequestNo
     *
     * @param string $merchantRequestNo <p>商户订单号</p>
     *
     * @return $this
     */
    public function setMerchantRequestNo($merchantRequestNo)
    {
        $this->container['merchantRequestNo'] = $merchantRequestNo;

        return $this;
    }

    /**
     * Gets parentMerchantRequestNo
     *
     * @return string
     */
    public function getParentMerchantRequestNo()
    {
        return $this->container['parentMerchantRequestNo'];
    }

    /**
     * Sets parentMerchantRequestNo
     *
     * @param string $parentMerchantRequestNo <pre>请求方订单号</pre>
     *
     * @return $this
     */
    public function setParentMerchantRequestNo($parentMerchantRequestNo)
    {
        $this->container['parentMerchantRequestNo'] = $parentMerchantRequestNo;

        return $this;
    }

    /**
     * Gets supplierOrderNo
     *
     * @return string
     */
    public function getSupplierOrderNo()
    {
        return $this->container['supplierOrderNo'];
    }

    /**
     * Sets supplierOrderNo
     *
     * @param string $supplierOrderNo <pre>资源方订单号</pre>
     *
     * @return $this
     */
    public function setSupplierOrderNo($supplierOrderNo)
    {
        $this->container['supplierOrderNo'] = $supplierOrderNo;

        return $this;
    }

    /**
     * Gets trxType
     *
     * @return string
     */
    public function getTrxType()
    {
        return $this->container['trxType'];
    }

    /**
     * Sets trxType
     *
     * @param string $trxType <p>在字段用来表示通知类型是交易还是退款。<br />只有在异步通知结果里该参数才有值</p>
     *
     * @return $this
     */
    public function setTrxType($trxType)
    {
        $this->container['trxType'] = $trxType;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    public function offsetExists($offset)
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed
     */
    public function offsetGet($offset)
    {
        return isset($this->container[$offset]) ? $this->container[$offset] : null;
    }

    /**
     * Sets value based on offset.
     *
     * @param integer $offset Offset
     * @param mixed   $value  Value to be set
     *
     * @return void
     */
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    public function offsetUnset($offset)
    {
        unset($this->container[$offset]);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
            return json_encode(
                ObjectSerializer::sanitizeForSerialization($this),
                JSON_PRETTY_PRINT
            );
        }

        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}


