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

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'activated' => 'bool',
        'active' => 'bool',
        'agreement_skipped' => 'bool',
        'apply_for_bureau_respite' => 'bool',
        'assignees' => 'string[]',
        'audit_firm' => 'string',
        'bureau_id' => 'int',
        'company_domicile' => 'string',
        'company_name' => 'string',
        'company_type' => 'string',
        'connection_client_id' => 'string',
        'connection_type' => 'string',
        'contact_first_name' => 'string',
        'contact_last_name' => 'string',
        'country' => 'string',
        'country_code' => 'string',
        'customer_number' => 'string',
        'customer_number_source' => 'string',
        'db_id' => 'int',
        'db_tag' => 'string',
        'db_tag_id' => 'string',
        'disconnected' => 'bool',
        'email' => 'string',
        'enable_authorize_flow' => 'bool',
        'favorite' => 'bool',
        'fax' => 'string',
        'folder_id' => 'string',
        'has_access' => 'bool',
        'has_agoy_access' => 'bool',
        'has_audit_obligations' => 'bool',
        'has_interpret_supplier_invoices' => 'bool',
        'homepage' => 'string',
        'id' => 'string',
        'information' => 'string',
        'kyc_skipped' => 'bool',
        'last_reconciliation_date' => '\DateTime',
        'non_fortnox_client' => 'bool',
        'org_no' => 'string',
        'phone' => 'string',
        'phone2' => 'string',
        'postal_address' => 'string',
        'postal_city' => 'string',
        'postal_code' => 'string',
        'private_individual' => 'bool',
        'prospect' => 'bool',
        'relations' => 'string[]',
        'removed_at' => '\DateTime',
        'sysadmins' => 'string[]',
        'tags' => 'string[]',
        'user_disabled_at' => '\DateTime',
        'user_id' => 'string',
        'visiting_country' => 'string',
        'visiting_country_code' => 'string',
        'visiting_name' => '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 = [
        'activated' => null,
        'active' => null,
        'agreement_skipped' => null,
        'apply_for_bureau_respite' => null,
        'assignees' => null,
        'audit_firm' => null,
        'bureau_id' => 'int64',
        'company_domicile' => null,
        'company_name' => null,
        'company_type' => null,
        'connection_client_id' => 'uuid',
        'connection_type' => null,
        'contact_first_name' => null,
        'contact_last_name' => null,
        'country' => null,
        'country_code' => null,
        'customer_number' => null,
        'customer_number_source' => null,
        'db_id' => 'int64',
        'db_tag' => null,
        'db_tag_id' => null,
        'disconnected' => null,
        'email' => null,
        'enable_authorize_flow' => null,
        'favorite' => null,
        'fax' => null,
        'folder_id' => null,
        'has_access' => null,
        'has_agoy_access' => null,
        'has_audit_obligations' => null,
        'has_interpret_supplier_invoices' => null,
        'homepage' => null,
        'id' => null,
        'information' => null,
        'kyc_skipped' => null,
        'last_reconciliation_date' => 'date',
        'non_fortnox_client' => null,
        'org_no' => null,
        'phone' => null,
        'phone2' => null,
        'postal_address' => null,
        'postal_city' => null,
        'postal_code' => null,
        'private_individual' => null,
        'prospect' => null,
        'relations' => null,
        'removed_at' => 'date-time',
        'sysadmins' => null,
        'tags' => null,
        'user_disabled_at' => 'date-time',
        'user_id' => null,
        'visiting_country' => null,
        'visiting_country_code' => null,
        'visiting_name' => 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 = [
        'activated' => false,
        'active' => false,
        'agreement_skipped' => false,
        'apply_for_bureau_respite' => false,
        'assignees' => false,
        'audit_firm' => false,
        'bureau_id' => false,
        'company_domicile' => false,
        'company_name' => false,
        'company_type' => false,
        'connection_client_id' => false,
        'connection_type' => false,
        'contact_first_name' => false,
        'contact_last_name' => false,
        'country' => false,
        'country_code' => false,
        'customer_number' => false,
        'customer_number_source' => false,
        'db_id' => false,
        'db_tag' => false,
        'db_tag_id' => false,
        'disconnected' => false,
        'email' => false,
        'enable_authorize_flow' => false,
        'favorite' => false,
        'fax' => false,
        'folder_id' => false,
        'has_access' => false,
        'has_agoy_access' => false,
        'has_audit_obligations' => false,
        'has_interpret_supplier_invoices' => false,
        'homepage' => false,
        'id' => false,
        'information' => false,
        'kyc_skipped' => false,
        'last_reconciliation_date' => false,
        'non_fortnox_client' => false,
        'org_no' => false,
        'phone' => false,
        'phone2' => false,
        'postal_address' => false,
        'postal_city' => false,
        'postal_code' => false,
        'private_individual' => false,
        'prospect' => false,
        'relations' => false,
        'removed_at' => false,
        'sysadmins' => false,
        'tags' => false,
        'user_disabled_at' => false,
        'user_id' => false,
        'visiting_country' => false,
        'visiting_country_code' => false,
        'visiting_name' => 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 = [
        'activated' => 'activated',
        'active' => 'active',
        'agreement_skipped' => 'agreementSkipped',
        'apply_for_bureau_respite' => 'applyForBureauRespite',
        'assignees' => 'assignees',
        'audit_firm' => 'auditFirm',
        'bureau_id' => 'bureauId',
        'company_domicile' => 'companyDomicile',
        'company_name' => 'companyName',
        'company_type' => 'companyType',
        'connection_client_id' => 'connectionClientId',
        'connection_type' => 'connectionType',
        'contact_first_name' => 'contactFirstName',
        'contact_last_name' => 'contactLastName',
        'country' => 'country',
        'country_code' => 'countryCode',
        'customer_number' => 'customerNumber',
        'customer_number_source' => 'customerNumberSource',
        'db_id' => 'dbId',
        'db_tag' => 'dbTag',
        'db_tag_id' => 'dbTagId',
        'disconnected' => 'disconnected',
        'email' => 'email',
        'enable_authorize_flow' => 'enableAuthorizeFlow',
        'favorite' => 'favorite',
        'fax' => 'fax',
        'folder_id' => 'folderId',
        'has_access' => 'hasAccess',
        'has_agoy_access' => 'hasAgoyAccess',
        'has_audit_obligations' => 'hasAuditObligations',
        'has_interpret_supplier_invoices' => 'hasInterpretSupplierInvoices',
        'homepage' => 'homepage',
        'id' => 'id',
        'information' => 'information',
        'kyc_skipped' => 'kycSkipped',
        'last_reconciliation_date' => 'lastReconciliationDate',
        'non_fortnox_client' => 'nonFortnoxClient',
        'org_no' => 'orgNo',
        'phone' => 'phone',
        'phone2' => 'phone2',
        'postal_address' => 'postalAddress',
        'postal_city' => 'postalCity',
        'postal_code' => 'postalCode',
        'private_individual' => 'privateIndividual',
        'prospect' => 'prospect',
        'relations' => 'relations',
        'removed_at' => 'removedAt',
        'sysadmins' => 'sysadmins',
        'tags' => 'tags',
        'user_disabled_at' => 'userDisabledAt',
        'user_id' => 'userId',
        'visiting_country' => 'visitingCountry',
        'visiting_country_code' => 'visitingCountryCode',
        'visiting_name' => 'visitingName',
        '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 = [
        'activated' => 'setActivated',
        'active' => 'setActive',
        'agreement_skipped' => 'setAgreementSkipped',
        'apply_for_bureau_respite' => 'setApplyForBureauRespite',
        'assignees' => 'setAssignees',
        'audit_firm' => 'setAuditFirm',
        'bureau_id' => 'setBureauId',
        'company_domicile' => 'setCompanyDomicile',
        'company_name' => 'setCompanyName',
        'company_type' => 'setCompanyType',
        'connection_client_id' => 'setConnectionClientId',
        'connection_type' => 'setConnectionType',
        'contact_first_name' => 'setContactFirstName',
        'contact_last_name' => 'setContactLastName',
        'country' => 'setCountry',
        'country_code' => 'setCountryCode',
        'customer_number' => 'setCustomerNumber',
        'customer_number_source' => 'setCustomerNumberSource',
        'db_id' => 'setDbId',
        'db_tag' => 'setDbTag',
        'db_tag_id' => 'setDbTagId',
        'disconnected' => 'setDisconnected',
        'email' => 'setEmail',
        'enable_authorize_flow' => 'setEnableAuthorizeFlow',
        'favorite' => 'setFavorite',
        'fax' => 'setFax',
        'folder_id' => 'setFolderId',
        'has_access' => 'setHasAccess',
        'has_agoy_access' => 'setHasAgoyAccess',
        'has_audit_obligations' => 'setHasAuditObligations',
        'has_interpret_supplier_invoices' => 'setHasInterpretSupplierInvoices',
        'homepage' => 'setHomepage',
        'id' => 'setId',
        'information' => 'setInformation',
        'kyc_skipped' => 'setKycSkipped',
        'last_reconciliation_date' => 'setLastReconciliationDate',
        'non_fortnox_client' => 'setNonFortnoxClient',
        'org_no' => 'setOrgNo',
        'phone' => 'setPhone',
        'phone2' => 'setPhone2',
        'postal_address' => 'setPostalAddress',
        'postal_city' => 'setPostalCity',
        'postal_code' => 'setPostalCode',
        'private_individual' => 'setPrivateIndividual',
        'prospect' => 'setProspect',
        'relations' => 'setRelations',
        'removed_at' => 'setRemovedAt',
        'sysadmins' => 'setSysadmins',
        'tags' => 'setTags',
        'user_disabled_at' => 'setUserDisabledAt',
        'user_id' => 'setUserId',
        'visiting_country' => 'setVisitingCountry',
        'visiting_country_code' => 'setVisitingCountryCode',
        'visiting_name' => 'setVisitingName',
        '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 = [
        'activated' => 'getActivated',
        'active' => 'getActive',
        'agreement_skipped' => 'getAgreementSkipped',
        'apply_for_bureau_respite' => 'getApplyForBureauRespite',
        'assignees' => 'getAssignees',
        'audit_firm' => 'getAuditFirm',
        'bureau_id' => 'getBureauId',
        'company_domicile' => 'getCompanyDomicile',
        'company_name' => 'getCompanyName',
        'company_type' => 'getCompanyType',
        'connection_client_id' => 'getConnectionClientId',
        'connection_type' => 'getConnectionType',
        'contact_first_name' => 'getContactFirstName',
        'contact_last_name' => 'getContactLastName',
        'country' => 'getCountry',
        'country_code' => 'getCountryCode',
        'customer_number' => 'getCustomerNumber',
        'customer_number_source' => 'getCustomerNumberSource',
        'db_id' => 'getDbId',
        'db_tag' => 'getDbTag',
        'db_tag_id' => 'getDbTagId',
        'disconnected' => 'getDisconnected',
        'email' => 'getEmail',
        'enable_authorize_flow' => 'getEnableAuthorizeFlow',
        'favorite' => 'getFavorite',
        'fax' => 'getFax',
        'folder_id' => 'getFolderId',
        'has_access' => 'getHasAccess',
        'has_agoy_access' => 'getHasAgoyAccess',
        'has_audit_obligations' => 'getHasAuditObligations',
        'has_interpret_supplier_invoices' => 'getHasInterpretSupplierInvoices',
        'homepage' => 'getHomepage',
        'id' => 'getId',
        'information' => 'getInformation',
        'kyc_skipped' => 'getKycSkipped',
        'last_reconciliation_date' => 'getLastReconciliationDate',
        'non_fortnox_client' => 'getNonFortnoxClient',
        'org_no' => 'getOrgNo',
        'phone' => 'getPhone',
        'phone2' => 'getPhone2',
        'postal_address' => 'getPostalAddress',
        'postal_city' => 'getPostalCity',
        'postal_code' => 'getPostalCode',
        'private_individual' => 'getPrivateIndividual',
        'prospect' => 'getProspect',
        'relations' => 'getRelations',
        'removed_at' => 'getRemovedAt',
        'sysadmins' => 'getSysadmins',
        'tags' => 'getTags',
        'user_disabled_at' => 'getUserDisabledAt',
        'user_id' => 'getUserId',
        'visiting_country' => 'getVisitingCountry',
        'visiting_country_code' => 'getVisitingCountryCode',
        'visiting_name' => 'getVisitingName',
        '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';
    public const CUSTOMER_NUMBER_SOURCE_USER = 'USER';
    public const CUSTOMER_NUMBER_SOURCE_CUSTOMER_REGISTRY = 'CUSTOMER_REGISTRY';

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

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getCustomerNumberSourceAllowableValues()
    {
        return [
            self::CUSTOMER_NUMBER_SOURCE_USER,
            self::CUSTOMER_NUMBER_SOURCE_CUSTOMER_REGISTRY,
        ];
    }

    /**
     * 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('activated', $data ?? [], null);
        $this->setIfExists('active', $data ?? [], null);
        $this->setIfExists('agreement_skipped', $data ?? [], null);
        $this->setIfExists('apply_for_bureau_respite', $data ?? [], null);
        $this->setIfExists('assignees', $data ?? [], null);
        $this->setIfExists('audit_firm', $data ?? [], null);
        $this->setIfExists('bureau_id', $data ?? [], null);
        $this->setIfExists('company_domicile', $data ?? [], null);
        $this->setIfExists('company_name', $data ?? [], null);
        $this->setIfExists('company_type', $data ?? [], null);
        $this->setIfExists('connection_client_id', $data ?? [], null);
        $this->setIfExists('connection_type', $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('customer_number', $data ?? [], null);
        $this->setIfExists('customer_number_source', $data ?? [], null);
        $this->setIfExists('db_id', $data ?? [], null);
        $this->setIfExists('db_tag', $data ?? [], null);
        $this->setIfExists('db_tag_id', $data ?? [], null);
        $this->setIfExists('disconnected', $data ?? [], null);
        $this->setIfExists('email', $data ?? [], null);
        $this->setIfExists('enable_authorize_flow', $data ?? [], null);
        $this->setIfExists('favorite', $data ?? [], null);
        $this->setIfExists('fax', $data ?? [], null);
        $this->setIfExists('folder_id', $data ?? [], null);
        $this->setIfExists('has_access', $data ?? [], null);
        $this->setIfExists('has_agoy_access', $data ?? [], null);
        $this->setIfExists('has_audit_obligations', $data ?? [], null);
        $this->setIfExists('has_interpret_supplier_invoices', $data ?? [], null);
        $this->setIfExists('homepage', $data ?? [], null);
        $this->setIfExists('id', $data ?? [], null);
        $this->setIfExists('information', $data ?? [], null);
        $this->setIfExists('kyc_skipped', $data ?? [], null);
        $this->setIfExists('last_reconciliation_date', $data ?? [], null);
        $this->setIfExists('non_fortnox_client', $data ?? [], null);
        $this->setIfExists('org_no', $data ?? [], null);
        $this->setIfExists('phone', $data ?? [], null);
        $this->setIfExists('phone2', $data ?? [], null);
        $this->setIfExists('postal_address', $data ?? [], null);
        $this->setIfExists('postal_city', $data ?? [], null);
        $this->setIfExists('postal_code', $data ?? [], null);
        $this->setIfExists('private_individual', $data ?? [], null);
        $this->setIfExists('prospect', $data ?? [], null);
        $this->setIfExists('relations', $data ?? [], null);
        $this->setIfExists('removed_at', $data ?? [], null);
        $this->setIfExists('sysadmins', $data ?? [], null);
        $this->setIfExists('tags', $data ?? [], null);
        $this->setIfExists('user_disabled_at', $data ?? [], null);
        $this->setIfExists('user_id', $data ?? [], null);
        $this->setIfExists('visiting_country', $data ?? [], null);
        $this->setIfExists('visiting_country_code', $data ?? [], null);
        $this->setIfExists('visiting_name', $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 ($this->container['assignees'] === null) {
            $invalidProperties[] = "'assignees' can't be null";
        }
        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.";
        }

        $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['connection_type']) && (mb_strlen($this->container['connection_type']) > 40)) {
            $invalidProperties[] = "invalid value for 'connection_type', the character length must be smaller than or equal to 40.";
        }

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

        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 ($this->container['tags'] === null) {
            $invalidProperties[] = "'tags' can't be null";
        }
        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets assignees
     *
     * @param string[] $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 BureauBureauClientWithConnection., must be smaller than or equal to 100.');
        }

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

        return $this;
    }

    /**
     * Gets bureau_id
     *
     * @return int|null
     */
    public function getBureauId()
    {
        return $this->container['bureau_id'];
    }

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

        return $this;
    }

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

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

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

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

        return $this;
    }

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

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

        $this->container['connection_type'] = $connection_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');
        }
        $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 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');
        }
        $this->container['customer_number'] = $customer_number;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets db_id
     *
     * @return int|null
     */
    public function getDbId()
    {
        return $this->container['db_id'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

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

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

        return $this;
    }

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

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

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

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

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

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

        return $this;
    }

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

    /**
     * Sets id
     *
     * @param string|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 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 BureauBureauClientWithConnection., must be smaller than or equal to 4096.');
        }

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

        return $this;
    }

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

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

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

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

        return $this;
    }

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

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

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Sets tags
     *
     * @param string[] $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 user_disabled_at
     *
     * @return \DateTime|null
     */
    public function getUserDisabledAt()
    {
        return $this->container['user_disabled_at'];
    }

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

        return $this;
    }

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

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

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


