139 lines
4.4 KiB
PHP
139 lines
4.4 KiB
PHP
<?php
|
|
|
|
namespace Uwil\ArcadiaKiotaOpenApiClient\Models;
|
|
|
|
use Microsoft\Kiota\Abstractions\Serialization\AdditionalDataHolder;
|
|
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
|
|
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
|
|
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
|
|
|
|
/**
|
|
* Quantités d'énergie (portion ou référence).
|
|
*/
|
|
class EnergyValues implements AdditionalDataHolder, Parsable
|
|
{
|
|
/**
|
|
* @var array<string, mixed>|null $additionalData 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 $energyKcal The energyKcal property
|
|
*/
|
|
private ?string $energyKcal = null;
|
|
|
|
/**
|
|
* @var string|null $energyKj The energyKj property
|
|
*/
|
|
private ?string $energyKj = null;
|
|
|
|
/**
|
|
* @var string|null $size The size property
|
|
*/
|
|
private ?string $size = null;
|
|
|
|
/**
|
|
* Instantiates a new EnergyValues 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
|
|
* @return EnergyValues
|
|
*/
|
|
public static function createFromDiscriminatorValue(ParseNode $parseNode): EnergyValues {
|
|
return new EnergyValues();
|
|
}
|
|
|
|
/**
|
|
* 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 energyKcal property value. The energyKcal property
|
|
* @return string|null
|
|
*/
|
|
public function getEnergyKcal(): ?string {
|
|
return $this->energyKcal;
|
|
}
|
|
|
|
/**
|
|
* Gets the energyKj property value. The energyKj property
|
|
* @return string|null
|
|
*/
|
|
public function getEnergyKj(): ?string {
|
|
return $this->energyKj;
|
|
}
|
|
|
|
/**
|
|
* The deserialization information for the current model
|
|
* @return array<string, callable(ParseNode): void>
|
|
*/
|
|
public function getFieldDeserializers(): array {
|
|
$o = $this;
|
|
return [
|
|
'energyKcal' => fn(ParseNode $n) => $o->setEnergyKcal($n->getStringValue()),
|
|
'energyKj' => fn(ParseNode $n) => $o->setEnergyKj($n->getStringValue()),
|
|
'size' => fn(ParseNode $n) => $o->setSize($n->getStringValue()),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Gets the size property value. The size property
|
|
* @return string|null
|
|
*/
|
|
public function getSize(): ?string {
|
|
return $this->size;
|
|
}
|
|
|
|
/**
|
|
* Serializes information the current object
|
|
* @param SerializationWriter $writer Serialization writer to use to serialize this model
|
|
*/
|
|
public function serialize(SerializationWriter $writer): void {
|
|
$writer->writeStringValue('energyKcal', $this->getEnergyKcal());
|
|
$writer->writeStringValue('energyKj', $this->getEnergyKj());
|
|
$writer->writeStringValue('size', $this->getSize());
|
|
$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 energyKcal property value. The energyKcal property
|
|
* @param string|null $value Value to set for the energyKcal property.
|
|
*/
|
|
public function setEnergyKcal(?string $value): void {
|
|
$this->energyKcal = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the energyKj property value. The energyKj property
|
|
* @param string|null $value Value to set for the energyKj property.
|
|
*/
|
|
public function setEnergyKj(?string $value): void {
|
|
$this->energyKj = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the size property value. The size property
|
|
* @param string|null $value Value to set for the size property.
|
|
*/
|
|
public function setSize(?string $value): void {
|
|
$this->size = $value;
|
|
}
|
|
|
|
}
|