Skip to content

Commit be98c0d

Browse files
authored
Merge pull request #1744 from microsoftgraph/kiota/v1.0/pipelinebuild/203960
Generated models and request builders
2 parents 40e794d + e3f3a34 commit be98c0d

File tree

29 files changed

+1663
-1
lines changed

29 files changed

+1663
-1
lines changed

src/Generated/Models/Entity.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@
104104
use Microsoft\Graph\Generated\Models\Security\Search;
105105
use Microsoft\Graph\Generated\Models\Security\Security;
106106
use Microsoft\Graph\Generated\Models\Security\Sensor;
107+
use Microsoft\Graph\Generated\Models\Security\SensorCandidate;
108+
use Microsoft\Graph\Generated\Models\Security\SensorCandidateActivationConfiguration;
107109
use Microsoft\Graph\Generated\Models\Security\SiteSource;
108110
use Microsoft\Graph\Generated\Models\Security\SslCertificate;
109111
use Microsoft\Graph\Generated\Models\Security\SubcategoryTemplate;
@@ -887,6 +889,8 @@ public static function createFromDiscriminatorValue(ParseNode $parseNode): Entit
887889
case '#microsoft.graph.security.retentionLabel': return new RetentionLabel();
888890
case '#microsoft.graph.security.search': return new Search();
889891
case '#microsoft.graph.security.sensor': return new Sensor();
892+
case '#microsoft.graph.security.sensorCandidate': return new SensorCandidate();
893+
case '#microsoft.graph.security.sensorCandidateActivationConfiguration': return new SensorCandidateActivationConfiguration();
890894
case '#microsoft.graph.security.siteSource': return new SiteSource();
891895
case '#microsoft.graph.security.sslCertificate': return new SslCertificate();
892896
case '#microsoft.graph.security.subcategoryTemplate': return new SubcategoryTemplate();

src/Generated/Models/Security/IdentityContainer.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public function getFieldDeserializers(): array {
3434
$o = $this;
3535
return array_merge(parent::getFieldDeserializers(), [
3636
'healthIssues' => fn(ParseNode $n) => $o->setHealthIssues($n->getCollectionOfObjectValues([HealthIssue::class, 'createFromDiscriminatorValue'])),
37+
'sensorCandidateActivationConfiguration' => fn(ParseNode $n) => $o->setSensorCandidateActivationConfiguration($n->getObjectValue([SensorCandidateActivationConfiguration::class, 'createFromDiscriminatorValue'])),
38+
'sensorCandidates' => fn(ParseNode $n) => $o->setSensorCandidates($n->getCollectionOfObjectValues([SensorCandidate::class, 'createFromDiscriminatorValue'])),
3739
'sensors' => fn(ParseNode $n) => $o->setSensors($n->getCollectionOfObjectValues([Sensor::class, 'createFromDiscriminatorValue'])),
3840
]);
3941
}
@@ -52,6 +54,32 @@ public function getHealthIssues(): ?array {
5254
throw new \UnexpectedValueException("Invalid type found in backing store for 'healthIssues'");
5355
}
5456

