|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 EnergyValues|null $portion Quantités d'énergie (portion ou référence). */ private ?EnergyValues $portion = null; /** * @var EnergyValues|null $reference Quantités d'énergie (portion ou référence). */ private ?EnergyValues $reference = null; /** * Instantiates a new IncoCompoEnergy 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 IncoCompoEnergy */ public static function createFromDiscriminatorValue(ParseNode $parseNode): IncoCompoEnergy { return new IncoCompoEnergy(); } /** * 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; } /** * The deserialization information for the current model * @return array */ public function getFieldDeserializers(): array { $o = $this; return [ 'portion' => fn(ParseNode $n) => $o->setPortion($n->getObjectValue([EnergyValues::class, 'createFromDiscriminatorValue'])), 'reference' => fn(ParseNode $n) => $o->setReference($n->getObjectValue([EnergyValues::class, 'createFromDiscriminatorValue'])), ]; } /** * Gets the portion property value. Quantités d'énergie (portion ou référence). * @return EnergyValues|null */ public function getPortion(): ?EnergyValues { return $this->portion; } /** * Gets the reference property value. Quantités d'énergie (portion ou référence). * @return EnergyValues|null */ public function getReference(): ?EnergyValues { 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('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 $value Value to set for the AdditionalData property. */ public function setAdditionalData(?array $value): void { $this->additionalData = $value; } /** * Sets the portion property value. Quantités d'énergie (portion ou référence). * @param EnergyValues|null $value Value to set for the portion property. */ public function setPortion(?EnergyValues $value): void { $this->portion = $value; } /** * Sets the reference property value. Quantités d'énergie (portion ou référence). * @param EnergyValues|null $value Value to set for the reference property. */ public function setReference(?EnergyValues $value): void { $this->reference = $value; } }