Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
202 changes: 202 additions & 0 deletions src/Generated/Models/ProtectionPolicyArtifactCount.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
<?php

namespace Microsoft\Graph\Generated\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\Store\BackedModel;
use Microsoft\Kiota\Abstractions\Store\BackingStore;
use Microsoft\Kiota\Abstractions\Store\BackingStoreFactorySingleton;

class ProtectionPolicyArtifactCount implements AdditionalDataHolder, BackedModel, Parsable
{
/**
* @var BackingStore $backingStore Stores model information.
*/
private BackingStore $backingStore;

/**
* Instantiates a new ProtectionPolicyArtifactCount and sets the default values.
*/
public function __construct() {
$this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();
$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 ProtectionPolicyArtifactCount
*/
public static function createFromDiscriminatorValue(ParseNode $parseNode): ProtectionPolicyArtifactCount {
return new ProtectionPolicyArtifactCount();
}

/**
* 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 {
$val = $this->getBackingStore()->get('additionalData');
if (is_null($val) || is_array($val)) {
/** @var array<string, mixed>|null $val */
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'");
}

/**
* Gets the BackingStore property value. Stores model information.
* @return BackingStore
*/
public function getBackingStore(): BackingStore {
return $this->backingStore;
}

/**
* Gets the completed property value. The completed property
* @return int|null
*/
public function getCompleted(): ?int {
$val = $this->getBackingStore()->get('completed');
if (is_null($val) || is_int($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'completed'");
}

/**
* Gets the failed property value. The failed property
* @return int|null
*/
public function getFailed(): ?int {
$val = $this->getBackingStore()->get('failed');
if (is_null($val) || is_int($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'failed'");
}

/**
* The deserialization information for the current model
* @return array<string, callable(ParseNode): void>
*/
public function getFieldDeserializers(): array {
$o = $this;
return [
'completed' => fn(ParseNode $n) => $o->setCompleted($n->getIntegerValue()),
'failed' => fn(ParseNode $n) => $o->setFailed($n->getIntegerValue()),
'inProgress' => fn(ParseNode $n) => $o->setInProgress($n->getIntegerValue()),
'@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),
'total' => fn(ParseNode $n) => $o->setTotal($n->getIntegerValue()),
];
}

/**
* Gets the inProgress property value. The inProgress property
* @return int|null
*/
public function getInProgress(): ?int {
$val = $this->getBackingStore()->get('inProgress');
if (is_null($val) || is_int($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'inProgress'");
}

/**
* Gets the @odata.type property value. The OdataType property
* @return string|null
*/
public function getOdataType(): ?string {
$val = $this->getBackingStore()->get('odataType');
if (is_null($val) || is_string($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'odataType'");
}

/**
* Gets the total property value. The total property
* @return int|null
*/
public function getTotal(): ?int {
$val = $this->getBackingStore()->get('total');
if (is_null($val) || is_int($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'total'");
}

/**
* Serializes information the current object
* @param SerializationWriter $writer Serialization writer to use to serialize this model
*/
public function serialize(SerializationWriter $writer): void {
$writer->writeIntegerValue('completed', $this->getCompleted());
$writer->writeIntegerValue('failed', $this->getFailed());
$writer->writeIntegerValue('inProgress', $this->getInProgress());
$writer->writeStringValue('@odata.type', $this->getOdataType());
$writer->writeIntegerValue('total', $this->getTotal());
$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->getBackingStore()->set('additionalData', $value);
}

/**
* Sets the BackingStore property value. Stores model information.
* @param BackingStore $value Value to set for the BackingStore property.
*/
public function setBackingStore(BackingStore $value): void {
$this->backingStore = $value;
}

/**
* Sets the completed property value. The completed property
* @param int|null $value Value to set for the completed property.
*/
public function setCompleted(?int $value): void {
$this->getBackingStore()->set('completed', $value);
}

/**
* Sets the failed property value. The failed property
* @param int|null $value Value to set for the failed property.
*/
public function setFailed(?int $value): void {
$this->getBackingStore()->set('failed', $value);
}

/**
* Sets the inProgress property value. The inProgress property
* @param int|null $value Value to set for the inProgress property.
*/
public function setInProgress(?int $value): void {
$this->getBackingStore()->set('inProgress', $value);
}

/**
* Sets the @odata.type property value. The OdataType property
* @param string|null $value Value to set for the @odata.type property.
*/
public function setOdataType(?string $value): void {
$this->getBackingStore()->set('odataType', $value);
}

/**
* Sets the total property value. The total property
* @param int|null $value Value to set for the total property.
*/
public function setTotal(?int $value): void {
$this->getBackingStore()->set('total', $value);
}

}
44 changes: 44 additions & 0 deletions src/Generated/Models/ProtectionPolicyBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,27 @@ public function getFieldDeserializers(): array {
'createdBy' => fn(ParseNode $n) => $o->setCreatedBy($n->getObjectValue([IdentitySet::class, 'createFromDiscriminatorValue'])),
'createdDateTime' => fn(ParseNode $n) => $o->setCreatedDateTime($n->getDateTimeValue()),
'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),
'isEnabled' => fn(ParseNode $n) => $o->setIsEnabled($n->getBooleanValue()),
'lastModifiedBy' => fn(ParseNode $n) => $o->setLastModifiedBy($n->getObjectValue([IdentitySet::class, 'createFromDiscriminatorValue'])),
'lastModifiedDateTime' => fn(ParseNode $n) => $o->setLastModifiedDateTime($n->getDateTimeValue()),
'protectionPolicyArtifactCount' => fn(ParseNode $n) => $o->setProtectionPolicyArtifactCount($n->getObjectValue([ProtectionPolicyArtifactCount::class, 'createFromDiscriminatorValue'])),
'retentionSettings' => fn(ParseNode $n) => $o->setRetentionSettings($n->getCollectionOfObjectValues([RetentionSetting::class, 'createFromDiscriminatorValue'])),
'status' => fn(ParseNode $n) => $o->setStatus($n->getEnumValue(ProtectionPolicyStatus::class)),
]);
}

/**
* Gets the isEnabled property value. The isEnabled property
* @return bool|null
*/
public function getIsEnabled(): ?bool {
$val = $this->getBackingStore()->get('isEnabled');
if (is_null($val) || is_bool($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'isEnabled'");
}

/**
* Gets the lastModifiedBy property value. The identity of the person who last modified the policy.
* @return IdentitySet|null
Expand All @@ -112,6 +126,18 @@ public function getLastModifiedDateTime(): ?DateTime {
throw new \UnexpectedValueException("Invalid type found in backing store for 'lastModifiedDateTime'");
}

/**
* Gets the protectionPolicyArtifactCount property value. The protectionPolicyArtifactCount property
* @return ProtectionPolicyArtifactCount|null
*/
public function getProtectionPolicyArtifactCount(): ?ProtectionPolicyArtifactCount {
$val = $this->getBackingStore()->get('protectionPolicyArtifactCount');
if (is_null($val) || $val instanceof ProtectionPolicyArtifactCount) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'protectionPolicyArtifactCount'");
}

/**
* Gets the retentionSettings property value. Contains the retention setting details for the policy.
* @return array<RetentionSetting>|null
Expand Down Expand Up @@ -147,8 +173,10 @@ public function serialize(SerializationWriter $writer): void {
$writer->writeObjectValue('createdBy', $this->getCreatedBy());
$writer->writeDateTimeValue('createdDateTime', $this->getCreatedDateTime());
$writer->writeStringValue('displayName', $this->getDisplayName());
$writer->writeBooleanValue('isEnabled', $this->getIsEnabled());
$writer->writeObjectValue('lastModifiedBy', $this->getLastModifiedBy());
$writer->writeDateTimeValue('lastModifiedDateTime', $this->getLastModifiedDateTime());
$writer->writeObjectValue('protectionPolicyArtifactCount', $this->getProtectionPolicyArtifactCount());
$writer->writeCollectionOfObjectValues('retentionSettings', $this->getRetentionSettings());
$writer->writeEnumValue('status', $this->getStatus());
}
Expand Down Expand Up @@ -177,6 +205,14 @@ public function setDisplayName(?string $value): void {
$this->getBackingStore()->set('displayName', $value);
}

/**
* Sets the isEnabled property value. The isEnabled property
* @param bool|null $value Value to set for the isEnabled property.
*/
public function setIsEnabled(?bool $value): void {
$this->getBackingStore()->set('isEnabled', $value);
}

/**
* Sets the lastModifiedBy property value. The identity of the person who last modified the policy.
* @param IdentitySet|null $value Value to set for the lastModifiedBy property.
Expand All @@ -193,6 +229,14 @@ public function setLastModifiedDateTime(?DateTime $value): void {
$this->getBackingStore()->set('lastModifiedDateTime', $value);
}

/**
* Sets the protectionPolicyArtifactCount property value. The protectionPolicyArtifactCount property
* @param ProtectionPolicyArtifactCount|null $value Value to set for the protectionPolicyArtifactCount property.
*/
public function setProtectionPolicyArtifactCount(?ProtectionPolicyArtifactCount $value): void {
$this->getBackingStore()->set('protectionPolicyArtifactCount', $value);
}

/**
* Sets the retentionSettings property value. Contains the retention setting details for the policy.
* @param array<RetentionSetting>|null $value Value to set for the retentionSettings property.
Expand Down
4 changes: 2 additions & 2 deletions src/Generated/Models/Security/Alert.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function getDescription(): ?string {
}

/**
* Gets the detectionSource property value. Detection technology or sensor that identified the notable component or activity. The possible values are: unknown, microsoftDefenderForEndpoint, antivirus, smartScreen, customTi, microsoftDefenderForOffice365, automatedInvestigation, microsoftThreatExperts, customDetection, microsoftDefenderForIdentity, cloudAppSecurity, microsoft365Defender, azureAdIdentityProtection, manual, microsoftDataLossPrevention, appGovernancePolicy, appGovernanceDetection, unknownFutureValue, microsoftDefenderForCloud, microsoftDefenderForIoT, microsoftDefenderForServers, microsoftDefenderForStorage, microsoftDefenderForDNS, microsoftDefenderForDatabases, microsoftDefenderForContainers, microsoftDefenderForNetwork, microsoftDefenderForAppService, microsoftDefenderForKeyVault, microsoftDefenderForResourceManager, microsoftDefenderForApiManagement, microsoftSentinel, nrtAlerts, scheduledAlerts, microsoftDefenderThreatIntelligenceAnalytics, builtInMl, microsoftThreatIntelligence, microsoftDefenderForAIServices, securityCopilot. Use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: microsoftDefenderForCloud, microsoftDefenderForIoT, microsoftDefenderForServers, microsoftDefenderForStorage, microsoftDefenderForDNS, microsoftDefenderForDatabases, microsoftDefenderForContainers, microsoftDefenderForNetwork, microsoftDefenderForAppService, microsoftDefenderForKeyVault, microsoftDefenderForResourceManager, microsoftDefenderForApiManagement, microsoftSentinel, nrtAlerts, scheduledAlerts, microsoftDefenderThreatIntelligenceAnalytics, builtInMl, microsoftThreatIntelligence, microsoftDefenderForAIServices, securityCopilot.
* Gets the detectionSource property value. Detection technology or sensor that identified the notable component or activity.
* @return DetectionSource|null
*/
public function getDetectionSource(): ?DetectionSource {
Expand Down Expand Up @@ -632,7 +632,7 @@ public function setDescription(?string $value): void {
}

/**
* Sets the detectionSource property value. Detection technology or sensor that identified the notable component or activity. The possible values are: unknown, microsoftDefenderForEndpoint, antivirus, smartScreen, customTi, microsoftDefenderForOffice365, automatedInvestigation, microsoftThreatExperts, customDetection, microsoftDefenderForIdentity, cloudAppSecurity, microsoft365Defender, azureAdIdentityProtection, manual, microsoftDataLossPrevention, appGovernancePolicy, appGovernanceDetection, unknownFutureValue, microsoftDefenderForCloud, microsoftDefenderForIoT, microsoftDefenderForServers, microsoftDefenderForStorage, microsoftDefenderForDNS, microsoftDefenderForDatabases, microsoftDefenderForContainers, microsoftDefenderForNetwork, microsoftDefenderForAppService, microsoftDefenderForKeyVault, microsoftDefenderForResourceManager, microsoftDefenderForApiManagement, microsoftSentinel, nrtAlerts, scheduledAlerts, microsoftDefenderThreatIntelligenceAnalytics, builtInMl, microsoftThreatIntelligence, microsoftDefenderForAIServices, securityCopilot. Use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: microsoftDefenderForCloud, microsoftDefenderForIoT, microsoftDefenderForServers, microsoftDefenderForStorage, microsoftDefenderForDNS, microsoftDefenderForDatabases, microsoftDefenderForContainers, microsoftDefenderForNetwork, microsoftDefenderForAppService, microsoftDefenderForKeyVault, microsoftDefenderForResourceManager, microsoftDefenderForApiManagement, microsoftSentinel, nrtAlerts, scheduledAlerts, microsoftDefenderThreatIntelligenceAnalytics, builtInMl, microsoftThreatIntelligence, microsoftDefenderForAIServices, securityCopilot.
* Sets the detectionSource property value. Detection technology or sensor that identified the notable component or activity.
* @param DetectionSource|null $value Value to set for the detectionSource property.
*/
public function setDetectionSource(?DetectionSource $value): void {
Expand Down
22 changes: 22 additions & 0 deletions src/Generated/Models/Security/Incident.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public function getFieldDeserializers(): array {
'incidentWebUrl' => fn(ParseNode $n) => $o->setIncidentWebUrl($n->getStringValue()),
'lastModifiedBy' => fn(ParseNode $n) => $o->setLastModifiedBy($n->getStringValue()),
'lastUpdateDateTime' => fn(ParseNode $n) => $o->setLastUpdateDateTime($n->getDateTimeValue()),
'priorityScore' => fn(ParseNode $n) => $o->setPriorityScore($n->getIntegerValue()),
'redirectIncidentId' => fn(ParseNode $n) => $o->setRedirectIncidentId($n->getStringValue()),
'resolvingComment' => fn(ParseNode $n) => $o->setResolvingComment($n->getStringValue()),
'severity' => fn(ParseNode $n) => $o->setSeverity($n->getEnumValue(AlertSeverity::class)),
Expand Down Expand Up @@ -220,6 +221,18 @@ public function getLastUpdateDateTime(): ?DateTime {
throw new \UnexpectedValueException("Invalid type found in backing store for 'lastUpdateDateTime'");
}

/**
* Gets the priorityScore property value. The priorityScore property
* @return int|null
*/
public function getPriorityScore(): ?int {
$val = $this->getBackingStore()->get('priorityScore');
if (is_null($val) || is_int($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'priorityScore'");
}

/**
* Gets the redirectIncidentId property value. Only populated in case an incident is grouped with another incident, as part of the logic that processes incidents. In such a case, the status property is redirected.
* @return string|null
Expand Down Expand Up @@ -324,6 +337,7 @@ public function serialize(SerializationWriter $writer): void {
$writer->writeStringValue('incidentWebUrl', $this->getIncidentWebUrl());
$writer->writeStringValue('lastModifiedBy', $this->getLastModifiedBy());
$writer->writeDateTimeValue('lastUpdateDateTime', $this->getLastUpdateDateTime());
$writer->writeIntegerValue('priorityScore', $this->getPriorityScore());
$writer->writeStringValue('redirectIncidentId', $this->getRedirectIncidentId());
$writer->writeStringValue('resolvingComment', $this->getResolvingComment());
$writer->writeEnumValue('severity', $this->getSeverity());
Expand Down Expand Up @@ -429,6 +443,14 @@ public function setLastUpdateDateTime(?DateTime $value): void {
$this->getBackingStore()->set('lastUpdateDateTime', $value);
}

/**
* Sets the priorityScore property value. The priorityScore property
* @param int|null $value Value to set for the priorityScore property.
*/
public function setPriorityScore(?int $value): void {
$this->getBackingStore()->set('priorityScore', $value);
}

/**
* Sets the redirectIncidentId property value. Only populated in case an incident is grouped with another incident, as part of the logic that processes incidents. In such a case, the status property is redirected.
* @param string|null $value Value to set for the redirectIncidentId property.
Expand Down
Loading