218 lines
6.3 KiB
PHP
218 lines
6.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Uwil\ArcadiaKiotaOpenApiClient\Models;
|
|
|
|
use Microsoft\Kiota\Abstractions\ApiException;
|
|
use Microsoft\Kiota\Abstractions\Serialization\AdditionalDataHolder;
|
|
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
|
|
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
|
|
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
|
|
|
|
/**
|
|
* Format RFC 7807 pour les erreurs de validation HTTP (422 Unprocessable Entity).
|
|
*/
|
|
class ValidationErrorProblemDetails extends ApiException implements AdditionalDataHolder, Parsable
|
|
{
|
|
/**
|
|
* @var array<string, mixed>|null 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 Message d'ensemble.
|
|
*/
|
|
private ?string $detail = null;
|
|
|
|
/**
|
|
* @var array<InvalidParamItem>|null Liste des paramètres invalides et motifs.
|
|
*/
|
|
private ?array $invalidParams = null;
|
|
|
|
/**
|
|
* @var int|null Code HTTP (422).
|
|
*/
|
|
private ?int $status = null;
|
|
|
|
/**
|
|
* @var string|null Titre de l'erreur.
|
|
*/
|
|
private ?string $title = null;
|
|
|
|
/**
|
|
* @var string|null URI identifiant l'erreur de validation.
|
|
*/
|
|
private ?string $type = null;
|
|
|
|
/**
|
|
* Instantiates a new ValidationErrorProblemDetails 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
|
|
*/
|
|
public static function createFromDiscriminatorValue(ParseNode $parseNode): ValidationErrorProblemDetails
|
|
{
|
|
return new ValidationErrorProblemDetails();
|
|
}
|
|
|
|
/**
|
|
* 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 detail property value. Message d'ensemble.
|
|
*/
|
|
public function getDetail(): ?string
|
|
{
|
|
return $this->detail;
|
|
}
|
|
|
|
/**
|
|
* The deserialization information for the current model
|
|
*
|
|
* @return array<string, callable(ParseNode): void>
|
|
*/
|
|
public function getFieldDeserializers(): array
|
|
{
|
|
$o = $this;
|
|
|
|
return [
|
|
'detail' => fn (ParseNode $n) => $o->setDetail($n->getStringValue()),
|
|
'invalidParams' => fn (ParseNode $n) => $o->setInvalidParams($n->getCollectionOfObjectValues([InvalidParamItem::class, 'createFromDiscriminatorValue'])),
|
|
'status' => fn (ParseNode $n) => $o->setStatus($n->getIntegerValue()),
|
|
'title' => fn (ParseNode $n) => $o->setTitle($n->getStringValue()),
|
|
'type' => fn (ParseNode $n) => $o->setType($n->getStringValue()),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Gets the invalidParams property value. Liste des paramètres invalides et motifs.
|
|
*
|
|
* @return array<InvalidParamItem>|null
|
|
*/
|
|
public function getInvalidParams(): ?array
|
|
{
|
|
return $this->invalidParams;
|
|
}
|
|
|
|
/**
|
|
* The primary error message.
|
|
*/
|
|
public function getPrimaryErrorMessage(): string
|
|
{
|
|
return parent::getMessage();
|
|
}
|
|
|
|
/**
|
|
* Gets the status property value. Code HTTP (422).
|
|
*/
|
|
public function getStatus(): ?int
|
|
{
|
|
return $this->status;
|
|
}
|
|
|
|
/**
|
|
* Gets the title property value. Titre de l'erreur.
|
|
*/
|
|
public function getTitle(): ?string
|
|
{
|
|
return $this->title;
|
|
}
|
|
|
|
/**
|
|
* Gets the type property value. URI identifiant l'erreur de validation.
|
|
*/
|
|
public function getType(): ?string
|
|
{
|
|
return $this->type;
|
|
}
|
|
|
|
/**
|
|
* Serializes information the current object
|
|
*
|
|
* @param SerializationWriter $writer Serialization writer to use to serialize this model
|
|
*/
|
|
public function serialize(SerializationWriter $writer): void
|
|
{
|
|
$writer->writeStringValue('detail', $this->getDetail());
|
|
$writer->writeCollectionOfObjectValues('invalidParams', $this->getInvalidParams());
|
|
$writer->writeIntegerValue('status', $this->getStatus());
|
|
$writer->writeStringValue('title', $this->getTitle());
|
|
$writer->writeStringValue('type', $this->getType());
|
|
$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 detail property value. Message d'ensemble.
|
|
*
|
|
* @param string|null $value Value to set for the detail property.
|
|
*/
|
|
public function setDetail(?string $value): void
|
|
{
|
|
$this->detail = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the invalidParams property value. Liste des paramètres invalides et motifs.
|
|
*
|
|
* @param array<InvalidParamItem>|null $value Value to set for the invalidParams property.
|
|
*/
|
|
public function setInvalidParams(?array $value): void
|
|
{
|
|
$this->invalidParams = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the status property value. Code HTTP (422).
|
|
*
|
|
* @param int|null $value Value to set for the status property.
|
|
*/
|
|
public function setStatus(?int $value): void
|
|
{
|
|
$this->status = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the title property value. Titre de l'erreur.
|
|
*
|
|
* @param string|null $value Value to set for the title property.
|
|
*/
|
|
public function setTitle(?string $value): void
|
|
{
|
|
$this->title = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the type property value. URI identifiant l'erreur de validation.
|
|
*
|
|
* @param string|null $value Value to set for the type property.
|
|
*/
|
|
public function setType(?string $value): void
|
|
{
|
|
$this->type = $value;
|
|
}
|
|
}
|