300 lines
10 KiB
PHP
300 lines
10 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;
|
|
|
|
/**
|
|
* Détail des composantes et classement Nutri-Score.
|
|
*/
|
|
class IncoCompoNutriScore 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 string|null $grade The grade property
|
|
*/
|
|
private ?string $grade = null;
|
|
|
|
/**
|
|
* @var string|null $grade2022 The grade2022 property
|
|
*/
|
|
private ?string $grade2022 = null;
|
|
|
|
/**
|
|
* @var string|null $isGradeAArticle The isGradeAArticle property
|
|
*/
|
|
private ?string $isGradeAArticle = null;
|
|
|
|
/**
|
|
* @var string|null $isRedMeat The isRedMeat property
|
|
*/
|
|
private ?string $isRedMeat = null;
|
|
|
|
/**
|
|
* @var string|null $negativeComponent The negativeComponent property
|
|
*/
|
|
private ?string $negativeComponent = null;
|
|
|
|
/**
|
|
* @var string|null $negativeComponent2022 The negativeComponent2022 property
|
|
*/
|
|
private ?string $negativeComponent2022 = null;
|
|
|
|
/**
|
|
* @var string|null $positiveComponent The positiveComponent property
|
|
*/
|
|
private ?string $positiveComponent = null;
|
|
|
|
/**
|
|
* @var string|null $positiveComponent2022 The positiveComponent2022 property
|
|
*/
|
|
private ?string $positiveComponent2022 = null;
|
|
|
|
/**
|
|
* @var string|null $score The score property
|
|
*/
|
|
private ?string $score = null;
|
|
|
|
/**
|
|
* @var string|null $score2022 The score2022 property
|
|
*/
|
|
private ?string $score2022 = null;
|
|
|
|
/**
|
|
* Instantiates a new IncoCompoNutriScore 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 IncoCompoNutriScore
|
|
*/
|
|
public static function createFromDiscriminatorValue(ParseNode $parseNode): IncoCompoNutriScore {
|
|
return new IncoCompoNutriScore();
|
|
}
|
|
|
|
/**
|
|
* 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 [
|
|
'grade' => fn(ParseNode $n) => $o->setGrade($n->getStringValue()),
|
|
'grade2022' => fn(ParseNode $n) => $o->setGrade2022($n->getStringValue()),
|
|
'isGradeAArticle' => fn(ParseNode $n) => $o->setIsGradeAArticle($n->getStringValue()),
|
|
'isRedMeat' => fn(ParseNode $n) => $o->setIsRedMeat($n->getStringValue()),
|
|
'negativeComponent' => fn(ParseNode $n) => $o->setNegativeComponent($n->getStringValue()),
|
|
'negativeComponent2022' => fn(ParseNode $n) => $o->setNegativeComponent2022($n->getStringValue()),
|
|
'positiveComponent' => fn(ParseNode $n) => $o->setPositiveComponent($n->getStringValue()),
|
|
'positiveComponent2022' => fn(ParseNode $n) => $o->setPositiveComponent2022($n->getStringValue()),
|
|
'score' => fn(ParseNode $n) => $o->setScore($n->getStringValue()),
|
|
'score2022' => fn(ParseNode $n) => $o->setScore2022($n->getStringValue()),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Gets the grade property value. The grade property
|
|
* @return string|null
|
|
*/
|
|
public function getGrade(): ?string {
|
|
return $this->grade;
|
|
}
|
|
|
|
/**
|
|
* Gets the grade2022 property value. The grade2022 property
|
|
* @return string|null
|
|
*/
|
|
public function getGrade2022(): ?string {
|
|
return $this->grade2022;
|
|
}
|
|
|
|
/**
|
|
* Gets the isGradeAArticle property value. The isGradeAArticle property
|
|
* @return string|null
|
|
*/
|
|
public function getIsGradeAArticle(): ?string {
|
|
return $this->isGradeAArticle;
|
|
}
|
|
|
|
/**
|
|
* Gets the isRedMeat property value. The isRedMeat property
|
|
* @return string|null
|
|
*/
|
|
public function getIsRedMeat(): ?string {
|
|
return $this->isRedMeat;
|
|
}
|
|
|
|
/**
|
|
* Gets the negativeComponent property value. The negativeComponent property
|
|
* @return string|null
|
|
*/
|
|
public function getNegativeComponent(): ?string {
|
|
return $this->negativeComponent;
|
|
}
|
|
|
|
/**
|
|
* Gets the negativeComponent2022 property value. The negativeComponent2022 property
|
|
* @return string|null
|
|
*/
|
|
public function getNegativeComponent2022(): ?string {
|
|
return $this->negativeComponent2022;
|
|
}
|
|
|
|
/**
|
|
* Gets the positiveComponent property value. The positiveComponent property
|
|
* @return string|null
|
|
*/
|
|
public function getPositiveComponent(): ?string {
|
|
return $this->positiveComponent;
|
|
}
|
|
|
|
/**
|
|
* Gets the positiveComponent2022 property value. The positiveComponent2022 property
|
|
* @return string|null
|
|
*/
|
|
public function getPositiveComponent2022(): ?string {
|
|
return $this->positiveComponent2022;
|
|
}
|
|
|
|
/**
|
|
* Gets the score property value. The score property
|
|
* @return string|null
|
|
*/
|
|
public function getScore(): ?string {
|
|
return $this->score;
|
|
}
|
|
|
|
/**
|
|
* Gets the score2022 property value. The score2022 property
|
|
* @return string|null
|
|
*/
|
|
public function getScore2022(): ?string {
|
|
return $this->score2022;
|
|
}
|
|
|
|
/**
|
|
* Serializes information the current object
|
|
* @param SerializationWriter $writer Serialization writer to use to serialize this model
|
|
*/
|
|
public function serialize(SerializationWriter $writer): void {
|
|
$writer->writeStringValue('grade', $this->getGrade());
|
|
$writer->writeStringValue('grade2022', $this->getGrade2022());
|
|
$writer->writeStringValue('isGradeAArticle', $this->getIsGradeAArticle());
|
|
$writer->writeStringValue('isRedMeat', $this->getIsRedMeat());
|
|
$writer->writeStringValue('negativeComponent', $this->getNegativeComponent());
|
|
$writer->writeStringValue('negativeComponent2022', $this->getNegativeComponent2022());
|
|
$writer->writeStringValue('positiveComponent', $this->getPositiveComponent());
|
|
$writer->writeStringValue('positiveComponent2022', $this->getPositiveComponent2022());
|
|
$writer->writeStringValue('score', $this->getScore());
|
|
$writer->writeStringValue('score2022', $this->getScore2022());
|
|
$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 grade property value. The grade property
|
|
* @param string|null $value Value to set for the grade property.
|
|
*/
|
|
public function setGrade(?string $value): void {
|
|
$this->grade = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the grade2022 property value. The grade2022 property
|
|
* @param string|null $value Value to set for the grade2022 property.
|
|
*/
|
|
public function setGrade2022(?string $value): void {
|
|
$this->grade2022 = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the isGradeAArticle property value. The isGradeAArticle property
|
|
* @param string|null $value Value to set for the isGradeAArticle property.
|
|
*/
|
|
public function setIsGradeAArticle(?string $value): void {
|
|
$this->isGradeAArticle = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the isRedMeat property value. The isRedMeat property
|
|
* @param string|null $value Value to set for the isRedMeat property.
|
|
*/
|
|
public function setIsRedMeat(?string $value): void {
|
|
$this->isRedMeat = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the negativeComponent property value. The negativeComponent property
|
|
* @param string|null $value Value to set for the negativeComponent property.
|
|
*/
|
|
public function setNegativeComponent(?string $value): void {
|
|
$this->negativeComponent = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the negativeComponent2022 property value. The negativeComponent2022 property
|
|
* @param string|null $value Value to set for the negativeComponent2022 property.
|
|
*/
|
|
public function setNegativeComponent2022(?string $value): void {
|
|
$this->negativeComponent2022 = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the positiveComponent property value. The positiveComponent property
|
|
* @param string|null $value Value to set for the positiveComponent property.
|
|
*/
|
|
public function setPositiveComponent(?string $value): void {
|
|
$this->positiveComponent = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the positiveComponent2022 property value. The positiveComponent2022 property
|
|
* @param string|null $value Value to set for the positiveComponent2022 property.
|
|
*/
|
|
public function setPositiveComponent2022(?string $value): void {
|
|
$this->positiveComponent2022 = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the score property value. The score property
|
|
* @param string|null $value Value to set for the score property.
|
|
*/
|
|
public function setScore(?string $value): void {
|
|
$this->score = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the score2022 property value. The score2022 property
|
|
* @param string|null $value Value to set for the score2022 property.
|
|
*/
|
|
public function setScore2022(?string $value): void {
|
|
$this->score2022 = $value;
|
|
}
|
|
|
|
}
|