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

/**
 * 发票服务
 *
 * <p>基于中台商户实际开票场景，提供给商户维护开票规则、票面信息，查询票面信息，申请开具手续费发票，查询开票记录，查询实收手续费金额的服务</p>
 *
 * 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\Invoice\Model;

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

/**
 * ApplyIssueInvoiceDtoResult Class Doc Comment
 *
 * @category Class
 * @package  Yeepay\Yop\Sdk\
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class ApplyIssueInvoiceDtoResult implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'totalPriceTax' => 'float',
        'invoiceStatus' => 'string',
        'isExpress' => 'string',
        'pdfUrl' => 'string',
        'pdfUrlCh' => 'string',
        'log' => 'string',
        'expressCompany' => 'string',
        'expressNumber' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'totalPriceTax' => null,
        'invoiceStatus' => null,
        'isExpress' => null,
        'pdfUrl' => null,
        'pdfUrlCh' => null,
        'log' => null,
        'expressCompany' => null,
        'expressNumber' => 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 = [
        'totalPriceTax' => 'totalPriceTax',
        'invoiceStatus' => 'invoiceStatus',
        'isExpress' => 'isExpress',
        'pdfUrl' => 'pdfUrl',
        'pdfUrlCh' => 'pdfUrlCh',
        'log' => 'log',
        'expressCompany' => 'expressCompany',
        'expressNumber' => 'expressNumber'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'totalPriceTax' => 'setTotalPriceTax',
        'invoiceStatus' => 'setInvoiceStatus',
        'isExpress' => 'setIsExpress',
        'pdfUrl' => 'setPdfUrl',
        'pdfUrlCh' => 'setPdfUrlCh',
        'log' => 'setLog',
        'expressCompany' => 'setExpressCompany',
        'expressNumber' => 'setExpressNumber'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'totalPriceTax' => 'getTotalPriceTax',
        'invoiceStatus' => 'getInvoiceStatus',
        'isExpress' => 'getIsExpress',
        'pdfUrl' => 'getPdfUrl',
        'pdfUrlCh' => 'getPdfUrlCh',
        'log' => 'getLog',
        'expressCompany' => 'getExpressCompany',
        'expressNumber' => 'getExpressNumber'
    ];

    /**
     * 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['totalPriceTax'] = isset($data['totalPriceTax']) ? $data['totalPriceTax'] : null;
        $this->container['invoiceStatus'] = isset($data['invoiceStatus']) ? $data['invoiceStatus'] : null;
        $this->container['isExpress'] = isset($data['isExpress']) ? $data['isExpress'] : null;
        $this->container['pdfUrl'] = isset($data['pdfUrl']) ? $data['pdfUrl'] : null;
        $this->container['pdfUrlCh'] = isset($data['pdfUrlCh']) ? $data['pdfUrlCh'] : null;
        $this->container['log'] = isset($data['log']) ? $data['log'] : null;
        $this->container['expressCompany'] = isset($data['expressCompany']) ? $data['expressCompany'] : null;
        $this->container['expressNumber'] = isset($data['expressNumber']) ? $data['expressNumber'] : null;
    }

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

        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 totalPriceTax
     *
     * @return float
     */
    public function getTotalPriceTax()
    {
        return $this->container['totalPriceTax'];
    }

    /**
     * Sets totalPriceTax
     *
     * @param float $totalPriceTax 手续费
     *
     * @return $this
     */
    public function setTotalPriceTax($totalPriceTax)
    {
        $this->container['totalPriceTax'] = $totalPriceTax;

        return $this;
    }

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

    /**
     * Sets invoiceStatus
     *
     * @param string $invoiceStatus 开票状态
     *
     * @return $this
     */
    public function setInvoiceStatus($invoiceStatus)
    {
        $this->container['invoiceStatus'] = $invoiceStatus;

        return $this;
    }

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

    /**
     * Sets isExpress
     *
     * @param string $isExpress 是否邮寄
     *
     * @return $this
     */
    public function setIsExpress($isExpress)
    {
        $this->container['isExpress'] = $isExpress;

        return $this;
    }

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

    /**
     * Sets pdfUrl
     *
     * @param string $pdfUrl 已开发票地址
     *
     * @return $this
     */
    public function setPdfUrl($pdfUrl)
    {
        $this->container['pdfUrl'] = $pdfUrl;

        return $this;
    }

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

    /**
     * Sets pdfUrlCh
     *
     * @param string $pdfUrlCh 冲红发票地址
     *
     * @return $this
     */
    public function setPdfUrlCh($pdfUrlCh)
    {
        $this->container['pdfUrlCh'] = $pdfUrlCh;

        return $this;
    }

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

    /**
     * Sets log
     *
     * @param string $log 失败原因
     *
     * @return $this
     */
    public function setLog($log)
    {
        $this->container['log'] = $log;

        return $this;
    }

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

    /**
     * Sets expressCompany
     *
     * @param string $expressCompany 快递公司
     *
     * @return $this
     */
    public function setExpressCompany($expressCompany)
    {
        $this->container['expressCompany'] = $expressCompany;

        return $this;
    }

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

    /**
     * Sets expressNumber
     *
     * @param string $expressNumber 快递单号
     *
     * @return $this
     */
    public function setExpressNumber($expressNumber)
    {
        $this->container['expressNumber'] = $expressNumber;

        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));
    }
}


