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

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'assignees' => 'string[]',
        'audit_firm' => 'string',
        'company_name' => 'string',
        'company_type' => 'string',
        'contact_first_name' => 'string',
        'contact_last_name' => 'string',
        'country' => 'string',
        'customer_number' => 'string',
        'email' => 'string',
        'has_audit_obligations' => 'bool',
        'homepage' => 'string',
        'information' => 'string',
        'last_reconciliation_date' => '\DateTime',
        'phone' => 'string',
        'postal_address' => 'string',
        'postal_city' => 'string',
        'postal_code' => 'string',
        'tags' => 'string[]',
        'visiting_country' => 'string',
        'visiting_postal_address' => 'string',
        'visiting_postal_city' => 'string',
        'visiting_postal_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 = [
        'assignees' => null,
        'audit_firm' => null,
        'company_name' => null,
        'company_type' => null,
        'contact_first_name' => null,
        'contact_last_name' => null,
        'country' => null,
        'customer_number' => null,
        'email' => null,
        'has_audit_obligations' => null,
        'homepage' => null,
        'information' => null,
        'last_reconciliation_date' => 'date',
        'phone' => null,
        'postal_address' => null,
        'postal_city' => null,
        'postal_code' => null,
        'tags' => null,
        'visiting_country' => null,
        'visiting_postal_address' => null,
        'visiting_postal_city' => null,
        'visiting_postal_code' => null
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static array $openAPINullables = [
        'assignees' => false,
        'audit_firm' => false,
        'company_name' => false,
        'company_type' => false,
        'contact_first_name' => false,
        'contact_last_name' => false,
        'country' => false,
        'customer_number' => false,
        'email' => false,
        'has_audit_obligations' => false,
        'homepage' => false,
        'information' => false,
        'last_reconciliation_date' => false,
        'phone' => false,
        'postal_address' => false,
        'postal_city' => false,
        'postal_code' => false,
        'tags' => false,
        'visiting_country' => false,
        'visiting_postal_address' => false,
        'visiting_postal_city' => false,
        'visiting_postal_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 = [
        'assignees' => 'assignees',
        'audit_firm' => 'auditFirm',
        'company_name' => 'companyName',
        'company_type' => 'companyType',
        'contact_first_name' => 'contactFirstName',
        'contact_last_name' => 'contactLastName',
        'country' => 'country',
        'customer_number' => 'customerNumber',
        'email' => 'email',
        'has_audit_obligations' => 'hasAuditObligations',
        'homepage' => 'homepage',
        'information' => 'information',
        'last_reconciliation_date' => 'lastReconciliationDate',
        'phone' => 'phone',
        'postal_address' => 'postalAddress',
        'postal_city' => 'postalCity',
        'postal_code' => 'postalCode',
        'tags' => 'tags',
        'visiting_country' => 'visitingCountry',
        'visiting_postal_address' => 'visitingPostalAddress',
        'visiting_postal_city' => 'visitingPostalCity',
        'visiting_postal_code' => 'visitingPostalCode'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'assignees' => 'setAssignees',
        'audit_firm' => 'setAuditFirm',
        'company_name' => 'setCompanyName',
        'company_type' => 'setCompanyType',
        'contact_first_name' => 'setContactFirstName',
        'contact_last_name' => 'setContactLastName',
        'country' => 'setCountry',
        'customer_number' => 'setCustomerNumber',
        'email' => 'setEmail',
        'has_audit_obligations' => 'setHasAuditObligations',
        'homepage' => 'setHomepage',
        'information' => 'setInformation',
        'last_reconciliation_date' => 'setLastReconciliationDate',
        'phone' => 'setPhone',
        'postal_address' => 'setPostalAddress',
        'postal_city' => 'setPostalCity',
        'postal_code' => 'setPostalCode',
        'tags' => 'setTags',
        'visiting_country' => 'setVisitingCountry',
        'visiting_postal_address' => 'setVisitingPostalAddress',
        'visiting_postal_city' => 'setVisitingPostalCity',
        'visiting_postal_code' => 'setVisitingPostalCode'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'assignees' => 'getAssignees',
        'audit_firm' => 'getAuditFirm',
        'company_name' => 'getCompanyName',
        'company_type' => 'getCompanyType',
        'contact_first_name' => 'getContactFirstName',
        'contact_last_name' => 'getContactLastName',
        'country' => 'getCountry',
        'customer_number' => 'getCustomerNumber',
        'email' => 'getEmail',
        'has_audit_obligations' => 'getHasAuditObligations',
        'homepage' => 'getHomepage',
        'information' => 'getInformation',
        'last_reconciliation_date' => 'getLastReconciliationDate',
        'phone' => 'getPhone',
        'postal_address' => 'getPostalAddress',
        'postal_city' => 'getPostalCity',
        'postal_code' => 'getPostalCode',
        'tags' => 'getTags',
        'visiting_country' => 'getVisitingCountry',
        'visiting_postal_address' => 'getVisitingPostalAddress',
        'visiting_postal_city' => 'getVisitingPostalCity',
        'visiting_postal_code' => 'getVisitingPostalCode'
    ];

    /**
     * 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;
    }

    public const COMPANY_TYPE_ESTATE = 'ESTATE';
    public const COMPANY_TYPE_SOLE_TRADER = 'SOLE_TRADER';
    public const COMPANY_TYPE_NATURAL_PERSON = 'NATURAL_PERSON';
    public const COMPANY_TYPE_CORPORATION = 'CORPORATION';
    public const COMPANY_TYPE_NONPROFIT_ASSOCIATION = 'NONPROFIT_ASSOCIATION';
    public const COMPANY_TYPE_HOUSING_ASSOCIATION = 'HOUSING_ASSOCIATION';
    public const COMPANY_TYPE_TENANCY_COMPOUND = 'TENANCY_COMPOUND';
    public const COMPANY_TYPE_COOPERATIVE = 'COOPERATIVE';
    public const COMPANY_TYPE_ECONOMIC_ASSOCIATION = 'ECONOMIC_ASSOCIATION';
    public const COMPANY_TYPE_HOUSING_SOCIETY = 'HOUSING_SOCIETY';
    public const COMPANY_TYPE_RELIGIOUS_BODY = 'RELIGIOUS_BODY';
    public const COMPANY_TYPE_LIMITED_PARTNERSHIP = 'LIMITED_PARTNERSHIP';
    public const COMPANY_TYPE_PARTNERSHIP = 'PARTNERSHIP';
    public const COMPANY_TYPE_PRIVATE_INDIVIDUAL = 'PRIVATE_INDIVIDUAL';
    public const COMPANY_TYPE_UNKNOWN = 'UNKNOWN';

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getCompanyTypeAllowableValues()
    {
        return [
            self::COMPANY_TYPE_ESTATE,
            self::COMPANY_TYPE_SOLE_TRADER,
            self::COMPANY_TYPE_NATURAL_PERSON,
            self::COMPANY_TYPE_CORPORATION,
            self::COMPANY_TYPE_NONPROFIT_ASSOCIATION,
            self::COMPANY_TYPE_HOUSING_ASSOCIATION,
            self::COMPANY_TYPE_TENANCY_COMPOUND,
            self::COMPANY_TYPE_COOPERATIVE,
            self::COMPANY_TYPE_ECONOMIC_ASSOCIATION,
            self::COMPANY_TYPE_HOUSING_SOCIETY,
            self::COMPANY_TYPE_RELIGIOUS_BODY,
            self::COMPANY_TYPE_LIMITED_PARTNERSHIP,
            self::COMPANY_TYPE_PARTNERSHIP,
            self::COMPANY_TYPE_PRIVATE_INDIVIDUAL,
            self::COMPANY_TYPE_UNKNOWN,
        ];
    }

    /**
     * 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('assignees', $data ?? [], null);
        $this->setIfExists('audit_firm', $data ?? [], null);
        $this->setIfExists('company_name', $data ?? [], null);
        $this->setIfExists('company_type', $data ?? [], null);
        $this->setIfExists('contact_first_name', $data ?? [], null);
        $this->setIfExists('contact_last_name', $data ?? [], null);
        $this->setIfExists('country', $data ?? [], null);
        $this->setIfExists('customer_number', $data ?? [], null);
        $this->setIfExists('email', $data ?? [], null);
        $this->setIfExists('has_audit_obligations', $data ?? [], null);
        $this->setIfExists('homepage', $data ?? [], null);
        $this->setIfExists('information', $data ?? [], null);
        $this->setIfExists('last_reconciliation_date', $data ?? [], null);
        $this->setIfExists('phone', $data ?? [], null);
        $this->setIfExists('postal_address', $data ?? [], null);
        $this->setIfExists('postal_city', $data ?? [], null);
        $this->setIfExists('postal_code', $data ?? [], null);
        $this->setIfExists('tags', $data ?? [], null);
        $this->setIfExists('visiting_country', $data ?? [], null);
        $this->setIfExists('visiting_postal_address', $data ?? [], null);
        $this->setIfExists('visiting_postal_city', $data ?? [], null);
        $this->setIfExists('visiting_postal_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 = [];

        if (!is_null($this->container['audit_firm']) && (mb_strlen($this->container['audit_firm']) > 100)) {
            $invalidProperties[] = "invalid value for 'audit_firm', the character length must be smaller than or equal to 100.";
        }

        if (!is_null($this->container['company_name']) && (mb_strlen($this->container['company_name']) > 1024)) {
            $invalidProperties[] = "invalid value for 'company_name', the character length must be smaller than or equal to 1024.";
        }

        $allowedValues = $this->getCompanyTypeAllowableValues();
        if (!is_null($this->container['company_type']) && !in_array($this->container['company_type'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value '%s' for 'company_type', must be one of '%s'",
                $this->container['company_type'],
                implode("', '", $allowedValues)
            );
        }

        if (!is_null($this->container['contact_first_name']) && (mb_strlen($this->container['contact_first_name']) > 100)) {
            $invalidProperties[] = "invalid value for 'contact_first_name', the character length must be smaller than or equal to 100.";
        }

        if (!is_null($this->container['contact_last_name']) && (mb_strlen($this->container['contact_last_name']) > 100)) {
            $invalidProperties[] = "invalid value for 'contact_last_name', the character length must be smaller than or equal to 100.";
        }

        if (!is_null($this->container['country']) && (mb_strlen($this->container['country']) > 100)) {
            $invalidProperties[] = "invalid value for 'country', the character length must be smaller than or equal to 100.";
        }

        if (!is_null($this->container['customer_number']) && (mb_strlen($this->container['customer_number']) > 40)) {
            $invalidProperties[] = "invalid value for 'customer_number', the character length must be smaller than or equal to 40.";
        }

        if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) > 200)) {
            $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 200.";
        }

        if (!is_null($this->container['homepage']) && (mb_strlen($this->container['homepage']) > 200)) {
            $invalidProperties[] = "invalid value for 'homepage', the character length must be smaller than or equal to 200.";
        }

        if (!is_null($this->container['information']) && (mb_strlen($this->container['information']) > 4096)) {
            $invalidProperties[] = "invalid value for 'information', the character length must be smaller than or equal to 4096.";
        }

        if (!is_null($this->container['phone']) && (mb_strlen($this->container['phone']) > 20)) {
            $invalidProperties[] = "invalid value for 'phone', the character length must be smaller than or equal to 20.";
        }

        if (!is_null($this->container['postal_address']) && (mb_strlen($this->container['postal_address']) > 100)) {
            $invalidProperties[] = "invalid value for 'postal_address', the character length must be smaller than or equal to 100.";
        }

        if (!is_null($this->container['postal_city']) && (mb_strlen($this->container['postal_city']) > 100)) {
            $invalidProperties[] = "invalid value for 'postal_city', the character length must be smaller than or equal to 100.";
        }

        if (!is_null($this->container['postal_code']) && (mb_strlen($this->container['postal_code']) > 10)) {
            $invalidProperties[] = "invalid value for 'postal_code', the character length must be smaller than or equal to 10.";
        }

        if (!is_null($this->container['visiting_country']) && (mb_strlen($this->container['visiting_country']) > 100)) {
            $invalidProperties[] = "invalid value for 'visiting_country', the character length must be smaller than or equal to 100.";
        }

        if (!is_null($this->container['visiting_postal_address']) && (mb_strlen($this->container['visiting_postal_address']) > 100)) {
            $invalidProperties[] = "invalid value for 'visiting_postal_address', the character length must be smaller than or equal to 100.";
        }

        if (!is_null($this->container['visiting_postal_city']) && (mb_strlen($this->container['visiting_postal_city']) > 100)) {
            $invalidProperties[] = "invalid value for 'visiting_postal_city', the character length must be smaller than or equal to 100.";
        }

        if (!is_null($this->container['visiting_postal_code']) && (mb_strlen($this->container['visiting_postal_code']) > 10)) {
            $invalidProperties[] = "invalid value for 'visiting_postal_code', the character length must be smaller than or equal to 10.";
        }

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

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

        return $this;
    }

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

    /**
     * Sets audit_firm
     *
     * @param string|null $audit_firm audit_firm
     *
     * @return self
     */
    public function setAuditFirm($audit_firm)
    {
        if (is_null($audit_firm)) {
            throw new \InvalidArgumentException('non-nullable audit_firm cannot be null');
        }
        if ((mb_strlen($audit_firm) > 100)) {
            throw new \InvalidArgumentException('invalid length for $audit_firm when calling BureauUpdatableBureauClient., must be smaller than or equal to 100.');
        }

        $this->container['audit_firm'] = $audit_firm;

        return $this;
    }

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

    /**
     * Sets company_name
     *
     * @param string|null $company_name company_name
     *
     * @return self
     */
    public function setCompanyName($company_name)
    {
        if (is_null($company_name)) {
            throw new \InvalidArgumentException('non-nullable company_name cannot be null');
        }
        if ((mb_strlen($company_name) > 1024)) {
            throw new \InvalidArgumentException('invalid length for $company_name when calling BureauUpdatableBureauClient., must be smaller than or equal to 1024.');
        }

        $this->container['company_name'] = $company_name;

        return $this;
    }

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

    /**
     * Sets company_type
     *
     * @param string|null $company_type company_type
     *
     * @return self
     */
    public function setCompanyType($company_type)
    {
        if (is_null($company_type)) {
            throw new \InvalidArgumentException('non-nullable company_type cannot be null');
        }
        $allowedValues = $this->getCompanyTypeAllowableValues();
        if (!in_array($company_type, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value '%s' for 'company_type', must be one of '%s'",
                    $company_type,
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['company_type'] = $company_type;

        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');
        }
        if ((mb_strlen($contact_first_name) > 100)) {
            throw new \InvalidArgumentException('invalid length for $contact_first_name when calling BureauUpdatableBureauClient., must be smaller than or equal to 100.');
        }

        $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');
        }
        if ((mb_strlen($contact_last_name) > 100)) {
            throw new \InvalidArgumentException('invalid length for $contact_last_name when calling BureauUpdatableBureauClient., must be smaller than or equal to 100.');
        }

        $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');
        }
        if ((mb_strlen($country) > 100)) {
            throw new \InvalidArgumentException('invalid length for $country when calling BureauUpdatableBureauClient., must be smaller than or equal to 100.');
        }

        $this->container['country'] = $country;

        return $this;
    }

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

    /**
     * Sets customer_number
     *
     * @param string|null $customer_number customer_number
     *
     * @return self
     */
    public function setCustomerNumber($customer_number)
    {
        if (is_null($customer_number)) {
            throw new \InvalidArgumentException('non-nullable customer_number cannot be null');
        }
        if ((mb_strlen($customer_number) > 40)) {
            throw new \InvalidArgumentException('invalid length for $customer_number when calling BureauUpdatableBureauClient., must be smaller than or equal to 40.');
        }

        $this->container['customer_number'] = $customer_number;

        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');
        }
        if ((mb_strlen($email) > 200)) {
            throw new \InvalidArgumentException('invalid length for $email when calling BureauUpdatableBureauClient., must be smaller than or equal to 200.');
        }

        $this->container['email'] = $email;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets homepage
     *
     * @param string|null $homepage homepage
     *
     * @return self
     */
    public function setHomepage($homepage)
    {
        if (is_null($homepage)) {
            throw new \InvalidArgumentException('non-nullable homepage cannot be null');
        }
        if ((mb_strlen($homepage) > 200)) {
            throw new \InvalidArgumentException('invalid length for $homepage when calling BureauUpdatableBureauClient., must be smaller than or equal to 200.');
        }

        $this->container['homepage'] = $homepage;

        return $this;
    }

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

    /**
     * Sets information
     *
     * @param string|null $information information
     *
     * @return self
     */
    public function setInformation($information)
    {
        if (is_null($information)) {
            throw new \InvalidArgumentException('non-nullable information cannot be null');
        }
        if ((mb_strlen($information) > 4096)) {
            throw new \InvalidArgumentException('invalid length for $information when calling BureauUpdatableBureauClient., must be smaller than or equal to 4096.');
        }

        $this->container['information'] = $information;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets phone
     *
     * @param string|null $phone phone
     *
     * @return self
     */
    public function setPhone($phone)
    {
        if (is_null($phone)) {
            throw new \InvalidArgumentException('non-nullable phone cannot be null');
        }
        if ((mb_strlen($phone) > 20)) {
            throw new \InvalidArgumentException('invalid length for $phone when calling BureauUpdatableBureauClient., must be smaller than or equal to 20.');
        }

        $this->container['phone'] = $phone;

        return $this;
    }

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

    /**
     * Sets postal_address
     *
     * @param string|null $postal_address postal_address
     *
     * @return self
     */
    public function setPostalAddress($postal_address)
    {
        if (is_null($postal_address)) {
            throw new \InvalidArgumentException('non-nullable postal_address cannot be null');
        }
        if ((mb_strlen($postal_address) > 100)) {
            throw new \InvalidArgumentException('invalid length for $postal_address when calling BureauUpdatableBureauClient., must be smaller than or equal to 100.');
        }

        $this->container['postal_address'] = $postal_address;

        return $this;
    }

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

    /**
     * Sets postal_city
     *
     * @param string|null $postal_city postal_city
     *
     * @return self
     */
    public function setPostalCity($postal_city)
    {
        if (is_null($postal_city)) {
            throw new \InvalidArgumentException('non-nullable postal_city cannot be null');
        }
        if ((mb_strlen($postal_city) > 100)) {
            throw new \InvalidArgumentException('invalid length for $postal_city when calling BureauUpdatableBureauClient., must be smaller than or equal to 100.');
        }

        $this->container['postal_city'] = $postal_city;

        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)) {
            throw new \InvalidArgumentException('non-nullable postal_code cannot be null');
        }
        if ((mb_strlen($postal_code) > 10)) {
            throw new \InvalidArgumentException('invalid length for $postal_code when calling BureauUpdatableBureauClient., must be smaller than or equal to 10.');
        }

        $this->container['postal_code'] = $postal_code;

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

        return $this;
    }

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

    /**
     * Sets visiting_country
     *
     * @param string|null $visiting_country visiting_country
     *
     * @return self
     */
    public function setVisitingCountry($visiting_country)
    {
        if (is_null($visiting_country)) {
            throw new \InvalidArgumentException('non-nullable visiting_country cannot be null');
        }
        if ((mb_strlen($visiting_country) > 100)) {
            throw new \InvalidArgumentException('invalid length for $visiting_country when calling BureauUpdatableBureauClient., must be smaller than or equal to 100.');
        }

        $this->container['visiting_country'] = $visiting_country;

        return $this;
    }

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

    /**
     * Sets visiting_postal_address
     *
     * @param string|null $visiting_postal_address visiting_postal_address
     *
     * @return self
     */
    public function setVisitingPostalAddress($visiting_postal_address)
    {
        if (is_null($visiting_postal_address)) {
            throw new \InvalidArgumentException('non-nullable visiting_postal_address cannot be null');
        }
        if ((mb_strlen($visiting_postal_address) > 100)) {
            throw new \InvalidArgumentException('invalid length for $visiting_postal_address when calling BureauUpdatableBureauClient., must be smaller than or equal to 100.');
        }

        $this->container['visiting_postal_address'] = $visiting_postal_address;

        return $this;
    }

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

    /**
     * Sets visiting_postal_city
     *
     * @param string|null $visiting_postal_city visiting_postal_city
     *
     * @return self
     */
    public function setVisitingPostalCity($visiting_postal_city)
    {
        if (is_null($visiting_postal_city)) {
            throw new \InvalidArgumentException('non-nullable visiting_postal_city cannot be null');
        }
        if ((mb_strlen($visiting_postal_city) > 100)) {
            throw new \InvalidArgumentException('invalid length for $visiting_postal_city when calling BureauUpdatableBureauClient., must be smaller than or equal to 100.');
        }

        $this->container['visiting_postal_city'] = $visiting_postal_city;

        return $this;
    }

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

    /**
     * Sets visiting_postal_code
     *
     * @param string|null $visiting_postal_code visiting_postal_code
     *
     * @return self
     */
    public function setVisitingPostalCode($visiting_postal_code)
    {
        if (is_null($visiting_postal_code)) {
            throw new \InvalidArgumentException('non-nullable visiting_postal_code cannot be null');
        }
        if ((mb_strlen($visiting_postal_code) > 10)) {
            throw new \InvalidArgumentException('invalid length for $visiting_postal_code when calling BureauUpdatableBureauClient., must be smaller than or equal to 10.');
        }

        $this->container['visiting_postal_code'] = $visiting_postal_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));
    }
}