57+
/**
58+
* Gets the sensorCandidateActivationConfiguration property value. The sensorCandidateActivationConfiguration property
59+
* @return SensorCandidateActivationConfiguration|null
60+
*/
61+
public function getSensorCandidateActivationConfiguration(): ?SensorCandidateActivationConfiguration {
62+
$val = $this->getBackingStore()->get('sensorCandidateActivationConfiguration');
63+
if (is_null($val) || $val instanceof SensorCandidateActivationConfiguration) {
64+
return $val;
65+
}
66+
throw new \UnexpectedValueException("Invalid type found in backing store for 'sensorCandidateActivationConfiguration'");
67+
}
68+
69+
/**
70+
* Gets the sensorCandidates property value. Represents Microsoft Defender for Identity sensors that are ready to be activated.
71+
* @return array<SensorCandidate>|null
72+
*/
73+
public function getSensorCandidates(): ?array {
74+
$val = $this->getBackingStore()->get('sensorCandidates');
75+
if (is_array($val) || is_null($val)) {
76+
TypeUtils::validateCollectionValues($val, SensorCandidate::class);
77+
/** @var array<SensorCandidate>|null $val */
78+
return $val;
79+
}
80+
throw new \UnexpectedValueException("Invalid type found in backing store for 'sensorCandidates'");
81+
}
82+
5583
/**
5684
* Gets the sensors property value. Represents a customer's Microsoft Defender for Identity sensors.
5785
* @return array<Sensor>|null
@@ -73,6 +101,8 @@ public function getSensors(): ?array {
73101
public function serialize(SerializationWriter $writer): void {
74102
parent::serialize($writer);
75103
$writer->writeCollectionOfObjectValues('healthIssues', $this->getHealthIssues());
104+
$writer->writeObjectValue('sensorCandidateActivationConfiguration', $this->getSensorCandidateActivationConfiguration());
105+
$writer->writeCollectionOfObjectValues('sensorCandidates', $this->getSensorCandidates());
76106
$writer->writeCollectionOfObjectValues('sensors', $this->getSensors());
77107
}
78108

@@ -84,6 +114,22 @@ public function setHealthIssues(?array $value): void {
84114
$this->getBackingStore()->set('healthIssues', $value);
85115
}
86116

117+
/**
118+
* Sets the sensorCandidateActivationConfiguration property value. The sensorCandidateActivationConfiguration property
119+
* @param SensorCandidateActivationConfiguration|null $value Value to set for the sensorCandidateActivationConfiguration property.
120+
*/
121+
public function setSensorCandidateActivationConfiguration(?SensorCandidateActivationConfiguration $value): void {
122+
$this->getBackingStore()->set('sensorCandidateActivationConfiguration', $value);
123+
}
124+
125+
/**
126+
* Sets the sensorCandidates property value. Represents Microsoft Defender for Identity sensors that are ready to be activated.
127+
* @param array<SensorCandidate>|null $value Value to set for the sensorCandidates property.
128+
*/
129+
public function setSensorCandidates(?array $value): void {
130+
$this->getBackingStore()->set('sensorCandidates', $value);
131+
}
132+
87133
/**
88134
* Sets the sensors property value. Represents a customer's Microsoft Defender for Identity sensors.
89135
* @param array<Sensor>|null $value Value to set for the sensors property.
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
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+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Models\Security;
4+
5+
use Microsoft\Graph\Generated\Models\Entity;
6+
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
7+
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
8+
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
9+
10+
class SensorCandidateActivationConfiguration extends Entity implements Parsable
11+
{
12+
/**
13+
* Instantiates a new SensorCandidateActivationConfiguration and sets the default values.
14+
*/
15+
public function __construct() {
16+
parent::__construct();
17+
}
18+
19+
/**
20+
* Creates a new instance of the appropriate class based on discriminator value
21+
* @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object
22+
* @return SensorCandidateActivationConfiguration
23+
*/
24+
public static function createFromDiscriminatorValue(ParseNode $parseNode): SensorCandidateActivationConfiguration {
25+
return new SensorCandidateActivationConfiguration();
26+
}
27+
28+
/**
29+
* Gets the activationMode property value. The activationMode property
30+
* @return SensorCandidateActivationMode|null
31+
*/
32+
public function getActivationMode(): ?SensorCandidateActivationMode {
33+
$val = $this->getBackingStore()->get('activationMode');
34+
if (is_null($val) || $val instanceof SensorCandidateActivationMode) {
35+
return $val;
36+
}
37+
throw new \UnexpectedValueException("Invalid type found in backing store for 'activationMode'");
38+
}
39+
40+
/**
41+
* The deserialization information for the current model
42+
* @return array<string, callable(ParseNode): void>
43+
*/
44+
public function getFieldDeserializers(): array {
45+
$o = $this;
46+
return array_merge(parent::getFieldDeserializers(), [
47+
'activationMode' => fn(ParseNode $n) => $o->setActivationMode($n->getEnumValue(SensorCandidateActivationMode::class)),
48+
]);
49+
}
50+
51+
/**
52+
* Serializes information the current object
53+
* @param SerializationWriter $writer Serialization writer to use to serialize this model
54+
*/
55+
public function serialize(SerializationWriter $writer): void {
56+
parent::serialize($writer);
57+
$writer->writeEnumValue('activationMode', $this->getActivationMode());
58+
}
59+
60+
/**
61+
* Sets the activationMode property value. The activationMode property
62+
* @param SensorCandidateActivationMode|null $value Value to set for the activationMode property.
63+
*/
64+
public function setActivationMode(?SensorCandidateActivationMode $value): void {
65+
$this->getBackingStore()->set('activationMode', $value);
66+
}
67+
68+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Models\Security;
4+
5+
use Microsoft\Kiota\Abstractions\Enum;
6+
7+
class SensorCandidateActivationMode extends Enum {
8+
public const MANUAL = "manual";
9+
public const AUTOMATED = "automated";
10+
public const UNKNOWN_FUTURE_VALUE = "unknownFutureValue";
11+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Models\Security;
4+
5+
use Microsoft\Graph\Generated\Models\BaseCollectionPaginationCountResponse;
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\Types\TypeUtils;
10+
11+
class SensorCandidateCollectionResponse extends BaseCollectionPaginationCountResponse implements Parsable
12+
{
13+
/**
14+
* Instantiates a new SensorCandidateCollectionResponse 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 SensorCandidateCollectionResponse
24+
*/
25+
public static function createFromDiscriminatorValue(ParseNode $parseNode): SensorCandidateCollectionResponse {
26+
return new SensorCandidateCollectionResponse();
27+
}
28+
29+
/**
30+
* The deserialization information for the current model
31+
* @return array<string, callable(ParseNode): void>
32+
*/
33+
public function getFieldDeserializers(): array {
34+
$o = $this;
35+
return array_merge(parent::getFieldDeserializers(), [
36+
'value' => fn(ParseNode $n) => $o->setValue($n->getCollectionOfObjectValues([SensorCandidate::class, 'createFromDiscriminatorValue'])),
37+
]);
38+
}
39+
40+
/**
41+
* Gets the value property value. The value property
42+
* @return array<SensorCandidate>|null
43+
*/
44+
public function getValue(): ?array {
45+
$val = $this->getBackingStore()->get('value');
46+
if (is_array($val) || is_null($val)) {
47+
TypeUtils::validateCollectionValues($val, SensorCandidate::class);
48+
/** @var array<SensorCandidate>|null $val */
49+
return $val;
50+
}
51+
throw new \UnexpectedValueException("Invalid type found in backing store for 'value'");
52+
}
53+
54+
/**
55+
* Serializes information the current object
56+
* @param SerializationWriter $writer Serialization writer to use to serialize this model
57+
*/
58+
public function serialize(SerializationWriter $writer): void {
59+
parent::serialize($writer);
60+
$writer->writeCollectionOfObjectValues('value', $this->getValue());
61+
}
62+
63+
/**
64+
* Sets the value property value. The value property
65+
* @param array<SensorCandidate>|null $value Value to set for the value property.
66+
*/
67+
public function setValue(?array $value): void {
68+
$this->getBackingStore()->set('value', $value);
69+
}
70+
71+
}

src/Generated/Security/Identities/IdentitiesRequestBuilder.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
88
use Microsoft\Graph\Generated\Models\Security\IdentityContainer;
99
use Microsoft\Graph\Generated\Security\Identities\HealthIssues\HealthIssuesRequestBuilder;
10+
use Microsoft\Graph\Generated\Security\Identities\SensorCandidateActivationConfiguration\SensorCandidateActivationConfigurationRequestBuilder;
11+
use Microsoft\Graph\Generated\Security\Identities\SensorCandidates\SensorCandidatesRequestBuilder;
1012
use Microsoft\Graph\Generated\Security\Identities\Sensors\SensorsRequestBuilder;
1113
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
1214
use Microsoft\Kiota\Abstractions\HttpMethod;
@@ -25,6 +27,20 @@ public function healthIssues(): HealthIssuesRequestBuilder {
2527
return new HealthIssuesRequestBuilder($this->pathParameters, $this->requestAdapter);
2628
}
2729

30+
/**
31+
* Provides operations to manage the sensorCandidateActivationConfiguration property of the microsoft.graph.security.identityContainer entity.
32+
*/
33+
public function sensorCandidateActivationConfiguration(): SensorCandidateActivationConfigurationRequestBuilder {
34+
return new SensorCandidateActivationConfigurationRequestBuilder($this->pathParameters, $this->requestAdapter);
35+
}
36+
37+
/**
38+
* Provides operations to manage the sensorCandidates property of the microsoft.graph.security.identityContainer entity.
39+
*/
40+
public function sensorCandidates(): SensorCandidatesRequestBuilder {
41+
return new SensorCandidatesRequestBuilder($this->pathParameters, $this->requestAdapter);
42+
}
43+
2844
/**
2945
* Provides operations to manage the sensors property of the microsoft.graph.security.identityContainer entity.
3046
*/

0 commit comments

Comments
 (0)