Class BatchRequestBuilder

java.lang.Object
com.microsoft.graph.core.requests.BatchRequestBuilder

public class BatchRequestBuilder extends Object
A request builder for creating batch requests.
  • 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 IOException
      Posts 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 IOException
      Posts 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.