<?php

/**
 * MonitoringPromptUpdateFlagsDto.
 *
 * PHP version 7.4
 *
 * @category Class
 *
 * @author   OpenAPI Generator team
 *
 * @see     https://openapi-generator.tech
 */

/**
 * Sync Core.
 *
 * The Sync Core that sends and receives content from all connected sites and services for Content Sync.
 *
 * The version of the OpenAPI document: 1.0
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 6.4.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 EdgeBox\SyncCore\V2\Raw\Model;

use EdgeBox\SyncCore\V2\Raw\ObjectSerializer;

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

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

    /**
     * Array of property to type mappings. Used for (de)serialization.
     *
     * @var string[]
     */
    protected static $openAPITypes = [
        'key' => 'string',
        'status' => 'MonitoringPromptStatus',
        'version' => 'float',
        'previousStatus' => 'MonitoringPromptStatus',
        'revisionArchivedAt' => 'float',
        'name' => 'string',
        'type' => 'MonitoringPromptType',
        'templatePrompt' => 'DynamicRevisionReference',
        'promptText' => 'string',
        'promptLocale' => '\EdgeBox\SyncCore\V2\Raw\Model\TermAssignmentTerm',
        'templateFacet' => 'TaxonomyFacet',
        'templateTerms' => '\EdgeBox\SyncCore\V2\Raw\Model\DynamicRevisionReference[]',
        'engines' => '\EdgeBox\SyncCore\V2\Raw\Model\DynamicRevisionReference[]',
        'countryLocales' => '\EdgeBox\SyncCore\V2\Raw\Model\MonitoringPromptCountryLocale[]',
        'frequencyHours' => 'float',
        'lastRun' => 'float',
        'nextRun' => 'float',
        'staticTerms' => '\EdgeBox\SyncCore\V2\Raw\Model\DynamicRevisionReference[]',
        'terms' => '\EdgeBox\SyncCore\V2\Raw\Model\TermAssignment[]',
        'targetTerms' => '\EdgeBox\SyncCore\V2\Raw\Model\TermAssignment[]',
        'customer' => '\EdgeBox\SyncCore\V2\Raw\Model\RuntimeRemoteEntityDependencyWithDependenciesEntity',
        'project' => '\EdgeBox\SyncCore\V2\Raw\Model\RuntimeRemoteEntityDependencyWithDependenciesEntity',
        'id' => 'string',
        'createdAt' => 'float',
        'updatedAt' => 'float',
        'deletedAt' => 'float',
        'updateTranslations' => '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 = [
        'key' => null,
        'status' => null,
        'version' => null,
        'previousStatus' => null,
        'revisionArchivedAt' => null,
        'name' => null,
        'type' => null,
        'templatePrompt' => null,
        'promptText' => null,
        'promptLocale' => null,
        'templateFacet' => null,
        'templateTerms' => null,
        'engines' => null,
        'countryLocales' => null,
        'frequencyHours' => null,
        'lastRun' => null,
        'nextRun' => null,
        'staticTerms' => null,
        'terms' => null,
        'targetTerms' => null,
        'customer' => null,
        'project' => null,
        'id' => null,
        'createdAt' => null,
        'updatedAt' => null,
        'deletedAt' => null,
        'updateTranslations' => null,
    ];

    /**
     * Array of nullable properties. Used for (de)serialization.
     *
     * @var bool[]
     */
    protected static array $openAPINullables = [
        'key' => false,
        'status' => false,
        'version' => false,
        'previousStatus' => true,
        'revisionArchivedAt' => true,
        'name' => false,
        'type' => false,
        'templatePrompt' => true,
        'promptText' => false,
        'promptLocale' => false,
        'templateFacet' => true,
        'templateTerms' => true,
        'engines' => false,
        'countryLocales' => false,
        'frequencyHours' => false,
        'lastRun' => true,
        'nextRun' => true,
        'staticTerms' => true,
        'terms' => true,
        'targetTerms' => true,
        'customer' => false,
        'project' => false,
        'id' => false,
        'createdAt' => false,
        'updatedAt' => false,
        'deletedAt' => true,
        'updateTranslations' => true,
    ];

    /**
     * If a nullable field gets set to null, insert it here.
     *
     * @var bool[]
     */
    protected array $openAPINullablesSetToNull = [];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name.
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'key' => 'key',
        'status' => 'status',
        'version' => 'version',
        'previousStatus' => 'previousStatus',
        'revisionArchivedAt' => 'revisionArchivedAt',
        'name' => 'name',
        'type' => 'type',
        'templatePrompt' => 'templatePrompt',
        'promptText' => 'promptText',
        'promptLocale' => 'promptLocale',
        'templateFacet' => 'templateFacet',
        'templateTerms' => 'templateTerms',
        'engines' => 'engines',
        'countryLocales' => 'countryLocales',
        'frequencyHours' => 'frequencyHours',
        'lastRun' => 'lastRun',
        'nextRun' => 'nextRun',
        'staticTerms' => 'staticTerms',
        'terms' => 'terms',
        'targetTerms' => 'targetTerms',
        'customer' => 'customer',
        'project' => 'project',
        'id' => 'id',
        'createdAt' => 'createdAt',
        'updatedAt' => 'updatedAt',
        'deletedAt' => 'deletedAt',
        'updateTranslations' => 'updateTranslations',
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses).
     *
     * @var string[]
     */
    protected static $setters = [
        'key' => 'setKey',
        'status' => 'setStatus',
        'version' => 'setVersion',
        'previousStatus' => 'setPreviousStatus',
        'revisionArchivedAt' => 'setRevisionArchivedAt',
        'name' => 'setName',
        'type' => 'setType',
        'templatePrompt' => 'setTemplatePrompt',
        'promptText' => 'setPromptText',
        'promptLocale' => 'setPromptLocale',
        'templateFacet' => 'setTemplateFacet',
        'templateTerms' => 'setTemplateTerms',
        'engines' => 'setEngines',
        'countryLocales' => 'setCountryLocales',
        'frequencyHours' => 'setFrequencyHours',
        'lastRun' => 'setLastRun',
        'nextRun' => 'setNextRun',
        'staticTerms' => 'setStaticTerms',
        'terms' => 'setTerms',
        'targetTerms' => 'setTargetTerms',
        'customer' => 'setCustomer',
        'project' => 'setProject',
        'id' => 'setId',
        'createdAt' => 'setCreatedAt',
        'updatedAt' => 'setUpdatedAt',
        'deletedAt' => 'setDeletedAt',
        'updateTranslations' => 'setUpdateTranslations',
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests).
     *
     * @var string[]
     */
    protected static $getters = [
        'key' => 'getKey',
        'status' => 'getStatus',
        'version' => 'getVersion',
        'previousStatus' => 'getPreviousStatus',
        'revisionArchivedAt' => 'getRevisionArchivedAt',
        'name' => 'getName',
        'type' => 'getType',
        'templatePrompt' => 'getTemplatePrompt',
        'promptText' => 'getPromptText',
        'promptLocale' => 'getPromptLocale',
        'templateFacet' => 'getTemplateFacet',
        'templateTerms' => 'getTemplateTerms',
        'engines' => 'getEngines',
        'countryLocales' => 'getCountryLocales',
        'frequencyHours' => 'getFrequencyHours',
        'lastRun' => 'getLastRun',
        'nextRun' => 'getNextRun',
        'staticTerms' => 'getStaticTerms',
        'terms' => 'getTerms',
        'targetTerms' => 'getTargetTerms',
        'customer' => 'getCustomer',
        'project' => 'getProject',
        'id' => 'getId',
        'createdAt' => 'getCreatedAt',
        'updatedAt' => 'getUpdatedAt',
        'deletedAt' => 'getDeletedAt',
        'updateTranslations' => 'getUpdateTranslations',
    ];

    /**
     * Associative array for storing property values.
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor.
     *
     * @param mixed[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(?array $data = null)
    {
        $this->setIfExists('key', $data ?? [], null);
        $this->setIfExists('status', $data ?? [], null);
        $this->setIfExists('version', $data ?? [], null);
        $this->setIfExists('previousStatus', $data ?? [], null);
        $this->setIfExists('revisionArchivedAt', $data ?? [], null);
        $this->setIfExists('name', $data ?? [], null);
        $this->setIfExists('type', $data ?? [], null);
        $this->setIfExists('templatePrompt', $data ?? [], null);
        $this->setIfExists('promptText', $data ?? [], null);
        $this->setIfExists('promptLocale', $data ?? [], null);
        $this->setIfExists('templateFacet', $data ?? [], null);
        $this->setIfExists('templateTerms', $data ?? [], null);
        $this->setIfExists('engines', $data ?? [], null);
        $this->setIfExists('countryLocales', $data ?? [], null);
        $this->setIfExists('frequencyHours', $data ?? [], null);
        $this->setIfExists('lastRun', $data ?? [], null);
        $this->setIfExists('nextRun', $data ?? [], null);
        $this->setIfExists('staticTerms', $data ?? [], null);
        $this->setIfExists('terms', $data ?? [], null);
        $this->setIfExists('targetTerms', $data ?? [], null);
        $this->setIfExists('customer', $data ?? [], null);
        $this->setIfExists('project', $data ?? [], null);
        $this->setIfExists('id', $data ?? [], null);
        $this->setIfExists('createdAt', $data ?? [], null);
        $this->setIfExists('updatedAt', $data ?? [], null);
        $this->setIfExists('deletedAt', $data ?? [], null);
        $this->setIfExists('updateTranslations', $data ?? [], null);
    }

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

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

    /**
     * Checks if a property is nullable.
     */
    public static function isNullable(string $property): bool
    {
        return self::openAPINullables()[$property] ?? false;
    }

    /**
     * Checks if a nullable property is set to null.
     */
    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.
     *
     * @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;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        if (null === $this->container['key']) {
            $invalidProperties[] = "'key' can't be null";
        }
        if (null === $this->container['status']) {
            $invalidProperties[] = "'status' can't be null";
        }
        if (null === $this->container['version']) {
            $invalidProperties[] = "'version' can't be null";
        }
        if (null === $this->container['name']) {
            $invalidProperties[] = "'name' can't be null";
        }
        if (null === $this->container['type']) {
            $invalidProperties[] = "'type' can't be null";
        }
        if (null === $this->container['promptText']) {
            $invalidProperties[] = "'promptText' can't be null";
        }
        if (null === $this->container['promptLocale']) {
            $invalidProperties[] = "'promptLocale' can't be null";
        }
        if (null === $this->container['engines']) {
            $invalidProperties[] = "'engines' can't be null";
        }
        if (null === $this->container['countryLocales']) {
            $invalidProperties[] = "'countryLocales' can't be null";
        }
        if (null === $this->container['frequencyHours']) {
            $invalidProperties[] = "'frequencyHours' can't be null";
        }
        if (null === $this->container['customer']) {
            $invalidProperties[] = "'customer' can't be null";
        }
        if (null === $this->container['project']) {
            $invalidProperties[] = "'project' can't be null";
        }
        if (null === $this->container['id']) {
            $invalidProperties[] = "'id' can't be null";
        }
        if (null === $this->container['createdAt']) {
            $invalidProperties[] = "'createdAt' can't be null";
        }
        if (null === $this->container['updatedAt']) {
            $invalidProperties[] = "'updatedAt' 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 0 === count($this->listInvalidProperties());
    }

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

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

        return $this;
    }

    /**
     * Gets status.
     *
     * @return MonitoringPromptStatus
     */
    public function getStatus()
    {
        return $this->container['status'];
    }

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

        return $this;
    }

    /**
     * Gets version.
     *
     * @return float
     */
    public function getVersion()
    {
        return $this->container['version'];
    }

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

        return $this;
    }

    /**
     * Gets previousStatus.
     *
     * @return null|MonitoringPromptStatus
     */
    public function getPreviousStatus()
    {
        return $this->container['previousStatus'];
    }

    /**
     * Sets previousStatus.
     *
     * @param null|MonitoringPromptStatus $previousStatus previousStatus
     *
     * @return self
     */
    public function setPreviousStatus($previousStatus)
    {
        if (is_null($previousStatus)) {
            array_push($this->openAPINullablesSetToNull, 'previousStatus');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('previousStatus', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['previousStatus'] = $previousStatus;

        return $this;
    }

    /**
     * Gets revisionArchivedAt.
     *
     * @return null|float
     */
    public function getRevisionArchivedAt()
    {
        return $this->container['revisionArchivedAt'];
    }

    /**
     * Sets revisionArchivedAt.
     *
     * @param null|float $revisionArchivedAt revisionArchivedAt
     *
     * @return self
     */
    public function setRevisionArchivedAt($revisionArchivedAt)
    {
        if (is_null($revisionArchivedAt)) {
            array_push($this->openAPINullablesSetToNull, 'revisionArchivedAt');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('revisionArchivedAt', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['revisionArchivedAt'] = $revisionArchivedAt;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets templatePrompt.
     *
     * @return null|DynamicRevisionReference
     */
    public function getTemplatePrompt()
    {
        return $this->container['templatePrompt'];
    }

    /**
     * Sets templatePrompt.
     *
     * @param null|DynamicRevisionReference $templatePrompt templatePrompt
     *
     * @return self
     */
    public function setTemplatePrompt($templatePrompt)
    {
        if (is_null($templatePrompt)) {
            array_push($this->openAPINullablesSetToNull, 'templatePrompt');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('templatePrompt', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['templatePrompt'] = $templatePrompt;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets promptLocale.
     *
     * @return TermAssignmentTerm
     */
    public function getPromptLocale()
    {
        return $this->container['promptLocale'];
    }

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

        return $this;
    }

    /**
     * Gets templateFacet.
     *
     * @return null|TaxonomyFacet
     */
    public function getTemplateFacet()
    {
        return $this->container['templateFacet'];
    }

    /**
     * Sets templateFacet.
     *
     * @param null|TaxonomyFacet $templateFacet templateFacet
     *
     * @return self
     */
    public function setTemplateFacet($templateFacet)
    {
        if (is_null($templateFacet)) {
            array_push($this->openAPINullablesSetToNull, 'templateFacet');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('templateFacet', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['templateFacet'] = $templateFacet;

        return $this;
    }

    /**
     * Gets templateTerms.
     *
     * @return null|DynamicRevisionReference[]
     */
    public function getTemplateTerms()
    {
        return $this->container['templateTerms'];
    }

    /**
     * Sets templateTerms.
     *
     * @param null|DynamicRevisionReference[] $templateTerms templateTerms
     *
     * @return self
     */
    public function setTemplateTerms($templateTerms)
    {
        if (is_null($templateTerms)) {
            array_push($this->openAPINullablesSetToNull, 'templateTerms');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('templateTerms', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['templateTerms'] = $templateTerms;

        return $this;
    }

    /**
     * Gets engines.
     *
     * @return DynamicRevisionReference[]
     */
    public function getEngines()
    {
        return $this->container['engines'];
    }

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

        return $this;
    }

    /**
     * Gets countryLocales.
     *
     * @return MonitoringPromptCountryLocale[]
     */
    public function getCountryLocales()
    {
        return $this->container['countryLocales'];
    }

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

        return $this;
    }

    /**
     * Gets frequencyHours.
     *
     * @return float
     */
    public function getFrequencyHours()
    {
        return $this->container['frequencyHours'];
    }

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

        return $this;
    }

    /**
     * Gets lastRun.
     *
     * @return null|float
     */
    public function getLastRun()
    {
        return $this->container['lastRun'];
    }

    /**
     * Sets lastRun.
     *
     * @param null|float $lastRun lastRun
     *
     * @return self
     */
    public function setLastRun($lastRun)
    {
        if (is_null($lastRun)) {
            array_push($this->openAPINullablesSetToNull, 'lastRun');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('lastRun', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['lastRun'] = $lastRun;

        return $this;
    }

    /**
     * Gets nextRun.
     *
     * @return null|float
     */
    public function getNextRun()
    {
        return $this->container['nextRun'];
    }

    /**
     * Sets nextRun.
     *
     * @param null|float $nextRun nextRun
     *
     * @return self
     */
    public function setNextRun($nextRun)
    {
        if (is_null($nextRun)) {
            array_push($this->openAPINullablesSetToNull, 'nextRun');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('nextRun', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['nextRun'] = $nextRun;

        return $this;
    }

    /**
     * Gets staticTerms.
     *
     * @return null|DynamicRevisionReference[]
     */
    public function getStaticTerms()
    {
        return $this->container['staticTerms'];
    }

    /**
     * Sets staticTerms.
     *
     * @param null|DynamicRevisionReference[] $staticTerms staticTerms
     *
     * @return self
     */
    public function setStaticTerms($staticTerms)
    {
        if (is_null($staticTerms)) {
            array_push($this->openAPINullablesSetToNull, 'staticTerms');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('staticTerms', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['staticTerms'] = $staticTerms;

        return $this;
    }

    /**
     * Gets terms.
     *
     * @return null|TermAssignment[]
     */
    public function getTerms()
    {
        return $this->container['terms'];
    }

    /**
     * Sets terms.
     *
     * @param null|TermAssignment[] $terms terms
     *
     * @return self
     */
    public function setTerms($terms)
    {
        if (is_null($terms)) {
            array_push($this->openAPINullablesSetToNull, 'terms');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('terms', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['terms'] = $terms;

        return $this;
    }

    /**
     * Gets targetTerms.
     *
     * @return null|TermAssignment[]
     */
    public function getTargetTerms()
    {
        return $this->container['targetTerms'];
    }

    /**
     * Sets targetTerms.
     *
     * @param null|TermAssignment[] $targetTerms targetTerms
     *
     * @return self
     */
    public function setTargetTerms($targetTerms)
    {
        if (is_null($targetTerms)) {
            array_push($this->openAPINullablesSetToNull, 'targetTerms');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('targetTerms', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['targetTerms'] = $targetTerms;

        return $this;
    }

    /**
     * Gets customer.
     *
     * @return RuntimeRemoteEntityDependencyWithDependenciesEntity
     */
    public function getCustomer()
    {
        return $this->container['customer'];
    }

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

        return $this;
    }

    /**
     * Gets project.
     *
     * @return RuntimeRemoteEntityDependencyWithDependenciesEntity
     */
    public function getProject()
    {
        return $this->container['project'];
    }

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

        return $this;
    }

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

    /**
     * Sets id.
     *
     * @param string $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 createdAt.
     *
     * @return float
     */
    public function getCreatedAt()
    {
        return $this->container['createdAt'];
    }

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

        return $this;
    }

    /**
     * Gets updatedAt.
     *
     * @return float
     */
    public function getUpdatedAt()
    {
        return $this->container['updatedAt'];
    }

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

        return $this;
    }

    /**
     * Gets deletedAt.
     *
     * @return null|float
     */
    public function getDeletedAt()
    {
        return $this->container['deletedAt'];
    }

    /**
     * Sets deletedAt.
     *
     * @param null|float $deletedAt deletedAt
     *
     * @return self
     */
    public function setDeletedAt($deletedAt)
    {
        if (is_null($deletedAt)) {
            array_push($this->openAPINullablesSetToNull, 'deletedAt');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('deletedAt', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['deletedAt'] = $deletedAt;

        return $this;
    }

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

    /**
     * Sets updateTranslations.
     *
     * @param null|bool $updateTranslations updateTranslations
     *
     * @return self
     */
    public function setUpdateTranslations($updateTranslations)
    {
        if (is_null($updateTranslations)) {
            array_push($this->openAPINullablesSetToNull, 'updateTranslations');
        } else {
            $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
            $index = array_search('updateTranslations', $nullablesSetToNull);
            if (false !== $index) {
                unset($nullablesSetToNull[$index]);
                $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
            }
        }
        $this->container['updateTranslations'] = $updateTranslations;

        return $this;
    }

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

    /**
     * Gets offset.
     *
     * @param int $offset Offset
     *
     * @return null|mixed
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return $this->container[$offset] ?? null;
    }

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

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

    /**
     * Serializes the object to a value that can be serialized natively by json_encode().
     *
     * @see 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 a header-safe presentation of the object.
     *
     * @return string
     */
    public function toHeaderValue()
    {
        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }

    /**
     * Array of nullable properties.
     */
    protected static function openAPINullables(): array
    {
        return self::$openAPINullables;
    }

    /**
     * Array of nullable field names deliberately set to null.
     *
     * @return bool[]
     */
    private function getOpenAPINullablesSetToNull(): array
    {
        return $this->openAPINullablesSetToNull;
    }

    /**
     * Setter - Array of nullable field names deliberately set to null.
     *
     * @param bool[] $openAPINullablesSetToNull
     */
    private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
    {
        $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
    }

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