<?php
/**
 * AlipayEcoMycarParkingChargeinfoSyncModel
 *
 * PHP version 7.4
 *
 * @category Class
 * @package  Alipay\OpenAPISDK
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * 支付宝开放平台API
 *
 * 支付宝开放平台v3协议文档
 *
 * The version of the OpenAPI document: 2023-12-20
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 6.2.1
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace Alipay\OpenAPISDK\Model;

use \ArrayAccess;
use \Alipay\OpenAPISDK\ObjectSerializer;

/**
 * AlipayEcoMycarParkingChargeinfoSyncModel Class Doc Comment
 *
 * @category Class
 * @package  Alipay\OpenAPISDK
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<TKey, TValue>
 * @template TKey int|null
 * @template TValue mixed|null
 */
class AlipayEcoMycarParkingChargeinfoSyncModel implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'businessHours' => 'string',
        'carDaylightAdvancedPrice' => 'string',
        'carDaylightBasePrice' => 'string',
        'carNightAdvancedPrice' => 'string',
        'carNightBasePrice' => 'string',
        'carOnetimePrice' => 'string',
        'dailyPriceUpperbound' => 'string',
        'daylightBusinessHours' => 'string',
        'freePeriod' => 'string',
        'hasChargingPile' => 'string',
        'isCharge' => 'string',
        'nightBusinessHours' => 'string',
        'parkingId' => 'string',
        'parkingSpaceCount' => 'int',
        'remark' => 'string',
        'truckDaylightAdvancedPrice' => 'string',
        'truckDaylightBasePrice' => 'string',
        'truckNightAdvancedPrice' => 'string',
        'truckNightBasePrice' => 'string',
        'truckOnetimePrice' => 'string'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      * @phpstan-var array<string, string|null>
      * @psalm-var array<string, string|null>
      */
    protected static $openAPIFormats = [
        'businessHours' => null,
        'carDaylightAdvancedPrice' => null,
        'carDaylightBasePrice' => null,
        'carNightAdvancedPrice' => null,
        'carNightBasePrice' => null,
        'carOnetimePrice' => null,
        'dailyPriceUpperbound' => null,
        'daylightBusinessHours' => null,
        'freePeriod' => null,
        'hasChargingPile' => null,
        'isCharge' => null,
        'nightBusinessHours' => null,
        'parkingId' => null,
        'parkingSpaceCount' => null,
        'remark' => null,
        'truckDaylightAdvancedPrice' => null,
        'truckDaylightBasePrice' => null,
        'truckNightAdvancedPrice' => null,
        'truckNightBasePrice' => null,
        'truckOnetimePrice' => null
    ];

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

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

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'businessHours' => 'business_hours',
        'carDaylightAdvancedPrice' => 'car_daylight_advanced_price',
        'carDaylightBasePrice' => 'car_daylight_base_price',
        'carNightAdvancedPrice' => 'car_night_advanced_price',
        'carNightBasePrice' => 'car_night_base_price',
        'carOnetimePrice' => 'car_onetime_price',
        'dailyPriceUpperbound' => 'daily_price_upperbound',
        'daylightBusinessHours' => 'daylight_business_hours',
        'freePeriod' => 'free_period',
        'hasChargingPile' => 'has_charging_pile',
        'isCharge' => 'is_charge',
        'nightBusinessHours' => 'night_business_hours',
        'parkingId' => 'parking_id',
        'parkingSpaceCount' => 'parking_space_count',
        'remark' => 'remark',
        'truckDaylightAdvancedPrice' => 'truck_daylight_advanced_price',
        'truckDaylightBasePrice' => 'truck_daylight_base_price',
        'truckNightAdvancedPrice' => 'truck_night_advanced_price',
        'truckNightBasePrice' => 'truck_night_base_price',
        'truckOnetimePrice' => 'truck_onetime_price'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'businessHours' => 'setBusinessHours',
        'carDaylightAdvancedPrice' => 'setCarDaylightAdvancedPrice',
        'carDaylightBasePrice' => 'setCarDaylightBasePrice',
        'carNightAdvancedPrice' => 'setCarNightAdvancedPrice',
        'carNightBasePrice' => 'setCarNightBasePrice',
        'carOnetimePrice' => 'setCarOnetimePrice',
        'dailyPriceUpperbound' => 'setDailyPriceUpperbound',
        'daylightBusinessHours' => 'setDaylightBusinessHours',
        'freePeriod' => 'setFreePeriod',
        'hasChargingPile' => 'setHasChargingPile',
        'isCharge' => 'setIsCharge',
        'nightBusinessHours' => 'setNightBusinessHours',
        'parkingId' => 'setParkingId',
        'parkingSpaceCount' => 'setParkingSpaceCount',
        'remark' => 'setRemark',
        'truckDaylightAdvancedPrice' => 'setTruckDaylightAdvancedPrice',
        'truckDaylightBasePrice' => 'setTruckDaylightBasePrice',
        'truckNightAdvancedPrice' => 'setTruckNightAdvancedPrice',
        'truckNightBasePrice' => 'setTruckNightBasePrice',
        'truckOnetimePrice' => 'setTruckOnetimePrice'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'businessHours' => 'getBusinessHours',
        'carDaylightAdvancedPrice' => 'getCarDaylightAdvancedPrice',
        'carDaylightBasePrice' => 'getCarDaylightBasePrice',
        'carNightAdvancedPrice' => 'getCarNightAdvancedPrice',
        'carNightBasePrice' => 'getCarNightBasePrice',
        'carOnetimePrice' => 'getCarOnetimePrice',
        'dailyPriceUpperbound' => 'getDailyPriceUpperbound',
        'daylightBusinessHours' => 'getDaylightBusinessHours',
        'freePeriod' => 'getFreePeriod',
        'hasChargingPile' => 'getHasChargingPile',
        'isCharge' => 'getIsCharge',
        'nightBusinessHours' => 'getNightBusinessHours',
        'parkingId' => 'getParkingId',
        'parkingSpaceCount' => 'getParkingSpaceCount',
        'remark' => 'getRemark',
        'truckDaylightAdvancedPrice' => 'getTruckDaylightAdvancedPrice',
        'truckDaylightBasePrice' => 'getTruckDaylightBasePrice',
        'truckNightAdvancedPrice' => 'getTruckNightAdvancedPrice',
        'truckNightBasePrice' => 'getTruckNightBasePrice',
        'truckOnetimePrice' => 'getTruckOnetimePrice'
    ];

    /**
     * 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::$openAPIModelName;
    }


    /**
     * 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['businessHours'] = $data['businessHours'] ?? null;
        $this->container['carDaylightAdvancedPrice'] = $data['carDaylightAdvancedPrice'] ?? null;
        $this->container['carDaylightBasePrice'] = $data['carDaylightBasePrice'] ?? null;
        $this->container['carNightAdvancedPrice'] = $data['carNightAdvancedPrice'] ?? null;
        $this->container['carNightBasePrice'] = $data['carNightBasePrice'] ?? null;
        $this->container['carOnetimePrice'] = $data['carOnetimePrice'] ?? null;
        $this->container['dailyPriceUpperbound'] = $data['dailyPriceUpperbound'] ?? null;
        $this->container['daylightBusinessHours'] = $data['daylightBusinessHours'] ?? null;
        $this->container['freePeriod'] = $data['freePeriod'] ?? null;
        $this->container['hasChargingPile'] = $data['hasChargingPile'] ?? null;
        $this->container['isCharge'] = $data['isCharge'] ?? null;
        $this->container['nightBusinessHours'] = $data['nightBusinessHours'] ?? null;
        $this->container['parkingId'] = $data['parkingId'] ?? null;
        $this->container['parkingSpaceCount'] = $data['parkingSpaceCount'] ?? null;
        $this->container['remark'] = $data['remark'] ?? null;
        $this->container['truckDaylightAdvancedPrice'] = $data['truckDaylightAdvancedPrice'] ?? null;
        $this->container['truckDaylightBasePrice'] = $data['truckDaylightBasePrice'] ?? null;
        $this->container['truckNightAdvancedPrice'] = $data['truckNightAdvancedPrice'] ?? null;
        $this->container['truckNightBasePrice'] = $data['truckNightBasePrice'] ?? null;
        $this->container['truckOnetimePrice'] = $data['truckOnetimePrice'] ?? 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 businessHours
     *
     * @return string|null
     */
    public function getBusinessHours()
    {
        return $this->container['businessHours'];
    }

    /**
     * Sets businessHours
     *
     * @param string|null $businessHours 营业时间
     *
     * @return self
     */
    public function setBusinessHours($businessHours)
    {
        $this->container['businessHours'] = $businessHours;

        return $this;
    }

    /**
     * Gets carDaylightAdvancedPrice
     *
     * @return string|null
     */
    public function getCarDaylightAdvancedPrice()
    {
        return $this->container['carDaylightAdvancedPrice'];
    }

    /**
     * Sets carDaylightAdvancedPrice
     *
     * @param string|null $carDaylightAdvancedPrice 小车-白天 非首个计费单元价格
     *
     * @return self
     */
    public function setCarDaylightAdvancedPrice($carDaylightAdvancedPrice)
    {
        $this->container['carDaylightAdvancedPrice'] = $carDaylightAdvancedPrice;

        return $this;
    }

    /**
     * Gets carDaylightBasePrice
     *
     * @return string|null
     */
    public function getCarDaylightBasePrice()
    {
        return $this->container['carDaylightBasePrice'];
    }

    /**
     * Sets carDaylightBasePrice
     *
     * @param string|null $carDaylightBasePrice 小车-白天 首个计费单元价格
     *
     * @return self
     */
    public function setCarDaylightBasePrice($carDaylightBasePrice)
    {
        $this->container['carDaylightBasePrice'] = $carDaylightBasePrice;

        return $this;
    }

    /**
     * Gets carNightAdvancedPrice
     *
     * @return string|null
     */
    public function getCarNightAdvancedPrice()
    {
        return $this->container['carNightAdvancedPrice'];
    }

    /**
     * Sets carNightAdvancedPrice
     *
     * @param string|null $carNightAdvancedPrice 小车-夜间 非首个计费单元价格
     *
     * @return self
     */
    public function setCarNightAdvancedPrice($carNightAdvancedPrice)
    {
        $this->container['carNightAdvancedPrice'] = $carNightAdvancedPrice;

        return $this;
    }

    /**
     * Gets carNightBasePrice
     *
     * @return string|null
     */
    public function getCarNightBasePrice()
    {
        return $this->container['carNightBasePrice'];
    }

    /**
     * Sets carNightBasePrice
     *
     * @param string|null $carNightBasePrice 小车-夜间 首个计费单元价格
     *
     * @return self
     */
    public function setCarNightBasePrice($carNightBasePrice)
    {
        $this->container['carNightBasePrice'] = $carNightBasePrice;

        return $this;
    }

    /**
     * Gets carOnetimePrice
     *
     * @return string|null
     */
    public function getCarOnetimePrice()
    {
        return $this->container['carOnetimePrice'];
    }

    /**
     * Sets carOnetimePrice
     *
     * @param string|null $carOnetimePrice 小车 计次收费价格  xx元 / 次，按次收费的车场填写
     *
     * @return self
     */
    public function setCarOnetimePrice($carOnetimePrice)
    {
        $this->container['carOnetimePrice'] = $carOnetimePrice;

        return $this;
    }

    /**
     * Gets dailyPriceUpperbound
     *
     * @return string|null
     */
    public function getDailyPriceUpperbound()
    {
        return $this->container['dailyPriceUpperbound'];
    }

    /**
     * Sets dailyPriceUpperbound
     *
     * @param string|null $dailyPriceUpperbound 单日停车封顶价格：具体值或“不封顶”
     *
     * @return self
     */
    public function setDailyPriceUpperbound($dailyPriceUpperbound)
    {
        $this->container['dailyPriceUpperbound'] = $dailyPriceUpperbound;

        return $this;
    }

    /**
     * Gets daylightBusinessHours
     *
     * @return string|null
     */
    public function getDaylightBusinessHours()
    {
        return $this->container['daylightBusinessHours'];
    }

    /**
     * Sets daylightBusinessHours
     *
     * @param string|null $daylightBusinessHours 车场白天（收费）营业时间段
     *
     * @return self
     */
    public function setDaylightBusinessHours($daylightBusinessHours)
    {
        $this->container['daylightBusinessHours'] = $daylightBusinessHours;

        return $this;
    }

    /**
     * Gets freePeriod
     *
     * @return string|null
     */
    public function getFreePeriod()
    {
        return $this->container['freePeriod'];
    }

    /**
     * Sets freePeriod
     *
     * @param string|null $freePeriod 单次停车免费时长
     *
     * @return self
     */
    public function setFreePeriod($freePeriod)
    {
        $this->container['freePeriod'] = $freePeriod;

        return $this;
    }

    /**
     * Gets hasChargingPile
     *
     * @return string|null
     */
    public function getHasChargingPile()
    {
        return $this->container['hasChargingPile'];
    }

    /**
     * Sets hasChargingPile
     *
     * @param string|null $hasChargingPile 是否有充电桩: -1 未知,0 否,1 是
     *
     * @return self
     */
    public function setHasChargingPile($hasChargingPile)
    {
        $this->container['hasChargingPile'] = $hasChargingPile;

        return $this;
    }

    /**
     * Gets isCharge
     *
     * @return string|null
     */
    public function getIsCharge()
    {
        return $this->container['isCharge'];
    }

    /**
     * Sets isCharge
     *
     * @param string|null $isCharge 是否收费：-1 未知,0 否,1 是
     *
     * @return self
     */
    public function setIsCharge($isCharge)
    {
        $this->container['isCharge'] = $isCharge;

        return $this;
    }

    /**
     * Gets nightBusinessHours
     *
     * @return string|null
     */
    public function getNightBusinessHours()
    {
        return $this->container['nightBusinessHours'];
    }

    /**
     * Sets nightBusinessHours
     *
     * @param string|null $nightBusinessHours 车场夜间（收费）营业时间段
     *
     * @return self
     */
    public function setNightBusinessHours($nightBusinessHours)
    {
        $this->container['nightBusinessHours'] = $nightBusinessHours;

        return $this;
    }

    /**
     * Gets parkingId
     *
     * @return string|null
     */
    public function getParkingId()
    {
        return $this->container['parkingId'];
    }

    /**
     * Sets parkingId
     *
     * @param string|null $parkingId 停车场ID
     *
     * @return self
     */
    public function setParkingId($parkingId)
    {
        $this->container['parkingId'] = $parkingId;

        return $this;
    }

    /**
     * Gets parkingSpaceCount
     *
     * @return int|null
     */
    public function getParkingSpaceCount()
    {
        return $this->container['parkingSpaceCount'];
    }

    /**
     * Sets parkingSpaceCount
     *
     * @param int|null $parkingSpaceCount 总车位数
     *
     * @return self
     */
    public function setParkingSpaceCount($parkingSpaceCount)
    {
        $this->container['parkingSpaceCount'] = $parkingSpaceCount;

        return $this;
    }

    /**
     * Gets remark
     *
     * @return string|null
     */
    public function getRemark()
    {
        return $this->container['remark'];
    }

    /**
     * Sets remark
     *
     * @param string|null $remark 复杂计费补充描述  收费复杂无法格式化的车场填写，以文本形式表述
     *
     * @return self
     */
    public function setRemark($remark)
    {
        $this->container['remark'] = $remark;

        return $this;
    }

    /**
     * Gets truckDaylightAdvancedPrice
     *
     * @return string|null
     */
    public function getTruckDaylightAdvancedPrice()
    {
        return $this->container['truckDaylightAdvancedPrice'];
    }

    /**
     * Sets truckDaylightAdvancedPrice
     *
     * @param string|null $truckDaylightAdvancedPrice 大车-白天 非首个计费单元价格
     *
     * @return self
     */
    public function setTruckDaylightAdvancedPrice($truckDaylightAdvancedPrice)
    {
        $this->container['truckDaylightAdvancedPrice'] = $truckDaylightAdvancedPrice;

        return $this;
    }

    /**
     * Gets truckDaylightBasePrice
     *
     * @return string|null
     */
    public function getTruckDaylightBasePrice()
    {
        return $this->container['truckDaylightBasePrice'];
    }

    /**
     * Sets truckDaylightBasePrice
     *
     * @param string|null $truckDaylightBasePrice 大车-白天 首个计费单元价格
     *
     * @return self
     */
    public function setTruckDaylightBasePrice($truckDaylightBasePrice)
    {
        $this->container['truckDaylightBasePrice'] = $truckDaylightBasePrice;

        return $this;
    }

    /**
     * Gets truckNightAdvancedPrice
     *
     * @return string|null
     */
    public function getTruckNightAdvancedPrice()
    {
        return $this->container['truckNightAdvancedPrice'];
    }

    /**
     * Sets truckNightAdvancedPrice
     *
     * @param string|null $truckNightAdvancedPrice 大车-夜间 非首个计费单元价格
     *
     * @return self
     */
    public function setTruckNightAdvancedPrice($truckNightAdvancedPrice)
    {
        $this->container['truckNightAdvancedPrice'] = $truckNightAdvancedPrice;

        return $this;
    }

    /**
     * Gets truckNightBasePrice
     *
     * @return string|null
     */
    public function getTruckNightBasePrice()
    {
        return $this->container['truckNightBasePrice'];
    }

    /**
     * Sets truckNightBasePrice
     *
     * @param string|null $truckNightBasePrice 大车-夜间 首个计费单元价格
     *
     * @return self
     */
    public function setTruckNightBasePrice($truckNightBasePrice)
    {
        $this->container['truckNightBasePrice'] = $truckNightBasePrice;

        return $this;
    }

    /**
     * Gets truckOnetimePrice
     *
     * @return string|null
     */
    public function getTruckOnetimePrice()
    {
        return $this->container['truckOnetimePrice'];
    }

    /**
     * Sets truckOnetimePrice
     *
     * @param string|null $truckOnetimePrice 大车 计次收费价格  xx元 / 次，按次收费的车场填写
     *
     * @return self
     */
    public function setTruckOnetimePrice($truckOnetimePrice)
    {
        $this->container['truckOnetimePrice'] = $truckOnetimePrice;

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

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

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

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

    /**
     * Serializes the object to a value that can be serialized natively by json_encode().
     * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
     *
     * @return mixed Returns data which can be serialized by json_encode(), which is a value
     * of any type other than a resource.
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
       return ObjectSerializer::sanitizeForSerialization($this);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        return json_encode(
            ObjectSerializer::sanitizeForSerialization($this),
            JSON_PRETTY_PRINT
        );
    }

    /**
     * Gets a header-safe presentation of the object
     *
     * @return string
     */
    public function toHeaderValue()
    {
        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}


