typings/lib2/messagev2/action/urlAction.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UrlAction = void 0;
const internal_1 = require("../internal");
/**
 * Represents a URL action.
 * @extends Action
 */
class UrlAction extends internal_1.Action {
    /**
     * Creates a new instance of the UrlAction class.
     * @param label - The label of the URL action.
     * @param url - The URL associated with the action.
     */
    constructor(label, url) {
        super(label);
        this.type = 'url';
        this.url = url;
    }
    /**
     * Get the URL associated with the URL action.
     * @returns The URL.
     */
    getUrl() {
        return this.url;
    }
    /**
     * Set the URL for the URL action.
     * @param url - The URL to set.
     * @returns The current instance of the UrlAction class.
     */
    setUrl(url) {
        this.url = url;
        return this;
    }
}
exports.UrlAction = UrlAction;