"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExecuteApplicationActionCommandMessage = void 0;
const internal_1 = require("../internal");
/**
* Represents an execute application action command message.
* This message is used in co-pilot where this message is sent from the skill to the client to trigger a specific action in a
* page, e.g. updateing fields.
*
* @extends CommandMessage
*/
class ExecuteApplicationActionCommandMessage extends internal_1.CommandMessage {
/**
* Creates an instance of the ExecuteApplicationActionCommandMessage class.
* @param {string} applicationName The name of the application
*/
constructor(applicationName, action) {
super(internal_1.CommandType.executeApplicationAction);
this.type = 'executeApplicationActionCommand';
this.applicationName = applicationName;
this.action = action;
}
/**
* Gets the application name
* @returns {string} The name of the application
*/
getApplicationName() {
return this.applicationName;
}
/**
* Sets the application name
* @param {string} The name of the application
* @returns {this} The updated instance of the ExecuteApplicationActionCommandMessage.
*/
setApplicationName(applicationName) {
this.applicationName = applicationName;
return this;
}
/**
* Gets the page name
* @returns {string} The name of the page
*/
getPageName() {
return this.pageName;
}
/**
* Sets the page name
* @param {string} The name of the page
* @returns {this} The updated instance of the ExecuteApplicationActionCommandMessage.
*/
setPageName(pageName) {
this.pageName = pageName;
return this;
}
/**
* Gets the action
* @returns {string} The action
*/
getAction() {
return this.action;
}
/**
* Sets the action
* @param {string} The action
* @returns {this} The updated instance of the ExecuteApplicationActionCommandMessage.
*/
setAction(action) {
this.action = action;
return this;
}
}
exports.ExecuteApplicationActionCommandMessage = ExecuteApplicationActionCommandMessage;