Skip to content

Commit

Permalink
feat(generation): update request builders and models
Browse files Browse the repository at this point in the history
Update generated files with build 159748
  • Loading branch information
Microsoft Graph DevX Tooling authored and Microsoft Graph DevX Tooling committed Aug 13, 2024
1 parent 4c684f5 commit f886163
Show file tree
Hide file tree
Showing 3,533 changed files with 20,327 additions and 179,517 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
146 changes: 146 additions & 0 deletions src/Generated/Admin/People/ItemInsights/ItemInsightsRequestBuilder.php
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);
}

}
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 ?? []);
}

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

}
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);
}

}
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 ?? []);
}

}
8 changes: 8 additions & 0 deletions src/Generated/Admin/People/PeopleRequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Exception;
use Http\Promise\Promise;
use Microsoft\Graph\Generated\Admin\People\ItemInsights\ItemInsightsRequestBuilder;
use Microsoft\Graph\Generated\Admin\People\ProfileCardProperties\ProfileCardPropertiesRequestBuilder;
use Microsoft\Graph\Generated\Admin\People\Pronouns\PronounsRequestBuilder;
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
Expand All @@ -18,6 +19,13 @@
*/
class PeopleRequestBuilder extends BaseRequestBuilder
{
/**
* Provides operations to manage the itemInsights property of the microsoft.graph.peopleAdminSettings entity.
*/
public function itemInsights(): ItemInsightsRequestBuilder {
return new ItemInsightsRequestBuilder($this->pathParameters, $this->requestAdapter);
}

/**
* Provides operations to manage the profileCardProperties property of the microsoft.graph.peopleAdminSettings entity.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function get(?FederatedIdentityCredentialItemRequestBuilderGetRequestConf
}

/**
* Create a new federatedIdentityCredential object for an application if it does exist, or update the properties of an existing federatedIdentityCredential object. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application.
* Create a new federatedIdentityCredential object for an application if it doesn't exist, or update the properties of an existing federatedIdentityCredential object. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application.
* @param FederatedIdentityCredential $body The request body
* @param FederatedIdentityCredentialItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<FederatedIdentityCredential|null>
Expand Down Expand Up @@ -116,7 +116,7 @@ public function toGetRequestInformation(?FederatedIdentityCredentialItemRequestB
}

/**
* Create a new federatedIdentityCredential object for an application if it does exist, or update the properties of an existing federatedIdentityCredential object. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application.
* Create a new federatedIdentityCredential object for an application if it doesn't exist, or update the properties of an existing federatedIdentityCredential object. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application.
* @param FederatedIdentityCredential $body The request body
* @param FederatedIdentityCredentialItemRequestBuilderPatchRequestConfiguration|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 @@ -64,7 +64,7 @@ public function get(?FederatedIdentityCredentialsWithNameRequestBuilderGetReques
}

/**
* Create a new federatedIdentityCredential object for an application if it does exist, or update the properties of an existing federatedIdentityCredential object. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application.
* Create a new federatedIdentityCredential object for an application if it doesn't exist, or update the properties of an existing federatedIdentityCredential object. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application.
* @param FederatedIdentityCredential $body The request body
* @param FederatedIdentityCredentialsWithNameRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<FederatedIdentityCredential|null>
Expand Down Expand Up @@ -119,7 +119,7 @@ public function toGetRequestInformation(?FederatedIdentityCredentialsWithNameReq
}

/**
* Create a new federatedIdentityCredential object for an application if it does exist, or update the properties of an existing federatedIdentityCredential object. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application.
* Create a new federatedIdentityCredential object for an application if it doesn't exist, or update the properties of an existing federatedIdentityCredential object. By configuring a trust relationship between your Microsoft Entra application registration and the identity provider for your compute platform, you can use tokens issued by that platform to authenticate with Microsoft identity platform and call APIs in the Microsoft ecosystem. Maximum of 20 objects can be added to an application.
* @param FederatedIdentityCredential $body The request body
* @param FederatedIdentityCredentialsWithNameRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
Expand Down
Loading

0 comments on commit f886163

Please sign in to comment.