Class FileScheduleDeletionOptions

java.lang.Object
com.azure.storage.file.datalake.options.FileScheduleDeletionOptions

public class FileScheduleDeletionOptions extends Object
Parameters for Schedule Deletion.
  • Constructor Details

    • FileScheduleDeletionOptions

      public FileScheduleDeletionOptions()
      Creates empty FileScheduleDeletionOptions. If the file was scheduled for deletion, the deletion will be cancelled.
    • FileScheduleDeletionOptions

      public FileScheduleDeletionOptions(Duration timeToExpire, FileExpirationOffset expiryRelativeTo)
      Sets time when the file will be deleted, relative to the file creation time or the current time.
      Parameters:
      timeToExpire - Duration before file will be deleted.
      expiryRelativeTo - Specifies if TimeToExpire should be set relative to the file's creation time, or the current time.
    • FileScheduleDeletionOptions

      public FileScheduleDeletionOptions(OffsetDateTime expiresOn)
      Sets the OffsetDateTime when the file will be deleted.
      Parameters:
      expiresOn - The OffsetDateTime when the file will be deleted.
  • Method Details

    • getTimeToExpire

      public Duration getTimeToExpire()
      Returns:
      Duration before file should be deleted.
    • getExpiryRelativeTo

      public FileExpirationOffset getExpiryRelativeTo()
      Returns:
      if getTimeToExpire() should be set relative to the file's creation time, or the current time.
    • getExpiresOn

      public OffsetDateTime getExpiresOn()
      Returns:
      The OffsetDateTime to set for when the file will be deleted.