<?php
namespace App\V4\Model\QuoteReason;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Model\IriNormalizableInterface;
use App\Model\NormalizeAsIRITrait;
use App\Model\QuoteState\QuoteState;
use App\Model\Traits\ImportableObjectTrait;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ApiResource(
* shortName="V4/QuoteReason",
* attributes={
* "denormalization_context": {
* "api_allow_update": true
* }
* },
* collectionOperations={
* "get": {
* "normalization_context": {
* "groups": {"quote_reason:list"},
* "enable_max_depth": true
* },
* "security": "is_granted(constant('App\\V4\\Voters\\QuoteVoter::QUOTE_REASON_ADD_EDIT'), 'App\V4\Voters\QuoteVoter')"
* }
* },
* itemOperations={
* },
* paginationClientEnabled=true,
* paginationClientItemsPerPage=true
* )
*/
class QuoteReason implements IriNormalizableInterface
{
use NormalizeAsIRITrait;
use ImportableObjectTrait;
/**
* @ApiProperty(identifier=true)
*
* @var string|null
* @Groups({
* "quote_reason:list", "quote_reason:read",
* "quote:list", "quote:read"
* })
*/
private $id;
/**
* @var string|null
* @ORM\Column(type="string", length=255)
* @Groups({
* "quote_reason:list",
* "quote:list", "quote:read"
* })
*/
private $name;
/**
* @var string|null
* @Groups({
* "quote_reason:list",
* "quote:list", "quote:read"
* })
*/
private $customerId;
/**
* @var string|null
* @Groups({
* "quote_reason:list", "quote_reason:read",
* "quote:list", "quote:read"
* })
*/
private $order;
/**
* @var QuoteState|null
* @Groups({
* "quote_reason:list", "quote_reason:read",
* "quote:list", "quote:read"
* })
*/
private $quoteState;
/**
* @return string|null
*/
public function getId(): ?string
{
return $this->id;
}
/**
* @param string|null $id
*
* @return QuoteReason
*/
public function setId(?string $id): self
{
$this->id = $id;
return $this;
}
/**
* @return string|null
*/
public function getName(): ?string
{
return $this->name;
}
/**
* @param string|null $name
*
* @return QuoteReason
*/
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
/**
* @return string|null
*/
public function getCustomerId(): ?string
{
return $this->customerId;
}
/**
* @param string|null $customerId
*
* @return QuoteReason
*/
public function setCustomerId(?string $customerId): self
{
$this->customerId = $customerId;
return $this;
}
/**
* @return string|null
*/
public function getOrder(): ?string
{
return $this->order;
}
/**
* @param string|null $order
*
* @return QuoteReason
*/
public function setOrder(?string $order): self
{
$this->order = $order;
return $this;
}
/**
* @return QuoteState|null
*/
public function getQuoteState(): ?QuoteState
{
return $this->quoteState;
}
/**
* @param QuoteState|null $quoteState
*
* @return QuoteReason
*/
public function setQuoteState(?QuoteState $quoteState): self
{
$this->quoteState = $quoteState;
return $this;
}
}