Class SharesRequestBuilder

java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
com.microsoft.graph.shares.SharesRequestBuilder

@Generated("com.microsoft.kiota") public class SharesRequestBuilder extends com.microsoft.kiota.BaseRequestBuilder
Provides operations to manage the collection of sharedDriveItem entities.
  • Constructor Details

    • SharesRequestBuilder

      public SharesRequestBuilder(@Nonnull HashMap<String,Object> pathParameters, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new SharesRequestBuilder and sets the default values.
      Parameters:
      pathParameters - Path parameters for the request
      requestAdapter - The request adapter to use to execute the requests.
    • SharesRequestBuilder

      public SharesRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new SharesRequestBuilder and sets the default values.
      Parameters:
      rawUrl - The raw URL to use for the request builder.
      requestAdapter - The request adapter to use to execute the requests.
  • Method Details

    • count

      @Nonnull public CountRequestBuilder count()
      Provides operations to count the resources in the collection.
      Returns:
      a CountRequestBuilder
    • bySharedDriveItemId

      @Nonnull public SharedDriveItemItemRequestBuilder bySharedDriveItemId(@Nonnull String sharedDriveItemId)
      Provides operations to manage the collection of sharedDriveItem entities.
      Parameters:
      sharedDriveItemId - The unique identifier of sharedDriveItem
      Returns:
      a SharedDriveItemItemRequestBuilder
    • get

      @Nullable public SharedDriveItemCollectionResponse get()
      Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token.
      Returns:
      a SharedDriveItemCollectionResponse
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • get

      @Nullable public SharedDriveItemCollectionResponse get(@Nullable Consumer<SharesRequestBuilder.GetRequestConfiguration> requestConfiguration)
      Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a SharedDriveItemCollectionResponse
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • post

      @Nullable public SharedDriveItem post(@Nonnull SharedDriveItem body)
      Add new entity to shares
      Parameters:
      body - The request body
      Returns:
      a SharedDriveItem
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • post

      @Nullable public SharedDriveItem post(@Nonnull SharedDriveItem body, @Nullable Consumer<SharesRequestBuilder.PostRequestConfiguration> requestConfiguration)
      Add new entity to shares
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a SharedDriveItem
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation()
      Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token.
      Returns:
      a RequestInformation
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation(@Nullable Consumer<SharesRequestBuilder.GetRequestConfiguration> requestConfiguration)
      Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • toPostRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPostRequestInformation(@Nonnull SharedDriveItem body)
      Add new entity to shares
      Parameters:
      body - The request body
      Returns:
      a RequestInformation
    • toPostRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPostRequestInformation(@Nonnull SharedDriveItem body, @Nullable Consumer<SharesRequestBuilder.PostRequestConfiguration> requestConfiguration)
      Add new entity to shares
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • withUrl

      @Nonnull public SharesRequestBuilder withUrl(@Nonnull String rawUrl)
      Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
      Parameters:
      rawUrl - The raw URL to use for the request builder.
      Returns:
      a SharesRequestBuilder