Skip to content

Commit 5ec0536

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 192501
1 parent 42c23d7 commit 5ec0536

File tree

233 files changed

+10677
-415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+10677
-415
lines changed

src/Generated/Applications/GetAvailableExtensionProperties/GetAvailableExtensionPropertiesRequestBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
3030
}
3131

3232
/**
33-
* Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:
33+
* Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties:
3434
* @param GetAvailableExtensionPropertiesPostRequestBody $body The request body
3535
* @param GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
3636
* @return Promise<GetAvailableExtensionPropertiesPostResponse|null>
@@ -46,7 +46,7 @@ public function post(GetAvailableExtensionPropertiesPostRequestBody $body, ?GetA
4646
}
4747

4848
/**
49-
* Return all directory extension definitions that have been registered in a directory, including through multi-tenant apps. The following entities support extension properties:
49+
* Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties:
5050
* @param GetAvailableExtensionPropertiesPostRequestBody $body The request body
5151
* @param GetAvailableExtensionPropertiesRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
5252
* @return RequestInformation

src/Generated/Applications/Item/AddKey/AddKeyRequestBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
3131
}
3232

3333
/**
34-
* Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that dont have any existing valid certificates (no certificates have been added yet, or all certificates have expired), wont be able to use this service action. You can use the Update application operation to perform an update instead.
34+
* Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don't have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won't be able to use this service action. You can use the Update application operation to perform an update instead.
3535
* @param AddKeyPostRequestBody $body The request body
3636
* @param AddKeyRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
3737
* @return Promise<KeyCredential|null>
@@ -47,7 +47,7 @@ public function post(AddKeyPostRequestBody $body, ?AddKeyRequestBuilderPostReque
4747
}
4848

4949
/**
50-
* Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that dont have any existing valid certificates (no certificates have been added yet, or all certificates have expired), wont be able to use this service action. You can use the Update application operation to perform an update instead.
50+
* Add a key credential to an application. This method, along with removeKey can be used by an application to automate rolling its expiring keys. As part of the request validation for this method, a proof of possession of an existing key is verified before the action can be performed. Applications that don't have any existing valid certificates (no certificates have been added yet, or all certificates have expired), won't be able to use this service action. You can use the Update application operation to perform an update instead.
5151
* @param AddKeyPostRequestBody $body The request body
5252
* @param AddKeyRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
5353
* @return RequestInformation
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\AuditLogs\SignIns\ConfirmCompromised;
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+
use Microsoft\Kiota\Abstractions\Types\TypeUtils;
13+
14+
class ConfirmCompromisedPostRequestBody implements AdditionalDataHolder, BackedModel, Parsable
15+
{
16+
/**
17+
* @var BackingStore $backingStore Stores model information.
18+
*/
19+
private BackingStore $backingStore;
20+
21+
/**
22+
* Instantiates a new ConfirmCompromisedPostRequestBody and sets the default values.
23+
*/
24+
public function __construct() {
25+
$this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();
26+
$this->setAdditionalData([]);
27+
}
28+
29+
/**
30+
* Creates a new instance of the appropriate class based on discriminator value
31+
* @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object
32+
* @return ConfirmCompromisedPostRequestBody
33+
*/
34+
public static function createFromDiscriminatorValue(ParseNode $parseNode): ConfirmCompromisedPostRequestBody {
35+
return new ConfirmCompromisedPostRequestBody();
36+
}
37+
38+
/**
39+
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
40+
* @return array<string, mixed>|null
41+
*/
42+
public function getAdditionalData(): ?array {
43+
$val = $this->getBackingStore()->get('additionalData');
44+
if (is_null($val) || is_array($val)) {
45+
/** @var array<string, mixed>|null $val */
46+
return $val;
47+
}
48+
throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'");
49+
}
50+
51+
/**
52+
* Gets the BackingStore property value. Stores model information.
53+
* @return BackingStore
54+
*/
55+
public function getBackingStore(): BackingStore {
56+
return $this->backingStore;
57+
}
58+
59+
/**
60+
* The deserialization information for the current model
61+
* @return array<string, callable(ParseNode): void>
62+
*/
63+
public function getFieldDeserializers(): array {
64+
$o = $this;
65+
return [
66+
'requestIds' => function (ParseNode $n) {
67+
$val = $n->getCollectionOfPrimitiveValues();
68+
if (is_array($val)) {
69+
TypeUtils::validateCollectionValues($val, 'string');
70+
}
71+
/** @var array<string>|null $val */
72+
$this->setRequestIds($val);
73+
},
74+
];
75+
}
76+
77+
/**
78+
* Gets the requestIds property value. The requestIds property
79+
* @return array<string>|null
80+
*/
81+
public function getRequestIds(): ?array {
82+
$val = $this->getBackingStore()->get('requestIds');
83+
if (is_array($val) || is_null($val)) {
84+
TypeUtils::validateCollectionValues($val, 'string');
85+
/** @var array<string>|null $val */
86+
return $val;
87+
}
88+
throw new \UnexpectedValueException("Invalid type found in backing store for 'requestIds'");
89+
}
90+
91+
/**
92+
* Serializes information the current object
93+
* @param SerializationWriter $writer Serialization writer to use to serialize this model
94+
*/
95+
public function serialize(SerializationWriter $writer): void {
96+
$writer->writeCollectionOfPrimitiveValues('requestIds', $this->getRequestIds());
97+
$writer->writeAdditionalData($this->getAdditionalData());
98+
}
99+
100+
/**
101+
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
102+
* @param array<string,mixed> $value Value to set for the AdditionalData property.
103+
*/
104+
public function setAdditionalData(?array $value): void {
105+
$this->getBackingStore()->set('additionalData', $value);
106+
}
107+
108+
/**
109+
* Sets the BackingStore property value. Stores model information.
110+
* @param BackingStore $value Value to set for the BackingStore property.
111+
*/
112+
public function setBackingStore(BackingStore $value): void {
113+
$this->backingStore = $value;
114+
}
115+
116+
/**
117+
* Sets the requestIds property value. The requestIds property
118+
* @param array<string>|null $value Value to set for the requestIds property.
119+
*/
120+
public function setRequestIds(?array $value): void {
121+
$this->getBackingStore()->set('requestIds', $value);
122+
}
123+
124+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\AuditLogs\SignIns\ConfirmCompromised;
4+
5+
use Exception;
6+
use Http\Promise\Promise;
7+
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
8+
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
9+
use Microsoft\Kiota\Abstractions\HttpMethod;
10+
use Microsoft\Kiota\Abstractions\RequestAdapter;
11+
use Microsoft\Kiota\Abstractions\RequestInformation;
12+
13+
/**
14+
* Provides operations to call the confirmCompromised method.
15+
*/
16+
class ConfirmCompromisedRequestBuilder extends BaseRequestBuilder
17+
{
18+
/**
19+
* Instantiates a new ConfirmCompromisedRequestBuilder and sets the default values.
20+
* @param array<string, mixed>|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL.
21+
* @param RequestAdapter $requestAdapter The request adapter to use to execute the requests.
22+
*/
23+
public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) {
24+
parent::__construct($requestAdapter, [], '{+baseurl}/auditLogs/signIns/confirmCompromised');
25+
if (is_array($pathParametersOrRawUrl)) {
26+
$this->pathParameters = $pathParametersOrRawUrl;
27+
} else {
28+
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
29+
}
30+
}
31+
32+
/**
33+
* Mark an event in the Microsoft Entra sign-in logs as risky. Events marked as risky by an admin are immediately flagged as high risk in Microsoft Entra ID Protection, overriding previous risk states. Admins can confirm that events flagged as risky by Microsoft Entra ID Protection are in fact risky. For details about investigating Identity Protection risks, see How to investigate risk.
34+
* @param ConfirmCompromisedPostRequestBody $body The request body
35+
* @param ConfirmCompromisedRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
36+
* @return Promise<void|null>
37+
* @throws Exception
38+
* @link https://learn.microsoft.com/graph/api/signin-confirmcompromised?view=graph-rest-1.0 Find more info here
39+
*/
40+
public function post(ConfirmCompromisedPostRequestBody $body, ?ConfirmCompromisedRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise {
41+
$requestInfo = $this->toPostRequestInformation($body, $requestConfiguration);
42+
$errorMappings = [
43+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
44+
];
45+
return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);
46+
}
47+
48+
/**
49+
* Mark an event in the Microsoft Entra sign-in logs as risky. Events marked as risky by an admin are immediately flagged as high risk in Microsoft Entra ID Protection, overriding previous risk states. Admins can confirm that events flagged as risky by Microsoft Entra ID Protection are in fact risky. For details about investigating Identity Protection risks, see How to investigate risk.
50+
* @param ConfirmCompromisedPostRequestBody $body The request body
51+
* @param ConfirmCompromisedRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
52+
* @return RequestInformation
53+
*/
54+
public function toPostRequestInformation(ConfirmCompromisedPostRequestBody $body, ?ConfirmCompromisedRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation {
55+
$requestInfo = new RequestInformation();
56+
$requestInfo->urlTemplate = $this->urlTemplate;
57+
$requestInfo->pathParameters = $this->pathParameters;
58+
$requestInfo->httpMethod = HttpMethod::POST;
59+
if ($requestConfiguration !== null) {
60+
$requestInfo->addHeaders($requestConfiguration->headers);
61+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
62+
}
63+
$requestInfo->tryAddHeader('Accept', "application/json");
64+
$requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body);
65+
return $requestInfo;
66+
}
67+
68+
/**
69+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
70+
* @param string $rawUrl The raw URL to use for the request builder.
71+
* @return ConfirmCompromisedRequestBuilder
72+
*/
73+
public function withUrl(string $rawUrl): ConfirmCompromisedRequestBuilder {
74+
return new ConfirmCompromisedRequestBuilder($rawUrl, $this->requestAdapter);
75+
}
76+
77+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\AuditLogs\SignIns\ConfirmCompromised;
4+
5+
use Microsoft\Kiota\Abstractions\BaseRequestConfiguration;
6+
use Microsoft\Kiota\Abstractions\RequestOption;
7+
8+
/**
9+
* Configuration for the request such as headers, query parameters, and middleware options.
10+
*/
11+
class ConfirmCompromisedRequestBuilderPostRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* Instantiates a new ConfirmCompromisedRequestBuilderPostRequestConfiguration and sets the default values.
15+
* @param array<string, array<string>|string>|null $headers Request headers
16+
* @param array<RequestOption>|null $options Request options
17+
*/
18+
public function __construct(?array $headers = null, ?array $options = null) {
19+
parent::__construct($headers ?? [], $options ?? []);
20+
}
21+
22+
}
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\AuditLogs\SignIns\ConfirmSafe;
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+
use Microsoft\Kiota\Abstractions\Types\TypeUtils;
13+
14+
class ConfirmSafePostRequestBody implements AdditionalDataHolder, BackedModel, Parsable
15+
{
16+
/**
17+
* @var BackingStore $backingStore Stores model information.
18+
*/
19+
private BackingStore $backingStore;
20+
21+
/**
22+
* Instantiates a new ConfirmSafePostRequestBody and sets the default values.
23+
*/
24+
public function __construct() {
25+
$this->backingStore = BackingStoreFactorySingleton::getInstance()->createBackingStore();
26+
$this->setAdditionalData([]);
27+
}
28+
29+
/**
30+
* Creates a new instance of the appropriate class based on discriminator value
31+
* @param ParseNode $parseNode The parse node to use to read the discriminator value and create the object
32+
* @return ConfirmSafePostRequestBody
33+
*/
34+
public static function createFromDiscriminatorValue(ParseNode $parseNode): ConfirmSafePostRequestBody {
35+
return new ConfirmSafePostRequestBody();
36+
}
37+
38+
/**
39+
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
40+
* @return array<string, mixed>|null
41+
*/
42+
public function getAdditionalData(): ?array {
43+
$val = $this->getBackingStore()->get('additionalData');
44+
if (is_null($val) || is_array($val)) {
45+
/** @var array<string, mixed>|null $val */
46+
return $val;
47+
}
48+
throw new \UnexpectedValueException("Invalid type found in backing store for 'additionalData'");
49+
}
50+
51+
/**
52+
* Gets the BackingStore property value. Stores model information.
53+
* @return BackingStore
54+
*/
55+
public function getBackingStore(): BackingStore {
56+
return $this->backingStore;
57+
}
58+
59+
/**
60+
* The deserialization information for the current model
61+
* @return array<string, callable(ParseNode): void>
62+
*/
63+
public function getFieldDeserializers(): array {
64+
$o = $this;
65+
return [
66+
'requestIds' => function (ParseNode $n) {
67+
$val = $n->getCollectionOfPrimitiveValues();
68+
if (is_array($val)) {
69+
TypeUtils::validateCollectionValues($val, 'string');
70+
}
71+
/** @var array<string>|null $val */
72+
$this->setRequestIds($val);
73+
},
74+
];
75+
}
76+
77+
/**
78+
* Gets the requestIds property value. The requestIds property
79+
* @return array<string>|null
80+
*/
81+
public function getRequestIds(): ?array {
82+
$val = $this->getBackingStore()->get('requestIds');
83+
if (is_array($val) || is_null($val)) {
84+
TypeUtils::validateCollectionValues($val, 'string');
85+
/** @var array<string>|null $val */
86+
return $val;
87+
}
88+
throw new \UnexpectedValueException("Invalid type found in backing store for 'requestIds'");
89+
}
90+
91+
/**
92+
* Serializes information the current object
93+
* @param SerializationWriter $writer Serialization writer to use to serialize this model
94+
*/
95+
public function serialize(SerializationWriter $writer): void {
96+
$writer->writeCollectionOfPrimitiveValues('requestIds', $this->getRequestIds());
97+
$writer->writeAdditionalData($this->getAdditionalData());
98+
}
99+
100+
/**
101+
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
102+
* @param array<string,mixed> $value Value to set for the AdditionalData property.
103+
*/
104+
public function setAdditionalData(?array $value): void {
105+
$this->getBackingStore()->set('additionalData', $value);
106+
}
107+
108+
/**
109+
* Sets the BackingStore property value. Stores model information.
110+
* @param BackingStore $value Value to set for the BackingStore property.
111+
*/
112+
public function setBackingStore(BackingStore $value): void {
113+
$this->backingStore = $value;
114+
}
115+
116+
/**
117+
* Sets the requestIds property value. The requestIds property
118+
* @param array<string>|null $value Value to set for the requestIds property.
119+
*/
120+
public function setRequestIds(?array $value): void {
121+
$this->getBackingStore()->set('requestIds', $value);
122+
}
123+
124+
}

0 commit comments

Comments
 (0)