Skip to content

Commit 0c36744

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
feat(generation): update request builders and models
Update generated files with build 210015
1 parent 0ebc792 commit 0c36744

File tree

93 files changed

+5223
-37
lines changed

Some content is hidden

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

93 files changed

+5223
-37
lines changed

src/Generated/Admin/AdminRequestBuilder.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Exception;
66
use Http\Promise\Promise;
77
use Microsoft\Graph\Generated\Admin\Edge\EdgeRequestBuilder;
8+
use Microsoft\Graph\Generated\Admin\Exchange\ExchangeRequestBuilder;
89
use Microsoft\Graph\Generated\Admin\Microsoft365Apps\Microsoft365AppsRequestBuilder;
910
use Microsoft\Graph\Generated\Admin\People\PeopleRequestBuilder;
1011
use Microsoft\Graph\Generated\Admin\ReportSettings\ReportSettingsRequestBuilder;
@@ -30,6 +31,13 @@ public function edge(): EdgeRequestBuilder {
3031
return new EdgeRequestBuilder($this->pathParameters, $this->requestAdapter);
3132
}
3233

34+
/**
35+
* Provides operations to manage the exchange property of the microsoft.graph.admin entity.
36+
*/
37+
public function exchange(): ExchangeRequestBuilder {
38+
return new ExchangeRequestBuilder($this->pathParameters, $this->requestAdapter);
39+
}
40+
3341
/**
3442
* Provides operations to manage the microsoft365Apps property of the microsoft.graph.admin entity.
3543
*/
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Admin\Exchange;
4+
5+
use Exception;
6+
use Http\Promise\Promise;
7+
use Microsoft\Graph\Generated\Admin\Exchange\Tracing\TracingRequestBuilder;
8+
use Microsoft\Graph\Generated\Models\ExchangeAdmin;
9+
use Microsoft\Graph\Generated\Models\ODataErrors\ODataError;
10+
use Microsoft\Kiota\Abstractions\BaseRequestBuilder;
11+
use Microsoft\Kiota\Abstractions\HttpMethod;
12+
use Microsoft\Kiota\Abstractions\RequestAdapter;
13+
use Microsoft\Kiota\Abstractions\RequestInformation;
14+
15+
/**
16+
* Provides operations to manage the exchange property of the microsoft.graph.admin entity.
17+
*/
18+
class ExchangeRequestBuilder extends BaseRequestBuilder
19+
{
20+
/**
21+
* Provides operations to manage the tracing property of the microsoft.graph.exchangeAdmin entity.
22+
*/
23+
public function tracing(): TracingRequestBuilder {
24+
return new TracingRequestBuilder($this->pathParameters, $this->requestAdapter);
25+
}
26+
27+
/**
28+
* Instantiates a new ExchangeRequestBuilder and sets the default values.
29+
* @param array<string, mixed>|string $pathParametersOrRawUrl Path parameters for the request or a String representing the raw URL.
30+
* @param RequestAdapter $requestAdapter The request adapter to use to execute the requests.
31+
*/
32+
public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) {
33+
parent::__construct($requestAdapter, [], '{+baseurl}/admin/exchange{?%24expand,%24select}');
34+
if (is_array($pathParametersOrRawUrl)) {
35+
$this->pathParameters = $pathParametersOrRawUrl;
36+
} else {
37+
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
38+
}
39+
}
40+
41+
/**
42+
* Delete navigation property exchange for admin
43+
* @param ExchangeRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
44+
* @return Promise<void|null>
45+
* @throws Exception
46+
*/
47+
public function delete(?ExchangeRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {
48+
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration);
49+
$errorMappings = [
50+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
51+
];
52+
return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);
53+
}
54+
55+
/**
56+
* A container for the Exchange admin functionality. Read-only.
57+
* @param ExchangeRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
58+
* @return Promise<ExchangeAdmin|null>
59+
* @throws Exception
60+
*/
61+
public function get(?ExchangeRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
62+
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
63+
$errorMappings = [
64+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
65+
];
66+
return $this->requestAdapter->sendAsync($requestInfo, [ExchangeAdmin::class, 'createFromDiscriminatorValue'], $errorMappings);
67+
}
68+
69+
/**
70+
* Update the navigation property exchange in admin
71+
* @param ExchangeAdmin $body The request body
72+
* @param ExchangeRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
73+
* @return Promise<ExchangeAdmin|null>
74+
* @throws Exception
75+
*/
76+
public function patch(ExchangeAdmin $body, ?ExchangeRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise {
77+
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration);
78+
$errorMappings = [
79+
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
80+
];
81+
return $this->requestAdapter->sendAsync($requestInfo, [ExchangeAdmin::class, 'createFromDiscriminatorValue'], $errorMappings);
82+
}
83+
84+
/**
85+
* Delete navigation property exchange for admin
86+
* @param ExchangeRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
87+
* @return RequestInformation
88+
*/
89+
public function toDeleteRequestInformation(?ExchangeRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation {
90+
$requestInfo = new RequestInformation();
91+
$requestInfo->urlTemplate = $this->urlTemplate;
92+
$requestInfo->pathParameters = $this->pathParameters;
93+
$requestInfo->httpMethod = HttpMethod::DELETE;
94+
if ($requestConfiguration !== null) {
95+
$requestInfo->addHeaders($requestConfiguration->headers);
96+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
97+
}
98+
$requestInfo->tryAddHeader('Accept', "application/json");
99+
return $requestInfo;
100+
}
101+
102+
/**
103+
* A container for the Exchange admin functionality. Read-only.
104+
* @param ExchangeRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
105+
* @return RequestInformation
106+
*/
107+
public function toGetRequestInformation(?ExchangeRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation {
108+
$requestInfo = new RequestInformation();
109+
$requestInfo->urlTemplate = $this->urlTemplate;
110+
$requestInfo->pathParameters = $this->pathParameters;
111+
$requestInfo->httpMethod = HttpMethod::GET;
112+
if ($requestConfiguration !== null) {
113+
$requestInfo->addHeaders($requestConfiguration->headers);
114+
if ($requestConfiguration->queryParameters !== null) {
115+
$requestInfo->setQueryParameters($requestConfiguration->queryParameters);
116+
}
117+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
118+
}
119+
$requestInfo->tryAddHeader('Accept', "application/json");
120+
return $requestInfo;
121+
}
122+
123+
/**
124+
* Update the navigation property exchange in admin
125+
* @param ExchangeAdmin $body The request body
126+
* @param ExchangeRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
127+
* @return RequestInformation
128+
*/
129+
public function toPatchRequestInformation(ExchangeAdmin $body, ?ExchangeRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation {
130+
$requestInfo = new RequestInformation();
131+
$requestInfo->urlTemplate = $this->urlTemplate;
132+
$requestInfo->pathParameters = $this->pathParameters;
133+
$requestInfo->httpMethod = HttpMethod::PATCH;
134+
if ($requestConfiguration !== null) {
135+
$requestInfo->addHeaders($requestConfiguration->headers);
136+
$requestInfo->addRequestOptions(...$requestConfiguration->options);
137+
}
138+
$requestInfo->tryAddHeader('Accept', "application/json");
139+
$requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body);
140+
return $requestInfo;
141+
}
142+
143+
/**
144+
* Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
145+
* @param string $rawUrl The raw URL to use for the request builder.
146+
* @return ExchangeRequestBuilder
147+
*/
148+
public function withUrl(string $rawUrl): ExchangeRequestBuilder {
149+
return new ExchangeRequestBuilder($rawUrl, $this->requestAdapter);
150+
}
151+
152+
}
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\Generated\Admin\Exchange;
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 ExchangeRequestBuilderDeleteRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* Instantiates a new ExchangeRequestBuilderDeleteRequestConfiguration 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\Generated\Admin\Exchange;
4+
5+
use Microsoft\Kiota\Abstractions\QueryParameter;
6+
7+
/**
8+
* A container for the Exchange admin functionality. Read-only.
9+
*/
10+
class ExchangeRequestBuilderGetQueryParameters
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 ExchangeRequestBuilderGetQueryParameters 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+
}
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\Generated\Admin\Exchange;
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 ExchangeRequestBuilderGetRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* @var ExchangeRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
15+
*/
16+
public ?ExchangeRequestBuilderGetQueryParameters $queryParameters = null;
17+
18+
/**
19+
* Instantiates a new ExchangeRequestBuilderGetRequestConfiguration 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 ExchangeRequestBuilderGetQueryParameters|null $queryParameters Request query parameters
23+
*/
24+
public function __construct(?array $headers = null, ?array $options = null, ?ExchangeRequestBuilderGetQueryParameters $queryParameters = null) {
25+
parent::__construct($headers ?? [], $options ?? []);
26+
$this->queryParameters = $queryParameters;
27+
}
28+
29+
/**
30+
* Instantiates a new ExchangeRequestBuilderGetQueryParameters.
31+
* @param array<string>|null $expand Expand related entities
32+
* @param array<string>|null $select Select properties to be returned
33+
* @return ExchangeRequestBuilderGetQueryParameters
34+
*/
35+
public static function createQueryParameters(?array $expand = null, ?array $select = null): ExchangeRequestBuilderGetQueryParameters {
36+
return new ExchangeRequestBuilderGetQueryParameters($expand, $select);
37+
}
38+
39+
}
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\Generated\Admin\Exchange;
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 ExchangeRequestBuilderPatchRequestConfiguration extends BaseRequestConfiguration
12+
{
13+
/**
14+
* Instantiates a new ExchangeRequestBuilderPatchRequestConfiguration 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: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?php
2+
3+
namespace Microsoft\Graph\Generated\Admin\Exchange\Tracing\MessageTraces\Count;
4+
5+
use Exception;
6+
use Http\Promise\Promise;
7+
use Microsoft\Graph\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/exchange/tracing/messageTraces/$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+
}

0 commit comments

Comments
 (0)