Skip to content

Commit d82def4

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 208109
1 parent 8fbfdd6 commit d82def4

File tree

10 files changed

+368
-5
lines changed

10 files changed

+368
-5
lines changed
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Models;
4+
5+
use Microsoft\Kiota\Abstractions\Serialization\AdditionalDataHolder;
6+
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
7+
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
8+
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
9+
use Microsoft\Kiota\Abstractions\Store\BackedModel;
10+
use Microsoft\Kiota\Abstractions\Store\BackingStore;
11+
use Microsoft\Kiota\Abstractions\Store\BackingStoreFactorySingleton;
12+
13+
class ProtectionPolicyArtifactCount implements AdditionalDataHolder, BackedModel, Parsable
14+
{
15+
/**
16+
* @var BackingStore $backingStore Stores model information.
17+
*/
18+
private BackingStore $backingStore;
19+
20+
/**
21+
* Instantiates a new ProtectionPolicyArtifactCount and sets the default values.
22+
*/
23+
public function __construct() {
24+
$this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();
25+
$this->setAdditionalData([]);
26+
}
27+
28+
/**
29+
* Creates a new instance of the appropriate class based on discriminator value
30+
* @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object
31+
* @return ProtectionPolicyArtifactCount
32+
*/
33+
public static function createFromDiscriminatorValue(ParseNode $parseNode): ProtectionPolicyArtifactCount {
34+
return new ProtectionPolicyArtifactCount();
35+
}
36+
37+
/**
38+
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
39+
* @return array<string, mixed>|null
40+
*/
41+
public function getAdditionalData(): ?array {
42+
$val = $this->getBackingStore()->get('additionalData');
43+
if (is_null($val) || is_array($val)) {
44+
/** @var array<string, mixed>|null $val */
45+
return $val;
46+
}
47+
throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'");
48+
}
49+
50+
/**
51+
* Gets the BackingStore property value. Stores model information.
52+
* @return BackingStore
53+
*/
54+
public function getBackingStore(): BackingStore {
55+
return $this->backingStore;
56+
}
57+
58+
/**
59+
* Gets the completed property value. The completed property
60+
* @return int|null
61+
*/
62+
public function getCompleted(): ?int {
63+
$val = $this->getBackingStore()->get('completed');
64+
if (is_null($val) || is_int($val)) {
65+
return $val;
66+
}
67+
throw new \UnexpectedValueException("Invalid type found in backing store for 'completed'");
68+
}
69+
70+
/**
71+
* Gets the failed property value. The failed property
72+
* @return int|null
73+
*/
74+
public function getFailed(): ?int {
75+
$val = $this->getBackingStore()->get('failed');
76+
if (is_null($val) || is_int($val)) {
77+
return $val;
78+
}
79+
throw new \UnexpectedValueException("Invalid type found in backing store for 'failed'");
80+
}
81+
82+
/**
83+
* The deserialization information for the current model
84+
* @return array<string, callable(ParseNode): void>
85+
*/
86+
public function getFieldDeserializers(): array {
87+
$o = $this;
88+
return [
89+
'completed' => fn(ParseNode $n) => $o->setCompleted($n->getIntegerValue()),
90+
'failed' => fn(ParseNode $n) => $o->setFailed($n->getIntegerValue()),
91+
'inProgress' => fn(ParseNode $n) => $o->setInProgress($n->getIntegerValue()),
92+
'@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),
93+
'total' => fn(ParseNode $n) => $o->setTotal($n->getIntegerValue()),
94+
];
95+
}
96+
97+
/**
98+
* Gets the inProgress property value. The inProgress property
99+
* @return int|null
100+
*/
101+
public function getInProgress(): ?int {
102+
$val = $this->getBackingStore()->get('inProgress');
103+
if (is_null($val) || is_int($val)) {
104+
return $val;
105+
}
106+
throw new \UnexpectedValueException("Invalid type found in backing store for 'inProgress'");
107+
}
108+
109+
/**
110+
* Gets the @odata.type property value. The OdataType property
111+
* @return string|null
112+
*/
113+
public function getOdataType(): ?string {
114+
$val = $this->getBackingStore()->get('odataType');
115+
if (is_null($val) || is_string($val)) {
116+
return $val;
117+
}
118+
throw new \UnexpectedValueException("Invalid type found in backing store for 'odataType'");
119+
}
120+
121+
/**
122+
* Gets the total property value. The total property
123+
* @return int|null
124+
*/
125+
public function getTotal(): ?int {
126+
$val = $this->getBackingStore()->get('total');
127+
if (is_null($val) || is_int($val)) {
128+
return $val;
129+
}
130+
throw new \UnexpectedValueException("Invalid type found in backing store for 'total'");
131+
}
132+
133+
/**
134+
* Serializes information the current object
135+
* @param SerializationWriter $writer Serialization writer to use to serialize this model
136+
*/
137+
public function serialize(SerializationWriter $writer): void {
138+
$writer->writeIntegerValue('completed', $this->getCompleted());
139+
$writer->writeIntegerValue('failed', $this->getFailed());
140+
$writer->writeIntegerValue('inProgress', $this->getInProgress());
141+
$writer->writeStringValue('@odata.type', $this->getOdataType());
142+
$writer->writeIntegerValue('total', $this->getTotal());
143+
$writer->writeAdditionalData($this->getAdditionalData());
144+
}
145+
146+
/**
147+
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
148+
* @param array<string,mixed> $value Value to set for the AdditionalData property.
149+
*/
150+
public function setAdditionalData(?array $value): void {
151+
$this->getBackingStore()->set('additionalData', $value);
152+
}
153+
154+
/**
155+
* Sets the BackingStore property value. Stores model information.
156+
* @param BackingStore $value Value to set for the BackingStore property.
157+
*/
158+
public function setBackingStore(BackingStore $value): void {
159+
$this->backingStore = $value;
160+
}
161+
162+
/**
163+
* Sets the completed property value. The completed property
164+
* @param int|null $value Value to set for the completed property.
165+
*/
166+
public function setCompleted(?int $value): void {
167+
$this->getBackingStore()->set('completed', $value);
168+
}
169+
170+
/**
171+
* Sets the failed property value. The failed property
172+
* @param int|null $value Value to set for the failed property.
173+
*/
174+
public function setFailed(?int $value): void {
175+
$this->getBackingStore()->set('failed', $value);
176+
}
177+
178+
/**
179+
* Sets the inProgress property value. The inProgress property
180+
* @param int|null $value Value to set for the inProgress property.
181+
*/
182+
public function setInProgress(?int $value): void {
183+
$this->getBackingStore()->set('inProgress', $value);
184+
}
185+
186+
/**
187+
* Sets the @odata.type property value. The OdataType property
188+
* @param string|null $value Value to set for the @odata.type property.
189+
*/
190+
public function setOdataType(?string $value): void {
191+
$this->getBackingStore()->set('odataType', $value);
192+
}
193+
194+
/**
195+
* Sets the total property value. The total property
196+
* @param int|null $value Value to set for the total property.
197+
*/
198+
public function setTotal(?int $value): void {
199+
$this->getBackingStore()->set('total', $value);
200+
}
201+
202+
}

