ldc-arcadia-kiota-openapi-c.../client/Models/IncoWeight.php

139 lines
4.6 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;
/**
* Poids du produit en grammes.
*/
class IncoWeight 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 int|null $grossWeight Poids brut UVC (g).
*/
private ?int $grossWeight = null;
/**
* @var int|null $netWeight Poids net UVC (g).
*/
private ?int $netWeight = null;
/**
* @var int|null $theoreticalAverage Moyenne théorique du poids (g).
*/
private ?int $theoreticalAverage = null;
/**
* Instantiates a new IncoWeight 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 IncoWeight
*/
public static function createFromDiscriminatorValue(ParseNode $parseNode): IncoWeight {
return new IncoWeight();
}
/**
* 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 [
'grossWeight' => fn(ParseNode $n) => $o->setGrossWeight($n->getIntegerValue()),
'netWeight' => fn(ParseNode $n) => $o->setNetWeight($n->getIntegerValue()),
'theoreticalAverage' => fn(ParseNode $n) => $o->setTheoreticalAverage($n->getIntegerValue()),
];
}
/**
* Gets the grossWeight property value. Poids brut UVC (g).
* @return int|null
*/
public function getGrossWeight(): ?int {
return $this->grossWeight;
}
/**
* Gets the netWeight property value. Poids net UVC (g).
* @return int|null
*/
public function getNetWeight(): ?int {
return $this->netWeight;
}
/**
* Gets the theoreticalAverage property value. Moyenne théorique du poids (g).
* @return int|null
*/
public function getTheoreticalAverage(): ?int {
return $this->theoreticalAverage;
}
/**
* Serializes information the current object
* @param SerializationWriter $writer Serialization writer to use to serialize this model
*/
public function serialize(SerializationWriter $writer): void {
$writer->writeIntegerValue('grossWeight', $this->getGrossWeight());
$writer->writeIntegerValue('netWeight', $this->getNetWeight());
$writer->writeIntegerValue('theoreticalAverage', $this->getTheoreticalAverage());
$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 grossWeight property value. Poids brut UVC (g).
* @param int|null $value Value to set for the grossWeight property.
*/
public function setGrossWeight(?int $value): void {
$this->grossWeight = $value;
}
/**
* Sets the netWeight property value. Poids net UVC (g).
* @param int|null $value Value to set for the netWeight property.
*/
public function setNetWeight(?int $value): void {
$this->netWeight = $value;
}
/**
* Sets the theoreticalAverage property value. Moyenne théorique du poids (g).
* @param int|null $value Value to set for the theoreticalAverage property.
*/
public function setTheoreticalAverage(?int $value): void {
$this->theoreticalAverage = $value;
}
}