|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 bool|null $approximative Indique si la portion est approximative. */ private ?bool $approximative = null; /** * @var int|null $highPart Valeur maximale. */ private ?int $highPart = null; /** * @var int|null $lowPart Valeur minimale ou exacte (en centièmes ou grammes). */ private ?int $lowPart = null; /** * Instantiates a new IncoPortionAmount 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 IncoPortionAmount */ public static function createFromDiscriminatorValue(ParseNode $parseNode): IncoPortionAmount { return new IncoPortionAmount(); } /** * 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|null */ public function getAdditionalData(): ?array { return $this->additionalData; } /** * Gets the approximative property value. Indique si la portion est approximative. * @return bool|null */ public function getApproximative(): ?bool { return $this->approximative; } /** * The deserialization information for the current model * @return array */ public function getFieldDeserializers(): array { $o = $this; return [ 'approximative' => fn(ParseNode $n) => $o->setApproximative($n->getBooleanValue()), 'highPart' => fn(ParseNode $n) => $o->setHighPart($n->getIntegerValue()), 'lowPart' => fn(ParseNode $n) => $o->setLowPart($n->getIntegerValue()), ]; } /** * Gets the highPart property value. Valeur maximale. * @return int|null */ public function getHighPart(): ?int { return $this->highPart; } /** * Gets the lowPart property value. Valeur minimale ou exacte (en centièmes ou grammes). * @return int|null */ public function getLowPart(): ?int { return $this->lowPart; } /** * Serializes information the current object * @param SerializationWriter $writer Serialization writer to use to serialize this model */ public function serialize(SerializationWriter $writer): void { $writer->writeBooleanValue('approximative', $this->getApproximative()); $writer->writeIntegerValue('highPart', $this->getHighPart()); $writer->writeIntegerValue('lowPart', $this->getLowPart()); $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 $value Value to set for the AdditionalData property. */ public function setAdditionalData(?array $value): void { $this->additionalData = $value; } /** * Sets the approximative property value. Indique si la portion est approximative. * @param bool|null $value Value to set for the approximative property. */ public function setApproximative(?bool $value): void { $this->approximative = $value; } /** * Sets the highPart property value. Valeur maximale. * @param int|null $value Value to set for the highPart property. */ public function setHighPart(?int $value): void { $this->highPart = $value; } /** * Sets the lowPart property value. Valeur minimale ou exacte (en centièmes ou grammes). * @param int|null $value Value to set for the lowPart property. */ public function setLowPart(?int $value): void { $this->lowPart = $value; } }