<?php

namespace NoahVet\Reef\Jane\Model;

class PrincipalGet extends \ArrayObject
{
    /**
     * @var array
     */
    protected $initialized = [];

    /**
     * Identifier of the principal (UUID).
     *
     * @var string
     */
    protected $id;

    /**
     * Email if the principal is a person.
     *
     * @var string|null
     */
    protected $email;

    /**
     * Last name of the person.
     *
     * @var string|null
     */
    protected $lastname;

    /**
     * First name of the person.
     *
     * @var string|null
     */
    protected $firstname;

    /**
     * Status of the principal.
     *
     * @var string
     */
    protected $status;

    /**
     * Locale to use. If not provided, detected during account validation.
     *
     * @var string|null
     */
    protected $locale;

    /**
     * Timezone to use. If not provided, detected during account validation.
     *
     * @var string|null
     */
    protected $timezone;

    /**
     * Birth date if the principal a person.
     *
     * @var \DateTime|null
     */
    protected $birthDate;

    /**
     * Postcode of birth, if principal is a person.
     *
     * @var string|null
     */
    protected $birthPostCode;

    /**
     * City of birth, if principal is a person.
     *
     * @var string|null
     */
    protected $birthCity;

    /**
     * Country of birth, if principal is a person. ISO 3 letters.
     *
     * @var string|null
     */
    protected $birthCountry;

    /**
     * @var PostalAddress
     */
    protected $mainAddress;

    /**
     * If privacy policy was accepted, the date of acceptance.
     *
     * @var \DateTime|null
     */
    protected $privacyPolicyAccepted;

    /**
     * @var list<PrincipalGetPhoneNumbersItem>
     */
    protected $phoneNumbers;

    /**
     * @var string|null
     */
    protected $mainPhoneNumber;

    /**
     * Date of creation of the principal.
     *
     * @var \DateTime
     */
    protected $created;

    /**
     * Date of last update of the principal.
     *
     * @var \DateTime
     */
    protected $updated;

    public function isInitialized($property): bool
    {
        return \array_key_exists($property, $this->initialized);
    }

    /**
     * Identifier of the principal (UUID).
     */
    public function getId(): string
    {
        return $this->id;
    }

    /**
     * Identifier of the principal (UUID).
     */
    public function setId(string $id): self
    {
        $this->initialized['id'] = true;
        $this->id = $id;

        return $this;
    }

    /**
     * Email if the principal is a person.
     */
    public function getEmail(): ?string
    {
        return $this->email;
    }

    /**
     * Email if the principal is a person.
     */
    public function setEmail(?string $email): self
    {
        $this->initialized['email'] = true;
        $this->email = $email;

        return $this;
    }

    /**
     * Last name of the person.
     */
    public function getLastname(): ?string
    {
        return $this->lastname;
    }

    /**
     * Last name of the person.
     */
    public function setLastname(?string $lastname): self
    {
        $this->initialized['lastname'] = true;
        $this->lastname = $lastname;

        return $this;
    }

    /**
     * First name of the person.
     */
    public function getFirstname(): ?string
    {
        return $this->firstname;
    }

    /**
     * First name of the person.
     */
    public function setFirstname(?string $firstname): self
    {
        $this->initialized['firstname'] = true;
        $this->firstname = $firstname;

        return $this;
    }

    /**
     * Status of the principal.
     */
    public function getStatus(): string
    {
        return $this->status;
    }

    /**
     * Status of the principal.
     */
    public function setStatus(string $status): self
    {
        $this->initialized['status'] = true;
        $this->status = $status;

        return $this;
    }

    /**
     * Locale to use. If not provided, detected during account validation.
     */
    public function getLocale(): ?string
    {
        return $this->locale;
    }

    /**
     * Locale to use. If not provided, detected during account validation.
     */
    public function setLocale(?string $locale): self
    {
        $this->initialized['locale'] = true;
        $this->locale = $locale;

        return $this;
    }

    /**
     * Timezone to use. If not provided, detected during account validation.
     */
    public function getTimezone(): ?string
    {
        return $this->timezone;
    }

