/** * The CustomView model module. * @module Ntnx/CustomView * @version 4.1.1-beta-1 * @class CustomView * * @param { string } entityType Entity type for which data needs to be shown in the view. * * @param { ViewFormat } format */ export default class CustomView { /** * Constructs a CustomView 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/CustomView} obj Optional instance to populate. * @param callFromChild {Boolean} Flag to recognise calling instance * @return {module:Ntnx/CustomView} The populated CustomView 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 CustomView. * Custom View Parameters used to decide what data needs to be shown in the view. * @alias module:Ntnx/CustomView * * @param { string } entityType Entity type for which data needs to be shown in the view. * * @param { ViewFormat } format */ constructor(entityType: string, format: ViewFormat); entityType: string; format: string; $objectType: string; /** @type {object} */ $reserved: object; /** @type {object} */ $unknownFields: object; /** * Returns Entity type for which data needs to be shown in the view. * @return {string} */ getEntityType(): string; /** * Sets Entity type for which data needs to be shown in the view. * @param {string} entityType Entity type for which data needs to be shown in the view. */ setEntityType(entityType: string): void; /** * Returns OData criteria that will be used to filter the returned data. * @return {string} */ getFilterCriteria(): string; /** * Sets OData criteria that will be used to filter the returned data. * @param {string} filterCriteria OData criteria that will be used to filter the returned data. */ setFilterCriteria(filterCriteria: string): void; filterCriteria: string; /** * @return {ViewFormat} */ getFormat(): ViewFormat; /** * @param {ViewFormat} format */ setFormat(format: ViewFormat): void; /** * Returns List of selected fields for the view. * @return {Field[]} */ getFields(): Field[]; /** * Sets List of selected fields for the view. * @param {Field[]} fields List of selected fields for the view. */ setFields(fields: Field[]): void; fields: Field[]; /** * Returns Entity UUIDs used in the view. * @return {string[]} */ getEntityIds(): string[]; /** * Sets Entity UUIDs used in the view. * @param {string[]} entityIds Entity UUIDs used in the view. */ setEntityIds(entityIds: string[]): void; entityIds: string[]; /** * Returns Entity Property based on which the result data is to be sorted. * @return {string} */ getSortColumn(): string; /** * Sets Entity Property based on which the result data is to be sorted. * @param {string} sortColumn Entity Property based on which the result data is to be sorted. */ setSortColumn(sortColumn: string): void; sortColumn: string; /** * @return {SortOrder} */ getSortOrder(): SortOrder; /** * @param {SortOrder} sortOrder */ setSortOrder(sortOrder: SortOrder): void; sortOrder: any; /** * Returns Limit on the maximum number of entities to be represented in the view. * minimum: 0 * maximum: 25000 * @return {Number} */ getLimit(): number; /** * Sets Limit on the maximum number of entities to be represented in the view. * @param {Number} limit Limit on the maximum number of entities to be represented in the view. */ setLimit(limit: number): void; limit: number; /** * Returns Offset to be used while getting data for the view. * minimum: 0 * @return {Number} */ getOffset(): number; /** * Sets Offset to be used while getting data for the view. * @param {Number} offset Offset to be used while getting data for the view. */ setOffset(offset: number): void; offset: number; /** * Returns Column on which grouping to be used while getting data for the view. * @return {string} */ getGroupByColumn(): string; /** * Sets Column on which grouping to be used while getting data for the view. * @param {string} groupByColumn Column on which grouping to be used while getting data for the view. */ setGroupByColumn(groupByColumn: string): void; groupByColumn: string; 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 ViewFormat from "./ViewFormat"; import Field from "./Field"; import ValidationError from "../../../validation/ValidationError";