Skip to content

Commit 59decd6

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 188232
1 parent a7b940e commit 59decd6

File tree

379 files changed

+13914
-399
lines changed

Some content is hidden

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

379 files changed

+13914
-399
lines changed

src/Generated/Admin/People/PeopleRequestBuilder.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Microsoft\Graph\Beta\Generated\Admin\People\ItemInsights\ItemInsightsRequestBuilder;
88
use Microsoft\Graph\Beta\Generated\Admin\People\NamePronunciation\NamePronunciationRequestBuilder;
99
use Microsoft\Graph\Beta\Generated\Admin\People\ProfileCardProperties\ProfileCardPropertiesRequestBuilder;
10+
use Microsoft\Graph\Beta\Generated\Admin\People\ProfilePropertySettings\ProfilePropertySettingsRequestBuilder;
1011
use Microsoft\Graph\Beta\Generated\Admin\People\Pronouns\PronounsRequestBuilder;
1112
use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError;
1213
use Microsoft\Graph\Beta\Generated\Models\PeopleAdminSettings;
@@ -41,6 +42,13 @@ public function profileCardProperties(): ProfileCardPropertiesRequestBuilder {
4142
return new ProfileCardPropertiesRequestBuilder($this->pathParameters, $this->requestAdapter);
4243
}
4344

