300 lines
11 KiB
PHP
300 lines
11 KiB
PHP
<?php
|
|
|
|
namespace UwilArcadiaApiClient\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;
|
|
|
|
/**
|
|
* Pourcentages des apports de référence (AR / ARIC).
|
|
*/
|
|
class IncoCompoReferenceIntakes 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 PercentageValue|null $carbohydrates Valeur sous forme de pourcentage (0-100%).
|
|
*/
|
|
private ?PercentageValue $carbohydrates = null;
|
|
|
|
/**
|
|
* @var PercentageValue|null $energyE14 Valeur sous forme de pourcentage (0-100%).
|
|
*/
|
|
private ?PercentageValue $energyE14 = null;
|
|
|
|
/**
|
|
* @var PercentageValue|null $energyKj Valeur sous forme de pourcentage (0-100%).
|
|
*/
|
|
private ?PercentageValue $energyKj = null;
|
|
|
|
/**
|
|
* @var PercentageValue|null $fat Valeur sous forme de pourcentage (0-100%).
|
|
*/
|
|
private ?PercentageValue $fat = null;
|
|
|
|
/**
|
|
* @var string|null $portionAmount The portionAmount property
|
|
*/
|
|
private ?string $portionAmount = null;
|
|
|
|
/**
|
|
* @var PercentageValue|null $protein Valeur sous forme de pourcentage (0-100%).
|
|
*/
|
|
private ?PercentageValue $protein = null;
|
|
|
|
/**
|
|
* @var string|null $proteinToLipidRatio The proteinToLipidRatio property
|
|
*/
|
|
private ?string $proteinToLipidRatio = null;
|
|
|
|
/**
|
|
* @var PercentageValue|null $salt Valeur sous forme de pourcentage (0-100%).
|
|
*/
|
|
private ?PercentageValue $salt = null;
|
|
|
|
/**
|
|
* @var PercentageValue|null $saturatedFat Valeur sous forme de pourcentage (0-100%).
|
|
*/
|
|
private ?PercentageValue $saturatedFat = null;
|
|
|
|
/**
|
|
* @var PercentageValue|null $sugars Valeur sous forme de pourcentage (0-100%).
|
|
*/
|
|
private ?PercentageValue $sugars = null;
|
|
|
|
/**
|
|
* Instantiates a new IncoCompoReferenceIntakes 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 IncoCompoReferenceIntakes
|
|
*/
|
|
public static function createFromDiscriminatorValue(ParseNode $parseNode): IncoCompoReferenceIntakes {
|
|
return new IncoCompoReferenceIntakes();
|
|
}
|
|
|
|
/**
|
|
* 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 carbohydrates property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @return PercentageValue|null
|
|
*/
|
|
public function getCarbohydrates(): ?PercentageValue {
|
|
return $this->carbohydrates;
|
|
}
|
|
|
|
/**
|
|
* Gets the energyE14 property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @return PercentageValue|null
|
|
*/
|
|
public function getEnergyE14(): ?PercentageValue {
|
|
return $this->energyE14;
|
|
}
|
|
|
|
/**
|
|
* Gets the energyKj property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @return PercentageValue|null
|
|
*/
|
|
public function getEnergyKj(): ?PercentageValue {
|
|
return $this->energyKj;
|
|
}
|
|
|
|
/**
|
|
* Gets the fat property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @return PercentageValue|null
|
|
*/
|
|
public function getFat(): ?PercentageValue {
|
|
return $this->fat;
|
|
}
|
|
|
|
/**
|
|
* The deserialization information for the current model
|
|
* @return array<string, callable(ParseNode): void>
|
|
*/
|
|
public function getFieldDeserializers(): array {
|
|
$o = $this;
|
|
return [
|
|
'carbohydrates' => fn(ParseNode $n) => $o->setCarbohydrates($n->getObjectValue([PercentageValue::class, 'createFromDiscriminatorValue'])),
|
|
'energyE14' => fn(ParseNode $n) => $o->setEnergyE14($n->getObjectValue([PercentageValue::class, 'createFromDiscriminatorValue'])),
|
|
'energyKj' => fn(ParseNode $n) => $o->setEnergyKj($n->getObjectValue([PercentageValue::class, 'createFromDiscriminatorValue'])),
|
|
'fat' => fn(ParseNode $n) => $o->setFat($n->getObjectValue([PercentageValue::class, 'createFromDiscriminatorValue'])),
|
|
'portionAmount' => fn(ParseNode $n) => $o->setPortionAmount($n->getStringValue()),
|
|
'protein' => fn(ParseNode $n) => $o->setProtein($n->getObjectValue([PercentageValue::class, 'createFromDiscriminatorValue'])),
|
|
'proteinToLipidRatio' => fn(ParseNode $n) => $o->setProteinToLipidRatio($n->getStringValue()),
|
|
'salt' => fn(ParseNode $n) => $o->setSalt($n->getObjectValue([PercentageValue::class, 'createFromDiscriminatorValue'])),
|
|
'saturatedFat' => fn(ParseNode $n) => $o->setSaturatedFat($n->getObjectValue([PercentageValue::class, 'createFromDiscriminatorValue'])),
|
|
'sugars' => fn(ParseNode $n) => $o->setSugars($n->getObjectValue([PercentageValue::class, 'createFromDiscriminatorValue'])),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Gets the portionAmount property value. The portionAmount property
|
|
* @return string|null
|
|
*/
|
|
public function getPortionAmount(): ?string {
|
|
return $this->portionAmount;
|
|
}
|
|
|
|
/**
|
|
* Gets the protein property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @return PercentageValue|null
|
|
*/
|
|
public function getProtein(): ?PercentageValue {
|
|
return $this->protein;
|
|
}
|
|
|
|
/**
|
|
* Gets the proteinToLipidRatio property value. The proteinToLipidRatio property
|
|
* @return string|null
|
|
*/
|
|
public function getProteinToLipidRatio(): ?string {
|
|
return $this->proteinToLipidRatio;
|
|
}
|
|
|
|
/**
|
|
* Gets the salt property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @return PercentageValue|null
|
|
*/
|
|
public function getSalt(): ?PercentageValue {
|
|
return $this->salt;
|
|
}
|
|
|
|
/**
|
|
* Gets the saturatedFat property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @return PercentageValue|null
|
|
*/
|
|
public function getSaturatedFat(): ?PercentageValue {
|
|
return $this->saturatedFat;
|
|
}
|
|
|
|
/**
|
|
* Gets the sugars property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @return PercentageValue|null
|
|
*/
|
|
public function getSugars(): ?PercentageValue {
|
|
return $this->sugars;
|
|
}
|
|
|
|
/**
|
|
* Serializes information the current object
|
|
* @param SerializationWriter $writer Serialization writer to use to serialize this model
|
|
*/
|
|
public function serialize(SerializationWriter $writer): void {
|
|
$writer->writeObjectValue('carbohydrates', $this->getCarbohydrates());
|
|
$writer->writeObjectValue('energyE14', $this->getEnergyE14());
|
|
$writer->writeObjectValue('energyKj', $this->getEnergyKj());
|
|
$writer->writeObjectValue('fat', $this->getFat());
|
|
$writer->writeStringValue('portionAmount', $this->getPortionAmount());
|
|
$writer->writeObjectValue('protein', $this->getProtein());
|
|
$writer->writeStringValue('proteinToLipidRatio', $this->getProteinToLipidRatio());
|
|
$writer->writeObjectValue('salt', $this->getSalt());
|
|
$writer->writeObjectValue('saturatedFat', $this->getSaturatedFat());
|
|
$writer->writeObjectValue('sugars', $this->getSugars());
|
|
$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 carbohydrates property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @param PercentageValue|null $value Value to set for the carbohydrates property.
|
|
*/
|
|
public function setCarbohydrates(?PercentageValue $value): void {
|
|
$this->carbohydrates = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the energyE14 property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @param PercentageValue|null $value Value to set for the energyE14 property.
|
|
*/
|
|
public function setEnergyE14(?PercentageValue $value): void {
|
|
$this->energyE14 = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the energyKj property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @param PercentageValue|null $value Value to set for the energyKj property.
|
|
*/
|
|
public function setEnergyKj(?PercentageValue $value): void {
|
|
$this->energyKj = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the fat property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @param PercentageValue|null $value Value to set for the fat property.
|
|
*/
|
|
public function setFat(?PercentageValue $value): void {
|
|
$this->fat = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the portionAmount property value. The portionAmount property
|
|
* @param string|null $value Value to set for the portionAmount property.
|
|
*/
|
|
public function setPortionAmount(?string $value): void {
|
|
$this->portionAmount = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the protein property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @param PercentageValue|null $value Value to set for the protein property.
|
|
*/
|
|
public function setProtein(?PercentageValue $value): void {
|
|
$this->protein = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the proteinToLipidRatio property value. The proteinToLipidRatio property
|
|
* @param string|null $value Value to set for the proteinToLipidRatio property.
|
|
*/
|
|
public function setProteinToLipidRatio(?string $value): void {
|
|
$this->proteinToLipidRatio = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the salt property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @param PercentageValue|null $value Value to set for the salt property.
|
|
*/
|
|
public function setSalt(?PercentageValue $value): void {
|
|
$this->salt = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the saturatedFat property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @param PercentageValue|null $value Value to set for the saturatedFat property.
|
|
*/
|
|
public function setSaturatedFat(?PercentageValue $value): void {
|
|
$this->saturatedFat = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the sugars property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @param PercentageValue|null $value Value to set for the sugars property.
|
|
*/
|
|
public function setSugars(?PercentageValue $value): void {
|
|
$this->sugars = $value;
|
|
}
|
|
|
|
}
|