Class BaseEntityCollectionRequest<T,T2 extends ICollectionResponse<T>,T3 extends BaseCollectionPage<T,? extends BaseRequestBuilder<T>>>

java.lang.Object
com.microsoft.graph.http.BaseCollectionRequest<T,T2,T3>
com.microsoft.graph.http.BaseEntityCollectionRequest<T,T2,T3>
Type Parameters:
T - the type of the object in the collection
T2 - the response collection type
T3 - the collection page type
All Implemented Interfaces:
IHttpRequest
Direct Known Subclasses:
BaseCollectionWithReferencesRequest

public abstract class BaseEntityCollectionRequest<T,T2 extends ICollectionResponse<T>,T3 extends BaseCollectionPage<T,? extends BaseRequestBuilder<T>>> extends BaseCollectionRequest<T,T2,T3>
A request against a collection
  • Constructor Details

    • BaseEntityCollectionRequest

      public BaseEntityCollectionRequest(@Nonnull String requestUrl, @Nonnull IBaseClient<?> client, @Nullable List<? extends Option> options, @Nonnull Class<T2> responseCollectionClass, @Nonnull Class<T3> collectionPageClass, @Nonnull Class<? extends BaseCollectionRequestBuilder<T,? extends BaseRequestBuilder<T>,T2,T3,? extends BaseCollectionRequest<T,T2,T3>>> collectionRequestBuilderClass)
      Create the collection request
      Parameters:
      requestUrl - the URL to make the request against
      client - the client which can issue the request
      options - the options for this request
      responseCollectionClass - the class for the response collection
      collectionPageClass - the class for the collection page
      collectionRequestBuilderClass - the class for the collection request builder
  • Method Details

    • getAsync

      @Nonnull public CompletableFuture<T3> getAsync()
      Gets the collection of items
      Returns:
      a future with the result
    • get

      @Nullable public T3 get() throws ClientException
      Gets the collection of items
      Returns:
      the collection page
      Throws:
      ClientException
    • post

      @Nullable protected <BodyType> T2 post(@Nullable BodyType serializedObject) throws ClientException
      Posts this request
      Type Parameters:
      BodyType - the type of the serialized body, some times Action use different body than collection item
      Parameters:
      serializedObject - the object to serialize as the body
      Returns:
      the response object
      Throws:
      ClientException - an exception occurs if there was an error while the request was sent