|
2 | 2 |
|
3 | 3 | namespace Microsoft\Graph\Generated\Admin\ConfigurationManagement; |
4 | 4 |
|
5 | | -use Exception; |
6 | | -use Http\Promise\Promise; |
7 | 5 | use Microsoft\Graph\Generated\Admin\ConfigurationManagement\ConfigurationDrifts\ConfigurationDriftsRequestBuilder; |
8 | 6 | use Microsoft\Graph\Generated\Admin\ConfigurationManagement\ConfigurationMonitoringResults\ConfigurationMonitoringResultsRequestBuilder; |
9 | 7 | use Microsoft\Graph\Generated\Admin\ConfigurationManagement\ConfigurationMonitors\ConfigurationMonitorsRequestBuilder; |
10 | 8 | use Microsoft\Graph\Generated\Admin\ConfigurationManagement\ConfigurationSnapshotJobs\ConfigurationSnapshotJobsRequestBuilder; |
11 | 9 | use Microsoft\Graph\Generated\Admin\ConfigurationManagement\ConfigurationSnapshots\ConfigurationSnapshotsRequestBuilder; |
12 | | -use Microsoft\Graph\Generated\Models\ConfigurationManagement; |
13 | | -use Microsoft\Graph\Generated\Models\ODataErrors\ODataError; |
14 | 10 | use Microsoft\Kiota\Abstractions\BaseRequestBuilder; |
15 | | -use Microsoft\Kiota\Abstractions\HttpMethod; |
16 | 11 | use Microsoft\Kiota\Abstractions\RequestAdapter; |
17 | | -use Microsoft\Kiota\Abstractions\RequestInformation; |
18 | 12 |
|
19 | 13 | /** |
20 | | - * Provides operations to manage the configurationManagement property of the microsoft.graph.admin entity. |
| 14 | + * Builds and executes requests for operations under /admin/configurationManagement |
21 | 15 | */ |
22 | 16 | class ConfigurationManagementRequestBuilder extends BaseRequestBuilder |
23 | 17 | { |
@@ -62,123 +56,12 @@ public function configurationSnapshots(): ConfigurationSnapshotsRequestBuilder { |
62 | 56 | * @param RequestAdapter $requestAdapter The request adapter to use to execute the requests. |
63 | 57 | */ |
64 | 58 | public function __construct($pathParametersOrRawUrl, RequestAdapter $requestAdapter) { |
65 | | - parent::__construct($requestAdapter, [], '{+baseurl}/admin/configurationManagement{?%24expand,%24select}'); |
| 59 | + parent::__construct($requestAdapter, [], '{+baseurl}/admin/configurationManagement'); |
66 | 60 | if (is_array($pathParametersOrRawUrl)) { |
67 | 61 | $this->pathParameters = $pathParametersOrRawUrl; |
68 | 62 | } else { |
69 | 63 | $this->pathParameters = ['request-raw-url' => $pathParametersOrRawUrl]; |
70 | 64 | } |
71 | 65 | } |
72 | 66 |
|
73 | | - /** |
74 | | - * Delete navigation property configurationManagement for admin |
75 | | - * @param ConfigurationManagementRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
76 | | - * @return Promise<void|null> |
77 | | - * @throws Exception |
78 | | - */ |
79 | | - public function delete(?ConfigurationManagementRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): Promise { |
80 | | - $requestInfo = $this->toDeleteRequestInformation($requestConfiguration); |
81 | | - $errorMappings = [ |
82 | | - 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], |
83 | | - ]; |
84 | | - return $this->requestAdapter->sendNoContentAsync($requestInfo, $errorMappings); |
85 | | - } |
86 | | - |
87 | | - /** |
88 | | - * A container for Tenant Configuration Management (TCM) resources. Read-only. |
89 | | - * @param ConfigurationManagementRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
90 | | - * @return Promise<ConfigurationManagement|null> |
91 | | - * @throws Exception |
92 | | - */ |
93 | | - public function get(?ConfigurationManagementRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise { |
94 | | - $requestInfo = $this->toGetRequestInformation($requestConfiguration); |
95 | | - $errorMappings = [ |
96 | | - 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], |
97 | | - ]; |
98 | | - return $this->requestAdapter->sendAsync($requestInfo, [ConfigurationManagement::class, 'createFromDiscriminatorValue'], $errorMappings); |
99 | | - } |
100 | | - |
101 | | - /** |
102 | | - * Update the navigation property configurationManagement in admin |
103 | | - * @param ConfigurationManagement $body The request body |
104 | | - * @param ConfigurationManagementRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
105 | | - * @return Promise<ConfigurationManagement|null> |
106 | | - * @throws Exception |
107 | | - */ |
108 | | - public function patch(ConfigurationManagement $body, ?ConfigurationManagementRequestBuilderPatchRequestConfiguration $requestConfiguration = null): Promise { |
109 | | - $requestInfo = $this->toPatchRequestInformation($body, $requestConfiguration); |
110 | | - $errorMappings = [ |
111 | | - 'XXX' => [ODataError::class, 'createFromDiscriminatorValue'], |
112 | | - ]; |
113 | | - return $this->requestAdapter->sendAsync($requestInfo, [ConfigurationManagement::class, 'createFromDiscriminatorValue'], $errorMappings); |
114 | | - } |
115 | | - |
116 | | - /** |
117 | | - * Delete navigation property configurationManagement for admin |
118 | | - * @param ConfigurationManagementRequestBuilderDeleteRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
119 | | - * @return RequestInformation |
120 | | - */ |
121 | | - public function toDeleteRequestInformation(?ConfigurationManagementRequestBuilderDeleteRequestConfiguration $requestConfiguration = null): RequestInformation { |
122 | | - $requestInfo = new RequestInformation(); |
123 | | - $requestInfo->urlTemplate = $this->urlTemplate; |
124 | | - $requestInfo->pathParameters = $this->pathParameters; |
125 | | - $requestInfo->httpMethod = HttpMethod::DELETE; |
126 | | - if ($requestConfiguration !== null) { |
127 | | - $requestInfo->addHeaders($requestConfiguration->headers); |
128 | | - $requestInfo->addRequestOptions(...$requestConfiguration->options); |
129 | | - } |
130 | | - $requestInfo->tryAddHeader('Accept', "application/json"); |
131 | | - return $requestInfo; |
132 | | - } |
133 | | - |
134 | | - /** |
135 | | - * A container for Tenant Configuration Management (TCM) resources. Read-only. |
136 | | - * @param ConfigurationManagementRequestBuilderGetRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
137 | | - * @return RequestInformation |
138 | | - */ |
139 | | - public function toGetRequestInformation(?ConfigurationManagementRequestBuilderGetRequestConfiguration $requestConfiguration = null): RequestInformation { |
140 | | - $requestInfo = new RequestInformation(); |
141 | | - $requestInfo->urlTemplate = $this->urlTemplate; |
142 | | - $requestInfo->pathParameters = $this->pathParameters; |
143 | | - $requestInfo->httpMethod = HttpMethod::GET; |
144 | | - if ($requestConfiguration !== null) { |
145 | | - $requestInfo->addHeaders($requestConfiguration->headers); |
146 | | - if ($requestConfiguration->queryParameters !== null) { |
147 | | - $requestInfo->setQueryParameters($requestConfiguration->queryParameters); |
148 | | - } |
149 | | - $requestInfo->addRequestOptions(...$requestConfiguration->options); |
150 | | - } |
151 | | - $requestInfo->tryAddHeader('Accept', "application/json"); |
152 | | - return $requestInfo; |
153 | | - } |
154 | | - |
155 | | - /** |
156 | | - * Update the navigation property configurationManagement in admin |
157 | | - * @param ConfigurationManagement $body The request body |
158 | | - * @param ConfigurationManagementRequestBuilderPatchRequestConfiguration|null $requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
159 | | - * @return RequestInformation |
160 | | - */ |
161 | | - public function toPatchRequestInformation(ConfigurationManagement $body, ?ConfigurationManagementRequestBuilderPatchRequestConfiguration $requestConfiguration = null): RequestInformation { |
162 | | - $requestInfo = new RequestInformation(); |
163 | | - $requestInfo->urlTemplate = $this->urlTemplate; |
164 | | - $requestInfo->pathParameters = $this->pathParameters; |
165 | | - $requestInfo->httpMethod = HttpMethod::PATCH; |
166 | | - if ($requestConfiguration !== null) { |
167 | | - $requestInfo->addHeaders($requestConfiguration->headers); |
168 | | - $requestInfo->addRequestOptions(...$requestConfiguration->options); |
169 | | - } |
170 | | - $requestInfo->tryAddHeader('Accept', "application/json"); |
171 | | - $requestInfo->setContentFromParsable($this->requestAdapter, "application/json", $body); |
172 | | - return $requestInfo; |
173 | | - } |
174 | | - |
175 | | - /** |
176 | | - * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. |
177 | | - * @param string $rawUrl The raw URL to use for the request builder. |
178 | | - * @return ConfigurationManagementRequestBuilder |
179 | | - */ |
180 | | - public function withUrl(string $rawUrl): ConfigurationManagementRequestBuilder { |
181 | | - return new ConfigurationManagementRequestBuilder($rawUrl, $this->requestAdapter); |
182 | | - } |
183 | | - |
184 | 67 | } |
0 commit comments