<?php
/**
 * BaseOrganizationItemWithEditNameFlag
 *
 * PHP version 7.3
 *
 * @category Class
 * @package  Pipedrive
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * Pipedrive API v1
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 5.3.0
 */

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

namespace Pipedrive\Model;

use ArrayAccess;
use JsonException;
use JsonSerializable;
use Pipedrive\Traits\RawData;
use Pipedrive\ObjectSerializer;

/**
 * BaseOrganizationItemWithEditNameFlag Class Doc Comment
 *
 * @category Class
 * @package  Pipedrive
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements ArrayAccess<TKey, TValue>
 * @template TKey int|null
 * @template TValue mixed|null
 */
class BaseOrganizationItemWithEditNameFlag implements ModelInterface, ArrayAccess, JsonSerializable
{
    use RawData;

    public const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      * @phpstan-var array<string, string>
      * @phpsalm-var array<string, string>
      */
    protected static array $openAPITypes = [
        'id' => 'int',
        'company_id' => 'int',
        'owner_id' => '\Pipedrive\Model\Owner',
        'name' => 'string',
        'active_flag' => 'bool',
        'picture_id' => '\Pipedrive\Model\PictureDataWithValue',
        'country_code' => 'string',
        'first_char' => 'string',
        'add_time' => 'string',
        'update_time' => 'string',
        'visible_to' => 'string',
        'label' => 'int',
        'label_ids' => 'int[]',
        'owner_name' => 'string',
        'cc_email' => 'string',
        'email_messages_count' => 'int',
        'people_count' => 'int',
        'activities_count' => 'int',
        'done_activities_count' => 'int',
        'undone_activities_count' => 'int',
        'files_count' => 'int',
        'notes_count' => 'int',
        'followers_count' => 'int',
        'address' => 'string',
        'address_subpremise' => 'string',
        'address_street_number' => 'string',
        'address_route' => 'string',
        'address_sublocality' => 'string',
        'address_locality' => 'string',
        'address_admin_area_level_1' => 'string',
        'address_admin_area_level_2' => 'string',
        'address_country' => 'string',
        'address_postal_code' => 'string',
        'address_formatted_address' => 'string',
        'open_deals_count' => 'int',
        'related_open_deals_count' => 'int',
        'closed_deals_count' => 'int',
        'related_closed_deals_count' => 'int',
        'won_deals_count' => 'int',
        'related_won_deals_count' => 'int',
        'lost_deals_count' => 'int',
        'related_lost_deals_count' => 'int',
        'next_activity_date' => 'string',
        'next_activity_time' => 'string',
        'next_activity_id' => 'int',
        'last_activity_id' => 'int',
        'last_activity_date' => 'string',
        'edit_name' => 'bool'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      * @phpstan-var array<string, string|null>
      * @psalm-var array<string, string|null>
      */
    protected static $openAPIFormats = [
        'id' => null,
        'company_id' => null,
        'owner_id' => null,
        'name' => null,
        'active_flag' => null,
        'picture_id' => null,
        'country_code' => null,
        'first_char' => null,
        'add_time' => null,
        'update_time' => null,
        'visible_to' => null,
        'label' => null,
        'label_ids' => null,
        'owner_name' => null,
        'cc_email' => null,
        'email_messages_count' => null,
        'people_count' => null,
        'activities_count' => null,
        'done_activities_count' => null,
        'undone_activities_count' => null,
        'files_count' => null,
        'notes_count' => null,
        'followers_count' => null,
        'address' => null,
        'address_subpremise' => null,
        'address_street_number' => null,
        'address_route' => null,
        'address_sublocality' => null,
        'address_locality' => null,
        'address_admin_area_level_1' => null,
        'address_admin_area_level_2' => null,
        'address_country' => null,
        'address_postal_code' => null,
        'address_formatted_address' => null,
        'open_deals_count' => null,
        'related_open_deals_count' => null,
        'closed_deals_count' => null,
        'related_closed_deals_count' => null,
        'won_deals_count' => null,
        'related_won_deals_count' => null,
        'lost_deals_count' => null,
        'related_lost_deals_count' => null,
        'next_activity_date' => null,
        'next_activity_time' => null,
        'next_activity_id' => null,
        'last_activity_id' => null,
        'last_activity_date' => null,
        'edit_name' => null
    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @phpstan-return array<string, string>
     * @psalm-return array<string, string>
     * @return array
     */
    public static function openAPITypes(): array
    {
        return self::$openAPITypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @phpstan-return array<string, string|null>
     * @psalm-return array<string, string|null>
     * @return array
     */
    public static function openAPIFormats(): array
    {
        return self::$openAPIFormats;
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'id' => 'id',
        'company_id' => 'company_id',
        'owner_id' => 'owner_id',
        'name' => 'name',
        'active_flag' => 'active_flag',
        'picture_id' => 'picture_id',
        'country_code' => 'country_code',
        'first_char' => 'first_char',
        'add_time' => 'add_time',
        'update_time' => 'update_time',
        'visible_to' => 'visible_to',
        'label' => 'label',
        'label_ids' => 'label_ids',
        'owner_name' => 'owner_name',
        'cc_email' => 'cc_email',
        'email_messages_count' => 'email_messages_count',
        'people_count' => 'people_count',
        'activities_count' => 'activities_count',
        'done_activities_count' => 'done_activities_count',
        'undone_activities_count' => 'undone_activities_count',
        'files_count' => 'files_count',
        'notes_count' => 'notes_count',
        'followers_count' => 'followers_count',
        'address' => 'address',
        'address_subpremise' => 'address_subpremise',
        'address_street_number' => 'address_street_number',
        'address_route' => 'address_route',
        'address_sublocality' => 'address_sublocality',
        'address_locality' => 'address_locality',
        'address_admin_area_level_1' => 'address_admin_area_level_1',
        'address_admin_area_level_2' => 'address_admin_area_level_2',
        'address_country' => 'address_country',
        'address_postal_code' => 'address_postal_code',
        'address_formatted_address' => 'address_formatted_address',
        'open_deals_count' => 'open_deals_count',
        'related_open_deals_count' => 'related_open_deals_count',
        'closed_deals_count' => 'closed_deals_count',
        'related_closed_deals_count' => 'related_closed_deals_count',
        'won_deals_count' => 'won_deals_count',
        'related_won_deals_count' => 'related_won_deals_count',
        'lost_deals_count' => 'lost_deals_count',
        'related_lost_deals_count' => 'related_lost_deals_count',
        'next_activity_date' => 'next_activity_date',
        'next_activity_time' => 'next_activity_time',
        'next_activity_id' => 'next_activity_id',
        'last_activity_id' => 'last_activity_id',
        'last_activity_date' => 'last_activity_date',
        'edit_name' => 'edit_name'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'id' => 'setId',
        'company_id' => 'setCompanyId',
        'owner_id' => 'setOwnerId',
        'name' => 'setName',
        'active_flag' => 'setActiveFlag',
        'picture_id' => 'setPictureId',
        'country_code' => 'setCountryCode',
        'first_char' => 'setFirstChar',
        'add_time' => 'setAddTime',
        'update_time' => 'setUpdateTime',
        'visible_to' => 'setVisibleTo',
        'label' => 'setLabel',
        'label_ids' => 'setLabelIds',
        'owner_name' => 'setOwnerName',
        'cc_email' => 'setCcEmail',
        'email_messages_count' => 'setEmailMessagesCount',
        'people_count' => 'setPeopleCount',
        'activities_count' => 'setActivitiesCount',
        'done_activities_count' => 'setDoneActivitiesCount',
        'undone_activities_count' => 'setUndoneActivitiesCount',
        'files_count' => 'setFilesCount',
        'notes_count' => 'setNotesCount',
        'followers_count' => 'setFollowersCount',
        'address' => 'setAddress',
        'address_subpremise' => 'setAddressSubpremise',
        'address_street_number' => 'setAddressStreetNumber',
        'address_route' => 'setAddressRoute',
        'address_sublocality' => 'setAddressSublocality',
        'address_locality' => 'setAddressLocality',
        'address_admin_area_level_1' => 'setAddressAdminAreaLevel1',
        'address_admin_area_level_2' => 'setAddressAdminAreaLevel2',
        'address_country' => 'setAddressCountry',
        'address_postal_code' => 'setAddressPostalCode',
        'address_formatted_address' => 'setAddressFormattedAddress',
        'open_deals_count' => 'setOpenDealsCount',
        'related_open_deals_count' => 'setRelatedOpenDealsCount',
        'closed_deals_count' => 'setClosedDealsCount',
        'related_closed_deals_count' => 'setRelatedClosedDealsCount',
        'won_deals_count' => 'setWonDealsCount',
        'related_won_deals_count' => 'setRelatedWonDealsCount',
        'lost_deals_count' => 'setLostDealsCount',
        'related_lost_deals_count' => 'setRelatedLostDealsCount',
        'next_activity_date' => 'setNextActivityDate',
        'next_activity_time' => 'setNextActivityTime',
        'next_activity_id' => 'setNextActivityId',
        'last_activity_id' => 'setLastActivityId',
        'last_activity_date' => 'setLastActivityDate',
        'edit_name' => 'setEditName'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'id' => 'getId',
        'company_id' => 'getCompanyId',
        'owner_id' => 'getOwnerId',
        'name' => 'getName',
        'active_flag' => 'getActiveFlag',
        'picture_id' => 'getPictureId',
        'country_code' => 'getCountryCode',
        'first_char' => 'getFirstChar',
        'add_time' => 'getAddTime',
        'update_time' => 'getUpdateTime',
        'visible_to' => 'getVisibleTo',
        'label' => 'getLabel',
        'label_ids' => 'getLabelIds',
        'owner_name' => 'getOwnerName',
        'cc_email' => 'getCcEmail',
        'email_messages_count' => 'getEmailMessagesCount',
        'people_count' => 'getPeopleCount',
        'activities_count' => 'getActivitiesCount',
        'done_activities_count' => 'getDoneActivitiesCount',
        'undone_activities_count' => 'getUndoneActivitiesCount',
        'files_count' => 'getFilesCount',
        'notes_count' => 'getNotesCount',
        'followers_count' => 'getFollowersCount',
        'address' => 'getAddress',
        'address_subpremise' => 'getAddressSubpremise',
        'address_street_number' => 'getAddressStreetNumber',
        'address_route' => 'getAddressRoute',
        'address_sublocality' => 'getAddressSublocality',
        'address_locality' => 'getAddressLocality',
        'address_admin_area_level_1' => 'getAddressAdminAreaLevel1',
        'address_admin_area_level_2' => 'getAddressAdminAreaLevel2',
        'address_country' => 'getAddressCountry',
        'address_postal_code' => 'getAddressPostalCode',
        'address_formatted_address' => 'getAddressFormattedAddress',
        'open_deals_count' => 'getOpenDealsCount',
        'related_open_deals_count' => 'getRelatedOpenDealsCount',
        'closed_deals_count' => 'getClosedDealsCount',
        'related_closed_deals_count' => 'getRelatedClosedDealsCount',
        'won_deals_count' => 'getWonDealsCount',
        'related_won_deals_count' => 'getRelatedWonDealsCount',
        'lost_deals_count' => 'getLostDealsCount',
        'related_lost_deals_count' => 'getRelatedLostDealsCount',
        'next_activity_date' => 'getNextActivityDate',
        'next_activity_time' => 'getNextActivityTime',
        'next_activity_id' => 'getNextActivityId',
        'last_activity_id' => 'getLastActivityId',
        'last_activity_date' => 'getLastActivityDate',
        'edit_name' => 'getEditName'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @phpstan-return array<string, string>
     * @psalm-return array<string, string>
     * @return array
     */
    public static function attributeMap(): array
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @phpstan-return array<string, string>
     * @psalm-return array<string, string>
     * @return array
     */
    public static function setters(): array
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @phpstan-return array<string, string>
     * @psalm-return array<string, string>
     * @return array
     */
    public static function getters(): array
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName(): string
    {
        return self::$openAPIModelName;
    }


    /**
     * Associative array for storing property values
     *
     * @var array
     * @phpstan-var array<int|string, mixed>
     * @psalm-var array<int|string, mixed>
     */
    protected array $container = [];

    /**
     * Constructor
     *
     * @phpstan-param array<string, mixed>|null $data
     * @psalm-param array<string, mixed>|null $data
     * @param array|null $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(array $data = null)
    {
        $this->container['id'] = $data['id'] ?? null;
        $this->container['company_id'] = $data['company_id'] ?? null;
        $this->container['owner_id'] = $data['owner_id'] ?? null;
        $this->container['name'] = $data['name'] ?? null;
        $this->container['active_flag'] = $data['active_flag'] ?? null;
        $this->container['picture_id'] = $data['picture_id'] ?? null;
        $this->container['country_code'] = $data['country_code'] ?? null;
        $this->container['first_char'] = $data['first_char'] ?? null;
        $this->container['add_time'] = $data['add_time'] ?? null;
        $this->container['update_time'] = $data['update_time'] ?? null;
        $this->container['visible_to'] = $data['visible_to'] ?? null;
        $this->container['label'] = $data['label'] ?? null;
        $this->container['label_ids'] = $data['label_ids'] ?? null;
        $this->container['owner_name'] = $data['owner_name'] ?? null;
        $this->container['cc_email'] = $data['cc_email'] ?? null;
        $this->container['email_messages_count'] = $data['email_messages_count'] ?? null;
        $this->container['people_count'] = $data['people_count'] ?? null;
        $this->container['activities_count'] = $data['activities_count'] ?? null;
        $this->container['done_activities_count'] = $data['done_activities_count'] ?? null;
        $this->container['undone_activities_count'] = $data['undone_activities_count'] ?? null;
        $this->container['files_count'] = $data['files_count'] ?? null;
        $this->container['notes_count'] = $data['notes_count'] ?? null;
        $this->container['followers_count'] = $data['followers_count'] ?? null;
        $this->container['address'] = $data['address'] ?? null;
        $this->container['address_subpremise'] = $data['address_subpremise'] ?? null;
        $this->container['address_street_number'] = $data['address_street_number'] ?? null;
        $this->container['address_route'] = $data['address_route'] ?? null;
        $this->container['address_sublocality'] = $data['address_sublocality'] ?? null;
        $this->container['address_locality'] = $data['address_locality'] ?? null;
        $this->container['address_admin_area_level_1'] = $data['address_admin_area_level_1'] ?? null;
        $this->container['address_admin_area_level_2'] = $data['address_admin_area_level_2'] ?? null;
        $this->container['address_country'] = $data['address_country'] ?? null;
        $this->container['address_postal_code'] = $data['address_postal_code'] ?? null;
        $this->container['address_formatted_address'] = $data['address_formatted_address'] ?? null;
        $this->container['open_deals_count'] = $data['open_deals_count'] ?? null;
        $this->container['related_open_deals_count'] = $data['related_open_deals_count'] ?? null;
        $this->container['closed_deals_count'] = $data['closed_deals_count'] ?? null;
        $this->container['related_closed_deals_count'] = $data['related_closed_deals_count'] ?? null;
        $this->container['won_deals_count'] = $data['won_deals_count'] ?? null;
        $this->container['related_won_deals_count'] = $data['related_won_deals_count'] ?? null;
        $this->container['lost_deals_count'] = $data['lost_deals_count'] ?? null;
        $this->container['related_lost_deals_count'] = $data['related_lost_deals_count'] ?? null;
        $this->container['next_activity_date'] = $data['next_activity_date'] ?? null;
        $this->container['next_activity_time'] = $data['next_activity_time'] ?? null;
        $this->container['next_activity_id'] = $data['next_activity_id'] ?? null;
        $this->container['last_activity_id'] = $data['last_activity_id'] ?? null;
        $this->container['last_activity_date'] = $data['last_activity_date'] ?? null;
        $this->container['edit_name'] = $data['edit_name'] ?? null;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     * @phpstan-return array<int, string>
     * @psalm-return array<int, string>
     */
    public function listInvalidProperties(): array
    {
        $invalidProperties = [];

        return $invalidProperties;
    }

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


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

    /**
     * Sets id
     *
     * @param int|null $id The ID of the organization
     *
     * @return self
     */
    public function setId($id): self
    {
        $this->container['id'] = $id;

        return $this;
    }

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

    /**
     * Sets company_id
     *
     * @param int|null $company_id The ID of the company related to the organization
     *
     * @return self
     */
    public function setCompanyId($company_id): self
    {
        $this->container['company_id'] = $company_id;

        return $this;
    }

    /**
     * Gets owner_id
     *
     * @return \Pipedrive\Model\Owner|null
     */
    public function getOwnerId()
    {
        return $this->container['owner_id'];
    }

    /**
     * Sets owner_id
     *
     * @param \Pipedrive\Model\Owner|null $owner_id owner_id
     *
     * @return self
     */
    public function setOwnerId($owner_id): self
    {
        $this->container['owner_id'] = $owner_id;

        return $this;
    }

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

    /**
     * Sets name
     *
     * @param string|null $name The name of the organization
     *
     * @return self
     */
    public function setName($name): self
    {
        $this->container['name'] = $name;

        return $this;
    }

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

    /**
     * Sets active_flag
     *
     * @param bool|null $active_flag Whether the organization is active or not
     *
     * @return self
     */
    public function setActiveFlag($active_flag): self
    {
        $this->container['active_flag'] = $active_flag;

        return $this;
    }

    /**
     * Gets picture_id
     *
     * @return \Pipedrive\Model\PictureDataWithValue|null
     */
    public function getPictureId()
    {
        return $this->container['picture_id'];
    }

    /**
     * Sets picture_id
     *
     * @param \Pipedrive\Model\PictureDataWithValue|null $picture_id picture_id
     *
     * @return self
     */
    public function setPictureId($picture_id): self
    {
        $this->container['picture_id'] = $picture_id;

        return $this;
    }

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

    /**
     * Sets country_code
     *
     * @param string|null $country_code The country code of the organization
     *
     * @return self
     */
    public function setCountryCode($country_code): self
    {
        $this->container['country_code'] = $country_code;

        return $this;
    }

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

    /**
     * Sets first_char
     *
     * @param string|null $first_char The first character of the organization name
     *
     * @return self
     */
    public function setFirstChar($first_char): self
    {
        $this->container['first_char'] = $first_char;

        return $this;
    }

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

    /**
     * Sets add_time
     *
     * @param string|null $add_time The creation date and time of the organization
     *
     * @return self
     */
    public function setAddTime($add_time): self
    {
        $this->container['add_time'] = $add_time;

        return $this;
    }

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

    /**
     * Sets update_time
     *
     * @param string|null $update_time The last updated date and time of the organization
     *
     * @return self
     */
    public function setUpdateTime($update_time): self
    {
        $this->container['update_time'] = $update_time;

        return $this;
    }

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

    /**
     * Sets visible_to
     *
     * @param string|null $visible_to The visibility group ID of who can see the organization
     *
     * @return self
     */
    public function setVisibleTo($visible_to): self
    {
        $this->container['visible_to'] = $visible_to;

        return $this;
    }

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

    /**
     * Sets label
     *
     * @param int|null $label The label assigned to the organization. When the `label` field is updated, the `label_ids` field value will be overwritten by the `label` field value.
     *
     * @return self
     */
    public function setLabel($label): self
    {
        $this->container['label'] = $label;

        return $this;
    }

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

    /**
     * Sets label_ids
     *
     * @param int[]|null $label_ids The IDs of labels assigned to the organization. When the `label_ids` field is updated, the `label` field value will be set to the first value of the `label_ids` field.
     *
     * @return self
     */
    public function setLabelIds($label_ids): self
    {
        $this->container['label_ids'] = $label_ids;

        return $this;
    }

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

    /**
     * Sets owner_name
     *
     * @param string|null $owner_name The name of the organization owner
     *
     * @return self
     */
    public function setOwnerName($owner_name): self
    {
        $this->container['owner_name'] = $owner_name;

        return $this;
    }

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

    /**
     * Sets cc_email
     *
     * @param string|null $cc_email The BCC email associated with the organization
     *
     * @return self
     */
    public function setCcEmail($cc_email): self
    {
        $this->container['cc_email'] = $cc_email;

        return $this;
    }

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

    /**
     * Sets email_messages_count
     *
     * @param int|null $email_messages_count The count of email messages related to the organization
     *
     * @return self
     */
    public function setEmailMessagesCount($email_messages_count): self
    {
        $this->container['email_messages_count'] = $email_messages_count;

        return $this;
    }

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

    /**
     * Sets people_count
     *
     * @param int|null $people_count The count of persons related to the organization
     *
     * @return self
     */
    public function setPeopleCount($people_count): self
    {
        $this->container['people_count'] = $people_count;

        return $this;
    }

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

    /**
     * Sets activities_count
     *
     * @param int|null $activities_count The count of activities related to the organization
     *
     * @return self
     */
    public function setActivitiesCount($activities_count): self
    {
        $this->container['activities_count'] = $activities_count;

        return $this;
    }

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

    /**
     * Sets done_activities_count
     *
     * @param int|null $done_activities_count The count of done activities related to the organization
     *
     * @return self
     */
    public function setDoneActivitiesCount($done_activities_count): self
    {
        $this->container['done_activities_count'] = $done_activities_count;

        return $this;
    }

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

    /**
     * Sets undone_activities_count
     *
     * @param int|null $undone_activities_count The count of undone activities related to the organization
     *
     * @return self
     */
    public function setUndoneActivitiesCount($undone_activities_count): self
    {
        $this->container['undone_activities_count'] = $undone_activities_count;

        return $this;
    }

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

    /**
     * Sets files_count
     *
     * @param int|null $files_count The count of files related to the organization
     *
     * @return self
     */
    public function setFilesCount($files_count): self
    {
        $this->container['files_count'] = $files_count;

        return $this;
    }

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

    /**
     * Sets notes_count
     *
     * @param int|null $notes_count The count of notes related to the organization
     *
     * @return self
     */
    public function setNotesCount($notes_count): self
    {
        $this->container['notes_count'] = $notes_count;

        return $this;
    }

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

    /**
     * Sets followers_count
     *
     * @param int|null $followers_count The count of followers related to the organization
     *
     * @return self
     */
    public function setFollowersCount($followers_count): self
    {
        $this->container['followers_count'] = $followers_count;

        return $this;
    }

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

    /**
     * Sets address
     *
     * @param string|null $address The full address of the organization
     *
     * @return self
     */
    public function setAddress($address): self
    {
        $this->container['address'] = $address;

        return $this;
    }

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

    /**
     * Sets address_subpremise
     *
     * @param string|null $address_subpremise The sub-premise of the organization location
     *
     * @return self
     */
    public function setAddressSubpremise($address_subpremise): self
    {
        $this->container['address_subpremise'] = $address_subpremise;

        return $this;
    }

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

    /**
     * Sets address_street_number
     *
     * @param string|null $address_street_number The street number of the organization location
     *
     * @return self
     */
    public function setAddressStreetNumber($address_street_number): self
    {
        $this->container['address_street_number'] = $address_street_number;

        return $this;
    }

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

    /**
     * Sets address_route
     *
     * @param string|null $address_route The route of the organization location
     *
     * @return self
     */
    public function setAddressRoute($address_route): self
    {
        $this->container['address_route'] = $address_route;

        return $this;
    }

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

    /**
     * Sets address_sublocality
     *
     * @param string|null $address_sublocality The sub-locality of the organization location
     *
     * @return self
     */
    public function setAddressSublocality($address_sublocality): self
    {
        $this->container['address_sublocality'] = $address_sublocality;

        return $this;
    }

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

    /**
     * Sets address_locality
     *
     * @param string|null $address_locality The locality of the organization location
     *
     * @return self
     */
    public function setAddressLocality($address_locality): self
    {
        $this->container['address_locality'] = $address_locality;

        return $this;
    }

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

    /**
     * Sets address_admin_area_level_1
     *
     * @param string|null $address_admin_area_level_1 The level 1 admin area of the organization location
     *
     * @return self
     */
    public function setAddressAdminAreaLevel1($address_admin_area_level_1): self
    {
        $this->container['address_admin_area_level_1'] = $address_admin_area_level_1;

        return $this;
    }

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

    /**
     * Sets address_admin_area_level_2
     *
     * @param string|null $address_admin_area_level_2 The level 2 admin area of the organization location
     *
     * @return self
     */
    public function setAddressAdminAreaLevel2($address_admin_area_level_2): self
    {
        $this->container['address_admin_area_level_2'] = $address_admin_area_level_2;

        return $this;
    }

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

    /**
     * Sets address_country
     *
     * @param string|null $address_country The country of the organization location
     *
     * @return self
     */
    public function setAddressCountry($address_country): self
    {
        $this->container['address_country'] = $address_country;

        return $this;
    }

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

    /**
     * Sets address_postal_code
     *
     * @param string|null $address_postal_code The postal code of the organization location
     *
     * @return self
     */
    public function setAddressPostalCode($address_postal_code): self
    {
        $this->container['address_postal_code'] = $address_postal_code;

        return $this;
    }

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

    /**
     * Sets address_formatted_address
     *
     * @param string|null $address_formatted_address The formatted organization location
     *
     * @return self
     */
    public function setAddressFormattedAddress($address_formatted_address): self
    {
        $this->container['address_formatted_address'] = $address_formatted_address;

        return $this;
    }

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

    /**
     * Sets open_deals_count
     *
     * @param int|null $open_deals_count The count of open deals related with the item
     *
     * @return self
     */
    public function setOpenDealsCount($open_deals_count): self
    {
        $this->container['open_deals_count'] = $open_deals_count;

        return $this;
    }

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

    /**
     * Sets related_open_deals_count
     *
     * @param int|null $related_open_deals_count The count of related open deals related with the item
     *
     * @return self
     */
    public function setRelatedOpenDealsCount($related_open_deals_count): self
    {
        $this->container['related_open_deals_count'] = $related_open_deals_count;

        return $this;
    }

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

    /**
     * Sets closed_deals_count
     *
     * @param int|null $closed_deals_count The count of closed deals related with the item
     *
     * @return self
     */
    public function setClosedDealsCount($closed_deals_count): self
    {
        $this->container['closed_deals_count'] = $closed_deals_count;

        return $this;
    }

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

    /**
     * Sets related_closed_deals_count
     *
     * @param int|null $related_closed_deals_count The count of related closed deals related with the item
     *
     * @return self
     */
    public function setRelatedClosedDealsCount($related_closed_deals_count): self
    {
        $this->container['related_closed_deals_count'] = $related_closed_deals_count;

        return $this;
    }

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

    /**
     * Sets won_deals_count
     *
     * @param int|null $won_deals_count The count of won deals related with the item
     *
     * @return self
     */
    public function setWonDealsCount($won_deals_count): self
    {
        $this->container['won_deals_count'] = $won_deals_count;

        return $this;
    }

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

    /**
     * Sets related_won_deals_count
     *
     * @param int|null $related_won_deals_count The count of related won deals related with the item
     *
     * @return self
     */
    public function setRelatedWonDealsCount($related_won_deals_count): self
    {
        $this->container['related_won_deals_count'] = $related_won_deals_count;

        return $this;
    }

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

    /**
     * Sets lost_deals_count
     *
     * @param int|null $lost_deals_count The count of lost deals related with the item
     *
     * @return self
     */
    public function setLostDealsCount($lost_deals_count): self
    {
        $this->container['lost_deals_count'] = $lost_deals_count;

        return $this;
    }

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

    /**
     * Sets related_lost_deals_count
     *
     * @param int|null $related_lost_deals_count The count of related lost deals related with the item
     *
     * @return self
     */
    public function setRelatedLostDealsCount($related_lost_deals_count): self
    {
        $this->container['related_lost_deals_count'] = $related_lost_deals_count;

        return $this;
    }

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

    /**
     * Sets next_activity_date
     *
     * @param string|null $next_activity_date The date of the next activity associated with the deal
     *
     * @return self
     */
    public function setNextActivityDate($next_activity_date): self
    {
        $this->container['next_activity_date'] = $next_activity_date;

        return $this;
    }

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

    /**
     * Sets next_activity_time
     *
     * @param string|null $next_activity_time The time of the next activity associated with the deal
     *
     * @return self
     */
    public function setNextActivityTime($next_activity_time): self
    {
        $this->container['next_activity_time'] = $next_activity_time;

        return $this;
    }

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

    /**
     * Sets next_activity_id
     *
     * @param int|null $next_activity_id The ID of the next activity associated with the deal
     *
     * @return self
     */
    public function setNextActivityId($next_activity_id): self
    {
        $this->container['next_activity_id'] = $next_activity_id;

        return $this;
    }

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

    /**
     * Sets last_activity_id
     *
     * @param int|null $last_activity_id The ID of the last activity associated with the deal
     *
     * @return self
     */
    public function setLastActivityId($last_activity_id): self
    {
        $this->container['last_activity_id'] = $last_activity_id;

        return $this;
    }

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

    /**
     * Sets last_activity_date
     *
     * @param string|null $last_activity_date The date of the last activity associated with the deal
     *
     * @return self
     */
    public function setLastActivityDate($last_activity_date): self
    {
        $this->container['last_activity_date'] = $last_activity_date;

        return $this;
    }

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

    /**
     * Sets edit_name
     *
     * @param bool|null $edit_name If the company ID of the organization and company ID of the request is same or not
     *
     * @return self
     */
    public function setEditName($edit_name): self
    {
        $this->container['edit_name'] = $edit_name;

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

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed
     */
    public function offsetGet($offset): mixed
    {
        return $this->container[$offset] ?? null;
    }

    /**
     * Sets value based on offset.
     *
     * @param int|null $offset Offset
     * @param mixed    $value  Value to be set
     *
     * @return void
     */
    public function offsetSet($offset, $value): void
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    public function offsetUnset($offset): void
    {
        unset($this->container[$offset]);
    }

    /**
     * Serializes the object to a value that can be serialized natively by json_encode().
     * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
     *
     * @return mixed Returns data which can be serialized by json_encode(), which is a value
     * of any type other than a resource.
     */
    public function jsonSerialize(): mixed
    {
       return ObjectSerializer::sanitizeForSerialization($this);
    }

    /**
     * Gets the string presentation of the object
     *
     * @throws JsonException
     * @return string
     */
    public function __toString()
    {
        return json_encode(
            ObjectSerializer::sanitizeForSerialization($this),
            JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR
        );
    }

    /**
     * Gets a header-safe presentation of the object
     *
     * @throws JsonException
     * @return string
     */
    public function toHeaderValue(): string
    {
        return json_encode(ObjectSerializer::sanitizeForSerialization($this), JSON_THROW_ON_ERROR);
    }
}