    /**
     * Timezone to use. If not provided, detected during account validation.
     */
    public function setTimezone(?string $timezone): self
    {
        $this->initialized['timezone'] = true;
        $this->timezone = $timezone;

        return $this;
    }

    /**
     * Birth date if the principal a person.
     */
    public function getBirthDate(): ?\DateTime
    {
        return $this->birthDate;
    }

    /**
     * Birth date if the principal a person.
     */
    public function setBirthDate(?\DateTime $birthDate): self
    {
        $this->initialized['birthDate'] = true;
        $this->birthDate = $birthDate;

        return $this;
    }

    /**
     * Postcode of birth, if principal is a person.
     */
    public function getBirthPostCode(): ?string
    {
        return $this->birthPostCode;
    }

    /**
     * Postcode of birth, if principal is a person.
     */
    public function setBirthPostCode(?string $birthPostCode): self
    {
        $this->initialized['birthPostCode'] = true;
        $this->birthPostCode = $birthPostCode;

        return $this;
    }

    /**
     * City of birth, if principal is a person.
     */
    public function getBirthCity(): ?string
    {
        return $this->birthCity;
    }

    /**
     * City of birth, if principal is a person.
     */
    public function setBirthCity(?string $birthCity): self
    {
        $this->initialized['birthCity'] = true;
        $this->birthCity = $birthCity;

        return $this;
    }

    /**
     * Country of birth, if principal is a person. ISO 3 letters.
     */
    public function getBirthCountry(): ?string
    {
        return $this->birthCountry;
    }

    /**
     * Country of birth, if principal is a person. ISO 3 letters.
     */
    public function setBirthCountry(?string $birthCountry): self
    {
        $this->initialized['birthCountry'] = true;
        $this->birthCountry = $birthCountry;

        return $this;
    }

    public function getMainAddress(): PostalAddress
    {
        return $this->mainAddress;
    }

    public function setMainAddress(PostalAddress $mainAddress): self
    {
        $this->initialized['mainAddress'] = true;
        $this->mainAddress = $mainAddress;

        return $this;
    }

    /**
     * If privacy policy was accepted, the date of acceptance.
     */
    public function getPrivacyPolicyAccepted(): ?\DateTime
    {
        return $this->privacyPolicyAccepted;
    }

    /**
     * If privacy policy was accepted, the date of acceptance.
     */
    public function setPrivacyPolicyAccepted(?\DateTime $privacyPolicyAccepted): self
    {
        $this->initialized['privacyPolicyAccepted'] = true;
        $this->privacyPolicyAccepted = $privacyPolicyAccepted;

        return $this;
    }

    /**
     * @return list<PrincipalGetPhoneNumbersItem>
     */
    public function getPhoneNumbers(): array
    {
        return $this->phoneNumbers;
    }

    /**
     * @param list<PrincipalGetPhoneNumbersItem> $phoneNumbers
     */
    public function setPhoneNumbers(array $phoneNumbers): self
    {
        $this->initialized['phoneNumbers'] = true;
        $this->phoneNumbers = $phoneNumbers;

        return $this;
    }

    public function getMainPhoneNumber(): ?string
    {
        return $this->mainPhoneNumber;
    }

    public function setMainPhoneNumber(?string $mainPhoneNumber): self
    {
        $this->initialized['mainPhoneNumber'] = true;
        $this->mainPhoneNumber = $mainPhoneNumber;

        return $this;
    }

    /**
     * Date of creation of the principal.
     */
    public function getCreated(): \DateTime
    {
        return $this->created;
    }

    /**
     * Date of creation of the principal.
     */
    public function setCreated(\DateTime $created): self
    {
        $this->initialized['created'] = true;
        $this->created = $created;

        return $this;
    }

    /**
     * Date of last update of the principal.
     */
    public function getUpdated(): \DateTime
    {
        return $this->updated;
    }

    /**
     * Date of last update of the principal.
     */
    public function setUpdated(\DateTime $updated): self
    {
        $this->initialized['updated'] = true;
        $this->updated = $updated;

        return $this;
    }
}
