162 lines
6.1 KiB
PHP
162 lines
6.1 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;
|
|
|
|
/**
|
|
* Teneur en fruits, légumes et noix (FNL).
|
|
*/
|
|
class IncoCompoFreshProduceAndNuts 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 $freshFnlPercentage Valeur sous forme de pourcentage (0-100%).
|
|
*/
|
|
private ?PercentageValue $freshFnlPercentage = null;
|
|
|
|
/**
|
|
* @var PercentageValue|null $fruitsPercentage Valeur sous forme de pourcentage (0-100%).
|
|
*/
|
|
private ?PercentageValue $fruitsPercentage = null;
|
|
|
|
/**
|
|
* @var FruitAndNutAmount|null $portion Quantités de fruits, noix et FNL.
|
|
*/
|
|
private ?FruitAndNutAmount $portion = null;
|
|
|
|
/**
|
|
* @var FruitAndNutAmount|null $reference Quantités de fruits, noix et FNL.
|
|
*/
|
|
private ?FruitAndNutAmount $reference = null;
|
|
|
|
/**
|
|
* Instantiates a new IncoCompoFreshProduceAndNuts 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 IncoCompoFreshProduceAndNuts
|
|
*/
|
|
public static function createFromDiscriminatorValue(ParseNode $parseNode): IncoCompoFreshProduceAndNuts {
|
|
return new IncoCompoFreshProduceAndNuts();
|
|
}
|
|
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
/**
|
|
* The deserialization information for the current model
|
|
* @return array<string, callable(ParseNode): void>
|
|
*/
|
|
public function getFieldDeserializers(): array {
|
|
$o = $this;
|
|
return [
|
|
'freshFnlPercentage' => fn(ParseNode $n) => $o->setFreshFnlPercentage($n->getObjectValue([PercentageValue::class, 'createFromDiscriminatorValue'])),
|
|
'fruitsPercentage' => fn(ParseNode $n) => $o->setFruitsPercentage($n->getObjectValue([PercentageValue::class, 'createFromDiscriminatorValue'])),
|
|
'portion' => fn(ParseNode $n) => $o->setPortion($n->getObjectValue([FruitAndNutAmount::class, 'createFromDiscriminatorValue'])),
|
|
'reference' => fn(ParseNode $n) => $o->setReference($n->getObjectValue([FruitAndNutAmount::class, 'createFromDiscriminatorValue'])),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Gets the freshFnlPercentage property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @return PercentageValue|null
|
|
*/
|
|
public function getFreshFnlPercentage(): ?PercentageValue {
|
|
return $this->freshFnlPercentage;
|
|
}
|
|
|
|
/**
|
|
* Gets the fruitsPercentage property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @return PercentageValue|null
|
|
*/
|
|
public function getFruitsPercentage(): ?PercentageValue {
|
|
return $this->fruitsPercentage;
|
|
}
|
|
|
|
/**
|
|
* Gets the portion property value. Quantités de fruits, noix et FNL.
|
|
* @return FruitAndNutAmount|null
|
|
*/
|
|
public function getPortion(): ?FruitAndNutAmount {
|
|
return $this->portion;
|
|
}
|
|
|
|
/**
|
|
* Gets the reference property value. Quantités de fruits, noix et FNL.
|
|
* @return FruitAndNutAmount|null
|
|
*/
|
|
public function getReference(): ?FruitAndNutAmount {
|
|
return $this->reference;
|
|
}
|
|
|
|
/**
|
|
* Serializes information the current object
|
|
* @param SerializationWriter $writer Serialization writer to use to serialize this model
|
|
*/
|
|
public function serialize(SerializationWriter $writer): void {
|
|
$writer->writeObjectValue('freshFnlPercentage', $this->getFreshFnlPercentage());
|
|
$writer->writeObjectValue('fruitsPercentage', $this->getFruitsPercentage());
|
|
$writer->writeObjectValue('portion', $this->getPortion());
|
|
$writer->writeObjectValue('reference', $this->getReference());
|
|
$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 freshFnlPercentage property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @param PercentageValue|null $value Value to set for the freshFnlPercentage property.
|
|
*/
|
|
public function setFreshFnlPercentage(?PercentageValue $value): void {
|
|
$this->freshFnlPercentage = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the fruitsPercentage property value. Valeur sous forme de pourcentage (0-100%).
|
|
* @param PercentageValue|null $value Value to set for the fruitsPercentage property.
|
|
*/
|
|
public function setFruitsPercentage(?PercentageValue $value): void {
|
|
$this->fruitsPercentage = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the portion property value. Quantités de fruits, noix et FNL.
|
|
* @param FruitAndNutAmount|null $value Value to set for the portion property.
|
|
*/
|
|
public function setPortion(?FruitAndNutAmount $value): void {
|
|
$this->portion = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the reference property value. Quantités de fruits, noix et FNL.
|
|
* @param FruitAndNutAmount|null $value Value to set for the reference property.
|
|
*/
|
|
public function setReference(?FruitAndNutAmount $value): void {
|
|
$this->reference = $value;
|
|
}
|
|
|
|
}
|