167 lines
5.2 KiB
PHP
167 lines
5.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Uwil\ArcadiaKiotaOpenApiClient\Models;
|
|
|
|
use DateTime;
|
|
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;
|
|
|
|
/**
|
|
* Résultat de la sonde d'état et de disponibilité des services.
|
|
*/
|
|
class HealthCheckResponse 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 HealthCheckResponse_checks|null Détails des vérifications par composant.
|
|
*/
|
|
private ?HealthCheckResponse_checks $checks = null;
|
|
|
|
/**
|
|
* @var HealthCheckResponse_status|null État de santé global du système.
|
|
*/
|
|
private ?HealthCheckResponse_status $status = null;
|
|
|
|
/**
|
|
* @var DateTime|null Horodatage de la vérification au format RFC 3339 UTC.
|
|
*/
|
|
private ?DateTime $timestamp = null;
|
|
|
|
/**
|
|
* Instantiates a new HealthCheckResponse 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): HealthCheckResponse
|
|
{
|
|
return new HealthCheckResponse();
|
|
}
|
|
|
|
/**
|
|
* 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 checks property value. Détails des vérifications par composant.
|
|
*/
|
|
public function getChecks(): ?HealthCheckResponse_checks
|
|
{
|
|
return $this->checks;
|
|
}
|
|
|
|
/**
|
|
* The deserialization information for the current model
|
|
*
|
|
* @return array<string, callable(ParseNode): void>
|
|
*/
|
|
public function getFieldDeserializers(): array
|
|
{
|
|
$o = $this;
|
|
|
|
return [
|
|
'checks' => fn (ParseNode $n) => $o->setChecks($n->getObjectValue([HealthCheckResponse_checks::class, 'createFromDiscriminatorValue'])),
|
|
'status' => fn (ParseNode $n) => $o->setStatus($n->getEnumValue(HealthCheckResponse_status::class)),
|
|
'timestamp' => fn (ParseNode $n) => $o->setTimestamp($n->getDateTimeValue()),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* The primary error message.
|
|
*/
|
|
public function getPrimaryErrorMessage(): string
|
|
{
|
|
return parent::getMessage();
|
|
}
|
|
|
|
/**
|
|
* Gets the status property value. État de santé global du système.
|
|
*/
|
|
public function getStatus(): ?HealthCheckResponse_status
|
|
{
|
|
return $this->status;
|
|
}
|
|
|
|
/**
|
|
* Gets the timestamp property value. Horodatage de la vérification au format RFC 3339 UTC.
|
|
*/
|
|
public function getTimestamp(): ?DateTime
|
|
{
|
|
return $this->timestamp;
|
|
}
|
|
|
|
/**
|
|
* Serializes information the current object
|
|
*
|
|
* @param SerializationWriter $writer Serialization writer to use to serialize this model
|
|
*/
|
|
public function serialize(SerializationWriter $writer): void
|
|
{
|
|
$writer->writeObjectValue('checks', $this->getChecks());
|
|
$writer->writeEnumValue('status', $this->getStatus());
|
|
$writer->writeDateTimeValue('timestamp', $this->getTimestamp());
|
|
$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 checks property value. Détails des vérifications par composant.
|
|
*
|
|
* @param HealthCheckResponse_checks|null $value Value to set for the checks property.
|
|
*/
|
|
public function setChecks(?HealthCheckResponse_checks $value): void
|
|
{
|
|
$this->checks = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the status property value. État de santé global du système.
|
|
*
|
|
* @param HealthCheckResponse_status|null $value Value to set for the status property.
|
|
*/
|
|
public function setStatus(?HealthCheckResponse_status $value): void
|
|
{
|
|
$this->status = $value;
|
|
}
|
|
|
|
/**
|
|
* Sets the timestamp property value. Horodatage de la vérification au format RFC 3339 UTC.
|
|
*
|
|
* @param DateTime|null $value Value to set for the timestamp property.
|
|
*/
|
|
public function setTimestamp(?DateTime $value): void
|
|
{
|
|
$this->timestamp = $value;
|
|
}
|
|
}
|