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

/**
 * pos
 *
 * <p>pos对外接口</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\Pos\Model;

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

/**
 * InstallPosWithProductPreShopParam Class Doc Comment
 *
 * @category Class
 * @description 需要新增网点或者修改网点时必填
 * @package  Yeepay\Yop\Sdk\
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class InstallPosWithProductPreShopParam implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerTypes = [
        'name' => 'string',
        'createTime' => 'string',
        'address' => 'string',
        'linkman' => 'string',
        'phone' => 'string',
        'mobile' => 'string',
        'orderCode' => 'string',
        'status' => 'string',
        'province' => 'string',
        'city' => 'string',
        'county' => 'string',
        'bindphone' => 'string',
        'isupdate' => 'bool',
        'isNew' => 'bool',
        'default' => 'bool'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $swaggerFormats = [
        'name' => null,
        'createTime' => 'date-time',
        'address' => null,
        'linkman' => null,
        'phone' => null,
        'mobile' => null,
        'orderCode' => null,
        'status' => null,
        'province' => null,
        'city' => null,
        'county' => null,
        'bindphone' => null,
        'isupdate' => null,
        'isNew' => null,
        'default' => 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 = [
        'name' => 'name',
        'createTime' => 'createTime',
        'address' => 'address',
        'linkman' => 'linkman',
        'phone' => 'phone',
        'mobile' => 'mobile',
        'orderCode' => 'orderCode',
        'status' => 'status',
        'province' => 'province',
        'city' => 'city',
        'county' => 'county',
        'bindphone' => 'bindphone',
        'isupdate' => 'isupdate',
        'isNew' => 'isNew',
        'default' => 'default'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'name' => 'setName',
        'createTime' => 'setCreateTime',
        'address' => 'setAddress',
        'linkman' => 'setLinkman',
        'phone' => 'setPhone',
        'mobile' => 'setMobile',
        'orderCode' => 'setOrderCode',
        'status' => 'setStatus',
        'province' => 'setProvince',
        'city' => 'setCity',
        'county' => 'setCounty',
        'bindphone' => 'setBindphone',
        'isupdate' => 'setIsupdate',
        'isNew' => 'setIsNew',
        'default' => 'setDefault'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'name' => 'getName',
        'createTime' => 'getCreateTime',
        'address' => 'getAddress',
        'linkman' => 'getLinkman',
        'phone' => 'getPhone',
        'mobile' => 'getMobile',
        'orderCode' => 'getOrderCode',
        'status' => 'getStatus',
        'province' => 'getProvince',
        'city' => 'getCity',
        'county' => 'getCounty',
        'bindphone' => 'getBindphone',
        'isupdate' => 'getIsupdate',
        'isNew' => 'getIsNew',
        'default' => 'getDefault'
    ];

    /**
     * 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['name'] = isset($data['name']) ? $data['name'] : null;
        $this->container['createTime'] = isset($data['createTime']) ? $data['createTime'] : null;
        $this->container['address'] = isset($data['address']) ? $data['address'] : null;
        $this->container['linkman'] = isset($data['linkman']) ? $data['linkman'] : null;
        $this->container['phone'] = isset($data['phone']) ? $data['phone'] : null;
        $this->container['mobile'] = isset($data['mobile']) ? $data['mobile'] : null;
        $this->container['orderCode'] = isset($data['orderCode']) ? $data['orderCode'] : null;
        $this->container['status'] = isset($data['status']) ? $data['status'] : null;
        $this->container['province'] = isset($data['province']) ? $data['province'] : null;
        $this->container['city'] = isset($data['city']) ? $data['city'] : null;
        $this->container['county'] = isset($data['county']) ? $data['county'] : null;
        $this->container['bindphone'] = isset($data['bindphone']) ? $data['bindphone'] : null;
        $this->container['isupdate'] = isset($data['isupdate']) ? $data['isupdate'] : null;
        $this->container['isNew'] = isset($data['isNew']) ? $data['isNew'] : null;
        $this->container['default'] = isset($data['default']) ? $data['default'] : 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 name
     *
     * @return string
     */
    public function getName()
    {
        return $this->container['name'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets isupdate
     *
     * @return bool
     */
    public function getIsupdate()
    {
        return $this->container['isupdate'];
    }

    /**
     * Sets isupdate
     *
     * @param bool $isupdate isupdate
     *
     * @return $this
     */
    public function setIsupdate($isupdate)
    {
        $this->container['isupdate'] = $isupdate;

        return $this;
    }

    /**
     * Gets isNew
     *
     * @return bool
     */
    public function getIsNew()
    {
        return $this->container['isNew'];
    }

    /**
     * Sets isNew
     *
     * @param bool $isNew isNew
     *
     * @return $this
     */
    public function setIsNew($isNew)
    {
        $this->container['isNew'] = $isNew;

        return $this;
    }

    /**
     * Gets default
     *
     * @return bool
     */
    public function getDefault()
    {
        return $this->container['default'];
    }

    /**
     * Sets default
     *
     * @param bool $default default
     *
     * @return $this
     */
    public function setDefault($default)
    {
        $this->container['default'] = $default;

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


