Class RetentionLabelRequestBuilder

java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
com.microsoft.graph.drives.item.items.item.retentionlabel.RetentionLabelRequestBuilder

@Generated("com.microsoft.kiota") public class RetentionLabelRequestBuilder extends com.microsoft.kiota.BaseRequestBuilder
Provides operations to manage the retentionLabel property of the microsoft.graph.driveItem entity.
  • Constructor Details

    • RetentionLabelRequestBuilder

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

      public RetentionLabelRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new RetentionLabelRequestBuilder 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

    • delete

      public void delete()
      Remove a retention label from a driveItem. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • delete

      public void delete(@Nullable Consumer<RetentionLabelRequestBuilder.DeleteRequestConfiguration> requestConfiguration)
      Remove a retention label from a driveItem. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • get

      @Nullable public ItemRetentionLabel get()
      Information about retention label and settings enforced on the driveItem. Read-write.
      Returns:
      a ItemRetentionLabel
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • get

      @Nullable public ItemRetentionLabel get(@Nullable Consumer<RetentionLabelRequestBuilder.GetRequestConfiguration> requestConfiguration)
      Information about retention label and settings enforced on the driveItem. Read-write.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a ItemRetentionLabel
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • patch

      @Nullable public ItemRetentionLabel patch(@Nonnull ItemRetentionLabel body)
      Apply (set) a retention label on a driveItem (files and folders). Retention labels don't need to be published in a retention label policy to be applied using this method. When a retention label is applied to a folder, all the items in the folder are tagged with the same retention label. For information about conflict resolution for retention labels, see Will an existing label be overridden or removed. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
      Parameters:
      body - The request body
      Returns:
      a ItemRetentionLabel
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • patch

      @Nullable public ItemRetentionLabel patch(@Nonnull ItemRetentionLabel body, @Nullable Consumer<RetentionLabelRequestBuilder.PatchRequestConfiguration> requestConfiguration)
      Apply (set) a retention label on a driveItem (files and folders). Retention labels don't need to be published in a retention label policy to be applied using this method. When a retention label is applied to a folder, all the items in the folder are tagged with the same retention label. For information about conflict resolution for retention labels, see Will an existing label be overridden or removed. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a ItemRetentionLabel
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • toDeleteRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation()
      Remove a retention label from a driveItem. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
      Returns:
      a RequestInformation
    • toDeleteRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation(@Nullable Consumer<RetentionLabelRequestBuilder.DeleteRequestConfiguration> requestConfiguration)
      Remove a retention label from a driveItem. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation()
      Information about retention label and settings enforced on the driveItem. Read-write.
      Returns:
      a RequestInformation
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation(@Nullable Consumer<RetentionLabelRequestBuilder.GetRequestConfiguration> requestConfiguration)
      Information about retention label and settings enforced on the driveItem. Read-write.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • toPatchRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPatchRequestInformation(@Nonnull ItemRetentionLabel body)
      Apply (set) a retention label on a driveItem (files and folders). Retention labels don't need to be published in a retention label policy to be applied using this method. When a retention label is applied to a folder, all the items in the folder are tagged with the same retention label. For information about conflict resolution for retention labels, see Will an existing label be overridden or removed. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
      Parameters:
      body - The request body
      Returns:
      a RequestInformation
    • toPatchRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPatchRequestInformation(@Nonnull ItemRetentionLabel body, @Nullable Consumer<RetentionLabelRequestBuilder.PatchRequestConfiguration> requestConfiguration)
      Apply (set) a retention label on a driveItem (files and folders). Retention labels don't need to be published in a retention label policy to be applied using this method. When a retention label is applied to a folder, all the items in the folder are tagged with the same retention label. For information about conflict resolution for retention labels, see Will an existing label be overridden or removed. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • withUrl

      @Nonnull public RetentionLabelRequestBuilder 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 RetentionLabelRequestBuilder