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

/**
 * Ziber Api
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 * Contact: support@ziber.nl
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 7.3.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 OpenAPI\Client\Model;

use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;

/**
 * ZiberTeamZoneDto Class Doc Comment
 *
 * @category Class
 * @package  OpenAPI\Client
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<string, mixed>
 */
class ZiberTeamZoneDto implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'id' => 'int',
        'name' => 'string',
        'address' => 'string',
        'postal_code' => 'string',
        'city' => 'string',
        'country' => 'string',
        'email_address' => 'string',
        'website' => 'string',
        'telephone' => 'string',
        'media' => '\OpenAPI\Client\Model\MediaDto[]',
        'description' => 'string',
        'opening_hours' => '\OpenAPI\Client\Model\OpeningHoursDto',
        'logo' => '\OpenAPI\Client\Model\MediaDto[]',
        'logo_background_color' => 'string',
        'identity_color' => 'string',
        'category' => '\OpenAPI\Client\Model\CategoryDto',
        'tags' => 'string[]',
        'facebook_url' => 'string',
        'linked_in_url' => 'string',
        'twitter_url' => 'string',
        'instagram_url' => 'string',
        'pinterest_url' => 'string',
        'location' => '\OpenAPI\Client\Model\LocationDto',
        'updated_at' => '\DateTime',
        'links' => '\OpenAPI\Client\Model\LinkDto',
        'brin_code' => 'string',
        'lrk_code' => 'string',
        'attachments' => '\OpenAPI\Client\Model\AttachmentDto[]',
        'external_links' => '\OpenAPI\Client\Model\ExternalLinkDto[]'
    ];

    /**
      * 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' => 'int32',
        'name' => null,
        'address' => null,
        'postal_code' => null,
        'city' => null,
        'country' => null,
        'email_address' => null,
        'website' => null,
        'telephone' => null,
        'media' => null,
        'description' => null,
        'opening_hours' => null,
        'logo' => null,
        'logo_background_color' => null,
        'identity_color' => null,
        'category' => null,
        'tags' => null,
        'facebook_url' => null,
        'linked_in_url' => null,
        'twitter_url' => null,
        'instagram_url' => null,
        'pinterest_url' => null,
        'location' => null,
        'updated_at' => 'date-time',
        'links' => null,
        'brin_code' => null,
        'lrk_code' => null,
        'attachments' => null,
        'external_links' => null
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static array $openAPINullables = [
        'id' => false,
        'name' => true,
        'address' => true,
        'postal_code' => true,
        'city' => true,
        'country' => true,
        'email_address' => true,
        'website' => true,
        'telephone' => true,
        'media' => true,
        'description' => true,
        'opening_hours' => false,
        'logo' => true,
        'logo_background_color' => true,
        'identity_color' => true,
        'category' => false,
        'tags' => true,
        'facebook_url' => true,
        'linked_in_url' => true,
        'twitter_url' => true,
        'instagram_url' => true,
        'pinterest_url' => true,
        'location' => false,
        'updated_at' => false,
        'links' => false,
        'brin_code' => true,
        'lrk_code' => true,
        'attachments' => true,
        'external_links' => true
    ];

    /**
      * If a nullable field gets set to null, insert it here
      *
      * @var boolean[]
      */
    protected array $openAPINullablesSetToNull = [];

    /**
     * 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 nullable properties
     *
     * @return array
     */
    protected static function openAPINullables(): array
    {
        return self::$openAPINullables;
    }

    /**
     * Array of nullable field names deliberately set to null
     *
     * @return boolean[]
     */
    private function getOpenAPINullablesSetToNull(): array
    {
        return $this->openAPINullablesSetToNull;
    }

    /**
     * Setter - Array of nullable field names deliberately set to null
     *
     * @param boolean[] $openAPINullablesSetToNull
     */
    private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
    {
        $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
    }

    /**
     * Checks if a property is nullable
     *
     * @param string $property
     * @return bool
     */
    public static function isNullable(string $property): bool
    {
        return self::openAPINullables()[$property] ?? false;
    }

    /**
     * Checks if a nullable property is set to null.
     *
     * @param string $property
     * @return bool
     */
    public function isNullableSetToNull(string $property): bool
    {
        return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'id' => 'id',
        'name' => 'name',
        'address' => 'address',
        'postal_code' => 'postalCode',
        'city' => 'city',
        'country' => 'country',
        'email_address' => 'emailAddress',
        'website' => 'website',
        'telephone' => 'telephone',
        'media' => 'media',
        'description' => 'description',
        'opening_hours' => 'openingHours',
        'logo' => 'logo',
        'logo_background_color' => 'logoBackgroundColor',
        'identity_color' => 'identityColor',
        'category' => 'category',
        'tags' => 'tags',
        'facebook_url' => 'facebookUrl',
        'linked_in_url' => 'linkedInUrl',
        'twitter_url' => 'twitterUrl',
        'instagram_url' => 'instagramUrl',
        'pinterest_url' => 'pinterestUrl',
        'location' => 'location',
        'updated_at' => 'updatedAt',
        'links' => 'links',
        'brin_code' => 'brinCode',
        'lrk_code' => 'lrkCode',
        'attachments' => 'attachments',
        'external_links' => 'external-links'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'id' => 'setId',
        'name' => 'setName',
        'address' => 'setAddress',
        'postal_code' => 'setPostalCode',
        'city' => 'setCity',
        'country' => 'setCountry',
        'email_address' => 'setEmailAddress',
        'website' => 'setWebsite',
        'telephone' => 'setTelephone',
        'media' => 'setMedia',
        'description' => 'setDescription',
        'opening_hours' => 'setOpeningHours',
        'logo' => 'setLogo',
        'logo_background_color' => 'setLogoBackgroundColor',
        'identity_color' => 'setIdentityColor',
        'category' => 'setCategory',
        'tags' => 'setTags',
        'facebook_url' => 'setFacebookUrl',
        'linked_in_url' => 'setLinkedInUrl',
        'twitter_url' => 'setTwitterUrl',
        'instagram_url' => 'setInstagramUrl',
        'pinterest_url' => 'setPinterestUrl',
        'location' => 'setLocation',
        'updated_at' => 'setUpdatedAt',
        'links' => 'setLinks',
        'brin_code' => 'setBrinCode',
        'lrk_code' => 'setLrkCode',
        'attachments' => 'setAttachments',
        'external_links' => 'setExternalLinks'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'id' => 'getId',
        'name' => 'getName',
        'address' => 'getAddress',
        'postal_code' => 'getPostalCode',
        'city' => 'getCity',
        'country' => 'getCountry',
        'email_address' => 'getEmailAddress',
        'website' => 'getWebsite',
        'telephone' => 'getTelephone',
        'media' => 'getMedia',
        'description' => 'getDescription',
        'opening_hours' => 'getOpeningHours',
        'logo' => 'getLogo',
        'logo_background_color' => 'getLogoBackgroundColor',
        'identity_color' => 'getIdentityColor',
        'category' => 'getCategory',
        'tags' => 'getTags',
        'facebook_url' => 'getFacebookUrl',
        'linked_in_url' => 'getLinkedInUrl',
        'twitter_url' => 'getTwitterUrl',
        'instagram_url' => 'getInstagramUrl',
        'pinterest_url' => 'getPinterestUrl',
        'location' => 'getLocation',
        'updated_at' => 'getUpdatedAt',
        'links' => 'getLinks',
        'brin_code' => 'getBrinCode',
        'lrk_code' => 'getLrkCode',
        'attachments' => 'getAttachments',
        'external_links' => 'getExternalLinks'
    ];

    /**
     * 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->setIfExists('id', $data ?? [], null);
        $this->setIfExists('name', $data ?? [], null);
        $this->setIfExists('address', $data ?? [], null);
        $this->setIfExists('postal_code', $data ?? [], null);
        $this->setIfExists('city', $data ?? [], null);
        $this->setIfExists('country', $data ?? [], null);
        $this->setIfExists('email_address', $data ?? [], null);
        $this->setIfExists('website', $data ?? [], null);
        $this->setIfExists('telephone', $data ?? [], null);
        $this->setIfExists('media', $data ?? [], null);
        $this->setIfExists('description', $data ?? [], null);
        $this->setIfExists('opening_hours', $data ?? [], null);
        $this->setIfExists('logo', $data ?? [], null);
        $this->setIfExists('logo_background_color', $data ?? [], null);
        $this->setIfExists('identity_color', $data ?? [], null);
        $this->setIfExists('category', $data ?? [], null);
        $this->setIfExists('tags', $data ?? [], null);
        $this->setIfExists('facebook_url', $data ?? [], null);
        $this->setIfExists('linked_in_url', $data ?? [], null);
        $this->setIfExists('twitter_url', $data ?? [], null);
        $this->setIfExists('instagram_url', $data ?? [], null);
        $this->setIfExists('pinterest_url', $data ?? [], null);
        $this->setIfExists('location', $data ?? [], null);
        $this->setIfExists('updated_at', $data ?? [], null);
        $this->setIfExists('links', $data ?? [], null);
        $this->setIfExists('brin_code', $data ?? [], null);
        $this->setIfExists('lrk_code', $data ?? [], null);
        $this->setIfExists('attachments', $data ?? [], null);
        $this->setIfExists('external_links', $data ?? [], null);
    }

    /**
    * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
    * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
    * $this->openAPINullablesSetToNull array
    *
    * @param string $variableName
    * @param array  $fields
    * @param mixed  $defaultValue
    */
    private function setIfExists(string $variableName, array $fields, $defaultValue): void
    {
        if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
            $this->openAPINullablesSetToNull[] = $variableName;
        }

        $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
    }

    /**
     * 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 id
     *
     * @return int|null
     */
    public function getId()
    {
        return $this->container['id'];
    }

    /**
     * Sets id
     *
     * @param int|null $id id
     *
     * @return self
     */
    public function setId($id)
    {
        if (is_null($id)) {
            throw new \InvalidArgumentException('non-nullable id cannot be null');
        }
        $this->container['id'] = $id;

        return $this;
    }

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

    /**
     * Sets name
     *
     * @param string|null $name name
     *
     * @return self
     */
    public function setName($name)
    {
        if (is_null($name)) {
            array_push($this->openAPINullablesSetToNull, 'name');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('name', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['name'] = $name;

        return $this;
    }

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

    /**
     * Sets address
     *
     * @param string|null $address address
     *
     * @return self
     */
    public function setAddress($address)
    {
        if (is_null($address)) {
            array_push($this->openAPINullablesSetToNull, 'address');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('address', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['address'] = $address;

        return $this;
    }

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

    /**
     * Sets postal_code
     *
     * @param string|null $postal_code postal_code
     *
     * @return self
     */
    public function setPostalCode($postal_code)
    {
        if (is_null($postal_code)) {
            array_push($this->openAPINullablesSetToNull, 'postal_code');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('postal_code', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['postal_code'] = $postal_code;

        return $this;
    }

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

    /**
     * Sets city
     *
     * @param string|null $city city
     *
     * @return self
     */
    public function setCity($city)
    {
        if (is_null($city)) {
            array_push($this->openAPINullablesSetToNull, 'city');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('city', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['city'] = $city;

        return $this;
    }

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

    /**
     * Sets country
     *
     * @param string|null $country country
     *
     * @return self
     */
    public function setCountry($country)
    {
        if (is_null($country)) {
            array_push($this->openAPINullablesSetToNull, 'country');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('country', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['country'] = $country;

        return $this;
    }

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

    /**
     * Sets email_address
     *
     * @param string|null $email_address email_address
     *
     * @return self
     */
    public function setEmailAddress($email_address)
    {
        if (is_null($email_address)) {
            array_push($this->openAPINullablesSetToNull, 'email_address');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('email_address', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['email_address'] = $email_address;

        return $this;
    }

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

    /**
     * Sets website
     *
     * @param string|null $website website
     *
     * @return self
     */
    public function setWebsite($website)
    {
        if (is_null($website)) {
            array_push($this->openAPINullablesSetToNull, 'website');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('website', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['website'] = $website;

        return $this;
    }

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

    /**
     * Sets telephone
     *
     * @param string|null $telephone telephone
     *
     * @return self
     */
    public function setTelephone($telephone)
    {
        if (is_null($telephone)) {
            array_push($this->openAPINullablesSetToNull, 'telephone');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('telephone', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['telephone'] = $telephone;

        return $this;
    }

    /**
     * Gets media
     *
     * @return \OpenAPI\Client\Model\MediaDto[]|null
     */
    public function getMedia()
    {
        return $this->container['media'];
    }

    /**
     * Sets media
     *
     * @param \OpenAPI\Client\Model\MediaDto[]|null $media media
     *
     * @return self
     */
    public function setMedia($media)
    {
        if (is_null($media)) {
            array_push($this->openAPINullablesSetToNull, 'media');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('media', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['media'] = $media;

        return $this;
    }

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

    /**
     * Sets description
     *
     * @param string|null $description description
     *
     * @return self
     */
    public function setDescription($description)
    {
        if (is_null($description)) {
            array_push($this->openAPINullablesSetToNull, 'description');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('description', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['description'] = $description;

        return $this;
    }

    /**
     * Gets opening_hours
     *
     * @return \OpenAPI\Client\Model\OpeningHoursDto|null
     */
    public function getOpeningHours()
    {
        return $this->container['opening_hours'];
    }

    /**
     * Sets opening_hours
     *
     * @param \OpenAPI\Client\Model\OpeningHoursDto|null $opening_hours opening_hours
     *
     * @return self
     */
    public function setOpeningHours($opening_hours)
    {
        if (is_null($opening_hours)) {
            throw new \InvalidArgumentException('non-nullable opening_hours cannot be null');
        }
        $this->container['opening_hours'] = $opening_hours;

        return $this;
    }

    /**
     * Gets logo
     *
     * @return \OpenAPI\Client\Model\MediaDto[]|null
     */
    public function getLogo()
    {
        return $this->container['logo'];
    }

    /**
     * Sets logo
     *
     * @param \OpenAPI\Client\Model\MediaDto[]|null $logo logo
     *
     * @return self
     */
    public function setLogo($logo)
    {
        if (is_null($logo)) {
            array_push($this->openAPINullablesSetToNull, 'logo');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('logo', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['logo'] = $logo;

        return $this;
    }

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

    /**
     * Sets logo_background_color
     *
     * @param string|null $logo_background_color logo_background_color
     *
     * @return self
     */
    public function setLogoBackgroundColor($logo_background_color)
    {
        if (is_null($logo_background_color)) {
            array_push($this->openAPINullablesSetToNull, 'logo_background_color');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('logo_background_color', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['logo_background_color'] = $logo_background_color;

        return $this;
    }

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

    /**
     * Sets identity_color
     *
     * @param string|null $identity_color identity_color
     *
     * @return self
     */
    public function setIdentityColor($identity_color)
    {
        if (is_null($identity_color)) {
            array_push($this->openAPINullablesSetToNull, 'identity_color');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('identity_color', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['identity_color'] = $identity_color;

        return $this;
    }

    /**
     * Gets category
     *
     * @return \OpenAPI\Client\Model\CategoryDto|null
     */
    public function getCategory()
    {
        return $this->container['category'];
    }

    /**
     * Sets category
     *
     * @param \OpenAPI\Client\Model\CategoryDto|null $category category
     *
     * @return self
     */
    public function setCategory($category)
    {
        if (is_null($category)) {
            throw new \InvalidArgumentException('non-nullable category cannot be null');
        }
        $this->container['category'] = $category;

        return $this;
    }

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

    /**
     * Sets tags
     *
     * @param string[]|null $tags tags
     *
     * @return self
     */
    public function setTags($tags)
    {
        if (is_null($tags)) {
            array_push($this->openAPINullablesSetToNull, 'tags');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('tags', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['tags'] = $tags;

        return $this;
    }

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

    /**
     * Sets facebook_url
     *
     * @param string|null $facebook_url facebook_url
     *
     * @return self
     */
    public function setFacebookUrl($facebook_url)
    {
        if (is_null($facebook_url)) {
            array_push($this->openAPINullablesSetToNull, 'facebook_url');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('facebook_url', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['facebook_url'] = $facebook_url;

        return $this;
    }

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

    /**
     * Sets linked_in_url
     *
     * @param string|null $linked_in_url linked_in_url
     *
     * @return self
     */
    public function setLinkedInUrl($linked_in_url)
    {
        if (is_null($linked_in_url)) {
            array_push($this->openAPINullablesSetToNull, 'linked_in_url');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('linked_in_url', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['linked_in_url'] = $linked_in_url;

        return $this;
    }

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

    /**
     * Sets twitter_url
     *
     * @param string|null $twitter_url twitter_url
     *
     * @return self
     */
    public function setTwitterUrl($twitter_url)
    {
        if (is_null($twitter_url)) {
            array_push($this->openAPINullablesSetToNull, 'twitter_url');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('twitter_url', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['twitter_url'] = $twitter_url;

        return $this;
    }

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

    /**
     * Sets instagram_url
     *
     * @param string|null $instagram_url instagram_url
     *
     * @return self
     */
    public function setInstagramUrl($instagram_url)
    {
        if (is_null($instagram_url)) {
            array_push($this->openAPINullablesSetToNull, 'instagram_url');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('instagram_url', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['instagram_url'] = $instagram_url;

        return $this;
    }

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

    /**
     * Sets pinterest_url
     *
     * @param string|null $pinterest_url pinterest_url
     *
     * @return self
     */
    public function setPinterestUrl($pinterest_url)
    {
        if (is_null($pinterest_url)) {
            array_push($this->openAPINullablesSetToNull, 'pinterest_url');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('pinterest_url', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['pinterest_url'] = $pinterest_url;

        return $this;
    }

    /**
     * Gets location
     *
     * @return \OpenAPI\Client\Model\LocationDto|null
     */
    public function getLocation()
    {
        return $this->container['location'];
    }

    /**
     * Sets location
     *
     * @param \OpenAPI\Client\Model\LocationDto|null $location location
     *
     * @return self
     */
    public function setLocation($location)
    {
        if (is_null($location)) {
            throw new \InvalidArgumentException('non-nullable location cannot be null');
        }
        $this->container['location'] = $location;

        return $this;
    }

    /**
     * Gets updated_at
     *
     * @return \DateTime|null
     */
    public function getUpdatedAt()
    {
        return $this->container['updated_at'];
    }

    /**
     * Sets updated_at
     *
     * @param \DateTime|null $updated_at updated_at
     *
     * @return self
     */
    public function setUpdatedAt($updated_at)
    {
        if (is_null($updated_at)) {
            throw new \InvalidArgumentException('non-nullable updated_at cannot be null');
        }
        $this->container['updated_at'] = $updated_at;

        return $this;
    }

    /**
     * Gets links
     *
     * @return \OpenAPI\Client\Model\LinkDto|null
     */
    public function getLinks()
    {
        return $this->container['links'];
    }

    /**
     * Sets links
     *
     * @param \OpenAPI\Client\Model\LinkDto|null $links links
     *
     * @return self
     */
    public function setLinks($links)
    {
        if (is_null($links)) {
            throw new \InvalidArgumentException('non-nullable links cannot be null');
        }
        $this->container['links'] = $links;

        return $this;
    }

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

    /**
     * Sets brin_code
     *
     * @param string|null $brin_code brin_code
     *
     * @return self
     */
    public function setBrinCode($brin_code)
    {
        if (is_null($brin_code)) {
            array_push($this->openAPINullablesSetToNull, 'brin_code');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('brin_code', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['brin_code'] = $brin_code;

        return $this;
    }

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

    /**
     * Sets lrk_code
     *
     * @param string|null $lrk_code lrk_code
     *
     * @return self
     */
    public function setLrkCode($lrk_code)
    {
        if (is_null($lrk_code)) {
            array_push($this->openAPINullablesSetToNull, 'lrk_code');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('lrk_code', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['lrk_code'] = $lrk_code;

        return $this;
    }

    /**
     * Gets attachments
     *
     * @return \OpenAPI\Client\Model\AttachmentDto[]|null
     */
    public function getAttachments()
    {
        return $this->container['attachments'];
    }

    /**
     * Sets attachments
     *
     * @param \OpenAPI\Client\Model\AttachmentDto[]|null $attachments attachments
     *
     * @return self
     */
    public function setAttachments($attachments)
    {
        if (is_null($attachments)) {
            array_push($this->openAPINullablesSetToNull, 'attachments');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('attachments', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['attachments'] = $attachments;

        return $this;
    }

    /**
     * Gets external_links
     *
     * @return \OpenAPI\Client\Model\ExternalLinkDto[]|null
     */
    public function getExternalLinks()
    {
        return $this->container['external_links'];
    }

    /**
     * Sets external_links
     *
     * @param \OpenAPI\Client\Model\ExternalLinkDto[]|null $external_links external_links
     *
     * @return self
     */
    public function setExternalLinks($external_links)
    {
        if (is_null($external_links)) {
            array_push($this->openAPINullablesSetToNull, 'external_links');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('external_links', $nullablesSetToNull);
            if ($index !== FALSE) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['external_links'] = $external_links;

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


