Class ChatAttachment

java.lang.Object
com.azure.communication.chat.models.ChatAttachment

public final class ChatAttachment extends Object
An attachment in a chat message.
  • Constructor Details

    • ChatAttachment

      public ChatAttachment(String id, ChatAttachmentType attachmentType)
      Create a new instance of ChatAttachment
      Parameters:
      id - the unique id of the chat attachment
      attachmentType - the type of attachment
  • Method Details

    • getId

      public String getId()
      Get the id property: Id of the attachment.
      Returns:
      the id value.
    • getAttachmentType

      public ChatAttachmentType getAttachmentType()
      Get the attachmentType property: The type of attachment.
      Returns:
      the attachmentType value.
    • getName

      public String getName()
      Get the name property: The name of the attachment content.
      Returns:
      the name value.
    • setName

      public ChatAttachment setName(String name)
      Set the name property: The name of the attachment content.
      Parameters:
      name - the name value to set.
      Returns:
      the ChatAttachment object itself.
    • getUrl

      public String getUrl()
      Get the url property: The URL where the attachment can be downloaded.
      Returns:
      the url value.
    • setUrl

      public ChatAttachment setUrl(String url)
      Set the url property: The URL where the attachment can be downloaded.
      Parameters:
      url - the url value to set.
      Returns:
      the ChatAttachment object itself.
    • getPreviewUrl

      public String getPreviewUrl()
      Get the previewUrl property: The URL where the preview of attachment can be downloaded.
      Returns:
      the previewUrl value.
    • setPreviewUrl

      public ChatAttachment setPreviewUrl(String previewUrl)
      Set the previewUrl property: The URL where the preview of attachment can be downloaded.
      Parameters:
      previewUrl - the previewUrl value to set.
      Returns:
      the ChatAttachment object itself.