191 lines
6.4 KiB
PHP
191 lines
6.4 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;
|
|
use Microsoft\Kiota\Abstractions\Types\TypeUtils;
|
|
|
|
/**
|
|
* Allégations associées au produit (santé, nutrition, etc.).
|
|
*/
|
|
class IncoAllegations 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 array<string>|null $allegations The allegations property
|
|
*/
|
|
private ?array $allegations = null;
|
|
|
|
/**
|
|
* @var array<string>|null $health The health property
|
|
*/
|
|
private ?array $health = null;
|
|
|
|
/**
|
|
* @var array<string>|null $nutrition The nutrition property
|
|
*/
|
|
private ?array $nutrition = null;
|
|
|
|
/**
|
|
* @var array<string>|null $other The other property
|
|
*/
|
|
private ?array $other = null;
|
|
|
|
/**
|
|
* Instantiates a new IncoAllegations 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 IncoAllegations
|
|
*/
|
|
public static function createFromDiscriminatorValue(ParseNode $parseNode): IncoAllegations {
|
|
return new IncoAllegations();
|
|
}
|
|
|
|
/**
|
|
* 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 allegations property value. The allegations property
|
|
* @return array<string>|null
|
|
*/
|
|
public function getAllegations(): ?array {
|
|
return $this->allegations;
|
|
}
|
|
|
|
/**
|
|
* The deserialization information for the current model
|
|
* @return array<string, callable(ParseNode): void>
|
|
*/
|
|
public function getFieldDeserializers(): array {
|
|
$o = $this;
|
|
return [
|
|
'allegations' => function (ParseNode $n) {
|
|
$val = $n->getCollectionOfPrimitiveValues();
|
|
if (is_array($val)) {
|
|
TypeUtils::validateCollectionValues($val, 'string');
|
|
}
|
|
/** @var array<string>|null $val */
|
|
$this->setAllegations($val);
|
|
},
|
|
'health' => function (ParseNode $n) {
|
|
$val = $n->getCollectionOfPrimitiveValues();
|
|
if (is_array($val)) {
|
|
TypeUtils::validateCollectionValues($val, 'string');
|
|
}
|
|
/** @var array<string>|null $val */
|
|
$this->setHealth($val);
|
|
},
|
|
'nutrition' => function (ParseNode $n) {
|
|
$val = $n->getCollectionOfPrimitiveValues();
|
|
if (is_array($val)) {
|
|
TypeUtils::validateCollectionValues($val, 'string');
|
|
}
|
|
/** @var array<string>|null $val */
|
|
$this->setNutrition($val);
|
|
},
|
|
'other' => function (ParseNode $n) {
|
|
$val = $n->getCollectionOfPrimitiveValues();
|
|
if (is_array($val)) {
|
|
TypeUtils::validateCollectionValues($val, 'string');
|
|
}
|
|
/** @var array<string>|null $val */
|
|
$this->setOther($val);
|
|
},
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Gets the health property value. The health property
|
|
* @return array<string>|null
|
|
*/
|
|
public function getHealth(): ?array {
|
|
return $this->health;
|
|
}
|
|
|
|
/**
|
|
* Gets the nutrition property value. The nutrition property
|
|
* @return array<string>|null
|
|
*/
|
|
public function getNutrition(): ?array {
|
|
return $this->nutrition;
|
|
}
|
|
|
|
/**
|
|
* Gets the other property value. The other property
|
|
* @return array<string>|null
|
|
*/
|
|
public function getOther(): ?array {
|
|
return $this->other;
|
|
}
|
|
|
|
/**
|
|
* Serializes information the current object
|
|
* @param SerializationWriter $writer Serialization writer to use to serialize this model
|
|
*/
|
|
public function serialize(SerializationWriter $writer): void {
|
|
$writer->writeCollectionOfPrimitiveValues('allegations', $this->getAllegations());
|
|
$writer->writeCollectionOfPrimitiveValues('health', $this->getHealth());
|
|
$writer->writeCollectionOfPrimitiveValues('nutrition', $this->getNutrition());
|
|
$writer->writeCollectionOfPrimitiveValues('other', $this->getOther());
|
|
$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 allegations property value. The allegations property
|
|
* @param array<string>|null $value Value to set for the allegations property.
|
|
*/
|
|
public function setAllegations(?array $value): void {
|
|
$this->allegations = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the health property value. The health property
|
|
* @param array<string>|null $value Value to set for the health property.
|
|
*/
|
|
public function setHealth(?array $value): void {
|
|
$this->health = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the nutrition property value. The nutrition property
|
|
* @param array<string>|null $value Value to set for the nutrition property.
|
|
*/
|
|
public function setNutrition(?array $value): void {
|
|
$this->nutrition = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the other property value. The other property
|
|
* @param array<string>|null $value Value to set for the other property.
|
|
*/
|
|
public function setOther(?array $value): void {
|
|
$this->other = $value;
|
|
}
|
|
|
|
}
|