-
Notifications
You must be signed in to change notification settings - Fork 149
Expand file tree
/
Copy pathDeviceAppManagementRequestBuilder.php
More file actions
234 lines (210 loc) · 12.6 KB
/
DeviceAppManagementRequestBuilder.php
File metadata and controls
234 lines (210 loc) · 12.6 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
<?php
namespace Microsoft\Graph\Generated\DeviceAppManagement;
use Exception;
use Http\Promise\Promise;
use Microsoft\Graph\Generated\DeviceAppManagement\AndroidManagedAppProtections\AndroidManagedAppProtectionsRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\DefaultManagedAppProtections\DefaultManagedAppProtectionsRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\IosManagedAppProtections\IosManagedAppProtectionsRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\ManagedAppPolicies\ManagedAppPoliciesRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\ManagedAppRegistrations\ManagedAppRegistrationsRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\ManagedAppStatuses\ManagedAppStatusesRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\ManagedEBooks\ManagedEBooksRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\MdmWindowsInformationProtectionPolicies\MdmWindowsInformationProtectionPoliciesRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\MobileAppCategories\MobileAppCategoriesRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\MobileAppConfigurations\MobileAppConfigurationsRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\MobileApps\MobileAppsRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\SyncMicrosoftStoreForBusinessApps\SyncMicrosoftStoreForBusinessAppsRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\TargetedManagedAppConfigurations\TargetedManagedAppConfigurationsRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\VppTokens\VppTokensRequestBuilder;
use Microsoft\Graph\Generated\DeviceAppManagement\WindowsInformationProtectionPolicies\WindowsInformationProtectionPoliciesRequestBuilder;
use Microsoft\Graph\Generated\Models\DeviceAppManagement;
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 deviceAppManagement singleton.
*/
class DeviceAppManagementRequestBuilder extends BaseRequestBuilder
{
/**
* Provides operations to manage the androidManagedAppProtections property of the microsoft.graph.deviceAppManagement entity.
*/
public function androidManagedAppProtections(): AndroidManagedAppProtectionsRequestBuilder {
return new AndroidManagedAppProtectionsRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the defaultManagedAppProtections property of the microsoft.graph.deviceAppManagement entity.
*/
public function defaultManagedAppProtections(): DefaultManagedAppProtectionsRequestBuilder {
return new DefaultManagedAppProtectionsRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the iosManagedAppProtections property of the microsoft.graph.deviceAppManagement entity.
*/
public function iosManagedAppProtections(): IosManagedAppProtectionsRequestBuilder {
return new IosManagedAppProtectionsRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the managedAppPolicies property of the microsoft.graph.deviceAppManagement entity.
*/
public function managedAppPolicies(): ManagedAppPoliciesRequestBuilder {
return new ManagedAppPoliciesRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the managedAppRegistrations property of the microsoft.graph.deviceAppManagement entity.
*/
public function managedAppRegistrations(): ManagedAppRegistrationsRequestBuilder {
return new ManagedAppRegistrationsRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the managedAppStatuses property of the microsoft.graph.deviceAppManagement entity.
*/
public function managedAppStatuses(): ManagedAppStatusesRequestBuilder {
return new ManagedAppStatusesRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the managedEBooks property of the microsoft.graph.deviceAppManagement entity.
*/
public function managedEBooks(): ManagedEBooksRequestBuilder {
return new ManagedEBooksRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the mdmWindowsInformationProtectionPolicies property of the microsoft.graph.deviceAppManagement entity.
*/
public function mdmWindowsInformationProtectionPolicies(): MdmWindowsInformationProtectionPoliciesRequestBuilder {
return new MdmWindowsInformationProtectionPoliciesRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the mobileAppCategories property of the microsoft.graph.deviceAppManagement entity.
*/
public function mobileAppCategories(): MobileAppCategoriesRequestBuilder {
return new MobileAppCategoriesRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the mobileAppConfigurations property of the microsoft.graph.deviceAppManagement entity.
*/
public function mobileAppConfigurations(): MobileAppConfigurationsRequestBuilder {
return new MobileAppConfigurationsRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the mobileApps property of the microsoft.graph.deviceAppManagement entity.
*/
public function mobileApps(): MobileAppsRequestBuilder {
return new MobileAppsRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to call the syncMicrosoftStoreForBusinessApps method.
*/
public function syncMicrosoftStoreForBusinessApps(): SyncMicrosoftStoreForBusinessAppsRequestBuilder {
return new SyncMicrosoftStoreForBusinessAppsRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the targetedManagedAppConfigurations property of the microsoft.graph.deviceAppManagement entity.
*/
public function targetedManagedAppConfigurations(): TargetedManagedAppConfigurationsRequestBuilder {
return new TargetedManagedAppConfigurationsRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the vppTokens property of the microsoft.graph.deviceAppManagement entity.
*/
public function vppTokens(): VppTokensRequestBuilder {
return new VppTokensRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Provides operations to manage the windowsInformationProtectionPolicies property of the microsoft.graph.deviceAppManagement entity.
*/
public function windowsInformationProtectionPolicies(): WindowsInformationProtectionPoliciesRequestBuilder {
return new WindowsInformationProtectionPoliciesRequestBuilder($this->pathParameters, $this->requestAdapter);
}
/**
* Instantiates a new DeviceAppManagementRequestBuilder 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}/deviceAppManagement{?%24expand,%24select}');
if (is_array($pathParametersOrRawUrl)) {
$this->pathParameters = $pathParametersOrRawUrl;
} else {
$this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl];
}
}
/**
* Read properties and relationships of the deviceAppManagement object.
* @param DeviceAppManagementRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<DeviceAppManagement|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/intune-unlock-deviceappmanagement-get?view=graph-rest-1.0 Find more info here
*/
public function get(?DeviceAppManagementRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toGetRequestInformation($requestConfiguration);
$errorMappings = [
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [DeviceAppManagement::class, 'createFromDiscriminatorValue'], $errorMappings);
}
/**
* Update the properties of a deviceAppManagement object.
* @param DeviceAppManagement $body The request body
* @param DeviceAppManagementRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return Promise<DeviceAppManagement|null>
* @throws Exception
* @link https://learn.microsoft.com/graph/api/intune-unlock-deviceappmanagement-update?view=graph-rest-1.0 Find more info here
*/
public function patch(DeviceAppManagement $body, ?DeviceAppManagementRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise {
$requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration);
$errorMappings = [
'XXX' => [ODataError::class, 'createFromDiscriminatorValue'],
];
return $this->requestAdapter->sendAsync($requestInfo, [DeviceAppManagement::class, 'createFromDiscriminatorValue'], $errorMappings);
}
/**
* Read properties and relationships of the deviceAppManagement object.
* @param DeviceAppManagementRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
public function toGetRequestInformation(?DeviceAppManagementRequestBuilderGetRequestConfiguration $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 the properties of a deviceAppManagement object.
* @param DeviceAppManagement $body The request body
* @param DeviceAppManagementRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return RequestInformation
*/
public function toPatchRequestInformation(DeviceAppManagement $body, ?DeviceAppManagementRequestBuilderPatchRequestConfiguration $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 DeviceAppManagementRequestBuilder
*/
public function withUrl(string $rawUrl): DeviceAppManagementRequestBuilder {
return new DeviceAppManagementRequestBuilder($rawUrl, $this->requestAdapter);
}
}