-
Notifications
You must be signed in to change notification settings - Fork 149
Expand file tree
/
Copy pathApplicationItemRequestBuilder.php
More file actions
325 lines (292 loc) · 16.3 KB
/
ApplicationItemRequestBuilder.php
File metadata and controls
325 lines (292 loc) · 16.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
<?php
namespace Microsoft\Graph\Generated\Applications\Item;
use Exception;
use Http\Promise\Promise;
use Microsoft\Graph\Generated\Applications\Item\AddKey\AddKeyRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\AddPassword\AddPasswordRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\AppManagementPolicies\AppManagementPoliciesRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\CheckMemberGroups\CheckMemberGroupsRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\CheckMemberObjects\CheckMemberObjectsRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\CreatedOnBehalfOf\CreatedOnBehalfOfRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\ExtensionProperties\ExtensionPropertiesRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\FederatedIdentityCredentials\FederatedIdentityCredentialsRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\FederatedIdentityCredentialsWithName\FederatedIdentityCredentialsWithNameRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\GetMemberGroups\GetMemberGroupsRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\GetMemberObjects\GetMemberObjectsRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\HomeRealmDiscoveryPolicies\HomeRealmDiscoveryPoliciesRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\Logo\LogoRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\Owners\OwnersRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\RemoveKey\RemoveKeyRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\RemovePassword\RemovePasswordRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\Restore\RestoreRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\SetVerifiedPublisher\SetVerifiedPublisherRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\Synchronization\SynchronizationRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\TokenIssuancePolicies\TokenIssuancePoliciesRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\TokenLifetimePolicies\TokenLifetimePoliciesRequestBuilder;
use Microsoft\Graph\Generated\Applications\Item\UnsetVerifiedPublisher\UnsetVerifiedPublisherRequestBuilder;
use Microsoft\Graph\Generated\Models\Application;
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 collection of application entities.
*/
class ApplicationItemRequestBuilder extends BaseRequestBuilder
{
/**
* Provides operations to call the addKey method.
*/
public function addKey(): AddKeyRequestBuilder {
return new AddKeyRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to call the addPassword method.
*/
public function addPassword(): AddPasswordRequestBuilder {
return new AddPasswordRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the appManagementPolicies property of the microsoft.graph.application entity.
*/
public function appManagementPolicies(): AppManagementPoliciesRequestBuilder {
return new AppManagementPoliciesRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to call the checkMemberGroups method.
*/
public function checkMemberGroups(): CheckMemberGroupsRequestBuilder {
return new CheckMemberGroupsRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to call the checkMemberObjects method.
*/
public function checkMemberObjects(): CheckMemberObjectsRequestBuilder {
return new CheckMemberObjectsRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the createdOnBehalfOf property of the microsoft.graph.application entity.
*/
public function createdOnBehalfOf(): CreatedOnBehalfOfRequestBuilder {
return new CreatedOnBehalfOfRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the extensionProperties property of the microsoft.graph.application entity.
*/
public function extensionProperties(): ExtensionPropertiesRequestBuilder {
return new ExtensionPropertiesRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the federatedIdentityCredentials property of the microsoft.graph.application entity.
*/
public function federatedIdentityCredentials(): FederatedIdentityCredentialsRequestBuilder {
return new FederatedIdentityCredentialsRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to call the getMemberGroups method.
*/
public function getMemberGroups(): GetMemberGroupsRequestBuilder {
return new GetMemberGroupsRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to call the getMemberObjects method.
*/
public function getMemberObjects(): GetMemberObjectsRequestBuilder {
return new GetMemberObjectsRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the homeRealmDiscoveryPolicies property of the microsoft.graph.application entity.
*/
public function homeRealmDiscoveryPolicies(): HomeRealmDiscoveryPoliciesRequestBuilder {
return new HomeRealmDiscoveryPoliciesRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the media for the application entity.
*/
public function logo(): LogoRequestBuilder {
return new LogoRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the owners property of the microsoft.graph.application entity.
*/
public function owners(): OwnersRequestBuilder {
return new OwnersRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to call the removeKey method.
*/
public function removeKey(): RemoveKeyRequestBuilder {
return new RemoveKeyRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to call the removePassword method.
*/
public function removePassword(): RemovePasswordRequestBuilder {
return new RemovePasswordRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to call the restore method.
*/
public function restore(): RestoreRequestBuilder {
return new RestoreRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to call the setVerifiedPublisher method.
*/
public function setVerifiedPublisher(): SetVerifiedPublisherRequestBuilder {
return new SetVerifiedPublisherRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the synchronization property of the microsoft.graph.application entity.
*/
public function synchronization(): SynchronizationRequestBuilder {
return new SynchronizationRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the tokenIssuancePolicies property of the microsoft.graph.application entity.
*/
public function tokenIssuancePolicies(): TokenIssuancePoliciesRequestBuilder {
return new TokenIssuancePoliciesRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the tokenLifetimePolicies property of the microsoft.graph.application entity.
*/
public function tokenLifetimePolicies(): TokenLifetimePoliciesRequestBuilder {
return new TokenLifetimePoliciesRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to call the unsetVerifiedPublisher method.
*/
public function unsetVerifiedPublisher(): UnsetVerifiedPublisherRequestBuilder {
return new UnsetVerifiedPublisherRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Instantiates a new ApplicationItemRequestBuilder 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}/applications/{application%2Did}{?%24expand,%24select}');
if (is_array($pathParametersOrRawUrl)) {
$this->pathParameters = $pathParametersOrRawUrl;
} else {
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
}
}
/**
* Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted.
* @param ApplicationItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<void|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/application-delete?view=graph-rest-1.0 Find more info here
*/
public function delete(?ApplicationItemRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toDeleteRequestInformation($requestConfiguration);
$errorMappings = [
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings);
}
/**
* Provides operations to manage the federatedIdentityCredentials property of the microsoft.graph.application entity.
* @param string $name Alternate key of federatedIdentityCredential
* @return FederatedIdentityCredentialsWithNameRequestBuilder
*/
public function federatedIdentityCredentialsWithName(string $name): FederatedIdentityCredentialsWithNameRequestBuilder {
return new FederatedIdentityCredentialsWithNameRequestBuilder($this->pathParameters, $this->requestAdapter, $name);
}
/**
* Get the properties and relationships of an application object.
* @param ApplicationItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<Application|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/application-get?view=graph-rest-1.0 Find more info here
*/
public function get(?ApplicationItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
$errorMappings = [
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [Application::class, 'createFromDiscriminatorValue'], $errorMappings);
}
/**
* Create a new application object if it doesn't exist, or update the properties of an existing application object.
* @param Application $body The request body
* @param ApplicationItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<Application|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/application-upsert?view=graph-rest-1.0 Find more info here
*/
public function patch(Application $body, ?ApplicationItemRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration);
$errorMappings = [
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [Application::class, 'createFromDiscriminatorValue'], $errorMappings);
}
/**
* Delete an application object. When deleted, apps are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted.
* @param ApplicationItemRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
public function toDeleteRequestInformation(?ApplicationItemRequestBuilderDeleteRequestConfiguration $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 and relationships of an application object.
* @param ApplicationItemRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
public function toGetRequestInformation(?ApplicationItemRequestBuilderGetRequestConfiguration $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;
}
/**
* Create a new application object if it doesn't exist, or update the properties of an existing application object.
* @param Application $body The request body
* @param ApplicationItemRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
public function toPatchRequestInformation(Application $body, ?ApplicationItemRequestBuilderPatchRequestConfiguration $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 ApplicationItemRequestBuilder
*/
public function withUrl(string $rawUrl): ApplicationItemRequestBuilder {
return new ApplicationItemRequestBuilder($rawUrl, $this->requestAdapter);
}
}