/** * The WidgetField model module. * @module Ntnx/WidgetField * @version 4.1.1-beta-1 * @class WidgetField * * @param { string } label Human-readable label for widget field. * * @param { string } name Entity attribute/metric to be selected for the widget. */ export default class WidgetField { /** * Constructs a WidgetField from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from data to obj if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. * @param {module:Ntnx/WidgetField} obj Optional instance to populate. * @param callFromChild {Boolean} Flag to recognise calling instance * @return {module:Ntnx/WidgetField} The populated WidgetField instance. */ static constructFromObject(data: any, obj?: any, callFromChild?: boolean): any; /** * Converts a given snake_case string to camelCase. * @param {string} snakeStr - The input string in snake_case format. * @returns {string} - The converted string in camelCase format. */ static snakeToCamel(snakeStr: string): string; /** * Constructs a new WidgetField. * Selected entity attribute/metric for the widget. * @alias module:Ntnx/WidgetField * * @param { string } label Human-readable label for widget field. * * @param { string } name Entity attribute/metric to be selected for the widget. */ constructor(label: string, name: string); label: string; name: string; $objectType: string; /** @type {object} */ $reserved: object; /** @type {object} */ $unknownFields: object; /** * Returns Human-readable label for widget field. * @return {string} */ getLabel(): string; /** * Sets Human-readable label for widget field. * @param {string} label Human-readable label for widget field. */ setLabel(label: string): void; /** * Returns Entity attribute/metric to be selected for the widget. * @return {string} */ getName(): string; /** * Sets Entity attribute/metric to be selected for the widget. * @param {string} name Entity attribute/metric to be selected for the widget. */ setName(name: string): void; /** * @return {AggregateFunction} */ getAggregateFunction(): AggregateFunction; /** * @param {AggregateFunction} aggregateFunction */ setAggregateFunction(aggregateFunction: AggregateFunction): void; aggregateFunction: string; /** * @return {Unit} */ getUnit(): Unit; /** * @param {Unit} unit */ setUnit(unit: Unit): void; unit: string; /** * Returns List of thresholds. * @return {Threshold[]} */ getThresholds(): Threshold[]; /** * Sets List of thresholds. * @param {Threshold[]} thresholds List of thresholds. */ setThresholds(thresholds: Threshold[]): void; thresholds: Threshold[]; /** * @return {CompoundMetric} */ getCompoundMetric(): CompoundMetric; /** * @param {CompoundMetric} compoundMetric */ setCompoundMetric(compoundMetric: CompoundMetric): void; compoundMetric: CompoundMetric; get$Reserved(): any; get$ObjectType(): string; get$UnknownFields(): any; toJson(forMutation: any): any; validate(scope: any, properties: any, ...args: any[]): Promise; validateProperty(scope: any, property: any): ValidationError; #private; } import AggregateFunction from "./AggregateFunction"; import Unit from "./Unit"; import Threshold from "./Threshold"; import CompoundMetric from "./CompoundMetric"; import ValidationError from "../../../validation/ValidationError";