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
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
}

/**
* Delete a resourceConnection object.
* Delete an operationalInsightsConnection object.
* @param ResourceConnectionItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<void|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/windowsupdates-resourceconnection-delete?view=graph-rest-beta Find more info here
* @link https://learn.microsoft.com/graph/api/windowsupdates-operationalinsightsconnection-delete?view=graph-rest-beta Find more info here
*/
public function delete(?ResourceConnectionItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration);
Expand Down Expand Up @@ -76,7 +76,7 @@ public function patch(ResourceConnection $body, ?ResourceConnectionItemRequestBu
}

/**
* Delete a resourceConnection object.
* Delete an operationalInsightsConnection object.
* @param ResourceConnectionItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
}

/**
* Delete an updatableAsset object.
* Delete an azureADDevice object. When a Microsoft Entra device is deleted, it is unregistered and automatically unenrolled from management for all update categories, as well as removed from every deploymentAudience and updatableAssetGroup.
* @param UpdatableAssetItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<void|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/windowsupdates-updatableasset-delete?view=graph-rest-beta Find more info here
* @link https://learn.microsoft.com/graph/api/windowsupdates-azureaddevice-delete?view=graph-rest-beta Find more info here
*/
public function delete(?UpdatableAssetItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration);
Expand All @@ -78,11 +78,11 @@ public function delete(?UpdatableAssetItemRequestBuilderDeleteRequestConfigurati
}

/**
* Read the properties and relationships of an updatableAsset object.
* Read the properties of an azureADDevice object.
* @param UpdatableAssetItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<UpdatableAsset|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/windowsupdates-updatableasset-get?view=graph-rest-beta Find more info here
* @link https://learn.microsoft.com/graph/api/windowsupdates-azureaddevice-get?view=graph-rest-beta Find more info here
*/
public function get(?UpdatableAssetItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
Expand All @@ -108,7 +108,7 @@ public function patch(UpdatableAsset $body, ?UpdatableAssetItemRequestBuilderPat
}

/**
* Delete an updatableAsset object.
* Delete an azureADDevice object. When a Microsoft Entra device is deleted, it is unregistered and automatically unenrolled from management for all update categories, as well as removed from every deploymentAudience and updatableAssetGroup.
* @param UpdatableAssetItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
Expand All @@ -126,7 +126,7 @@ public function toDeleteRequestInformation(?UpdatableAssetItemRequestBuilderDele
}

/**
* Read the properties and relationships of an updatableAsset object.
* Read the properties of an azureADDevice object.
* @param UpdatableAssetItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Microsoft\Kiota\Abstractions\QueryParameter;

/**
* Read the properties and relationships of an updatableAsset object.
* Read the properties of an azureADDevice object.
*/
class UpdatableAssetItemRequestBuilderGetQueryParameters
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdap
}

/**
* Delete a complianceChange object.
* Delete a contentApproval object.
* @param ComplianceChangeItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<void|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-delete?view=graph-rest-beta Find more info here
* @link https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-delete?view=graph-rest-beta Find more info here
*/
public function delete(?ComplianceChangeItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration);
Expand All @@ -69,12 +69,12 @@ public function get(?ComplianceChangeItemRequestBuilderGetRequestConfiguration $
}

/**
* Update the properties of a complianceChange object.
* Update the properties of a contentApproval object.
* @param ComplianceChange $body The request body
* @param ComplianceChangeItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<ComplianceChange|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/windowsupdates-compliancechange-update?view=graph-rest-beta Find more info here
* @link https://learn.microsoft.com/graph/api/windowsupdates-contentapproval-update?view=graph-rest-beta Find more info here
*/
public function patch(ComplianceChange $body, ?ComplianceChangeItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration);
Expand All @@ -85,7 +85,7 @@ public function patch(ComplianceChange $body, ?ComplianceChangeItemRequestBuilde
}

/**
* Delete a complianceChange object.
* Delete a contentApproval object.
* @param ComplianceChangeItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
Expand Down Expand Up @@ -124,7 +124,7 @@ public function toGetRequestInformation(?ComplianceChangeItemRequestBuilderGetRe
}

/**
* Update the properties of a complianceChange object.
* Update the properties of a contentApproval object.
* @param ComplianceChange $body The request body
* @param ComplianceChangeItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
Expand Down
124 changes: 124 additions & 0 deletions src/Generated/AuditLogs/SignIns/Dismiss/DismissPostRequestBody.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<?php

namespace Microsoft\Graph\Beta\Generated\AuditLogs\SignIns\Dismiss;

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;
use Microsoft\Kiota\Abstractions\Types\TypeUtils;

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

/**
* Instantiates a new DismissPostRequestBody 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 DismissPostRequestBody
*/
public static function createFromDiscriminatorValue(ParseNode $parseNode): DismissPostRequestBody {
return new DismissPostRequestBody();
}

/**
* 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;
}

/**
* The deserialization information for the current model
* @return array<string, callable(ParseNode): void>
*/
public function getFieldDeserializers(): array {
$o = $this;
return [
'requestIds' => function (ParseNode $n) {
$val = $n->getCollectionOfPrimitiveValues();
if (is_array($val)) {
TypeUtils::validateCollectionValues($val, 'string');
}
/** @var array<string>|null $val */
$this->setRequestIds($val);
},
];
}

