|
| 1 | +package com.microsoft.graph.beta.admin.configurationmanagement; |
| 2 | + |
| 3 | +import com.microsoft.graph.beta.admin.configurationmanagement.configurationapplications.ConfigurationApplicationsRequestBuilder; |
| 4 | +import com.microsoft.graph.beta.admin.configurationmanagement.configurationdrifts.ConfigurationDriftsRequestBuilder; |
| 5 | +import com.microsoft.graph.beta.admin.configurationmanagement.configurationmonitoringresults.ConfigurationMonitoringResultsRequestBuilder; |
| 6 | +import com.microsoft.graph.beta.admin.configurationmanagement.configurationmonitors.ConfigurationMonitorsRequestBuilder; |
| 7 | +import com.microsoft.graph.beta.admin.configurationmanagement.configurationsnapshotjobs.ConfigurationSnapshotJobsRequestBuilder; |
| 8 | +import com.microsoft.graph.beta.admin.configurationmanagement.configurationsnapshots.ConfigurationSnapshotsRequestBuilder; |
| 9 | +import com.microsoft.graph.beta.models.ConfigurationManagement; |
| 10 | +import com.microsoft.graph.beta.models.odataerrors.ODataError; |
| 11 | +import com.microsoft.kiota.BaseRequestBuilder; |
| 12 | +import com.microsoft.kiota.BaseRequestConfiguration; |
| 13 | +import com.microsoft.kiota.HttpMethod; |
| 14 | +import com.microsoft.kiota.QueryParameters; |
| 15 | +import com.microsoft.kiota.RequestAdapter; |
| 16 | +import com.microsoft.kiota.RequestInformation; |
| 17 | +import com.microsoft.kiota.RequestOption; |
| 18 | +import com.microsoft.kiota.serialization.Parsable; |
| 19 | +import com.microsoft.kiota.serialization.ParsableFactory; |
| 20 | +import java.util.Collection; |
| 21 | +import java.util.HashMap; |
| 22 | +import java.util.Map; |
| 23 | +import java.util.Objects; |
| 24 | +/** |
| 25 | + * Provides operations to manage the configurationManagement property of the microsoft.graph.admin entity. |
| 26 | + */ |
| 27 | +@jakarta.annotation.Generated("com.microsoft.kiota") |
| 28 | +public class ConfigurationManagementRequestBuilder extends BaseRequestBuilder { |
| 29 | + /** |
| 30 | + * Provides operations to manage the configurationApplications property of the microsoft.graph.configurationManagement entity. |
| 31 | + * @return a {@link ConfigurationApplicationsRequestBuilder} |
| 32 | + */ |
| 33 | + @jakarta.annotation.Nonnull |
| 34 | + public ConfigurationApplicationsRequestBuilder configurationApplications() { |
| 35 | + return new ConfigurationApplicationsRequestBuilder(pathParameters, requestAdapter); |
| 36 | + } |
| 37 | + /** |
| 38 | + * Provides operations to manage the configurationDrifts property of the microsoft.graph.configurationManagement entity. |
| 39 | + * @return a {@link ConfigurationDriftsRequestBuilder} |
| 40 | + */ |
| 41 | + @jakarta.annotation.Nonnull |
| 42 | + public ConfigurationDriftsRequestBuilder configurationDrifts() { |
| 43 | + return new ConfigurationDriftsRequestBuilder(pathParameters, requestAdapter); |
| 44 | + } |
| 45 | + /** |
| 46 | + * Provides operations to manage the configurationMonitoringResults property of the microsoft.graph.configurationManagement entity. |
| 47 | + * @return a {@link ConfigurationMonitoringResultsRequestBuilder} |
| 48 | + */ |
| 49 | + @jakarta.annotation.Nonnull |
| 50 | + public ConfigurationMonitoringResultsRequestBuilder configurationMonitoringResults() { |
| 51 | + return new ConfigurationMonitoringResultsRequestBuilder(pathParameters, requestAdapter); |
| 52 | + } |
| 53 | + /** |
| 54 | + * Provides operations to manage the configurationMonitors property of the microsoft.graph.configurationManagement entity. |
| 55 | + * @return a {@link ConfigurationMonitorsRequestBuilder} |
| 56 | + */ |
| 57 | + @jakarta.annotation.Nonnull |
| 58 | + public ConfigurationMonitorsRequestBuilder configurationMonitors() { |
| 59 | + return new ConfigurationMonitorsRequestBuilder(pathParameters, requestAdapter); |
| 60 | + } |
| 61 | + /** |
| 62 | + * Provides operations to manage the configurationSnapshotJobs property of the microsoft.graph.configurationManagement entity. |
| 63 | + * @return a {@link ConfigurationSnapshotJobsRequestBuilder} |
| 64 | + */ |
| 65 | + @jakarta.annotation.Nonnull |
| 66 | + public ConfigurationSnapshotJobsRequestBuilder configurationSnapshotJobs() { |
| 67 | + return new ConfigurationSnapshotJobsRequestBuilder(pathParameters, requestAdapter); |
| 68 | + } |
| 69 | + /** |
| 70 | + * Provides operations to manage the configurationSnapshots property of the microsoft.graph.configurationManagement entity. |
| 71 | + * @return a {@link ConfigurationSnapshotsRequestBuilder} |
| 72 | + */ |
| 73 | + @jakarta.annotation.Nonnull |
| 74 | + public ConfigurationSnapshotsRequestBuilder configurationSnapshots() { |
| 75 | + return new ConfigurationSnapshotsRequestBuilder(pathParameters, requestAdapter); |
| 76 | + } |
| 77 | + /** |
| 78 | + * Instantiates a new {@link ConfigurationManagementRequestBuilder} and sets the default values. |
| 79 | + * @param pathParameters Path parameters for the request |
| 80 | + * @param requestAdapter The request adapter to use to execute the requests. |
| 81 | + */ |
| 82 | + public ConfigurationManagementRequestBuilder(@jakarta.annotation.Nonnull final HashMap<String, Object> pathParameters, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) { |
| 83 | + super(requestAdapter, "{+baseurl}/admin/configurationManagement{?%24expand,%24select}", pathParameters); |
| 84 | + } |
| 85 | + /** |
| 86 | + * Instantiates a new {@link ConfigurationManagementRequestBuilder} and sets the default values. |
| 87 | + * @param rawUrl The raw URL to use for the request builder. |
| 88 | + * @param requestAdapter The request adapter to use to execute the requests. |
| 89 | + */ |
| 90 | + public ConfigurationManagementRequestBuilder(@jakarta.annotation.Nonnull final String rawUrl, @jakarta.annotation.Nonnull final RequestAdapter requestAdapter) { |
| 91 | + super(requestAdapter, "{+baseurl}/admin/configurationManagement{?%24expand,%24select}", rawUrl); |
| 92 | + } |
| 93 | + /** |
| 94 | + * Delete navigation property configurationManagement for admin |
| 95 | + * @throws ODataError When receiving a 4XX or 5XX status code |
| 96 | + */ |
| 97 | + public void delete() { |
| 98 | + delete(null); |
| 99 | + } |
| 100 | + /** |
| 101 | + * Delete navigation property configurationManagement for admin |
| 102 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 103 | + * @throws ODataError When receiving a 4XX or 5XX status code |
| 104 | + */ |
| 105 | + public void delete(@jakarta.annotation.Nullable final java.util.function.Consumer<DeleteRequestConfiguration> requestConfiguration) { |
| 106 | + final RequestInformation requestInfo = toDeleteRequestInformation(requestConfiguration); |
| 107 | + final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>(); |
| 108 | + errorMapping.put("XXX", ODataError::createFromDiscriminatorValue); |
| 109 | + this.requestAdapter.sendPrimitive(requestInfo, errorMapping, Void.class); |
| 110 | + } |
| 111 | + /** |
| 112 | + * Get configurationManagement from admin |
| 113 | + * @return a {@link ConfigurationManagement} |
| 114 | + * @throws ODataError When receiving a 4XX or 5XX status code |
| 115 | + */ |
| 116 | + @jakarta.annotation.Nullable |
| 117 | + public ConfigurationManagement get() { |
| 118 | + return get(null); |
| 119 | + } |
| 120 | + /** |
| 121 | + * Get configurationManagement from admin |
| 122 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 123 | + * @return a {@link ConfigurationManagement} |
| 124 | + * @throws ODataError When receiving a 4XX or 5XX status code |
| 125 | + */ |
| 126 | + @jakarta.annotation.Nullable |
| 127 | + public ConfigurationManagement get(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) { |
| 128 | + final RequestInformation requestInfo = toGetRequestInformation(requestConfiguration); |
| 129 | + final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>(); |
| 130 | + errorMapping.put("XXX", ODataError::createFromDiscriminatorValue); |
| 131 | + return this.requestAdapter.send(requestInfo, errorMapping, ConfigurationManagement::createFromDiscriminatorValue); |
| 132 | + } |
| 133 | + /** |
| 134 | + * Update the navigation property configurationManagement in admin |
| 135 | + * @param body The request body |
| 136 | + * @return a {@link ConfigurationManagement} |
| 137 | + * @throws ODataError When receiving a 4XX or 5XX status code |
| 138 | + */ |
| 139 | + @jakarta.annotation.Nullable |
| 140 | + public ConfigurationManagement patch(@jakarta.annotation.Nonnull final ConfigurationManagement body) { |
| 141 | + return patch(body, null); |
| 142 | + } |
| 143 | + /** |
| 144 | + * Update the navigation property configurationManagement in admin |
| 145 | + * @param body The request body |
| 146 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 147 | + * @return a {@link ConfigurationManagement} |
| 148 | + * @throws ODataError When receiving a 4XX or 5XX status code |
| 149 | + */ |
| 150 | + @jakarta.annotation.Nullable |
| 151 | + public ConfigurationManagement patch(@jakarta.annotation.Nonnull final ConfigurationManagement body, @jakarta.annotation.Nullable final java.util.function.Consumer<PatchRequestConfiguration> requestConfiguration) { |
| 152 | + Objects.requireNonNull(body); |
| 153 | + final RequestInformation requestInfo = toPatchRequestInformation(body, requestConfiguration); |
| 154 | + final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>(); |
| 155 | + errorMapping.put("XXX", ODataError::createFromDiscriminatorValue); |
| 156 | + return this.requestAdapter.send(requestInfo, errorMapping, ConfigurationManagement::createFromDiscriminatorValue); |
| 157 | + } |
| 158 | + /** |
| 159 | + * Delete navigation property configurationManagement for admin |
| 160 | + * @return a {@link RequestInformation} |
| 161 | + */ |
| 162 | + @jakarta.annotation.Nonnull |
| 163 | + public RequestInformation toDeleteRequestInformation() { |
| 164 | + return toDeleteRequestInformation(null); |
| 165 | + } |
| 166 | + /** |
| 167 | + * Delete navigation property configurationManagement for admin |
| 168 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 169 | + * @return a {@link RequestInformation} |
| 170 | + */ |
| 171 | + @jakarta.annotation.Nonnull |
| 172 | + public RequestInformation toDeleteRequestInformation(@jakarta.annotation.Nullable final java.util.function.Consumer<DeleteRequestConfiguration> requestConfiguration) { |
| 173 | + final RequestInformation requestInfo = new RequestInformation(HttpMethod.DELETE, urlTemplate, pathParameters); |
| 174 | + requestInfo.configure(requestConfiguration, DeleteRequestConfiguration::new); |
| 175 | + requestInfo.headers.tryAdd("Accept", "application/json"); |
| 176 | + return requestInfo; |
| 177 | + } |
| 178 | + /** |
| 179 | + * Get configurationManagement from admin |
| 180 | + * @return a {@link RequestInformation} |
| 181 | + */ |
| 182 | + @jakarta.annotation.Nonnull |
| 183 | + public RequestInformation toGetRequestInformation() { |
| 184 | + return toGetRequestInformation(null); |
| 185 | + } |
| 186 | + /** |
| 187 | + * Get configurationManagement from admin |
| 188 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 189 | + * @return a {@link RequestInformation} |
| 190 | + */ |
| 191 | + @jakarta.annotation.Nonnull |
| 192 | + public RequestInformation toGetRequestInformation(@jakarta.annotation.Nullable final java.util.function.Consumer<GetRequestConfiguration> requestConfiguration) { |
| 193 | + final RequestInformation requestInfo = new RequestInformation(HttpMethod.GET, urlTemplate, pathParameters); |
| 194 | + requestInfo.configure(requestConfiguration, GetRequestConfiguration::new, x -> x.queryParameters); |
| 195 | + requestInfo.headers.tryAdd("Accept", "application/json"); |
| 196 | + return requestInfo; |
| 197 | + } |
| 198 | + /** |
| 199 | + * Update the navigation property configurationManagement in admin |
| 200 | + * @param body The request body |
| 201 | + * @return a {@link RequestInformation} |
| 202 | + */ |
| 203 | + @jakarta.annotation.Nonnull |
| 204 | + public RequestInformation toPatchRequestInformation(@jakarta.annotation.Nonnull final ConfigurationManagement body) { |
| 205 | + return toPatchRequestInformation(body, null); |
| 206 | + } |
| 207 | + /** |
| 208 | + * Update the navigation property configurationManagement in admin |
| 209 | + * @param body The request body |
| 210 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 211 | + * @return a {@link RequestInformation} |
| 212 | + */ |
| 213 | + @jakarta.annotation.Nonnull |
| 214 | + public RequestInformation toPatchRequestInformation(@jakarta.annotation.Nonnull final ConfigurationManagement body, @jakarta.annotation.Nullable final java.util.function.Consumer<PatchRequestConfiguration> requestConfiguration) { |
| 215 | + Objects.requireNonNull(body); |
| 216 | + final RequestInformation requestInfo = new RequestInformation(HttpMethod.PATCH, urlTemplate, pathParameters); |
| 217 | + requestInfo.configure(requestConfiguration, PatchRequestConfiguration::new); |
| 218 | + requestInfo.headers.tryAdd("Accept", "application/json"); |
| 219 | + requestInfo.setContentFromParsable(requestAdapter, "application/json", body); |
| 220 | + return requestInfo; |
| 221 | + } |
| 222 | + /** |
| 223 | + * Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. |
| 224 | + * @param rawUrl The raw URL to use for the request builder. |
| 225 | + * @return a {@link ConfigurationManagementRequestBuilder} |
| 226 | + */ |
| 227 | + @jakarta.annotation.Nonnull |
| 228 | + public ConfigurationManagementRequestBuilder withUrl(@jakarta.annotation.Nonnull final String rawUrl) { |
| 229 | + Objects.requireNonNull(rawUrl); |
| 230 | + return new ConfigurationManagementRequestBuilder(rawUrl, requestAdapter); |
| 231 | + } |
| 232 | + /** |
| 233 | + * Configuration for the request such as headers, query parameters, and middleware options. |
| 234 | + */ |
| 235 | + @jakarta.annotation.Generated("com.microsoft.kiota") |
| 236 | + public class DeleteRequestConfiguration extends BaseRequestConfiguration { |
| 237 | + } |
| 238 | + /** |
| 239 | + * Get configurationManagement from admin |
| 240 | + */ |
| 241 | + @jakarta.annotation.Generated("com.microsoft.kiota") |
| 242 | + public class GetQueryParameters implements QueryParameters { |
| 243 | + /** |
| 244 | + * Expand related entities |
| 245 | + */ |
| 246 | + @jakarta.annotation.Nullable |
| 247 | + public String[] expand; |
| 248 | + /** |
| 249 | + * Select properties to be returned |
| 250 | + */ |
| 251 | + @jakarta.annotation.Nullable |
| 252 | + public String[] select; |
| 253 | + /** |
| 254 | + * Extracts the query parameters into a map for the URI template parsing. |
| 255 | + * @return a {@link Map<String, Object>} |
| 256 | + */ |
| 257 | + @jakarta.annotation.Nonnull |
| 258 | + public Map<String, Object> toQueryParameters() { |
| 259 | + final Map<String, Object> allQueryParams = new HashMap(); |
| 260 | + allQueryParams.put("%24expand", expand); |
| 261 | + allQueryParams.put("%24select", select); |
| 262 | + return allQueryParams; |
| 263 | + } |
| 264 | + } |
| 265 | + /** |
| 266 | + * Configuration for the request such as headers, query parameters, and middleware options. |
| 267 | + */ |
| 268 | + @jakarta.annotation.Generated("com.microsoft.kiota") |
| 269 | + public class GetRequestConfiguration extends BaseRequestConfiguration { |
| 270 | + /** |
| 271 | + * Request query parameters |
| 272 | + */ |
| 273 | + @jakarta.annotation.Nullable |
| 274 | + public GetQueryParameters queryParameters = new GetQueryParameters(); |
| 275 | + } |
| 276 | + /** |
| 277 | + * Configuration for the request such as headers, query parameters, and middleware options. |
| 278 | + */ |
| 279 | + @jakarta.annotation.Generated("com.microsoft.kiota") |
| 280 | + public class PatchRequestConfiguration extends BaseRequestConfiguration { |
| 281 | + } |
| 282 | +} |
0 commit comments