<?php
namespace App\Model\Template;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Model\IriNormalizableInterface;
use App\Model\NormalizeAsIRITrait;
use App\Model\Traits\BlamableTrait;
use App\Model\Traits\ImportableObjectTrait;
use App\Model\Traits\TimestampableTrait;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ApiResource(
* attributes={
* "denormalization_context": {
* "api_allow_update": true
* }
* },
* collectionOperations={
* "get": {
* "normalization_context": {
* "groups": {"template:list"},
* }
* },
* "post": {
* "normalization_context": {
* "groups": {"template:list"},
* },
* "denormalization_context": {
* "groups": {"template:write"}
* }
* }
* },
* itemOperations={
* "get": {
* "normalization_context": {
* "groups": {"template:read"},
* }
* },
* "put": {
* "normalization_context": {
* "groups": {"template:read"},
* },
* "denormalization_context": {
* "groups": {"template:update"}
* }
* },
* "delete": {}
* },
* paginationClientEnabled=true,
* paginationClientItemsPerPage=true
* )
*/
class Template implements IriNormalizableInterface
{
use BlamableTrait;
use TimestampableTrait;
use ImportableObjectTrait;
use NormalizeAsIRITrait;
/**
* @ApiProperty(identifier=true)
*
* @var string|null
*
* @Groups({
* "list", "template:list", "template:read"
* })
*/
private $id;
/**
* @var string|null
*
* @Groups({
* "template:list", "template:read", "template:write"
* })
*/
private $customerId;
/**
* @var string|null
*
* @Groups({
* "list", "template:list", "template:read", "template:write", "template:update"
* })
*/
private $name;
/**
* @var string|null
*
* @Groups({
* "list", "template:list", "template:read", "template:write", "template:update"
* })
*/
private $content;
/**
* @return string|null
*/
public function getId(): ?string
{
return $this->id;
}
/**
* @param string|null $id
*
* @return Template
*/
public function setId(?string $id): Template
{
$this->id = $id;
return $this;
}
/**
* @return string|null
*/
public function getCustomerId(): ?string
{
return $this->customerId;
}
/**
* @param string|null $customerId
*
* @return Template
*/
public function setCustomerId(?string $customerId): Template
{
$this->customerId = $customerId;
return $this;
}
/**
* @return string|null
*/
public function getName(): ?string
{
return $this->name;
}
/**
* @param string|null $name
*
* @return Template
*/
public function setName(?string $name): Template
{
$this->name = $name;
return $this;
}
/**
* @return string|null
*/
public function getContent(): ?string
{
return $this->content;
}
/**
* @param string|null $content
*
* @return Template
*/
public function setContent(?string $content): Template
{
$this->content = $content;
return $this;
}
}