<?php
/**
 * AlipayOpenMiniTipsStatisticQueryResponseModel
 *
 * 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;

/**
 * AlipayOpenMiniTipsStatisticQueryResponseModel 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 AlipayOpenMiniTipsStatisticQueryResponseModel implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'appCollectCnt' => 'int',
        'appUv' => 'int',
        'deliveryContent' => 'string',
        'deliveryId' => 'string',
        'tipsCollectRate' => 'string',
        'tipsCollectUv' => 'int',
        'tipsExpoUv' => 'int',
        'totalAppCollectCnt' => 'int',
        'totalAppUv' => 'int',
        'totalTipsCollectRate' => 'string',
        'totalTipsCollectUv' => 'int',
        'totalTipsExpoUv' => 'int'
    ];

    /**
      * 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 = [
        'appCollectCnt' => null,
        'appUv' => null,
        'deliveryContent' => null,
        'deliveryId' => null,
        'tipsCollectRate' => null,
        'tipsCollectUv' => null,
        'tipsExpoUv' => null,
        'totalAppCollectCnt' => null,
        'totalAppUv' => null,
        'totalTipsCollectRate' => null,
        'totalTipsCollectUv' => null,
        'totalTipsExpoUv' => 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 = [
        'appCollectCnt' => 'app_collect_cnt',
        'appUv' => 'app_uv',
        'deliveryContent' => 'delivery_content',
        'deliveryId' => 'delivery_id',
        'tipsCollectRate' => 'tips_collect_rate',
        'tipsCollectUv' => 'tips_collect_uv',
        'tipsExpoUv' => 'tips_expo_uv',
        'totalAppCollectCnt' => 'total_app_collect_cnt',
        'totalAppUv' => 'total_app_uv',
        'totalTipsCollectRate' => 'total_tips_collect_rate',
        'totalTipsCollectUv' => 'total_tips_collect_uv',
        'totalTipsExpoUv' => 'total_tips_expo_uv'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'appCollectCnt' => 'setAppCollectCnt',
        'appUv' => 'setAppUv',
        'deliveryContent' => 'setDeliveryContent',
        'deliveryId' => 'setDeliveryId',
        'tipsCollectRate' => 'setTipsCollectRate',
        'tipsCollectUv' => 'setTipsCollectUv',
        'tipsExpoUv' => 'setTipsExpoUv',
        'totalAppCollectCnt' => 'setTotalAppCollectCnt',
        'totalAppUv' => 'setTotalAppUv',
        'totalTipsCollectRate' => 'setTotalTipsCollectRate',
        'totalTipsCollectUv' => 'setTotalTipsCollectUv',
        'totalTipsExpoUv' => 'setTotalTipsExpoUv'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'appCollectCnt' => 'getAppCollectCnt',
        'appUv' => 'getAppUv',
        'deliveryContent' => 'getDeliveryContent',
        'deliveryId' => 'getDeliveryId',
        'tipsCollectRate' => 'getTipsCollectRate',
        'tipsCollectUv' => 'getTipsCollectUv',
        'tipsExpoUv' => 'getTipsExpoUv',
        'totalAppCollectCnt' => 'getTotalAppCollectCnt',
        'totalAppUv' => 'getTotalAppUv',
        'totalTipsCollectRate' => 'getTotalTipsCollectRate',
        'totalTipsCollectUv' => 'getTotalTipsCollectUv',
        'totalTipsExpoUv' => 'getTotalTipsExpoUv'
    ];

    /**
     * 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['appCollectCnt'] = $data['appCollectCnt'] ?? null;
        $this->container['appUv'] = $data['appUv'] ?? null;
        $this->container['deliveryContent'] = $data['deliveryContent'] ?? null;
        $this->container['deliveryId'] = $data['deliveryId'] ?? null;
        $this->container['tipsCollectRate'] = $data['tipsCollectRate'] ?? null;
        $this->container['tipsCollectUv'] = $data['tipsCollectUv'] ?? null;
        $this->container['tipsExpoUv'] = $data['tipsExpoUv'] ?? null;
        $this->container['totalAppCollectCnt'] = $data['totalAppCollectCnt'] ?? null;
        $this->container['totalAppUv'] = $data['totalAppUv'] ?? null;
        $this->container['totalTipsCollectRate'] = $data['totalTipsCollectRate'] ?? null;
        $this->container['totalTipsCollectUv'] = $data['totalTipsCollectUv'] ?? null;
        $this->container['totalTipsExpoUv'] = $data['totalTipsExpoUv'] ?? 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 appCollectCnt
     *
     * @return int|null
     */
    public function getAppCollectCnt()
    {
        return $this->container['appCollectCnt'];
    }

    /**
     * Sets appCollectCnt
     *
     * @param int|null $appCollectCnt 昨日（接口调用当日的前一天）小程序收藏人数，时间内未创建投放活动，则响应时不传出参数。
     *
     * @return self
     */
    public function setAppCollectCnt($appCollectCnt)
    {
        $this->container['appCollectCnt'] = $appCollectCnt;

        return $this;
    }

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

    /**
     * Sets appUv
     *
     * @param int|null $appUv 昨日（接口调用当日的前一天）小程序访问人数。当小程序日访问量为0，或以活动维度查询，或时间内未创建投放活动，则响应时不传出参数。
     *
     * @return self
     */
    public function setAppUv($appUv)
    {
        $this->container['appUv'] = $appUv;

        return $this;
    }

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

    /**
     * Sets deliveryContent
     *
     * @param string|null $deliveryContent 收藏文案内容（仅以app维度查询时为空）,仅活动维度查询成功时返回。
     *
     * @return self
     */
    public function setDeliveryContent($deliveryContent)
    {
        $this->container['deliveryContent'] = $deliveryContent;

        return $this;
    }

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

    /**
     * Sets deliveryId
     *
     * @param string|null $deliveryId 收藏引导投放活动ID（仅以app维度查询时为空）,仅活动维度查询成功时返回。
     *
     * @return self
     */
    public function setDeliveryId($deliveryId)
    {
        $this->container['deliveryId'] = $deliveryId;

        return $this;
    }

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

    /**
     * Sets tipsCollectRate
     *
     * @param string|null $tipsCollectRate 昨日（接口调用当日的前一天）收藏引导文案收藏转化率，数据为小数字符串类型，取小数点后两位，单位为百分比。小程序曝光数为0，或时间内未创建投放活动，则响应时不传出参数。
     *
     * @return self
     */
    public function setTipsCollectRate($tipsCollectRate)
    {
        $this->container['tipsCollectRate'] = $tipsCollectRate;

        return $this;
    }

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

    /**
     * Sets tipsCollectUv
     *
     * @param int|null $tipsCollectUv 昨日（接口调用当日的前一天）收藏引导文案收藏用户数，时间内未创建投放活动，则响应时不传出参数。
     *
     * @return self
     */
    public function setTipsCollectUv($tipsCollectUv)
    {
        $this->container['tipsCollectUv'] = $tipsCollectUv;

        return $this;
    }

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

    /**
     * Sets tipsExpoUv
     *
     * @param int|null $tipsExpoUv 昨日（接口调用当日的前一天）收藏引导文案曝光用户数，时间内未创建投放活动，则响应时不传出参数。
     *
     * @return self
     */
    public function setTipsExpoUv($tipsExpoUv)
    {
        $this->container['tipsExpoUv'] = $tipsExpoUv;

        return $this;
    }

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

    /**
     * Sets totalAppCollectCnt
     *
     * @param int|null $totalAppCollectCnt 时间段内累计小程序收藏人数，时间内未创建投放活动，则响应时不传出参数。
     *
     * @return self
     */
    public function setTotalAppCollectCnt($totalAppCollectCnt)
    {
        $this->container['totalAppCollectCnt'] = $totalAppCollectCnt;

        return $this;
    }

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

    /**
     * Sets totalAppUv
     *
     * @param int|null $totalAppUv 时间段内累计小程序访问人数。当小程序日访问量为0，或以活动维度查询，或时间内未创建投放活动，则响应时不传出参数。
     *
     * @return self
     */
    public function setTotalAppUv($totalAppUv)
    {
        $this->container['totalAppUv'] = $totalAppUv;

        return $this;
    }

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

    /**
     * Sets totalTipsCollectRate
     *
     * @param string|null $totalTipsCollectRate 时间段内收藏引导文案收藏转化率，数据为小数字符串类型，取小数点后两位，单位为百分比。小程序曝光数为0，或时间内未创建投放活动，则响应时不传出参数。
     *
     * @return self
     */
    public function setTotalTipsCollectRate($totalTipsCollectRate)
    {
        $this->container['totalTipsCollectRate'] = $totalTipsCollectRate;

        return $this;
    }

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

    /**
     * Sets totalTipsCollectUv
     *
     * @param int|null $totalTipsCollectUv 时间段内累计收藏引导文案收藏用户数，时间内未创建投放活动，则响应时不传出参数。
     *
     * @return self
     */
    public function setTotalTipsCollectUv($totalTipsCollectUv)
    {
        $this->container['totalTipsCollectUv'] = $totalTipsCollectUv;

        return $this;
    }

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

    /**
     * Sets totalTipsExpoUv
     *
     * @param int|null $totalTipsExpoUv 时间段内累计收藏引导文案曝光用户数，仅当小程序/活动投放活动时返回。时间内未创建投放活动，则响应时不传出参数。
     *
     * @return self
     */
    public function setTotalTipsExpoUv($totalTipsExpoUv)
    {
        $this->container['totalTipsExpoUv'] = $totalTipsExpoUv;

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


