<?php

namespace AutoAdmin\Bundle\Media\Model\Library;

use Symfony\Component\Serializer\Annotation\Groups;

class LibraryItem
{
    public function __construct(
        #[Groups(['media'])]
        protected BaseMediaInterface $media,
        #[Groups(['media'])]
        protected ?string $type,
        #[Groups(['media'])]
        protected ?string $mediaUrl = null,
        #[Groups(['media'])]
        protected ?string $sizeReadable = null,
    ) {
    }

    public function getMedia(): BaseMediaInterface
    {
        return $this->media;
    }

    public function setMedia(BaseMediaInterface $media): LibraryItem
    {
        $this->media = $media;

        return $this;
    }

    public function getType(): ?string
    {
        return $this->type;
    }

    public function setType(?string $type): LibraryItem
    {
        $this->type = $type;

        return $this;
    }

    public function getMediaUrl(): ?string
    {
        return $this->mediaUrl;
    }

    public function setMediaUrl(?string $mediaUrl): LibraryItem
    {
        $this->mediaUrl = $mediaUrl;

        return $this;
    }

    public function getSizeReadable(): ?string
    {
        return $this->sizeReadable;
    }

    public function setSizeReadable(?string $sizeReadable): LibraryItem
    {
        $this->sizeReadable = $sizeReadable;

        return $this;
    }
}