/**
* Gets the requestIds property value. The requestIds property
* @return array<string>|null
*/
public function getRequestIds(): ?array {
$val = $this->getBackingStore()->get('requestIds');
if (is_array($val) || is_null($val)) {
TypeUtils::validateCollectionValues($val, 'string');
/** @var array<string>|null $val */
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'requestIds'");
}

/**
* Serializes information the current object
* @param SerializationWriter $writer Serialization writer to use to serialize this model
*/
public function serialize(SerializationWriter $writer): void {
$writer->writeCollectionOfPrimitiveValues('requestIds', $this->getRequestIds());
$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 requestIds property value. The requestIds property
* @param array<string>|null $value Value to set for the requestIds property.
*/
public function setRequestIds(?array $value): void {
$this->getBackingStore()->set('requestIds', $value);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?php

namespace Microsoft\Graph\Beta\Generated\AuditLogs\SignIns\Dismiss;

use Exception;
use Http\Promise\Promise;
use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError;
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
use Microsoft\Kiota\Abstractions\HttpMethod;
use Microsoft\Kiota\Abstractions\RequestAdapter;
use Microsoft\Kiota\Abstractions\RequestInformation;

/**
* Provides operations to call the dismiss method.
*/
class DismissRequestBuilder extends BaseRequestBuilder
{
/**
* Instantiates a new DismissRequestBuilder and sets the default values.
* @param array<string, mixed>|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL.
* @param RequestAdapter $requestAdapter The request adapter to use to execute the requests.
*/
public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) {
parent::__construct($requestAdapter, [], '{+baseurl}/auditLogs/signIns/dismiss');
if (is_array($pathParametersOrRawUrl)) {
$this->pathParameters = $pathParametersOrRawUrl;
} else {
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
}
}

/**
* Mark an event in Microsoft Entra sign-in logs as dismissed. For details about investigating Identity Protection risks, see How to investigate risk.
* @param DismissPostRequestBody $body The request body
* @param DismissRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<void|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/signin-dismiss?view=graph-rest-beta Find more info here
*/
public function post(DismissPostRequestBody $body, ?DismissRequestBuilderPostRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toPostRequestInformation($body, $requestConfiguration);
$errorMappings = [
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);
}

/**
* Mark an event in Microsoft Entra sign-in logs as dismissed. For details about investigating Identity Protection risks, see How to investigate risk.
* @param DismissPostRequestBody $body The request body
* @param DismissRequestBuilderPostRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
public function toPostRequestInformation(DismissPostRequestBody $body, ?DismissRequestBuilderPostRequestConfiguration $requestConfiguration = null): RequestInformation {
$requestInfo = new RequestInformation();
$requestInfo->urlTemplate = $this->urlTemplate;
$requestInfo->pathParameters = $this->pathParameters;
$requestInfo->httpMethod = HttpMethod::POST;
if ($requestConfiguration !== null) {
$requestInfo->addHeaders($requestConfiguration->headers);
$requestInfo->addRequestOptions(...$requestConfiguration->options);
}
$requestInfo->tryAddHeader('Accept', "application/json");
$requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body);
return $requestInfo;
}

/**
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
* @param string $rawUrl The raw URL to use for the request builder.
* @return DismissRequestBuilder
*/
public function withUrl(string $rawUrl): DismissRequestBuilder {
return new DismissRequestBuilder($rawUrl, $this->requestAdapter);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace Microsoft\Graph\Beta\Generated\AuditLogs\SignIns\Dismiss;

use Microsoft\Kiota\Abstractions\BaseRequestConfiguration;
use Microsoft\Kiota\Abstractions\RequestOption;

/**
* Configuration for the request such as headers, query parameters, and middleware options.
*/
class DismissRequestBuilderPostRequestConfiguration extends BaseRequestConfiguration
{
/**
* Instantiates a new DismissRequestBuilderPostRequestConfiguration and sets the default values.
* @param array<string, array<string>|string>|null $headers Request headers
* @param array<RequestOption>|null $options Request options
*/
public function __construct(?array $headers = null, ?array $options = null) {
parent::__construct($headers ?? [], $options ?? []);
}

}
8 changes: 8 additions & 0 deletions src/Generated/AuditLogs/SignIns/SignInsRequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Microsoft\Graph\Beta\Generated\AuditLogs\SignIns\ConfirmCompromised\ConfirmCompromisedRequestBuilder;
use Microsoft\Graph\Beta\Generated\AuditLogs\SignIns\ConfirmSafe\ConfirmSafeRequestBuilder;
use Microsoft\Graph\Beta\Generated\AuditLogs\SignIns\Count\CountRequestBuilder;
use Microsoft\Graph\Beta\Generated\AuditLogs\SignIns\Dismiss\DismissRequestBuilder;
use Microsoft\Graph\Beta\Generated\AuditLogs\SignIns\Item\SignInItemRequestBuilder;
use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError;
use Microsoft\Graph\Beta\Generated\Models\SignIn;
Expand Down Expand Up @@ -42,6 +43,13 @@ public function count(): CountRequestBuilder {
return new CountRequestBuilder($this->pathParameters, $this->requestAdapter);
}

/**
* Provides operations to call the dismiss method.
*/
public function dismiss(): DismissRequestBuilder {
return new DismissRequestBuilder($this->pathParameters, $this->requestAdapter);
}

/**
* Provides operations to manage the signIns property of the microsoft.graph.auditLogRoot entity.
* @param string $signInId The unique identifier of signIn
Expand Down
Loading