src/Generated/Models/ProtectionPolicyBase.php

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,27 @@ public function getFieldDeserializers(): array {
8181
'createdBy' => fn(ParseNode $n) => $o->setCreatedBy($n->getObjectValue([IdentitySet::class, 'createFromDiscriminatorValue'])),
8282
'createdDateTime' => fn(ParseNode $n) => $o->setCreatedDateTime($n->getDateTimeValue()),
8383
'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),
84+
'isEnabled' => fn(ParseNode $n) => $o->setIsEnabled($n->getBooleanValue()),
8485
'lastModifiedBy' => fn(ParseNode $n) => $o->setLastModifiedBy($n->getObjectValue([IdentitySet::class, 'createFromDiscriminatorValue'])),
8586
'lastModifiedDateTime' => fn(ParseNode $n) => $o->setLastModifiedDateTime($n->getDateTimeValue()),
87+
'protectionPolicyArtifactCount' => fn(ParseNode $n) => $o->setProtectionPolicyArtifactCount($n->getObjectValue([ProtectionPolicyArtifactCount::class, 'createFromDiscriminatorValue'])),
8688
'retentionSettings' => fn(ParseNode $n) => $o->setRetentionSettings($n->getCollectionOfObjectValues([RetentionSetting::class, 'createFromDiscriminatorValue'])),
8789
'status' => fn(ParseNode $n) => $o->setStatus($n->getEnumValue(ProtectionPolicyStatus::class)),
8890
]);
8991
}
9092

