-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(generation): update request builders and models
Update generated files with build 161941
- Loading branch information
Microsoft Graph DevX Tooling
authored and
Microsoft Graph DevX Tooling
committed
Sep 3, 2024
1 parent
4c684f5
commit 03cbf75
Showing
5,955 changed files
with
384,460 additions
and
179,566 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
146 changes: 146 additions & 0 deletions
146
src/Generated/Admin/People/ItemInsights/ItemInsightsRequestBuilder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\Admin\People\ItemInsights; | ||
|
||
use Exception; | ||
use Http\Promise\Promise; | ||
use Microsoft\Graph\Generated\Models\InsightsSettings; | ||
use Microsoft\Graph\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 manage the itemInsights property of the microsoft.graph.peopleAdminSettings entity. | ||
*/ | ||
class ItemInsightsRequestBuilder extends BaseRequestBuilder | ||
{ | ||
/** | ||
* Instantiates a new ItemInsightsRequestBuilder 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}/admin/people/itemInsights{?%24expand,%24select}'); | ||
if (is_array($pathParametersOrRawUrl)) { | ||
$this->pathParameters = $pathParametersOrRawUrl; | ||
} else { | ||
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; | ||
} | ||
} | ||
|
||
/** | ||
* Delete navigation property itemInsights for admin | ||
* @param ItemInsightsRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @return Promise<void|null> | ||
* @throws Exception | ||
*/ | ||
public function delete(?ItemInsightsRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { | ||
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration); | ||
$errorMappings = [ | ||
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], | ||
]; | ||
return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); | ||
} | ||
|
||
/** | ||
* Get the properties of an insightsSettings object to display or return item insights in an organization. To learn how to customize the privacy of item insights in an organization, see Customize item insights privacy in Microsoft Graph. | ||
* @param ItemInsightsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @return Promise<InsightsSettings|null> | ||
* @throws Exception | ||
* @link https://learn.microsoft.com/graph/api/peopleadminsettings-list-iteminsights?view=graph-rest-1.0 Find more info here | ||
*/ | ||
public function get(?ItemInsightsRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { | ||
$requestInfo = $this->toGetRequestInformation($requestConfiguration); | ||
$errorMappings = [ | ||
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], | ||
]; | ||
return $this->requestAdapter->sendAsync($requestInfo, [InsightsSettings::class, 'createFromDiscriminatorValue'], $errorMappings); | ||
} | ||
|
||
/** | ||
* Update privacy settings to display or return the specified type of insights in an organization. Currently, itemInsights is the only supported type of settings. To learn more about customizing insights privacy for your organization, see Customize item insights privacy in Microsoft Graph. | ||
* @param InsightsSettings $body The request body | ||
* @param ItemInsightsRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @return Promise<InsightsSettings|null> | ||
* @throws Exception | ||
* @link https://learn.microsoft.com/graph/api/insightssettings-update?view=graph-rest-1.0 Find more info here | ||
*/ | ||
public function patch(InsightsSettings $body, ?ItemInsightsRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { | ||
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); | ||
$errorMappings = [ | ||
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], | ||
]; | ||
return $this->requestAdapter->sendAsync($requestInfo, [InsightsSettings::class, 'createFromDiscriminatorValue'], $errorMappings); | ||
} | ||
|
||
/** | ||
* Delete navigation property itemInsights for admin | ||
* @param ItemInsightsRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @return RequestInformation | ||
*/ | ||
public function toDeleteRequestInformation(?ItemInsightsRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { | ||
$requestInfo = new RequestInformation(); | ||
$requestInfo->urlTemplate = $this->urlTemplate; | ||
$requestInfo->pathParameters = $this->pathParameters; | ||
$requestInfo->httpMethod = HttpMethod::DELETE; | ||
if ($requestConfiguration !== null) { | ||
$requestInfo->addHeaders($requestConfiguration->headers); | ||
$requestInfo->addRequestOptions(...$requestConfiguration->options); | ||
} | ||
$requestInfo->tryAddHeader('Accept', "application/json"); | ||
return $requestInfo; | ||
} | ||
|
||
/** | ||
* Get the properties of an insightsSettings object to display or return item insights in an organization. To learn how to customize the privacy of item insights in an organization, see Customize item insights privacy in Microsoft Graph. | ||
* @param ItemInsightsRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @return RequestInformation | ||
*/ | ||
public function toGetRequestInformation(?ItemInsightsRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { | ||
$requestInfo = new RequestInformation(); | ||
$requestInfo->urlTemplate = $this->urlTemplate; | ||
$requestInfo->pathParameters = $this->pathParameters; | ||
$requestInfo->httpMethod = HttpMethod::GET; | ||
if ($requestConfiguration !== null) { | ||
$requestInfo->addHeaders($requestConfiguration->headers); | ||
if ($requestConfiguration->queryParameters !== null) { | ||
$requestInfo->setQueryParameters($requestConfiguration->queryParameters); | ||
} | ||
$requestInfo->addRequestOptions(...$requestConfiguration->options); | ||
} | ||
$requestInfo->tryAddHeader('Accept', "application/json"); | ||
return $requestInfo; | ||
} | ||
|
||
/** | ||
* Update privacy settings to display or return the specified type of insights in an organization. Currently, itemInsights is the only supported type of settings. To learn more about customizing insights privacy for your organization, see Customize item insights privacy in Microsoft Graph. | ||
* @param InsightsSettings $body The request body | ||
* @param ItemInsightsRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @return RequestInformation | ||
*/ | ||
public function toPatchRequestInformation(InsightsSettings $body, ?ItemInsightsRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation { | ||
$requestInfo = new RequestInformation(); | ||
$requestInfo->urlTemplate = $this->urlTemplate; | ||
$requestInfo->pathParameters = $this->pathParameters; | ||
$requestInfo->httpMethod = HttpMethod::PATCH; | ||
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 ItemInsightsRequestBuilder | ||
*/ | ||
public function withUrl(string $rawUrl): ItemInsightsRequestBuilder { | ||
return new ItemInsightsRequestBuilder($rawUrl, $this->requestAdapter); | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
...erated/Admin/People/ItemInsights/ItemInsightsRequestBuilderDeleteRequestConfiguration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\Admin\People\ItemInsights; | ||
|
||
use Microsoft\Kiota\Abstractions\BaseRequestConfiguration; | ||
use Microsoft\Kiota\Abstractions\RequestOption; | ||
|
||
/** | ||
* Configuration for the request such as headers, query parameters, and middleware options. | ||
*/ | ||
class ItemInsightsRequestBuilderDeleteRequestConfiguration extends BaseRequestConfiguration | ||
{ | ||
/** | ||
* Instantiates a new ItemInsightsRequestBuilderDeleteRequestConfiguration 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 ?? []); | ||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
src/Generated/Admin/People/ItemInsights/ItemInsightsRequestBuilderGetQueryParameters.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\Admin\People\ItemInsights; | ||
|
||
use Microsoft\Kiota\Abstractions\QueryParameter; | ||
|
||
/** | ||
* Get the properties of an insightsSettings object to display or return item insights in an organization. To learn how to customize the privacy of item insights in an organization, see Customize item insights privacy in Microsoft Graph. | ||
*/ | ||
class ItemInsightsRequestBuilderGetQueryParameters | ||
{ | ||
/** | ||
* @QueryParameter("%24expand") | ||
* @var array<string>|null $expand Expand related entities | ||
*/ | ||
public ?array $expand = null; | ||
|
||
/** | ||
* @QueryParameter("%24select") | ||
* @var array<string>|null $select Select properties to be returned | ||
*/ | ||
public ?array $select = null; | ||
|
||
/** | ||
* Instantiates a new ItemInsightsRequestBuilderGetQueryParameters and sets the default values. | ||
* @param array<string>|null $expand Expand related entities | ||
* @param array<string>|null $select Select properties to be returned | ||
*/ | ||
public function __construct(?array $expand = null, ?array $select = null) { | ||
$this->expand = $expand; | ||
$this->select = $select; | ||
} | ||
|
||
} |
39 changes: 39 additions & 0 deletions
39
...Generated/Admin/People/ItemInsights/ItemInsightsRequestBuilderGetRequestConfiguration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\Admin\People\ItemInsights; | ||
|
||
use Microsoft\Kiota\Abstractions\BaseRequestConfiguration; | ||
use Microsoft\Kiota\Abstractions\RequestOption; | ||
|
||
/** | ||
* Configuration for the request such as headers, query parameters, and middleware options. | ||
*/ | ||
class ItemInsightsRequestBuilderGetRequestConfiguration extends BaseRequestConfiguration | ||
{ | ||
/** | ||
* @var ItemInsightsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters | ||
*/ | ||
public ?ItemInsightsRequestBuilderGetQueryParameters $queryParameters = null; | ||
|
||
/** | ||
* Instantiates a new ItemInsightsRequestBuilderGetRequestConfiguration and sets the default values. | ||
* @param array<string, array<string>|string>|null $headers Request headers | ||
* @param array<RequestOption>|null $options Request options | ||
* @param ItemInsightsRequestBuilderGetQueryParameters|null $queryParameters Request query parameters | ||
*/ | ||
public function __construct(?array $headers = null, ?array $options = null, ?ItemInsightsRequestBuilderGetQueryParameters $queryParameters = null) { | ||
parent::__construct($headers ?? [], $options ?? []); | ||
$this->queryParameters = $queryParameters; | ||
} | ||
|
||
/** | ||
* Instantiates a new ItemInsightsRequestBuilderGetQueryParameters. | ||
* @param array<string>|null $expand Expand related entities | ||
* @param array<string>|null $select Select properties to be returned | ||
* @return ItemInsightsRequestBuilderGetQueryParameters | ||
*/ | ||
public static function createQueryParameters(?array $expand = null, ?array $select = null): ItemInsightsRequestBuilderGetQueryParameters { | ||
return new ItemInsightsRequestBuilderGetQueryParameters($expand, $select); | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
...nerated/Admin/People/ItemInsights/ItemInsightsRequestBuilderPatchRequestConfiguration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Microsoft\Graph\Generated\Admin\People\ItemInsights; | ||
|
||
use Microsoft\Kiota\Abstractions\BaseRequestConfiguration; | ||
use Microsoft\Kiota\Abstractions\RequestOption; | ||
|
||
/** | ||
* Configuration for the request such as headers, query parameters, and middleware options. | ||
*/ | ||
class ItemInsightsRequestBuilderPatchRequestConfiguration extends BaseRequestConfiguration | ||
{ | ||
/** | ||
* Instantiates a new ItemInsightsRequestBuilderPatchRequestConfiguration 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 ?? []); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.