Class BatchRequestBuilder
java.lang.Object
com.microsoft.graph.core.requests.BatchRequestBuilder
A request builder for creating batch requests.
-
Constructor Summary
ConstructorsConstructorDescriptionBatchRequestBuilder(com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a new BatchRequestBuilder. -
Method Summary
Modifier and TypeMethodDescriptioncom.microsoft.kiota.RequestAdapterGets the request adapter.post(BatchRequestContentCollection batchRequestContentCollection, Map<String, com.microsoft.kiota.serialization.ParsableFactory<? extends com.microsoft.kiota.serialization.Parsable>> errorMappings) Posts a BatchRequestContentCollection.post(BatchRequestContent requestContent, Map<String, com.microsoft.kiota.serialization.ParsableFactory<? extends com.microsoft.kiota.serialization.Parsable>> errorMappings) Posts a batch request.com.microsoft.kiota.RequestInformationtoPostRequestInformation(BatchRequestContent requestContent) Creates the request information for a batch request.
-
Constructor Details
-
BatchRequestBuilder
public BatchRequestBuilder(@Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a new BatchRequestBuilder.- Parameters:
requestAdapter- the adapter to use to build requests.
-
-
Method Details
-
post
@Nonnull public BatchResponseContent post(@Nonnull BatchRequestContent requestContent, @Nullable Map<String, com.microsoft.kiota.serialization.ParsableFactory<? extends com.microsoft.kiota.serialization.Parsable>> errorMappings) throws IOExceptionPosts a batch request.- Parameters:
requestContent- the batch request content.errorMappings- the error mappings to use when parsing the response.- Returns:
- the batch response content.
- Throws:
IOException- if there was an error writing the request content.
-
post
@Nonnull public BatchResponseContentCollection post(@Nonnull BatchRequestContentCollection batchRequestContentCollection, @Nullable Map<String, com.microsoft.kiota.serialization.ParsableFactory<? extends com.microsoft.kiota.serialization.Parsable>> errorMappings) throws IOExceptionPosts a BatchRequestContentCollection.- Parameters:
batchRequestContentCollection- the BatchRequestContentCollection to post.errorMappings- the error mappings to use when parsing the response.- Returns:
- the BatchResponseContentCollection.
- Throws:
IOException- if there was an error writing the request content.
-
toPostRequestInformation
@Nonnull public com.microsoft.kiota.RequestInformation toPostRequestInformation(@Nonnull BatchRequestContent requestContent) throws IOException Creates the request information for a batch request.- Parameters:
requestContent- the batch request content.- Returns:
- the request information.
- Throws:
IOException- if there was an error writing the request content.
-
getRequestAdapter
@Nonnull public com.microsoft.kiota.RequestAdapter getRequestAdapter()Gets the request adapter.- Returns:
- the request adapter.
-