<?php

/**
 * ContentItemEntity.
 *
 * 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;

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

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

    /**
     * Array of property to type mappings. Used for (de)serialization.
     *
     * @var string[]
     */
    protected static $openAPITypes = [
        'site' => '\EdgeBox\SyncCore\V2\Raw\Model\RuntimeRemoteEntityDependencyWithDependenciesEntity',
        'locale' => 'DynamicReference',
        'key' => 'string',
        'name' => 'string',
        'description' => 'string',
        'entityReference' => 'RemoteEntityReference',
        'entityTypeVersion' => 'DynamicReference',
        'entityType' => 'DynamicReference',
        'type' => 'ContentRepresentation',
        'status' => 'ContentItemStatus',
        'version' => 'float',
        'previousStatus' => 'ContentItemStatus',
        'revisionArchivedAt' => 'float',
        'languageKey' => 'string',
        'workflowStage' => 'ContentWorkflowState',
        'sourceWorkflowStage' => 'string',
        'stageSource' => 'ContentStageSource',
        'fetchedAt' => 'float',
        'rawResponseBody' => 'DynamicReference',
        'responseEtag' => 'string',
        'responseBodyHash' => 'string',
        'requestCompatibilityDate' => 'string',
        'rawRequestDetails' => 'DynamicReference',
        'contentType' => 'string',
        'urlAliases' => 'string[]',
        'url' => 'string',
        'canonicalUrl' => 'string',
        'shortlinkUrl' => 'string',
        'contentPriority' => 'ContentPriority',
        'contentPrioritySource' => 'ContentPrioritySource',
        'hreflangUrls' => 'mixed',
        'sitemaps' => '\EdgeBox\SyncCore\V2\Raw\Model\ContentItemSitemapInfo[]',
        'contentGroup' => 'DynamicReference',
        'issues' => 'ContentIssuesRollup',
        'nextCrawlAt' => 'float',
        'lastCrawledAt' => 'float',
        'extractions' => 'ContentExtractions',
        'terms' => 'Terms',
        'health' => '\EdgeBox\SyncCore\V2\Raw\Model\ContentHealth[]',
        'healthScore' => 'float',
        'previousSnapshot' => 'DynamicRevisionReference',
        'customer' => '\EdgeBox\SyncCore\V2\Raw\Model\RuntimeRemoteEntityDependencyWithDependenciesEntity',
        'project' => '\EdgeBox\SyncCore\V2\Raw\Model\RuntimeRemoteEntityDependencyWithDependenciesEntity',
        'id' => 'string',
        'createdAt' => 'float',
        'updatedAt' => 'float',
        'deletedAt' => 'float',
    ];

    /**
     * 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 = [
        'site' => null,
        'locale' => null,
        'key' => null,
        'name' => null,
        'description' => null,
        'entityReference' => null,
        'entityTypeVersion' => null,
        'entityType' => null,
        'type' => null,
        'status' => null,
        'version' => null,
        'previousStatus' => null,
        'revisionArchivedAt' => null,
        'languageKey' => null,
        'workflowStage' => null,
        'sourceWorkflowStage' => null,
        'stageSource' => null,
        'fetchedAt' => null,
        'rawResponseBody' => null,
        'responseEtag' => null,
        'responseBodyHash' => null,
        'requestCompatibilityDate' => null,
        'rawRequestDetails' => null,
        'contentType' => null,
        'urlAliases' => null,
        'url' => null,
        'canonicalUrl' => null,
        'shortlinkUrl' => null,
        'contentPriority' => null,
        'contentPrioritySource' => null,
        'hreflangUrls' => null,
        'sitemaps' => null,
        'contentGroup' => null,
        'issues' => null,
        'nextCrawlAt' => null,
        'lastCrawledAt' => null,
        'extractions' => null,
        'terms' => null,
        'health' => null,
        'healthScore' => null,
        'previousSnapshot' => null,
        'customer' => null,
        'project' => null,
        'id' => null,
        'createdAt' => null,
        'updatedAt' => null,
        'deletedAt' => null,
    ];

    /**
     * Array of nullable properties. Used for (de)serialization.
     *
     * @var bool[]
     */
    protected static array $openAPINullables = [
        'site' => false,
        'locale' => true,
        'key' => false,
        'name' => true,
        'description' => true,
        'entityReference' => true,
        'entityTypeVersion' => true,
        'entityType' => true,
        'type' => false,
        'status' => false,
        'version' => false,
        'previousStatus' => true,
        'revisionArchivedAt' => true,
        'languageKey' => true,
        'workflowStage' => true,
        'sourceWorkflowStage' => true,
        'stageSource' => true,
        'fetchedAt' => true,
        'rawResponseBody' => true,
        'responseEtag' => true,
        'responseBodyHash' => true,
        'requestCompatibilityDate' => false,
        'rawRequestDetails' => true,
        'contentType' => true,
        'urlAliases' => true,
        'url' => true,
        'canonicalUrl' => true,
        'shortlinkUrl' => true,
        'contentPriority' => false,
        'contentPrioritySource' => false,
        'hreflangUrls' => true,
        'sitemaps' => true,
        'contentGroup' => true,
        'issues' => true,
        'nextCrawlAt' => true,
        'lastCrawledAt' => true,
        'extractions' => true,
        'terms' => true,
        'health' => true,
        'healthScore' => true,
        'previousSnapshot' => true,
        'customer' => false,
        'project' => false,
        'id' => false,
        'createdAt' => false,
        'updatedAt' => false,
        'deletedAt' => 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 = [
        'site' => 'site',
        'locale' => 'locale',
        'key' => 'key',
        'name' => 'name',
        'description' => 'description',
        'entityReference' => 'entityReference',
        'entityTypeVersion' => 'entityTypeVersion',
        'entityType' => 'entityType',
        'type' => 'type',
        'status' => 'status',
        'version' => 'version',
        'previousStatus' => 'previousStatus',
        'revisionArchivedAt' => 'revisionArchivedAt',
        'languageKey' => 'languageKey',
        'workflowStage' => 'workflowStage',
        'sourceWorkflowStage' => 'sourceWorkflowStage',
        'stageSource' => 'stageSource',
        'fetchedAt' => 'fetchedAt',
        'rawResponseBody' => 'rawResponseBody',
        'responseEtag' => 'responseEtag',
        'responseBodyHash' => 'responseBodyHash',
        'requestCompatibilityDate' => 'requestCompatibilityDate',
        'rawRequestDetails' => 'rawRequestDetails',
        'contentType' => 'contentType',
        'urlAliases' => 'urlAliases',
        'url' => 'url',
        'canonicalUrl' => 'canonicalUrl',
        'shortlinkUrl' => 'shortlinkUrl',
        'contentPriority' => 'contentPriority',
        'contentPrioritySource' => 'contentPrioritySource',
        'hreflangUrls' => 'hreflangUrls',
        'sitemaps' => 'sitemaps',
        'contentGroup' => 'contentGroup',
        'issues' => 'issues',
        'nextCrawlAt' => 'nextCrawlAt',
        'lastCrawledAt' => 'lastCrawledAt',
        'extractions' => 'extractions',
        'terms' => 'terms',
        'health' => 'health',
        'healthScore' => 'healthScore',
        'previousSnapshot' => 'previousSnapshot',
        'customer' => 'customer',
        'project' => 'project',
        'id' => 'id',
        'createdAt' => 'createdAt',
        'updatedAt' => 'updatedAt',
        'deletedAt' => 'deletedAt',
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses).
     *
     * @var string[]
     */
    protected static $setters = [
        'site' => 'setSite',
        'locale' => 'setLocale',
        'key' => 'setKey',
        'name' => 'setName',
        'description' => 'setDescription',
        'entityReference' => 'setEntityReference',
        'entityTypeVersion' => 'setEntityTypeVersion',
        'entityType' => 'setEntityType',
        'type' => 'setType',
        'status' => 'setStatus',
        'version' => 'setVersion',
        'previousStatus' => 'setPreviousStatus',
        'revisionArchivedAt' => 'setRevisionArchivedAt',
        'languageKey' => 'setLanguageKey',
        'workflowStage' => 'setWorkflowStage',
        'sourceWorkflowStage' => 'setSourceWorkflowStage',
        'stageSource' => 'setStageSource',
        'fetchedAt' => 'setFetchedAt',
        'rawResponseBody' => 'setRawResponseBody',
        'responseEtag' => 'setResponseEtag',
        'responseBodyHash' => 'setResponseBodyHash',
        'requestCompatibilityDate' => 'setRequestCompatibilityDate',
        'rawRequestDetails' => 'setRawRequestDetails',
        'contentType' => 'setContentType',
        'urlAliases' => 'setUrlAliases',
        'url' => 'setUrl',
        'canonicalUrl' => 'setCanonicalUrl',
        'shortlinkUrl' => 'setShortlinkUrl',
        'contentPriority' => 'setContentPriority',
        'contentPrioritySource' => 'setContentPrioritySource',
        'hreflangUrls' => 'setHreflangUrls',
        'sitemaps' => 'setSitemaps',
        'contentGroup' => 'setContentGroup',
        'issues' => 'setIssues',
        'nextCrawlAt' => 'setNextCrawlAt',
        'lastCrawledAt' => 'setLastCrawledAt',
        'extractions' => 'setExtractions',
        'terms' => 'setTerms',
        'health' => 'setHealth',
        'healthScore' => 'setHealthScore',
        'previousSnapshot' => 'setPreviousSnapshot',
        'customer' => 'setCustomer',
        'project' => 'setProject',
        'id' => 'setId',
        'createdAt' => 'setCreatedAt',
        'updatedAt' => 'setUpdatedAt',
        'deletedAt' => 'setDeletedAt',
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests).
     *
     * @var string[]
     */
    protected static $getters = [
        'site' => 'getSite',
        'locale' => 'getLocale',
        'key' => 'getKey',
        'name' => 'getName',
        'description' => 'getDescription',
        'entityReference' => 'getEntityReference',
        'entityTypeVersion' => 'getEntityTypeVersion',
        'entityType' => 'getEntityType',
        'type' => 'getType',
        'status' => 'getStatus',
        'version' => 'getVersion',
        'previousStatus' => 'getPreviousStatus',
        'revisionArchivedAt' => 'getRevisionArchivedAt',
        'languageKey' => 'getLanguageKey',
        'workflowStage' => 'getWorkflowStage',
        'sourceWorkflowStage' => 'getSourceWorkflowStage',
        'stageSource' => 'getStageSource',
        'fetchedAt' => 'getFetchedAt',
        'rawResponseBody' => 'getRawResponseBody',
        'responseEtag' => 'getResponseEtag',
        'responseBodyHash' => 'getResponseBodyHash',
        'requestCompatibilityDate' => 'getRequestCompatibilityDate',
        'rawRequestDetails' => 'getRawRequestDetails',
        'contentType' => 'getContentType',
        'urlAliases' => 'getUrlAliases',
        'url' => 'getUrl',
        'canonicalUrl' => 'getCanonicalUrl',
        'shortlinkUrl' => 'getShortlinkUrl',
        'contentPriority' => 'getContentPriority',
        'contentPrioritySource' => 'getContentPrioritySource',
        'hreflangUrls' => 'getHreflangUrls',
        'sitemaps' => 'getSitemaps',
        'contentGroup' => 'getContentGroup',
        'issues' => 'getIssues',
        'nextCrawlAt' => 'getNextCrawlAt',
        'lastCrawledAt' => 'getLastCrawledAt',
        'extractions' => 'getExtractions',
        'terms' => 'getTerms',
        'health' => 'getHealth',
        'healthScore' => 'getHealthScore',
        'previousSnapshot' => 'getPreviousSnapshot',
        'customer' => 'getCustomer',
        'project' => 'getProject',
        'id' => 'getId',
        'createdAt' => 'getCreatedAt',
        'updatedAt' => 'getUpdatedAt',
        'deletedAt' => 'getDeletedAt',
    ];

    /**
     * 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('site', $data ?? [], null);
        $this->setIfExists('locale', $data ?? [], null);
        $this->setIfExists('key', $data ?? [], null);
        $this->setIfExists('name', $data ?? [], null);
        $this->setIfExists('description', $data ?? [], null);
        $this->setIfExists('entityReference', $data ?? [], null);
        $this->setIfExists('entityTypeVersion', $data ?? [], null);
        $this->setIfExists('entityType', $data ?? [], null);
        $this->setIfExists('type', $data ?? [], null);
        $this->setIfExists('status', $data ?? [], null);
        $this->setIfExists('version', $data ?? [], null);
        $this->setIfExists('previousStatus', $data ?? [], null);
        $this->setIfExists('revisionArchivedAt', $data ?? [], null);
        $this->setIfExists('languageKey', $data ?? [], null);
        $this->setIfExists('workflowStage', $data ?? [], null);
        $this->setIfExists('sourceWorkflowStage', $data ?? [], null);
        $this->setIfExists('stageSource', $data ?? [], null);
        $this->setIfExists('fetchedAt', $data ?? [], null);
        $this->setIfExists('rawResponseBody', $data ?? [], null);
        $this->setIfExists('responseEtag', $data ?? [], null);
        $this->setIfExists('responseBodyHash', $data ?? [], null);
        $this->setIfExists('requestCompatibilityDate', $data ?? [], null);
        $this->setIfExists('rawRequestDetails', $data ?? [], null);
        $this->setIfExists('contentType', $data ?? [], null);
        $this->setIfExists('urlAliases', $data ?? [], null);
        $this->setIfExists('url', $data ?? [], null);
        $this->setIfExists('canonicalUrl', $data ?? [], null);
        $this->setIfExists('shortlinkUrl', $data ?? [], null);
        $this->setIfExists('contentPriority', $data ?? [], null);
        $this->setIfExists('contentPrioritySource', $data ?? [], null);
        $this->setIfExists('hreflangUrls', $data ?? [], null);
        $this->setIfExists('sitemaps', $data ?? [], null);
        $this->setIfExists('contentGroup', $data ?? [], null);
        $this->setIfExists('issues', $data ?? [], null);
        $this->setIfExists('nextCrawlAt', $data ?? [], null);
        $this->setIfExists('lastCrawledAt', $data ?? [], null);
        $this->setIfExists('extractions', $data ?? [], null);
        $this->setIfExists('terms', $data ?? [], null);
        $this->setIfExists('health', $data ?? [], null);
        $this->setIfExists('healthScore', $data ?? [], null);
        $this->setIfExists('previousSnapshot', $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);
    }

    /**
     * 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['site']) {
            $invalidProperties[] = "'site' can't be null";
        }
        if (null === $this->container['key']) {
            $invalidProperties[] = "'key' can't be null";
        }
        if (null === $this->container['type']) {
            $invalidProperties[] = "'type' 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['requestCompatibilityDate']) {
            $invalidProperties[] = "'requestCompatibilityDate' can't be null";
        }
        if (null === $this->container['contentPriority']) {
            $invalidProperties[] = "'contentPriority' can't be null";
        }
        if (null === $this->container['contentPrioritySource']) {
            $invalidProperties[] = "'contentPrioritySource' 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 site.
     *
     * @return RuntimeRemoteEntityDependencyWithDependenciesEntity
     */
    public function getSite()
    {
        return $this->container['site'];
    }

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

        return $this;
    }

    /**
     * Gets locale.
     *
     * @return null|DynamicReference
     */
    public function getLocale()
    {
        return $this->container['locale'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets entityReference.
     *
     * @return null|RemoteEntityReference
     */
    public function getEntityReference()
    {
        return $this->container['entityReference'];
    }

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

        return $this;
    }

    /**
     * Gets entityTypeVersion.
     *
     * @return null|DynamicReference
     */
    public function getEntityTypeVersion()
    {
        return $this->container['entityTypeVersion'];
    }

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

        return $this;
    }

    /**
     * Gets entityType.
     *
     * @return null|DynamicReference
     */
    public function getEntityType()
    {
        return $this->container['entityType'];
    }

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

        return $this;
    }

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

    /**
     * Sets type.
     *
     * @param ContentRepresentation $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 status.
     *
     * @return ContentItemStatus
     */
    public function getStatus()
    {
        return $this->container['status'];
    }

    /**
     * Sets status.
     *
     * @param ContentItemStatus $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|ContentItemStatus
     */
    public function getPreviousStatus()
    {
        return $this->container['previousStatus'];
    }

    /**
     * Sets previousStatus.
     *
     * @param null|ContentItemStatus $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 languageKey.
     *
     * @return null|string
     */
    public function getLanguageKey()
    {
        return $this->container['languageKey'];
    }

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

        return $this;
    }

    /**
     * Gets workflowStage.
     *
     * @return null|ContentWorkflowState
     */
    public function getWorkflowStage()
    {
        return $this->container['workflowStage'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets stageSource.
     *
     * @return null|ContentStageSource
     */
    public function getStageSource()
    {
        return $this->container['stageSource'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets rawResponseBody.
     *
     * @return null|DynamicReference
     */
    public function getRawResponseBody()
    {
        return $this->container['rawResponseBody'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets rawRequestDetails.
     *
     * @return null|DynamicReference
     */
    public function getRawRequestDetails()
    {
        return $this->container['rawRequestDetails'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets contentPriority.
     *
     * @return ContentPriority
     */
    public function getContentPriority()
    {
        return $this->container['contentPriority'];
    }

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

        return $this;
    }

    /**
     * Gets contentPrioritySource.
     *
     * @return ContentPrioritySource
     */
    public function getContentPrioritySource()
    {
        return $this->container['contentPrioritySource'];
    }

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

        return $this;
    }

    /**
     * Gets hreflangUrls.
     *
     * @return null|mixed
     */
    public function getHreflangUrls()
    {
        return $this->container['hreflangUrls'];
    }

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

        return $this;
    }

    /**
     * Gets sitemaps.
     *
     * @return null|ContentItemSitemapInfo[]
     */
    public function getSitemaps()
    {
        return $this->container['sitemaps'];
    }

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

        return $this;
    }

    /**
     * Gets contentGroup.
     *
     * @return null|DynamicReference
     */
    public function getContentGroup()
    {
        return $this->container['contentGroup'];
    }

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

        return $this;
    }

    /**
     * Gets issues.
     *
     * @return null|ContentIssuesRollup
     */
    public function getIssues()
    {
        return $this->container['issues'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Gets extractions.
     *
     * @return null|ContentExtractions
     */
    public function getExtractions()
    {
        return $this->container['extractions'];
    }

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

        return $this;
    }

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

    /**
     * Sets terms.
     *
     * @param null|Terms $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 health.
     *
     * @return null|ContentHealth[]
     */
    public function getHealth()
    {
        return $this->container['health'];
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

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

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

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