All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.communication.chat.implementation.models.ChatAttachment Maven / Gradle / Ivy

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.communication.chat.implementation.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * An attachment in a chat message.
 */
@Fluent
public final class ChatAttachment {
    /*
     * Id of the attachment
     */
    @JsonProperty(value = "id", required = true)
    private String id;

    /*
     * The type of attachment.
     */
    @JsonProperty(value = "attachmentType", required = true)
    private ChatAttachmentType attachmentType;

    /*
     * The name of the attachment content.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * The URL where the attachment can be downloaded
     */
    @JsonProperty(value = "url")
    private String url;

    /*
     * The URL where the preview of attachment can be downloaded
     */
    @JsonProperty(value = "previewUrl")
    private String previewUrl;

    /**
     * Creates an instance of ChatAttachment class.
     */
    public ChatAttachment() {
    }

    /**
     * Get the id property: Id of the attachment.
     * 
     * @return the id value.
     */
    public String getId() {
        return this.id;
    }

    /**
     * Set the id property: Id of the attachment.
     * 
     * @param id the id value to set.
     * @return the ChatAttachment object itself.
     */
    public ChatAttachment setId(String id) {
        this.id = id;
        return this;
    }

    /**
     * Get the attachmentType property: The type of attachment.
     * 
     * @return the attachmentType value.
     */
    public ChatAttachmentType getAttachmentType() {
        return this.attachmentType;
    }

    /**
     * Set the attachmentType property: The type of attachment.
     * 
     * @param attachmentType the attachmentType value to set.
     * @return the ChatAttachment object itself.
     */
    public ChatAttachment setAttachmentType(ChatAttachmentType attachmentType) {
        this.attachmentType = attachmentType;
        return this;
    }

    /**
     * Get the name property: The name of the attachment content.
     * 
     * @return the name value.
     */
    public String getName() {
        return this.name;
    }

    /**
     * Set the name property: The name of the attachment content.
     * 
     * @param name the name value to set.
     * @return the ChatAttachment object itself.
     */
    public ChatAttachment setName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the url property: The URL where the attachment can be downloaded.
     * 
     * @return the url value.
     */
    public String getUrl() {
        return this.url;
    }

    /**
     * Set the url property: The URL where the attachment can be downloaded.
     * 
     * @param url the url value to set.
     * @return the ChatAttachment object itself.
     */
    public ChatAttachment setUrl(String url) {
        this.url = url;
        return this;
    }

    /**
     * Get the previewUrl property: The URL where the preview of attachment can be downloaded.
     * 
     * @return the previewUrl value.
     */
    public String getPreviewUrl() {
        return this.previewUrl;
    }

    /**
     * Set the previewUrl property: The URL where the preview of attachment can be downloaded.
     * 
     * @param previewUrl the previewUrl value to set.
     * @return the ChatAttachment object itself.
     */
    public ChatAttachment setPreviewUrl(String previewUrl) {
        this.previewUrl = previewUrl;
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy