Skip to content

Commit 90fea63

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 189193
1 parent f62e531 commit 90fea63

File tree

264 files changed

+9438
-1323
lines changed

Some content is hidden

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

264 files changed

+9438
-1323
lines changed

src/Generated/Admin/People/PeopleRequestBuilder.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
use Microsoft\Graph\Beta\Generated\Admin\People\NamePronunciation\NamePronunciationRequestBuilder;
99
use Microsoft\Graph\Beta\Generated\Admin\People\ProfileCardProperties\ProfileCardPropertiesRequestBuilder;
1010
use Microsoft\Graph\Beta\Generated\Admin\People\ProfilePropertySettings\ProfilePropertySettingsRequestBuilder;
11+
use Microsoft\Graph\Beta\Generated\Admin\People\ProfileSources\ProfileSourcesRequestBuilder;
12+
use Microsoft\Graph\Beta\Generated\Admin\People\ProfileSourcesWithSourceId\ProfileSourcesWithSourceIdRequestBuilder;
1113
use Microsoft\Graph\Beta\Generated\Admin\People\Pronouns\PronounsRequestBuilder;
1214
use Microsoft\Graph\Beta\Generated\Models\ODataErrors\ODataError;
1315
use Microsoft\Graph\Beta\Generated\Models\PeopleAdminSettings;
@@ -49,6 +51,13 @@ public function profilePropertySettings(): ProfilePropertySettingsRequestBuilder
4951
return new ProfilePropertySettingsRequestBuilder($this->pathParameters, $this->requestAdapter);
5052
}
5153

54+
/**
55+
* Provides operations to manage the profileSources property of the microsoft.graph.peopleAdminSettings entity.
56+
*/
57+
public function profileSources(): ProfileSourcesRequestBuilder {
58+
return new ProfileSourcesRequestBuilder($this->pathParameters, $this->requestAdapter);
59+
}
60+
5261
/**
5362
* Provides operations to manage the pronouns property of the microsoft.graph.peopleAdminSettings entity.
5463
*/
@@ -114,6 +123,15 @@ public function patch(PeopleAdminSettings $body, ?PeopleRequestBuilderPatchReque
114123
return $this->requestAdapter->sendAsync($requestInfo, [PeopleAdminSettings::class, 'createFromDiscriminatorValue'], $errorMappings);
115124
}
116125

126+
/**
127+
* Provides operations to manage the profileSources property of the microsoft.graph.peopleAdminSettings entity.
128+
* @param string $sourceId Alternate key of profileSource
129+
* @return ProfileSourcesWithSourceIdRequestBuilder
130+
*/
131+
public function profileSourcesWithSourceId(string $sourceId): ProfileSourcesWithSourceIdRequestBuilder {
132+
return new ProfileSourcesWithSourceIdRequestBuilder($this->pathParameters, $this->requestAdapter, $sourceId);
133+
}
134+
117135
/**
118136
* Delete navigation property people for admin
119137
* @param PeopleRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
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\ProfileSources\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/profileSources/$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\ProfileSources\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\ProfileSources\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: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Beta\Generated\Admin\People\ProfileSources\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\ProfileSource;
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 profileSources property of the microsoft.graph.peopleAdminSettings entity.
16+
*/
17+
class ProfileSourceItemRequestBuilder extends BaseRequestBuilder
18+
{
19+
/**
20+
* Instantiates a new ProfileSourceItemRequestBuilder 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/profileSources/{profileSource%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 profileSource object.
35+
* @param ProfileSourceItemRequestBuilderDeleteRequestConfiguration|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/profilesource-delete?view=graph-rest-beta Find more info here
39+
*/
40+
public function delete(?ProfileSourceItemRequestBuilderDeleteRequestConfiguration $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+
* A collection of profile source settings configured by an administrator in an organization.
50+
* @param ProfileSourceItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
51+
* @return Promise<ProfileSource|null>
52+
* @throws Exception
53+
*/
54+
public function get(?ProfileSourceItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
55+
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
56+
$errorMappings = [
57+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
58+
];
59+
return $this->requestAdapter->sendAsync($requestInfo, [ProfileSource::class, 'createFromDiscriminatorValue'], $errorMappings);
60+
}
61+
62+
/**
63+
* Update the properties of a profileSource object.
64+
* @param ProfileSource $body The request body
65+
* @param ProfileSourceItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
66+
* @return Promise<ProfileSource|null>
67+
* @throws Exception
68+
* @link https://learn.microsoft.com/graph/api/profilesource-update?view=graph-rest-beta Find more info here
69+
*/
70+
public function patch(ProfileSource $body, ?ProfileSourceItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise {
71+
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration);
72+
$errorMappings = [
73+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
74+
];
75+
return $this->requestAdapter->sendAsync($requestInfo, [ProfileSource::class, 'createFromDiscriminatorValue'], $errorMappings);
76+
}
77+
78+
/**
79+
* Delete a profileSource object.
80+
* @param ProfileSourceItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
81+
* @return RequestInformation
82+
*/
83+
public function toDeleteRequestInformation(?ProfileSourceItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation {
84+
$requestInfo = new RequestInformation();
85+
$requestInfo->urlTemplate = $this->urlTemplate;
86+
$requestInfo->pathParameters = $this->pathParameters;
87+
$requestInfo->httpMethod = HttpMethod::DELETE;
88+
if ($requestConfiguration !== null) {
89+
$requestInfo->addHeaders($requestConfiguration->headers);
90+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
91+
}
92+
return $requestInfo;
93+
}
94+
95+
/**
96+
* A collection of profile source settings configured by an administrator in an organization.
97+
* @param ProfileSourceItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
98+
* @return RequestInformation
99+
*/
100+
public function toGetRequestInformation(?ProfileSourceItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation {
101+
$requestInfo = new RequestInformation();
102+
$requestInfo->urlTemplate = $this->urlTemplate;
103+
$requestInfo->pathParameters = $this->pathParameters;
104+
$requestInfo->httpMethod = HttpMethod::GET;
105+
if ($requestConfiguration !== null) {
106+
$requestInfo->addHeaders($requestConfiguration->headers);
107+
if ($requestConfiguration->queryParameters !== null) {
108+
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
109+
}
110+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
111+
}
112+
$requestInfo->tryAddHeader('Accept', "application/json");
113+
return $requestInfo;
114+
}
115+
116+
/**
117+
* Update the properties of a profileSource object.
118+
* @param ProfileSource $body The request body
119+
* @param ProfileSourceItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
120+
* @return RequestInformation
121+
*/
122+
public function toPatchRequestInformation(ProfileSource $body, ?ProfileSourceItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation {
123+
$requestInfo = new RequestInformation();
124+
$requestInfo->urlTemplate = $this->urlTemplate;
125+
$requestInfo->pathParameters = $this->pathParameters;
126+
$requestInfo->httpMethod = HttpMethod::PATCH;
127+
if ($requestConfiguration !== null) {
128+
$requestInfo->addHeaders($requestConfiguration->headers);
129+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
130+
}
131+
$requestInfo->tryAddHeader('Accept', "application/json");
132+
$requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body);
133+
return $requestInfo;
134+
}
135+
136+
/**
137+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
138+
* @param string $rawUrl The raw URL to use for the request builder.
139+
* @return ProfileSourceItemRequestBuilder
140+
*/
141+
public function withUrl(string $rawUrl): ProfileSourceItemRequestBuilder {
142+
return new ProfileSourceItemRequestBuilder($rawUrl, $this->requestAdapter);
143+
}
144+
145+
}
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\Beta\Generated\Admin\People\ProfileSources\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 ProfileSourceItemRequestBuilderDeleteRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* Instantiates a new ProfileSourceItemRequestBuilderDeleteRequestConfiguration 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\ProfileSources\Item;
4+
5+
use Microsoft\Kiota\Abstractions\QueryParameter;
6+
7+
/**
8+
* A collection of profile source settings configured by an administrator in an organization.
9+
*/
10+
class ProfileSourceItemRequestBuilderGetQueryParameters
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 ProfileSourceItemRequestBuilderGetQueryParameters 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)