|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace Microsoft\Graph\Generated\Models\Security; |
| 4 | + |
| 5 | +use DateTime; |
| 6 | +use Microsoft\Graph\Generated\Models\Entity; |
| 7 | +use Microsoft\Kiota\Abstractions\Serialization\Parsable; |
| 8 | +use Microsoft\Kiota\Abstractions\Serialization\ParseNode; |
| 9 | +use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter; |
| 10 | + |
| 11 | +class SensorCandidate extends Entity implements Parsable |
| 12 | +{ |
| 13 | + /** |
| 14 | + * Instantiates a new SensorCandidate and sets the default values. |
| 15 | + */ |
| 16 | + public function __construct() { |
| 17 | + parent::__construct(); |
| 18 | + } |
| 19 | + |
| 20 | + /** |
| 21 | + * Creates a new instance of the appropriate class based on discriminator value |
| 22 | + * @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object |
| 23 | + * @return SensorCandidate |
| 24 | + */ |
| 25 | + public static function createFromDiscriminatorValue(ParseNode $parseNode): SensorCandidate { |
| 26 | + return new SensorCandidate(); |
| 27 | + } |
| 28 | + |
| 29 | + /** |
| 30 | + * Gets the computerDnsName property value. The DNS name of the computer associated with the sensor. |
| 31 | + * @return string|null |
| 32 | + */ |
| 33 | + public function getComputerDnsName(): ?string { |
| 34 | + $val = $this->getBackingStore()->get('computerDnsName'); |
| 35 | + if (is_null($val) || is_string($val)) { |
| 36 | + return $val; |
| 37 | + } |
| 38 | + throw new \UnexpectedValueException("Invalid type found in backing store for 'computerDnsName'"); |
| 39 | + } |
| 40 | + |
| 41 | + /** |
| 42 | + * The deserialization information for the current model |
| 43 | + * @return array<string, callable(ParseNode): void> |
| 44 | + */ |
| 45 | + public function getFieldDeserializers(): array { |
| 46 | + $o = $this; |
| 47 | + return array_merge(parent::getFieldDeserializers(), [ |
| 48 | + 'computerDnsName' => fn(ParseNode $n) => $o->setComputerDnsName($n->getStringValue()), |
| 49 | + 'lastSeenDateTime' => fn(ParseNode $n) => $o->setLastSeenDateTime($n->getDateTimeValue()), |
| 50 | + 'senseClientVersion' => fn(ParseNode $n) => $o->setSenseClientVersion($n->getStringValue()), |
| 51 | + ]); |
| 52 | + } |
| 53 | + |
| 54 | + /** |
| 55 | + * Gets the lastSeenDateTime property value. The date and time when the sensor was last seen. |
| 56 | + * @return DateTime|null |
| 57 | + */ |
| 58 | + public function getLastSeenDateTime(): ?DateTime { |
| 59 | + $val = $this->getBackingStore()->get('lastSeenDateTime'); |
| 60 | + if (is_null($val) || $val instanceof DateTime) { |
| 61 | + return $val; |
| 62 | + } |
| 63 | + throw new \UnexpectedValueException("Invalid type found in backing store for 'lastSeenDateTime'"); |
| 64 | + } |
| 65 | + |
| 66 | + /** |
| 67 | + * Gets the senseClientVersion property value. The version of the Defender for Identity sensor client. Supports $filter (eq). |
| 68 | + * @return string|null |
| 69 | + */ |
| 70 | + public function getSenseClientVersion(): ?string { |
| 71 | + $val = $this->getBackingStore()->get('senseClientVersion'); |
| 72 | + if (is_null($val) || is_string($val)) { |
| 73 | + return $val; |
| 74 | + } |
| 75 | + throw new \UnexpectedValueException("Invalid type found in backing store for 'senseClientVersion'"); |
| 76 | + } |
| 77 | + |
| 78 | + /** |
| 79 | + * Serializes information the current object |
| 80 | + * @param SerializationWriter $writer Serialization writer to use to serialize this model |
| 81 | + */ |
| 82 | + public function serialize(SerializationWriter $writer): void { |
| 83 | + parent::serialize($writer); |
| 84 | + $writer->writeStringValue('computerDnsName', $this->getComputerDnsName()); |
| 85 | + $writer->writeDateTimeValue('lastSeenDateTime', $this->getLastSeenDateTime()); |
| 86 | + $writer->writeStringValue('senseClientVersion', $this->getSenseClientVersion()); |
| 87 | + } |
| 88 | + |
| 89 | + /** |
| 90 | + * Sets the computerDnsName property value. The DNS name of the computer associated with the sensor. |
| 91 | + * @param string|null $value Value to set for the computerDnsName property. |
| 92 | + */ |
| 93 | + public function setComputerDnsName(?string $value): void { |
| 94 | + $this->getBackingStore()->set('computerDnsName', $value); |
| 95 | + } |
| 96 | + |
| 97 | + /** |
| 98 | + * Sets the lastSeenDateTime property value. The date and time when the sensor was last seen. |
| 99 | + * @param DateTime|null $value Value to set for the lastSeenDateTime property. |
| 100 | + */ |
| 101 | + public function setLastSeenDateTime(?DateTime $value): void { |
| 102 | + $this->getBackingStore()->set('lastSeenDateTime', $value); |
| 103 | + } |
| 104 | + |
| 105 | + /** |
| 106 | + * Sets the senseClientVersion property value. The version of the Defender for Identity sensor client. Supports $filter (eq). |
| 107 | + * @param string|null $value Value to set for the senseClientVersion property. |
| 108 | + */ |
| 109 | + public function setSenseClientVersion(?string $value): void { |
| 110 | + $this->getBackingStore()->set('senseClientVersion', $value); |
| 111 | + } |
| 112 | + |
| 113 | +} |
0 commit comments