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

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

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'agreements' => 'string[]',
        'assignee_id' => 'string',
        'client_assignee_id' => 'string',
        'client_db_id' => 'string',
        'client_id' => 'string',
        'end_date' => '\DateTime',
        'include_finished' => 'bool',
        'responsible_user_id' => 'string',
        'start_date' => '\DateTime',
        'sub_type' => 'string',
        'tags' => 'string[]',
        'type' => 'string',
        'types' => 'string[]',
        'urgencies' => 'string[]',
        'user_tags' => '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 = [
        'agreements' => null,
        'assignee_id' => null,
        'client_assignee_id' => null,
        'client_db_id' => null,
        'client_id' => null,
        'end_date' => 'date',
        'include_finished' => null,
        'responsible_user_id' => null,
        'start_date' => 'date',
        'sub_type' => null,
        'tags' => null,
        'type' => null,
        'types' => null,
        'urgencies' => null,
        'user_tags' => null
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static array $openAPINullables = [
        'agreements' => false,
        'assignee_id' => false,
        'client_assignee_id' => false,
        'client_db_id' => false,
        'client_id' => false,
        'end_date' => false,
        'include_finished' => false,
        'responsible_user_id' => false,
        'start_date' => false,
        'sub_type' => false,
        'tags' => false,
        'type' => false,
        'types' => false,
        'urgencies' => false,
        'user_tags' => 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 = [
        'agreements' => 'agreements',
        'assignee_id' => 'assigneeId',
        'client_assignee_id' => 'clientAssigneeId',
        'client_db_id' => 'clientDbId',
        'client_id' => 'clientId',
        'end_date' => 'endDate',
        'include_finished' => 'includeFinished',
        'responsible_user_id' => 'responsibleUserId',
        'start_date' => 'startDate',
        'sub_type' => 'subType',
        'tags' => 'tags',
        'type' => 'type',
        'types' => 'types',
        'urgencies' => 'urgencies',
        'user_tags' => 'userTags'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'agreements' => 'setAgreements',
        'assignee_id' => 'setAssigneeId',
        'client_assignee_id' => 'setClientAssigneeId',
        'client_db_id' => 'setClientDbId',
        'client_id' => 'setClientId',
        'end_date' => 'setEndDate',
        'include_finished' => 'setIncludeFinished',
        'responsible_user_id' => 'setResponsibleUserId',
        'start_date' => 'setStartDate',
        'sub_type' => 'setSubType',
        'tags' => 'setTags',
        'type' => 'setType',
        'types' => 'setTypes',
        'urgencies' => 'setUrgencies',
        'user_tags' => 'setUserTags'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'agreements' => 'getAgreements',
        'assignee_id' => 'getAssigneeId',
        'client_assignee_id' => 'getClientAssigneeId',
        'client_db_id' => 'getClientDbId',
        'client_id' => 'getClientId',
        'end_date' => 'getEndDate',
        'include_finished' => 'getIncludeFinished',
        'responsible_user_id' => 'getResponsibleUserId',
        'start_date' => 'getStartDate',
        'sub_type' => 'getSubType',
        'tags' => 'getTags',
        'type' => 'getType',
        'types' => 'getTypes',
        'urgencies' => 'getUrgencies',
        'user_tags' => 'getUserTags'
    ];

    /**
     * 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 SUB_TYPE_ACC = 'ACC';
    public const SUB_TYPE_DCA = 'DCA';
    public const SUB_TYPE_CAP = 'CAP';
    public const SUB_TYPE_REC = 'REC';
    public const SUB_TYPE_RTC = 'RTC';
    public const SUB_TYPE_DVO = 'DVO';
    public const SUB_TYPE_DDT = 'DDT';
    public const SUB_TYPE_DER = 'DER';
    public const SUB_TYPE_DEP = 'DEP';
    public const SUB_TYPE_DBT = 'DBT';
    public const SUB_TYPE_OAC = 'OAC';
    public const SUB_TYPE_VAT = 'VAT';
    public const SUB_TYPE_EBD = 'EBD';
    public const SUB_TYPE_RVT = 'RVT';
    public const SUB_TYPE_PAV = 'PAV';
    public const SUB_TYPE_SAL = 'SAL';
    public const SUB_TYPE_CIV = 'CIV';
    public const SUB_TYPE_ECI = 'ECI';
    public const SUB_TYPE_MAR = 'MAR';
    public const SUB_TYPE_RAR = 'RAR';
    public const SUB_TYPE_CRE = 'CRE';
    public const SUB_TYPE_TRE = 'TRE';
    public const SUB_TYPE_DCI = 'DCI';
    public const SUB_TYPE_SIV = 'SIV';
    public const SUB_TYPE_SIN = 'SIN';
    public const SUB_TYPE_SIA = 'SIA';
    public const SUB_TYPE_CPP = 'CPP';
    public const SUB_TYPE_PAL = 'PAL';
    public const SUB_TYPE_SIB = 'SIB';
    public const SUB_TYPE_SID = 'SID';
    public const SUB_TYPE_SRG = 'SRG';
    public const SUB_TYPE_SPY = 'SPY';
    public const SUB_TYPE_SRP = 'SRP';
    public const SUB_TYPE_REQ = 'REQ';
    public const SUB_TYPE_OSI = 'OSI';
    public const SUB_TYPE_FBK = 'FBK';
    public const SUB_TYPE_PEC = 'PEC';
    public const SUB_TYPE_OER = 'OER';
    public const SUB_TYPE_AIS = 'AIS';
    public const SUB_TYPE_FSA = 'FSA';
    public const SUB_TYPE_QFA = 'QFA';
    public const SUB_TYPE_PRY = 'PRY';
    public const SUB_TYPE_COR = 'COR';
    public const SUB_TYPE_MFA = 'MFA';
    public const SUB_TYPE_OWN = 'OWN';
    public const SUB_TYPE_OWS = 'OWS';
    public const SUB_TYPE_ANR = 'ANR';
    public const SUB_TYPE_DEC = 'DEC';
    public const SUB_TYPE_SAA = 'SAA';
    public const SUB_TYPE_FAR = 'FAR';
    public const SUB_TYPE_OAR = 'OAR';
    public const SUB_TYPE_INC = 'INC';
    public const SUB_TYPE_EPD = 'EPD';
    public const SUB_TYPE_EPA = 'EPA';
    public const SUB_TYPE_IIT = 'IIT';
    public const SUB_TYPE_PLA = 'PLA';
    public const SUB_TYPE_QID = 'QID';
    public const SUB_TYPE_PIN = 'PIN';
    public const SUB_TYPE_LID = 'LID';
    public const SUB_TYPE_PAR = 'PAR';
    public const SUB_TYPE_CRP = 'CRP';
    public const SUB_TYPE_SPC = 'SPC';
    public const SUB_TYPE_PAY = 'PAY';
    public const SUB_TYPE_AVD = 'AVD';
    public const SUB_TYPE_ADI = 'ADI';
    public const SUB_TYPE_PAT = 'PAT';
    public const SUB_TYPE_ORE = 'ORE';
    public const SUB_TYPE_FRE = 'FRE';
    public const SUB_TYPE_STA = 'STA';
    public const SUB_TYPE_KUS = 'KUS';
    public const SUB_TYPE_KUI = 'KUI';
    public const SUB_TYPE_KUD = 'KUD';
    public const SUB_TYPE_OW1 = 'OW1';
    public const TYPE_ACC = 'ACC';
    public const TYPE_VAT = 'VAT';
    public const TYPE_SAL = 'SAL';
    public const TYPE_CIV = 'CIV';
    public const TYPE_SIV = 'SIV';
    public const TYPE_FBK = 'FBK';
    public const TYPE_ANR = 'ANR';
    public const TYPE_INC = 'INC';
    public const TYPE_PAR = 'PAR';
    public const TYPE_OW1 = 'OW1';
    public const TYPES_ACC = 'ACC';
    public const TYPES_VAT = 'VAT';
    public const TYPES_SAL = 'SAL';
    public const TYPES_CIV = 'CIV';
    public const TYPES_SIV = 'SIV';
    public const TYPES_FBK = 'FBK';
    public const TYPES_ANR = 'ANR';
    public const TYPES_INC = 'INC';
    public const TYPES_PAR = 'PAR';
    public const TYPES_OW1 = 'OW1';
    public const URGENCIES_URGENT = 'URGENT';
    public const URGENCIES_FUTURE = 'FUTURE';
    public const URGENCIES_AVAILABLE = 'AVAILABLE';

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getSubTypeAllowableValues()
    {
        return [
            self::SUB_TYPE_ACC,
            self::SUB_TYPE_DCA,
            self::SUB_TYPE_CAP,
            self::SUB_TYPE_REC,
            self::SUB_TYPE_RTC,
            self::SUB_TYPE_DVO,
            self::SUB_TYPE_DDT,
            self::SUB_TYPE_DER,
            self::SUB_TYPE_DEP,
            self::SUB_TYPE_DBT,
            self::SUB_TYPE_OAC,
            self::SUB_TYPE_VAT,
            self::SUB_TYPE_EBD,
            self::SUB_TYPE_RVT,
            self::SUB_TYPE_PAV,
            self::SUB_TYPE_SAL,
            self::SUB_TYPE_CIV,
            self::SUB_TYPE_ECI,
            self::SUB_TYPE_MAR,
            self::SUB_TYPE_RAR,
            self::SUB_TYPE_CRE,
            self::SUB_TYPE_TRE,
            self::SUB_TYPE_DCI,
            self::SUB_TYPE_SIV,
            self::SUB_TYPE_SIN,
            self::SUB_TYPE_SIA,
            self::SUB_TYPE_CPP,
            self::SUB_TYPE_PAL,
            self::SUB_TYPE_SIB,
            self::SUB_TYPE_SID,
            self::SUB_TYPE_SRG,
            self::SUB_TYPE_SPY,
            self::SUB_TYPE_SRP,
            self::SUB_TYPE_REQ,
            self::SUB_TYPE_OSI,
            self::SUB_TYPE_FBK,
            self::SUB_TYPE_PEC,
            self::SUB_TYPE_OER,
            self::SUB_TYPE_AIS,
            self::SUB_TYPE_FSA,
            self::SUB_TYPE_QFA,
            self::SUB_TYPE_PRY,
            self::SUB_TYPE_COR,
            self::SUB_TYPE_MFA,
            self::SUB_TYPE_OWN,
            self::SUB_TYPE_OWS,
            self::SUB_TYPE_ANR,
            self::SUB_TYPE_DEC,
            self::SUB_TYPE_SAA,
            self::SUB_TYPE_FAR,
            self::SUB_TYPE_OAR,
            self::SUB_TYPE_INC,
            self::SUB_TYPE_EPD,
            self::SUB_TYPE_EPA,
            self::SUB_TYPE_IIT,
            self::SUB_TYPE_PLA,
            self::SUB_TYPE_QID,
            self::SUB_TYPE_PIN,
            self::SUB_TYPE_LID,
            self::SUB_TYPE_PAR,
            self::SUB_TYPE_CRP,
            self::SUB_TYPE_SPC,
            self::SUB_TYPE_PAY,
            self::SUB_TYPE_AVD,
            self::SUB_TYPE_ADI,
            self::SUB_TYPE_PAT,
            self::SUB_TYPE_ORE,
            self::SUB_TYPE_FRE,
            self::SUB_TYPE_STA,
            self::SUB_TYPE_KUS,
            self::SUB_TYPE_KUI,
            self::SUB_TYPE_KUD,
            self::SUB_TYPE_OW1,
        ];
    }

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getTypeAllowableValues()
    {
        return [
            self::TYPE_ACC,
            self::TYPE_VAT,
            self::TYPE_SAL,
            self::TYPE_CIV,
            self::TYPE_SIV,
            self::TYPE_FBK,
            self::TYPE_ANR,
            self::TYPE_INC,
            self::TYPE_PAR,
            self::TYPE_OW1,
        ];
    }

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getTypesAllowableValues()
    {
        return [
            self::TYPES_ACC,
            self::TYPES_VAT,
            self::TYPES_SAL,
            self::TYPES_CIV,
            self::TYPES_SIV,
            self::TYPES_FBK,
            self::TYPES_ANR,
            self::TYPES_INC,
            self::TYPES_PAR,
            self::TYPES_OW1,
        ];
    }

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getUrgenciesAllowableValues()
    {
        return [
            self::URGENCIES_URGENT,
            self::URGENCIES_FUTURE,
            self::URGENCIES_AVAILABLE,
        ];
    }

    /**
     * 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('agreements', $data ?? [], null);
        $this->setIfExists('assignee_id', $data ?? [], null);
        $this->setIfExists('client_assignee_id', $data ?? [], null);
        $this->setIfExists('client_db_id', $data ?? [], null);
        $this->setIfExists('client_id', $data ?? [], null);
        $this->setIfExists('end_date', $data ?? [], null);
        $this->setIfExists('include_finished', $data ?? [], null);
        $this->setIfExists('responsible_user_id', $data ?? [], null);
        $this->setIfExists('start_date', $data ?? [], null);
        $this->setIfExists('sub_type', $data ?? [], null);
        $this->setIfExists('tags', $data ?? [], null);
        $this->setIfExists('type', $data ?? [], null);
        $this->setIfExists('types', $data ?? [], null);
        $this->setIfExists('urgencies', $data ?? [], null);
        $this->setIfExists('user_tags', $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 = [];

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

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

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

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


