ldc-arcadia-kiota-openapi-c.../client/Models/Brand.php

183 lines
5.3 KiB
PHP

<?php
declare(strict_types=1);
namespace Uwil\ArcadiaKiotaOpenApiClient\Models;
use DateTime;
use Microsoft\Kiota\Abstractions\Serialization\AdditionalDataHolder;
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
/**
* Représentation canonique d'une marque dans Arcadia API.
*/
class Brand implements AdditionalDataHolder, Parsable
{
/**
* @var array<string, mixed>|null Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
*/
private ?array $additionalData = null;
/**
* @var string|null Identifiant numérique amont Arcadia.
*/
private ?string $arcadiaId = null;
/**
* @var string|null Code public unique trigramme + 2 chiffres.
*/
private ?string $code = null;
/**
* @var DateTime|null Date et heure de création (ISO 8601).
*/
private ?DateTime $createdAt = null;
/**
* @var string|null Nom / libellé de la marque.
*/
private ?string $name = null;
/**
* Instantiates a new Brand and sets the default values.
*/
public function __construct()
{
$this->setAdditionalData([]);
}
/**
* Creates a new instance of the appropriate class based on discriminator value
*
* @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object
*/
public static function createFromDiscriminatorValue(ParseNode $parseNode): Brand
{
return new Brand();
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
*
* @return array<string, mixed>|null
*/
public function getAdditionalData(): ?array
{
return $this->additionalData;
}
/**
* Gets the arcadiaId property value. Identifiant numérique amont Arcadia.
*/
public function getArcadiaId(): ?string
{
return $this->arcadiaId;
}
/**
* Gets the code property value. Code public unique trigramme + 2 chiffres.
*/
public function getCode(): ?string
{
return $this->code;
}
/**
* Gets the createdAt property value. Date et heure de création (ISO 8601).
*/
public function getCreatedAt(): ?DateTime
{
return $this->createdAt;
}
/**
* The deserialization information for the current model
*
* @return array<string, callable(ParseNode): void>
*/
public function getFieldDeserializers(): array
{
$o = $this;
return [
'arcadiaId' => fn (ParseNode $n) => $o->setArcadiaId($n->getStringValue()),
'code' => fn (ParseNode $n) => $o->setCode($n->getStringValue()),
'createdAt' => fn (ParseNode $n) => $o->setCreatedAt($n->getDateTimeValue()),
'name' => fn (ParseNode $n) => $o->setName($n->getStringValue()),
];
}
/**
* Gets the name property value. Nom / libellé de la marque.
*/
public function getName(): ?string
{
return $this->name;
}
/**
* Serializes information the current object
*
* @param SerializationWriter $writer Serialization writer to use to serialize this model
*/
public function serialize(SerializationWriter $writer): void
{
$writer->writeStringValue('arcadiaId', $this->getArcadiaId());
$writer->writeStringValue('code', $this->getCode());
$writer->writeDateTimeValue('createdAt', $this->getCreatedAt());
$writer->writeStringValue('name', $this->getName());
$writer->writeAdditionalData($this->getAdditionalData());
}
/**
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
*
* @param array<string,mixed> $value Value to set for the AdditionalData property.
*/
public function setAdditionalData(?array $value): void
{
$this->additionalData = $value;
}
/**
* Sets the arcadiaId property value. Identifiant numérique amont Arcadia.
*
* @param string|null $value Value to set for the arcadiaId property.
*/
public function setArcadiaId(?string $value): void
{
$this->arcadiaId = $value;
}
/**
* Sets the code property value. Code public unique trigramme + 2 chiffres.
*
* @param string|null $value Value to set for the code property.
*/
public function setCode(?string $value): void
{
$this->code = $value;
}
/**
* Sets the createdAt property value. Date et heure de création (ISO 8601).
*
* @param DateTime|null $value Value to set for the createdAt property.
*/
public function setCreatedAt(?DateTime $value): void
{
$this->createdAt = $value;
}
/**
* Sets the name property value. Nom / libellé de la marque.
*
* @param string|null $value Value to set for the name property.
*/
public function setName(?string $value): void
{
$this->name = $value;
}
}