93+
/**
94+
* Gets the isEnabled property value. The isEnabled property
95+
* @return bool|null
96+
*/
97+
public function getIsEnabled(): ?bool {
98+
$val = $this->getBackingStore()->get('isEnabled');
99+
if (is_null($val) || is_bool($val)) {
100+
return $val;
101+
}
102+
throw new \UnexpectedValueException("Invalid type found in backing store for 'isEnabled'");
103+
}
104+
91105
/**
92106
* Gets the lastModifiedBy property value. The identity of the person who last modified the policy.
93107
* @return IdentitySet|null
@@ -112,6 +126,18 @@ public function getLastModifiedDateTime(): ?DateTime {
112126
throw new \UnexpectedValueException("Invalid type found in backing store for 'lastModifiedDateTime'");
113127
}
114128

129+
/**
130+
* Gets the protectionPolicyArtifactCount property value. The protectionPolicyArtifactCount property
131+
* @return ProtectionPolicyArtifactCount|null
132+
*/
133+
public function getProtectionPolicyArtifactCount(): ?ProtectionPolicyArtifactCount {
134+
$val = $this->getBackingStore()->get('protectionPolicyArtifactCount');
135+
if (is_null($val) || $val instanceof ProtectionPolicyArtifactCount) {
136+
return $val;
137+
}
138+
throw new \UnexpectedValueException("Invalid type found in backing store for 'protectionPolicyArtifactCount'");
139+
}
140+
115141
/**
116142
* Gets the retentionSettings property value. Contains the retention setting details for the policy.
117143
* @return array<RetentionSetting>|null
@@ -147,8 +173,10 @@ public function serialize(SerializationWriter $writer): void {
147173
$writer->writeObjectValue('createdBy', $this->getCreatedBy());
148174
$writer->writeDateTimeValue('createdDateTime', $this->getCreatedDateTime());
149175
$writer->writeStringValue('displayName', $this->getDisplayName());
176+
$writer->writeBooleanValue('isEnabled', $this->getIsEnabled());
150177
$writer->writeObjectValue('lastModifiedBy', $this->getLastModifiedBy());
151178
$writer->writeDateTimeValue('lastModifiedDateTime', $this->getLastModifiedDateTime());
179+
$writer->writeObjectValue('protectionPolicyArtifactCount', $this->getProtectionPolicyArtifactCount());
152180
$writer->writeCollectionOfObjectValues('retentionSettings', $this->getRetentionSettings());
153181
$writer->writeEnumValue('status', $this->getStatus());
154182
}
@@ -177,6 +205,14 @@ public function setDisplayName(?string $value): void {
177205
$this->getBackingStore()->set('displayName', $value);
178206
}
179207

208+
/**
209+
* Sets the isEnabled property value. The isEnabled property
210+
* @param bool|null $value Value to set for the isEnabled property.
211+
*/
212+
public function setIsEnabled(?bool $value): void {
213+
$this->getBackingStore()->set('isEnabled', $value);
214+
}
215+
180216
/**
181217
* Sets the lastModifiedBy property value. The identity of the person who last modified the policy.
182218
* @param IdentitySet|null $value Value to set for the lastModifiedBy property.
@@ -193,6 +229,14 @@ public function setLastModifiedDateTime(?DateTime $value): void {
193229
$this->getBackingStore()->set('lastModifiedDateTime', $value);
194230
}
195231

232+
/**
233+
* Sets the protectionPolicyArtifactCount property value. The protectionPolicyArtifactCount property
234+
* @param ProtectionPolicyArtifactCount|null $value Value to set for the protectionPolicyArtifactCount property.
235+
*/
236+
public function setProtectionPolicyArtifactCount(?ProtectionPolicyArtifactCount $value): void {
237+
$this->getBackingStore()->set('protectionPolicyArtifactCount', $value);
238+
}
239+
196240
/**
197241
* Sets the retentionSettings property value. Contains the retention setting details for the policy.
198242
* @param array<RetentionSetting>|null $value Value to set for the retentionSettings property.

src/Generated/Models/Security/Alert.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function getDescription(): ?string {
162162
}
163163

164164
/**
165-
* 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.
165+
* Gets the detectionSource property value. Detection technology or sensor that identified the notable component or activity.
166166
* @return DetectionSource|null
167167
*/
168168
public function getDetectionSource(): ?DetectionSource {
@@ -632,7 +632,7 @@ public function setDescription(?string $value): void {
632632
}
633633

634634
/**
635-
* 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.
635+
* Sets the detectionSource property value. Detection technology or sensor that identified the notable component or activity.
636636
* @param DetectionSource|null $value Value to set for the detectionSource property.
637637
*/
638638
public function setDetectionSource(?DetectionSource $value): void {

src/Generated/Models/Security/Incident.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ public function getFieldDeserializers(): array {
167167
'incidentWebUrl' => fn(ParseNode $n) => $o->setIncidentWebUrl($n->getStringValue()),
168168
'lastModifiedBy' => fn(ParseNode $n) => $o->setLastModifiedBy($n->getStringValue()),
169169
'lastUpdateDateTime' => fn(ParseNode $n) => $o->setLastUpdateDateTime($n->getDateTimeValue()),
170+
'priorityScore' => fn(ParseNode $n) => $o->setPriorityScore($n->getIntegerValue()),
170171
'redirectIncidentId' => fn(ParseNode $n) => $o->setRedirectIncidentId($n->getStringValue()),
171172
'resolvingComment' => fn(ParseNode $n) => $o->setResolvingComment($n->getStringValue()),
172173
'severity' => fn(ParseNode $n) => $o->setSeverity($n->getEnumValue(AlertSeverity::class)),
@@ -220,6 +221,18 @@ public function getLastUpdateDateTime(): ?DateTime {
220221
throw new \UnexpectedValueException("Invalid type found in backing store for 'lastUpdateDateTime'");
221222
}
222223

224+
/**
225+
* Gets the priorityScore property value. The priorityScore property
226+
* @return int|null
227+
*/
228+
public function getPriorityScore(): ?int {
229+
$val = $this->getBackingStore()->get('priorityScore');
230+
if (is_null($val) || is_int($val)) {
231+
return $val;
232+
}
233+
throw new \UnexpectedValueException("Invalid type found in backing store for 'priorityScore'");
234+
}
235+
223236
/**
224237
* 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.
225238
* @return string|null
@@ -324,6 +337,7 @@ public function serialize(SerializationWriter $writer): void {
324337
$writer->writeStringValue('incidentWebUrl', $this->getIncidentWebUrl());
325338
$writer->writeStringValue('lastModifiedBy', $this->getLastModifiedBy());
326339
$writer->writeDateTimeValue('lastUpdateDateTime', $this->getLastUpdateDateTime());
340+
$writer->writeIntegerValue('priorityScore', $this->getPriorityScore());
327341
$writer->writeStringValue('redirectIncidentId', $this->getRedirectIncidentId());
328342
$writer->writeStringValue('resolvingComment', $this->getResolvingComment());
329343
$writer->writeEnumValue('severity', $this->getSeverity());
@@ -429,6 +443,14 @@ public function setLastUpdateDateTime(?DateTime $value): void {
429443
$this->getBackingStore()->set('lastUpdateDateTime', $value);
430444
}
431445

446+
/**
447+
* Sets the priorityScore property value. The priorityScore property
448+
* @param int|null $value Value to set for the priorityScore property.
449+
*/
450+
public function setPriorityScore(?int $value): void {
451+
$this->getBackingStore()->set('priorityScore', $value);
452+
}
453+
432454
/**
433455
* 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.
434456
* @param string|null $value Value to set for the redirectIncidentId property.

0 commit comments

Comments
 (0)