"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActionField = void 0;
const internal_1 = require("../internal");
/**
* Represents an action field.
* @extends ReadOnlyField
*/
class ActionField extends internal_1.ReadOnlyField {
/**
* Creates an instance of the ActionField class.
* @param {Action} action The action of the action field.
*/
constructor(action) {
super();
this.displayType = 'action';
this.action = action;
}
/**
* Deserialize nested object properties into corresponding class instances
*/
deserializeNestedProperties() {
super.deserializeNestedProperties();
this.action = internal_1.MessageUtil.deserializeAction(this.action);
}
/**
* Gets the action associated with the field.
* @returns {Action} The action.
*/
getAction() {
return this.action;
}
/**
* Sets the action associated with the field.
* @param {Action} action The action to set.
* @returns The updated instance of the ActionField.
*/
setAction(action) {
this.action = action;
return this;
}
}
exports.ActionField = ActionField;