45+
/**
46+
* Provides operations to manage the profilePropertySettings property of the microsoft.graph.peopleAdminSettings entity.
47+
*/
48+
public function profilePropertySettings(): ProfilePropertySettingsRequestBuilder {
49+
return new ProfilePropertySettingsRequestBuilder($this->pathParameters, $this->requestAdapter);
50+
}
51+
4452
/**
4553
* Provides operations to manage the pronouns property of the microsoft.graph.peopleAdminSettings entity.
4654
*/
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Beta\Generated\Admin\People\ProfilePropertySettings\Count;
4+
5+
use Exception;
6+
use Http\Promise\Promise;
7+
use Microsoft\Graph\Beta\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 count the resources in the collection.
15+
*/
16+
class CountRequestBuilder extends BaseRequestBuilder
17+
{
18+
/**
19+
* Instantiates a new CountRequestBuilder 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}/admin/people/profilePropertySettings/$count{?%24filter,%24search}');
25+
if (is_array($pathParametersOrRawUrl)) {
26+
$this->pathParameters = $pathParametersOrRawUrl;
27+
} else {
28+
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
29+
}
30+
}
31+
32+
/**
33+
* Get the number of the resource
34+
* @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
35+
* @return Promise<int|null>
36+
* @throws Exception
37+
*/
38+
public function get(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
39+
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
40+
$errorMappings = [
41+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
42+
];
43+
/** @var Promise<int|null> $result */
44+
$result = $this->requestAdapter->sendPrimitiveAsync($requestInfo, 'int', $errorMappings);
45+
return $result;
46+
}
47+
48+
/**
49+
* Get the number of the resource
50+
* @param CountRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
51+
* @return RequestInformation
52+
*/
53+
public function toGetRequestInformation(?CountRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation {
54+
$requestInfo = new RequestInformation();
55+
$requestInfo->urlTemplate = $this->urlTemplate;
56+
$requestInfo->pathParameters = $this->pathParameters;
57+
$requestInfo->httpMethod = HttpMethod::GET;
58+
if ($requestConfiguration !== null) {
59+
$requestInfo->addHeaders($requestConfiguration->headers);
60+
if ($requestConfiguration->queryParameters !== null) {
61+
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
62+
}
63+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
64+
}
65+
$requestInfo->tryAddHeader('Accept', "text/plain;q=0.9");
66+
return $requestInfo;
67+
}
68+
69+
/**
70+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
71+
* @param string $rawUrl The raw URL to use for the request builder.
72+
* @return CountRequestBuilder
73+
*/
74+
public function withUrl(string $rawUrl): CountRequestBuilder {
75+
return new CountRequestBuilder($rawUrl, $this->requestAdapter);
76+
}
77+
78+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Beta\Generated\Admin\People\ProfilePropertySettings\Count;
4+
5+
use Microsoft\Kiota\Abstractions\QueryParameter;
6+
7+
/**
8+
* Get the number of the resource
9+
*/
10+
class CountRequestBuilderGetQueryParameters
11+
{
12+
/**
13+
* @QueryParameter("%24filter")
14+
* @var string|null $filter Filter items by property values
15+
*/
16+
public ?string $filter = null;
17+
18+
/**
19+
* @QueryParameter("%24search")
20+
* @var string|null $search Search items by search phrases
21+
*/
22+
public ?string $search = null;
23+
24+
/**
25+
* Instantiates a new CountRequestBuilderGetQueryParameters and sets the default values.
26+
* @param string|null $filter Filter items by property values
27+
* @param string|null $search Search items by search phrases
28+
*/
29+
public function __construct(?string $filter = null, ?string $search = null) {
30+
$this->filter = $filter;
31+
$this->search = $search;
32+
}
33+
34+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Beta\Generated\Admin\People\ProfilePropertySettings\Count;
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 CountRequestBuilderGetRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* @var CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
15+
*/
16+
public ?CountRequestBuilderGetQueryParameters $queryParameters = null;
17+
18+
/**
19+
* Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values.
20+
* @param array<string, array<string>|string>|null $headers Request headers
21+
* @param array<RequestOption>|null $options Request options
22+
* @param CountRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
23+
*/
24+
public function __construct(?array $headers = null, ?array $options = null, ?CountRequestBuilderGetQueryParameters $queryParameters = null) {
25+
parent::__construct($headers ?? [], $options ?? []);
26+
$this->queryParameters = $queryParameters;
27+
}
28+
29+
/**
30+
* Instantiates a new CountRequestBuilderGetQueryParameters.
31+
* @param string|null $filter Filter items by property values
32+
* @param string|null $search Search items by search phrases
33+
* @return CountRequestBuilderGetQueryParameters
34+
*/
35+
public static function createQueryParameters(?string $filter = null, ?string $search = null): CountRequestBuilderGetQueryParameters {
36+
return new CountRequestBuilderGetQueryParameters($filter, $search);
37+
}
38+
39+
}
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Beta\Generated\Admin\People\ProfilePropertySettings\Item;
4+
5+
use Exception;
6+
use Http\Promise\Promise;
7+
use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError;
8+
use Microsoft\Graph\Beta\Generated\Models\ProfilePropertySetting;
9+
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
10+
use Microsoft\Kiota\Abstractions\HttpMethod;
11+
use Microsoft\Kiota\Abstractions\RequestAdapter;
12+
use Microsoft\Kiota\Abstractions\RequestInformation;
13+
14+
/**
15+
* Provides operations to manage the profilePropertySettings property of the microsoft.graph.peopleAdminSettings entity.
16+
*/
17+
class ProfilePropertySettingItemRequestBuilder extends BaseRequestBuilder
18+
{
19+
/**
20+
* Instantiates a new ProfilePropertySettingItemRequestBuilder and sets the default values.
21+
* @param array<string, mixed>|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL.
22+
* @param RequestAdapter $requestAdapter The request adapter to use to execute the requests.
23+
*/
24+
public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) {
25+
parent::__construct($requestAdapter, [], '{+baseurl}/admin/people/profilePropertySettings/{profilePropertySetting%2Did}{?%24expand,%24select}');
26+
if (is_array($pathParametersOrRawUrl)) {
27+
$this->pathParameters = $pathParametersOrRawUrl;
28+
} else {
29+
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
30+
}
31+
}
32+
33+
/**
34+
* Delete a profilePropertySetting object.
35+
* @param ProfilePropertySettingItemRequestBuilderDeleteRequestConfiguration|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/profilepropertysetting-delete?view=graph-rest-beta Find more info here
39+
*/
40+
public function delete(?ProfilePropertySettingItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {
41+
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration);
42+
$errorMappings = [
43+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
44+
];
45+
return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);
46+
}
47+
48+
/**
49+
* Read the properties and relationships of a profilePropertySetting object.
50+
* @param ProfilePropertySettingItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
51+
* @return Promise<ProfilePropertySetting|null>
52+
* @throws Exception
53+
* @link https://learn.microsoft.com/graph/api/profilepropertysetting-get?view=graph-rest-beta Find more info here
54+
*/
55+
public function get(?ProfilePropertySettingItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
56+
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
57+
$errorMappings = [
58+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
59+
];
60+
return $this->requestAdapter->sendAsync($requestInfo, [ProfilePropertySetting::class, 'createFromDiscriminatorValue'], $errorMappings);
61+
}
62+
63+
/**
64+
* Update the properties of a profilePropertySetting object.
65+
* @param ProfilePropertySetting $body The request body
66+
* @param ProfilePropertySettingItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
67+
* @return Promise<ProfilePropertySetting|null>
68+
* @throws Exception
69+
* @link https://learn.microsoft.com/graph/api/profilepropertysetting-update?view=graph-rest-beta Find more info here
70+
*/
71+
public function patch(ProfilePropertySetting $body, ?ProfilePropertySettingItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise {
72+
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration);
73+
$errorMappings = [
74+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
75+
];
76+
return $this->requestAdapter->sendAsync($requestInfo, [ProfilePropertySetting::class, 'createFromDiscriminatorValue'], $errorMappings);
77+
}
78+
79+
/**
80+
* Delete a profilePropertySetting object.
81+
* @param ProfilePropertySettingItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
82+
* @return RequestInformation
83+
*/
84+
public function toDeleteRequestInformation(?ProfilePropertySettingItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation {
85+
$requestInfo = new RequestInformation();
86+
$requestInfo->urlTemplate = $this->urlTemplate;
87+
$requestInfo->pathParameters = $this->pathParameters;
88+
$requestInfo->httpMethod = HttpMethod::DELETE;
89+
if ($requestConfiguration !== null) {
90+
$requestInfo->addHeaders($requestConfiguration->headers);
91+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
92+
}
93+
return $requestInfo;
94+
}
95+
96+
/**
97+
* Read the properties and relationships of a profilePropertySetting object.
98+
* @param ProfilePropertySettingItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
99+
* @return RequestInformation
100+
*/
101+
public function toGetRequestInformation(?ProfilePropertySettingItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation {
102+
$requestInfo = new RequestInformation();
103+
$requestInfo->urlTemplate = $this->urlTemplate;
104+
$requestInfo->pathParameters = $this->pathParameters;
105+
$requestInfo->httpMethod = HttpMethod::GET;
106+
if ($requestConfiguration !== null) {
107+
$requestInfo->addHeaders($requestConfiguration->headers);
108+
if ($requestConfiguration->queryParameters !== null) {
109+
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
110+
}
111+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
112+
}
113+
$requestInfo->tryAddHeader('Accept', "application/json");
114+
return $requestInfo;
115+
}
116+
117+
/**
118+
* Update the properties of a profilePropertySetting object.
119+
* @param ProfilePropertySetting $body The request body
120+
* @param ProfilePropertySettingItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
121+
* @return RequestInformation
122+
*/
123+
public function toPatchRequestInformation(ProfilePropertySetting $body, ?ProfilePropertySettingItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation {
124+
$requestInfo = new RequestInformation();
125+
$requestInfo->urlTemplate = $this->urlTemplate;
126+
$requestInfo->pathParameters = $this->pathParameters;
127+
$requestInfo->httpMethod = HttpMethod::PATCH;
128+
if ($requestConfiguration !== null) {
129+
$requestInfo->addHeaders($requestConfiguration->headers);
130+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
131+
}
132+
$requestInfo->tryAddHeader('Accept', "application/json");
133+
$requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body);
134+
return $requestInfo;
135+
}
136+
137+
/**
138+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
139+
* @param string $rawUrl The raw URL to use for the request builder.
140+
* @return ProfilePropertySettingItemRequestBuilder
141+
*/
142+
public function withUrl(string $rawUrl): ProfilePropertySettingItemRequestBuilder {
143+
return new ProfilePropertySettingItemRequestBuilder($rawUrl, $this->requestAdapter);
144+
}
145+
146+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Beta\Generated\Admin\People\ProfilePropertySettings\Item;
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 ProfilePropertySettingItemRequestBuilderDeleteRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* Instantiates a new ProfilePropertySettingItemRequestBuilderDeleteRequestConfiguration 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: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Beta\Generated\Admin\People\ProfilePropertySettings\Item;
4+
5+
use Microsoft\Kiota\Abstractions\QueryParameter;
6+
7+
/**
8+
* Read the properties and relationships of a profilePropertySetting object.
9+
*/
10+
class ProfilePropertySettingItemRequestBuilderGetQueryParameters
11+
{
12+
/**
13+
* @QueryParameter("%24expand")
14+
* @var array<string>|null $expand Expand related entities
15+
*/
16+
public ?array $expand = null;
17+
18+
/**
19+
* @QueryParameter("%24select")
20+
* @var array<string>|null $select Select properties to be returned
21+
*/
22+
public ?array $select = null;
23+
24+
/**
25+
* Instantiates a new ProfilePropertySettingItemRequestBuilderGetQueryParameters and sets the default values.
26+
* @param array<string>|null $expand Expand related entities
27+
* @param array<string>|null $select Select properties to be returned
28+
*/
29+
public function __construct(?array $expand = null, ?array $select = null) {
30+
$this->expand = $expand;
31+
$this->select = $select;
32+
}
33+
34+
}

0 commit comments

Comments
 (0)