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

/**
 * Magento Community
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2.3
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 6.0.0
 */

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

namespace Magento2\Model;

use \ArrayAccess;
use \Magento2\ObjectSerializer;

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

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $openAPIModelName = 'store-data-store-config-interface';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'id' => 'int',
        'code' => 'string',
        'website_id' => 'int',
        'locale' => 'string',
        'base_currency_code' => 'string',
        'default_display_currency_code' => 'string',
        'timezone' => 'string',
        'weight_unit' => 'string',
        'base_url' => 'string',
        'base_link_url' => 'string',
        'base_static_url' => 'string',
        'base_media_url' => 'string',
        'secure_base_url' => 'string',
        'secure_base_link_url' => 'string',
        'secure_base_static_url' => 'string',
        'secure_base_media_url' => 'string',
        'extension_attributes' => 'object'
    ];

    /**
      * 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 = [
        'id' => null,
        'code' => null,
        'website_id' => null,
        'locale' => null,
        'base_currency_code' => null,
        'default_display_currency_code' => null,
        'timezone' => null,
        'weight_unit' => null,
        'base_url' => null,
        'base_link_url' => null,
        'base_static_url' => null,
        'base_media_url' => null,
        'secure_base_url' => null,
        'secure_base_link_url' => null,
        'secure_base_static_url' => null,
        'secure_base_media_url' => null,
        'extension_attributes' => 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 = [
        'id' => 'id',
        'code' => 'code',
        'website_id' => 'website_id',
        'locale' => 'locale',
        'base_currency_code' => 'base_currency_code',
        'default_display_currency_code' => 'default_display_currency_code',
        'timezone' => 'timezone',
        'weight_unit' => 'weight_unit',
        'base_url' => 'base_url',
        'base_link_url' => 'base_link_url',
        'base_static_url' => 'base_static_url',
        'base_media_url' => 'base_media_url',
        'secure_base_url' => 'secure_base_url',
        'secure_base_link_url' => 'secure_base_link_url',
        'secure_base_static_url' => 'secure_base_static_url',
        'secure_base_media_url' => 'secure_base_media_url',
        'extension_attributes' => 'extension_attributes'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'id' => 'setId',
        'code' => 'setCode',
        'website_id' => 'setWebsiteId',
        'locale' => 'setLocale',
        'base_currency_code' => 'setBaseCurrencyCode',
        'default_display_currency_code' => 'setDefaultDisplayCurrencyCode',
        'timezone' => 'setTimezone',
        'weight_unit' => 'setWeightUnit',
        'base_url' => 'setBaseUrl',
        'base_link_url' => 'setBaseLinkUrl',
        'base_static_url' => 'setBaseStaticUrl',
        'base_media_url' => 'setBaseMediaUrl',
        'secure_base_url' => 'setSecureBaseUrl',
        'secure_base_link_url' => 'setSecureBaseLinkUrl',
        'secure_base_static_url' => 'setSecureBaseStaticUrl',
        'secure_base_media_url' => 'setSecureBaseMediaUrl',
        'extension_attributes' => 'setExtensionAttributes'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'id' => 'getId',
        'code' => 'getCode',
        'website_id' => 'getWebsiteId',
        'locale' => 'getLocale',
        'base_currency_code' => 'getBaseCurrencyCode',
        'default_display_currency_code' => 'getDefaultDisplayCurrencyCode',
        'timezone' => 'getTimezone',
        'weight_unit' => 'getWeightUnit',
        'base_url' => 'getBaseUrl',
        'base_link_url' => 'getBaseLinkUrl',
        'base_static_url' => 'getBaseStaticUrl',
        'base_media_url' => 'getBaseMediaUrl',
        'secure_base_url' => 'getSecureBaseUrl',
        'secure_base_link_url' => 'getSecureBaseLinkUrl',
        'secure_base_static_url' => 'getSecureBaseStaticUrl',
        'secure_base_media_url' => 'getSecureBaseMediaUrl',
        'extension_attributes' => 'getExtensionAttributes'
    ];

    /**
     * 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['id'] = $data['id'] ?? null;
        $this->container['code'] = $data['code'] ?? null;
        $this->container['website_id'] = $data['website_id'] ?? null;
        $this->container['locale'] = $data['locale'] ?? null;
        $this->container['base_currency_code'] = $data['base_currency_code'] ?? null;
        $this->container['default_display_currency_code'] = $data['default_display_currency_code'] ?? null;
        $this->container['timezone'] = $data['timezone'] ?? null;
        $this->container['weight_unit'] = $data['weight_unit'] ?? null;
        $this->container['base_url'] = $data['base_url'] ?? null;
        $this->container['base_link_url'] = $data['base_link_url'] ?? null;
        $this->container['base_static_url'] = $data['base_static_url'] ?? null;
        $this->container['base_media_url'] = $data['base_media_url'] ?? null;
        $this->container['secure_base_url'] = $data['secure_base_url'] ?? null;
        $this->container['secure_base_link_url'] = $data['secure_base_link_url'] ?? null;
        $this->container['secure_base_static_url'] = $data['secure_base_static_url'] ?? null;
        $this->container['secure_base_media_url'] = $data['secure_base_media_url'] ?? null;
        $this->container['extension_attributes'] = $data['extension_attributes'] ?? null;
    }

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

        if ($this->container['id'] === null) {
            $invalidProperties[] = "'id' can't be null";
        }
        if ($this->container['code'] === null) {
            $invalidProperties[] = "'code' can't be null";
        }
        if ($this->container['website_id'] === null) {
            $invalidProperties[] = "'website_id' can't be null";
        }
        if ($this->container['locale'] === null) {
            $invalidProperties[] = "'locale' can't be null";
        }
        if ($this->container['base_currency_code'] === null) {
            $invalidProperties[] = "'base_currency_code' can't be null";
        }
        if ($this->container['default_display_currency_code'] === null) {
            $invalidProperties[] = "'default_display_currency_code' can't be null";
        }
        if ($this->container['timezone'] === null) {
            $invalidProperties[] = "'timezone' can't be null";
        }
        if ($this->container['weight_unit'] === null) {
            $invalidProperties[] = "'weight_unit' can't be null";
        }
        if ($this->container['base_url'] === null) {
            $invalidProperties[] = "'base_url' can't be null";
        }
        if ($this->container['base_link_url'] === null) {
            $invalidProperties[] = "'base_link_url' can't be null";
        }
        if ($this->container['base_static_url'] === null) {
            $invalidProperties[] = "'base_static_url' can't be null";
        }
        if ($this->container['base_media_url'] === null) {
            $invalidProperties[] = "'base_media_url' can't be null";
        }
        if ($this->container['secure_base_url'] === null) {
            $invalidProperties[] = "'secure_base_url' can't be null";
        }
        if ($this->container['secure_base_link_url'] === null) {
            $invalidProperties[] = "'secure_base_link_url' can't be null";
        }
        if ($this->container['secure_base_static_url'] === null) {
            $invalidProperties[] = "'secure_base_static_url' can't be null";
        }
        if ($this->container['secure_base_media_url'] === null) {
            $invalidProperties[] = "'secure_base_media_url' can't be null";
        }
        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 id
     *
     * @return int
     */
    public function getId()
    {
        return $this->container['id'];
    }

    /**
     * Sets id
     *
     * @param int $id Store id
     *
     * @return self
     */
    public function setId($id)
    {
        $this->container['id'] = $id;

        return $this;
    }

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

    /**
     * Sets code
     *
     * @param string $code Store code
     *
     * @return self
     */
    public function setCode($code)
    {
        $this->container['code'] = $code;

        return $this;
    }

    /**
     * Gets website_id
     *
     * @return int
     */
    public function getWebsiteId()
    {
        return $this->container['website_id'];
    }

    /**
     * Sets website_id
     *
     * @param int $website_id Website id of the store
     *
     * @return self
     */
    public function setWebsiteId($website_id)
    {
        $this->container['website_id'] = $website_id;

        return $this;
    }

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

    /**
     * Sets locale
     *
     * @param string $locale Store locale
     *
     * @return self
     */
    public function setLocale($locale)
    {
        $this->container['locale'] = $locale;

        return $this;
    }

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

    /**
     * Sets base_currency_code
     *
     * @param string $base_currency_code Base currency code
     *
     * @return self
     */
    public function setBaseCurrencyCode($base_currency_code)
    {
        $this->container['base_currency_code'] = $base_currency_code;

        return $this;
    }

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

    /**
     * Sets default_display_currency_code
     *
     * @param string $default_display_currency_code Default display currency code
     *
     * @return self
     */
    public function setDefaultDisplayCurrencyCode($default_display_currency_code)
    {
        $this->container['default_display_currency_code'] = $default_display_currency_code;

        return $this;
    }

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

    /**
     * Sets timezone
     *
     * @param string $timezone Timezone of the store
     *
     * @return self
     */
    public function setTimezone($timezone)
    {
        $this->container['timezone'] = $timezone;

        return $this;
    }

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

    /**
     * Sets weight_unit
     *
     * @param string $weight_unit The unit of weight
     *
     * @return self
     */
    public function setWeightUnit($weight_unit)
    {
        $this->container['weight_unit'] = $weight_unit;

        return $this;
    }

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

    /**
     * Sets base_url
     *
     * @param string $base_url Base URL for the store
     *
     * @return self
     */
    public function setBaseUrl($base_url)
    {
        $this->container['base_url'] = $base_url;

        return $this;
    }

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

    /**
     * Sets base_link_url
     *
     * @param string $base_link_url Base link URL for the store
     *
     * @return self
     */
    public function setBaseLinkUrl($base_link_url)
    {
        $this->container['base_link_url'] = $base_link_url;

        return $this;
    }

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

    /**
     * Sets base_static_url
     *
     * @param string $base_static_url Base static URL for the store
     *
     * @return self
     */
    public function setBaseStaticUrl($base_static_url)
    {
        $this->container['base_static_url'] = $base_static_url;

        return $this;
    }

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

    /**
     * Sets base_media_url
     *
     * @param string $base_media_url Base media URL for the store
     *
     * @return self
     */
    public function setBaseMediaUrl($base_media_url)
    {
        $this->container['base_media_url'] = $base_media_url;

        return $this;
    }

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

    /**
     * Sets secure_base_url
     *
     * @param string $secure_base_url Secure base URL for the store
     *
     * @return self
     */
    public function setSecureBaseUrl($secure_base_url)
    {
        $this->container['secure_base_url'] = $secure_base_url;

        return $this;
    }

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

    /**
     * Sets secure_base_link_url
     *
     * @param string $secure_base_link_url Secure base link URL for the store
     *
     * @return self
     */
    public function setSecureBaseLinkUrl($secure_base_link_url)
    {
        $this->container['secure_base_link_url'] = $secure_base_link_url;

        return $this;
    }

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

    /**
     * Sets secure_base_static_url
     *
     * @param string $secure_base_static_url Secure base static URL for the store
     *
     * @return self
     */
    public function setSecureBaseStaticUrl($secure_base_static_url)
    {
        $this->container['secure_base_static_url'] = $secure_base_static_url;

        return $this;
    }

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

    /**
     * Sets secure_base_media_url
     *
     * @param string $secure_base_media_url Secure base media URL for the store
     *
     * @return self
     */
    public function setSecureBaseMediaUrl($secure_base_media_url)
    {
        $this->container['secure_base_media_url'] = $secure_base_media_url;

        return $this;
    }

    /**
     * Gets extension_attributes
     *
     * @return object|null
     */
    public function getExtensionAttributes()
    {
        return $this->container['extension_attributes'];
    }

    /**
     * Sets extension_attributes
     *
     * @param object|null $extension_attributes ExtensionInterface class for @see \\Magento\\Store\\Api\\Data\\StoreConfigInterface
     *
     * @return self
     */
    public function setExtensionAttributes($extension_attributes)
    {
        $this->container['extension_attributes'] = $extension_attributes;

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


