<?php
/**
 * FortnoxCompanyCompanySettingsSingleItem
 *
 * PHP version 8.1
 *
 * @category Class
 * @package  Fortnox
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * Fortnox API
 *
 * # Documentation   The Fortnox API is organized around REST. This means that we’ve designed it to have resource-oriented URLs and be as predictable as possible for you as developer.  It also means that we use HTTP status codes when something goes wrong and HTTP verbs understod by many API clients around the web.  We use a modified version of OAuth2 for authentication to offer a secure way for both you and our users to interact.  The API is generally built to support both XML and JSON but in this documentation all the examples will be in JSON.  We encourage you to read all the articles in the [Guides & Good to Know section](https://www.fortnox.se/developer/guides-and-good-to-know/)</a> first, before going forward and learning about the different resources.  This to ensure you get an understanding of some of the shared components of the API such as parameters and error handling.  ## Rate limits  The limit per access-token is 25 requests per 5 seconds. This equals to 300 requests per minute.  [Read more about this here.](https://www.fortnox.se/developer/guides-and-good-to-know/rate-limits-for-fortnox-api/)  ## Query parameters  Use query parameters with the ?-character and separate parameters with the &-character.   **Example:**  GET - https://api.fortnox.se/3/invoices?accountnumberfrom=3000&accountnumberto=4000 Read more about our parameters [here](https://www.fortnox.se/developer/guides-and-good-to-know/parameters/)   Search the documentation using the search field in the top left corner.
 *
 * The version of the OpenAPI document: 
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.19.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 Fortnox\Model;

use \ArrayAccess;
use \Fortnox\ObjectSerializer;

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'address' => 'string',
        'bg' => 'string',
        'bic' => 'string',
        'branch_code' => 'string',
        'city' => 'string',
        'contact_first_name' => 'string',
        'contact_last_name' => 'string',
        'country' => 'string',
        'country_code' => 'string',
        'database_number' => 'string',
        'domicile' => 'string',
        'email' => 'string',
        'fax' => 'string',
        'iban' => 'string',
        'name' => 'string',
        'organization_number' => 'string',
        'pg' => 'string',
        'phone1' => 'string',
        'phone2' => 'string',
        'tax_enabled' => 'bool',
        'vat_number' => 'string',
        'visit_address' => 'string',
        'visit_city' => 'string',
        'visit_country' => 'string',
        'visit_country_code' => 'string',
        'visit_name' => 'string',
        'visit_zip_code' => 'string',
        'www' => 'string',
        'zip_code' => '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 = [
        'address' => null,
        'bg' => null,
        'bic' => null,
        'branch_code' => null,
        'city' => null,
        'contact_first_name' => null,
        'contact_last_name' => null,
        'country' => null,
        'country_code' => null,
        'database_number' => null,
        'domicile' => null,
        'email' => null,
        'fax' => null,
        'iban' => null,
        'name' => null,
        'organization_number' => null,
        'pg' => null,
        'phone1' => null,
        'phone2' => null,
        'tax_enabled' => null,
        'vat_number' => null,
        'visit_address' => null,
        'visit_city' => null,
        'visit_country' => null,
        'visit_country_code' => null,
        'visit_name' => null,
        'visit_zip_code' => null,
        'www' => null,
        'zip_code' => null
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static array $openAPINullables = [
        'address' => false,
        'bg' => false,
        'bic' => false,
        'branch_code' => false,
        'city' => false,
        'contact_first_name' => false,
        'contact_last_name' => false,
        'country' => false,
        'country_code' => false,
        'database_number' => false,
        'domicile' => false,
        'email' => false,
        'fax' => false,
        'iban' => false,
        'name' => false,
        'organization_number' => false,
        'pg' => false,
        'phone1' => false,
        'phone2' => false,
        'tax_enabled' => false,
        'vat_number' => false,
        'visit_address' => false,
        'visit_city' => false,
        'visit_country' => false,
        'visit_country_code' => false,
        'visit_name' => false,
        'visit_zip_code' => false,
        'www' => false,
        'zip_code' => false
    ];

    /**
      * 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 = [
        'address' => 'Address',
        'bg' => 'BG',
        'bic' => 'BIC',
        'branch_code' => 'BranchCode',
        'city' => 'City',
        'contact_first_name' => 'ContactFirstName',
        'contact_last_name' => 'ContactLastName',
        'country' => 'Country',
        'country_code' => 'CountryCode',
        'database_number' => 'DatabaseNumber',
        'domicile' => 'Domicile',
        'email' => 'Email',
        'fax' => 'Fax',
        'iban' => 'IBAN',
        'name' => 'Name',
        'organization_number' => 'OrganizationNumber',
        'pg' => 'PG',
        'phone1' => 'Phone1',
        'phone2' => 'Phone2',
        'tax_enabled' => 'TaxEnabled',
        'vat_number' => 'VATNumber',
        'visit_address' => 'VisitAddress',
        'visit_city' => 'VisitCity',
        'visit_country' => 'VisitCountry',
        'visit_country_code' => 'VisitCountryCode',
        'visit_name' => 'VisitName',
        'visit_zip_code' => 'VisitZipCode',
        'www' => 'WWW',
        'zip_code' => 'ZipCode'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'address' => 'setAddress',
        'bg' => 'setBg',
        'bic' => 'setBic',
        'branch_code' => 'setBranchCode',
        'city' => 'setCity',
        'contact_first_name' => 'setContactFirstName',
        'contact_last_name' => 'setContactLastName',
        'country' => 'setCountry',
        'country_code' => 'setCountryCode',
        'database_number' => 'setDatabaseNumber',
        'domicile' => 'setDomicile',
        'email' => 'setEmail',
        'fax' => 'setFax',
        'iban' => 'setIban',
        'name' => 'setName',
        'organization_number' => 'setOrganizationNumber',
        'pg' => 'setPg',
        'phone1' => 'setPhone1',
        'phone2' => 'setPhone2',
        'tax_enabled' => 'setTaxEnabled',
        'vat_number' => 'setVatNumber',
        'visit_address' => 'setVisitAddress',
        'visit_city' => 'setVisitCity',
        'visit_country' => 'setVisitCountry',
        'visit_country_code' => 'setVisitCountryCode',
        'visit_name' => 'setVisitName',
        'visit_zip_code' => 'setVisitZipCode',
        'www' => 'setWww',
        'zip_code' => 'setZipCode'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'address' => 'getAddress',
        'bg' => 'getBg',
        'bic' => 'getBic',
        'branch_code' => 'getBranchCode',
        'city' => 'getCity',
        'contact_first_name' => 'getContactFirstName',
        'contact_last_name' => 'getContactLastName',
        'country' => 'getCountry',
        'country_code' => 'getCountryCode',
        'database_number' => 'getDatabaseNumber',
        'domicile' => 'getDomicile',
        'email' => 'getEmail',
        'fax' => 'getFax',
        'iban' => 'getIban',
        'name' => 'getName',
        'organization_number' => 'getOrganizationNumber',
        'pg' => 'getPg',
        'phone1' => 'getPhone1',
        'phone2' => 'getPhone2',
        'tax_enabled' => 'getTaxEnabled',
        'vat_number' => 'getVatNumber',
        'visit_address' => 'getVisitAddress',
        'visit_city' => 'getVisitCity',
        'visit_country' => 'getVisitCountry',
        'visit_country_code' => 'getVisitCountryCode',
        'visit_name' => 'getVisitName',
        'visit_zip_code' => 'getVisitZipCode',
        'www' => 'getWww',
        'zip_code' => 'getZipCode'
    ];

    /**
     * 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[]|null $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(?array $data = null)
    {
        $this->setIfExists('address', $data ?? [], null);
        $this->setIfExists('bg', $data ?? [], null);
        $this->setIfExists('bic', $data ?? [], null);
        $this->setIfExists('branch_code', $data ?? [], null);
        $this->setIfExists('city', $data ?? [], null);
        $this->setIfExists('contact_first_name', $data ?? [], null);
        $this->setIfExists('contact_last_name', $data ?? [], null);
        $this->setIfExists('country', $data ?? [], null);
        $this->setIfExists('country_code', $data ?? [], null);
        $this->setIfExists('database_number', $data ?? [], null);
        $this->setIfExists('domicile', $data ?? [], null);
        $this->setIfExists('email', $data ?? [], null);
        $this->setIfExists('fax', $data ?? [], null);
        $this->setIfExists('iban', $data ?? [], null);
        $this->setIfExists('name', $data ?? [], null);
        $this->setIfExists('organization_number', $data ?? [], null);
        $this->setIfExists('pg', $data ?? [], null);
        $this->setIfExists('phone1', $data ?? [], null);
        $this->setIfExists('phone2', $data ?? [], null);
        $this->setIfExists('tax_enabled', $data ?? [], null);
        $this->setIfExists('vat_number', $data ?? [], null);
        $this->setIfExists('visit_address', $data ?? [], null);
        $this->setIfExists('visit_city', $data ?? [], null);
        $this->setIfExists('visit_country', $data ?? [], null);
        $this->setIfExists('visit_country_code', $data ?? [], null);
        $this->setIfExists('visit_name', $data ?? [], null);
        $this->setIfExists('visit_zip_code', $data ?? [], null);
        $this->setIfExists('www', $data ?? [], null);
        $this->setIfExists('zip_code', $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 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)) {
            throw new \InvalidArgumentException('non-nullable address cannot be null');
        }
        $this->container['address'] = $address;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets branch_code
     *
     * @param string|null $branch_code branch_code
     *
     * @return self
     */
    public function setBranchCode($branch_code)
    {
        if (is_null($branch_code)) {
            throw new \InvalidArgumentException('non-nullable branch_code cannot be null');
        }
        $this->container['branch_code'] = $branch_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)) {
            throw new \InvalidArgumentException('non-nullable city cannot be null');
        }
        $this->container['city'] = $city;

        return $this;
    }

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

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

        return $this;
    }

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

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

        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)) {
            throw new \InvalidArgumentException('non-nullable country cannot be null');
        }
        $this->container['country'] = $country;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        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)) {
            throw new \InvalidArgumentException('non-nullable name cannot be null');
        }
        $this->container['name'] = $name;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets tax_enabled
     *
     * @return bool|null
     */
    public function getTaxEnabled()
    {
        return $this->container['tax_enabled'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

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

    /**
     * Gets offset.
     *
     * @param integer|string $offset Offset
     *
     * @return mixed|null
     */
    #[\ReturnTypeWillChange]
    public function offsetGet(mixed $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|string $offset Offset
     *
     * @return void
     */
    public function offsetUnset(mixed $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));
    }
}


