v3/src/Model/AlipayOpenPublicInfoModifyModel.php
<?php
/**
 * AlipayOpenPublicInfoModifyModel
 *
 * 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: 2025-08-26
 * 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;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'appName' => 'string',
        'authPic' => 'string',
        'backgroundUrl' => 'string',
        'introduction' => 'string',
        'licenseUrl' => 'string',
        'logoUrl' => 'string',
        'notifyUrl' => 'string',
        'publicGreeting' => 'string',
        'shopPics' => '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 = [
        'appName' => null,
        'authPic' => null,
        'backgroundUrl' => null,
        'introduction' => null,
        'licenseUrl' => null,
        'logoUrl' => null,
        'notifyUrl' => null,
        'publicGreeting' => null,
        'shopPics' => 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 = [
        'appName' => 'app_name',
        'authPic' => 'auth_pic',
        'backgroundUrl' => 'background_url',
        'introduction' => 'introduction',
        'licenseUrl' => 'license_url',
        'logoUrl' => 'logo_url',
        'notifyUrl' => 'notify_url',
        'publicGreeting' => 'public_greeting',
        'shopPics' => 'shop_pics'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'appName' => 'setAppName',
        'authPic' => 'setAuthPic',
        'backgroundUrl' => 'setBackgroundUrl',
        'introduction' => 'setIntroduction',
        'licenseUrl' => 'setLicenseUrl',
        'logoUrl' => 'setLogoUrl',
        'notifyUrl' => 'setNotifyUrl',
        'publicGreeting' => 'setPublicGreeting',
        'shopPics' => 'setShopPics'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'appName' => 'getAppName',
        'authPic' => 'getAuthPic',
        'backgroundUrl' => 'getBackgroundUrl',
        'introduction' => 'getIntroduction',
        'licenseUrl' => 'getLicenseUrl',
        'logoUrl' => 'getLogoUrl',
        'notifyUrl' => 'getNotifyUrl',
        'publicGreeting' => 'getPublicGreeting',
        'shopPics' => 'getShopPics'
    ];

    /**
     * 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['appName'] = $data['appName'] ?? null;
        $this->container['authPic'] = $data['authPic'] ?? null;
        $this->container['backgroundUrl'] = $data['backgroundUrl'] ?? null;
        $this->container['introduction'] = $data['introduction'] ?? null;
        $this->container['licenseUrl'] = $data['licenseUrl'] ?? null;
        $this->container['logoUrl'] = $data['logoUrl'] ?? null;
        $this->container['notifyUrl'] = $data['notifyUrl'] ?? null;
        $this->container['publicGreeting'] = $data['publicGreeting'] ?? null;
        $this->container['shopPics'] = $data['shopPics'] ?? 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 appName
     *
     * @return string|null
     */
    public function getAppName()
    {
        return $this->container['appName'];
    }

    /**
     * Sets appName
     *
     * @param string|null $appName 生活号名称，2-20个字之间。注意： * 不得含有违反法律法规和公序良俗的相关信息； * 不得侵害他人名誉权、知识产权、商业秘密等合法权利； * 不得以太过广泛的、或产品、行业词组来命名，如：女装、皮革批发； * 不得以实名认证的媒体资质账号创建服务窗，或媒体相关名称命名服务窗，如：XX电视台、XX杂志等。
     *
     * @return self
     */
    public function setAppName($appName)
    {
        $this->container['appName'] = $appName;

        return $this;
    }

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

    /**
     * Sets authPic
     *
     * @param string|null $authPic 授权运营书图片地址，企业商户若为被经营方授权，需上传加盖公章的扫描件。支持 .jpg、 .jpeg、 .png 格式，需小于1M。使用 <a href=\"https://opendocs.alipay.com/apis/api_3/alipay.offline.material.image.upload\">alipay.offline.material.image.upload</a>(上传门店照片和视频接口)上传图片后，将得到的image_url回填与此处。
     *
     * @return self
     */
    public function setAuthPic($authPic)
    {
        $this->container['authPic'] = $authPic;

        return $this;
    }

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

    /**
     * Sets backgroundUrl
     *
     * @param string|null $backgroundUrl 背景图片地址，建议尺寸 1600 x 1000px，支持.jpg .jpeg .png格式，小于1M。使用 <a href=\"https://opendocs.alipay.com/apis/api_3/alipay.offline.material.image.upload\">alipay.offline.material.image.upload</a>(上传门店照片和视频接口)上传图片后，将得到的image_url回填与此处。
     *
     * @return self
     */
    public function setBackgroundUrl($backgroundUrl)
    {
        $this->container['backgroundUrl'] = $backgroundUrl;

        return $this;
    }

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

    /**
     * Sets introduction
     *
     * @param string|null $introduction 简介
     *
     * @return self
     */
    public function setIntroduction($introduction)
    {
        $this->container['introduction'] = $introduction;

        return $this;
    }

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

    /**
     * Sets licenseUrl
     *
     * @param string|null $licenseUrl 营业执照地址，建议尺寸 320*320 px，支持 .jpg、 .jpeg、 .png 格式，需小于1M。 使用 <a href=\"https://opendocs.alipay.com/apis/api_3/alipay.offline.material.image.upload\">alipay.offline.material.image.upload</a>(上传门店照片和视频接口)上传图片后，将得到的image_url回填与此处。
     *
     * @return self
     */
    public function setLicenseUrl($licenseUrl)
    {
        $this->container['licenseUrl'] = $licenseUrl;

        return $this;
    }

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

    /**
     * Sets logoUrl
     *
     * @param string|null $logoUrl 生活号头像地址，建议尺寸 320*320 px，支持 .jpg、 .jpeg、 .png 格式，需小于1M。 使用 <a href=\"https://opendocs.alipay.com/apis/api_3/alipay.offline.material.image.upload\">alipay.offline.material.image.upload</a>(上传门店照片和视频接口)上传图片后，将得到的image_url回填与此处。
     *
     * @return self
     */
    public function setLogoUrl($logoUrl)
    {
        $this->container['logoUrl'] = $logoUrl;

        return $this;
    }

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

    /**
     * Sets notifyUrl
     *
     * @param string|null $notifyUrl 通知地址
     *
     * @return self
     */
    public function setNotifyUrl($notifyUrl)
    {
        $this->container['notifyUrl'] = $notifyUrl;

        return $this;
    }

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

    /**
     * Sets publicGreeting
     *
     * @param string|null $publicGreeting 欢迎语
     *
     * @return self
     */
    public function setPublicGreeting($publicGreeting)
    {
        $this->container['publicGreeting'] = $publicGreeting;

        return $this;
    }

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

    /**
     * Sets shopPics
     *
     * @param string[]|null $shopPics 门店照片地址，支持 .jpg、 .jpeg、 .png 格式，需小于1M。 使用 <a href=\"https://opendocs.alipay.com/apis/api_3/alipay.offline.material.image.upload\">alipay.offline.material.image.upload</a>(上传门店照片和视频接口)上传图片后，将得到的image_url回填与此处。
     *
     * @return self
     */
    public function setShopPics($shopPics)
    {
        $this->container['shopPics'] = $shopPics;

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


