<?php

namespace NoahVet\Reef\Domain\Log;

class SyslogMessage implements SyslogMessageInterface
{
    /**
     * Represents what we're trying to do.
     * For example :
     *      http post for a resource creation,
     *      http put for a resource update,
     *      http post for a search.
     */
    private ?string $action = null;

    private ?string $eventType = null;

    private ?string $message = null;

    private ?string $principalId = null;

    private ?string $resourceId = null;

    private ?string $resourceType = null;

    private ?string $version = null;

    /**
     * @var array<string, string>
     */
    private array $extraData = [];

    #[\Override]
    public function getAction(): ?string
    {
        return $this->action;
    }

    #[\Override]
    public function setAction(string $action): self
    {
        $this->action = $action;

        return $this;
    }

    #[\Override]
    public function getEventType(): ?string
    {
        return $this->eventType;
    }

    #[\Override]
    public function setEventType(string $eventType): self
    {
        $this->eventType = $eventType;

        return $this;
    }

    #[\Override]
    public function getMessage(): ?string
    {
        return $this->message;
    }

    #[\Override]
    public function setMessage(string $message): self
    {
        $this->message = $message;

        return $this;
    }

    #[\Override]
    public function getPrincipalId(): ?string
    {
        return $this->principalId;
    }

    #[\Override]
    public function setPrincipalId(string $principalId): self
    {
        $this->principalId = $principalId;

        return $this;
    }

    #[\Override]
    public function getResourceId(): ?string
    {
        return $this->resourceId;
    }

    #[\Override]
    public function setResourceId(?string $resourceId): self
    {
        $this->resourceId = $resourceId;

        return $this;
    }

    #[\Override]
    public function getResourceType(): ?string
    {
        return $this->resourceType;
    }

    #[\Override]
    public function setResourceType(string $resourceType): self
    {
        $this->resourceType = $resourceType;

        return $this;
    }

    #[\Override]
    public function getVersion(): ?string
    {
        return $this->version;
    }

    #[\Override]
    public function setVersion(string $version): self
    {
        $this->version = $version;

        return $this;
    }

    /**
     * @return array<string, string>
     */
    #[\Override]
    public function getExtraData(): array
    {
        return $this->extraData;
    }

    /**
     * @param array<string, string> $extraData
     *
     * @return $this
     */
    #[\Override]
    public function setExtraData(array $extraData): self
    {
        $this->extraData = $extraData;

        return $this;
    }
}
