client/splunk.js
function(props, parentDataModel) {
            props = props || {};
            props.owner = props.owner || "";

            this.dataModel              = parentDataModel;
            this.name                   = props.objectName;
            this.displayName            = props.displayName;
            this.parentName             = props.parentName;
            this.lineage                = props.lineage.split(".");

            // Properties exclusive to BaseTransaction
            if (props.hasOwnProperty("groupByFields")) {
                this.groupByFields = props.groupByFields;
            }
            if (props.hasOwnProperty("objectsToGroup")) {
                this.objectsToGroup = props.objectsToGroup;
            }
            if (props.hasOwnProperty("transactionMaxTimeSpan")) {
                this.maxSpan = props.transactionMaxTimeSpan;
            }
            if (props.hasOwnProperty("transactionMaxPause")) {
                this.maxPause = props.transactionMaxPause;
            }

            // Property exclusive to BaseSearch
            if (props.hasOwnProperty("baseSearch")) {
                this.baseSearch = props.baseSearch;
            }

            // Parse fields
            this.fields = {};
            for (var i = 0; i < props.fields.length; i++) {
                this.fields[props.fields[i].fieldName] = new root.DataModelField(props.fields[i]);
            }

            // Parse constraints
            this.constraints = [];
            for (var j = 0; j < props.constraints.length; j++) {
                this.constraints.push(new root.DataModelConstraint(props.constraints[j]));
            }

            // Parse calculations
            this.calculations = [];
            for (var k = 0; k < props.calculations.length; k++) {
                this.calculations[props.calculations[k].calculationID] = new root.DataModelCalculation(props.calculations[k]);
            }
        }
function(props, parentDataModel) {
            props = props || {};
            props.owner = props.owner || "";

            this.dataModel              = parentDataModel;
            this.name                   = props.objectName;
            this.displayName            = props.displayName;
            this.parentName             = props.parentName;
            this.lineage                = props.lineage.split(".");

            // Properties exclusive to BaseTransaction
            if (props.hasOwnProperty("groupByFields")) {
                this.groupByFields = props.groupByFields;
            }
            if (props.hasOwnProperty("objectsToGroup")) {
                this.objectsToGroup = props.objectsToGroup;
            }
            if (props.hasOwnProperty("transactionMaxTimeSpan")) {
                this.maxSpan = props.transactionMaxTimeSpan;
            }
            if (props.hasOwnProperty("transactionMaxPause")) {
                this.maxPause = props.transactionMaxPause;
            }

            // Property exclusive to BaseSearch
            if (props.hasOwnProperty("baseSearch")) {
                this.baseSearch = props.baseSearch;
            }

            // Parse fields
            this.fields = {};
            for (var i = 0; i < props.fields.length; i++) {
                this.fields[props.fields[i].fieldName] = new root.DataModelField(props.fields[i]);
            }

            // Parse constraints
            this.constraints = [];
            for (var j = 0; j < props.constraints.length; j++) {
                this.constraints.push(new root.DataModelConstraint(props.constraints[j]));
            }

            // Parse calculations
            this.calculations = [];
            for (var k = 0; k < props.calculations.length; k++) {
                this.calculations[props.calculations[k].calculationID] = new root.DataModelCalculation(props.calculations[k]);
            }
        }
function ( props , parentDataModel ) { props = props || { } ; props . owner = props . owner || "" ; this . dataModel = parentDataModel ; this . name = props . objectName ; this . displayName = props . displayName ; this . parentName = props . parentName ; this . lineage = props . lineage . split ( "." ) ; // Properties exclusive to BaseTransaction if ( props . hasOwnProperty ( "groupByFields" ) ) { this . groupByFields = props . groupByFields ; } if ( props . hasOwnProperty ( "objectsToGroup" ) ) { this . objectsToGroup = props . objectsToGroup ; } if ( props . hasOwnProperty ( "transactionMaxTimeSpan" ) ) { this . maxSpan = props . transactionMaxTimeSpan ; } if ( props . hasOwnProperty ( "transactionMaxPause" ) ) { this . maxPause = props . transactionMaxPause ; } // Property exclusive to BaseSearch if ( props . hasOwnProperty ( "baseSearch" ) ) { this . baseSearch = props . baseSearch ; } // Parse fields this . fields = { } ; for ( var i = 0 ; i < props . fields . length ; i ++ ) { this . fields [ props . fields [ i ] . fieldName ] = new root . DataModelField ( props . fields [ i ] ) ; } // Parse constraints this . constraints = [ ] ; for ( var j = 0 ; j < props . constraints . length ; j ++ ) { this . constraints . push ( new root . DataModelConstraint ( props . constraints [ j ] ) ) ; } // Parse calculations this . calculations = [ ] ; for ( var k = 0 ; k < props . calculations . length ; k ++ ) { this . calculations [ props . calculations [ k ] . calculationID ] = new root . DataModelCalculation ( props . calculations [ k ] ) ; } }
Constructor for a data model object.
SDK users are not expected to invoke this constructor directly.

@constructor
@param {Object} props A dictionary of properties to set:
- `objectName` (_string_): The name for this data model object.
- `displayName` (_string_): A human readable name for this data model object.
- `parentName` (_string_): The name of the data model that owns this data model object.
- `lineage` (_string_): The lineage of the data model that owns this data model object,
items are delimited by a dot. This is converted into an array of
strings upon construction.
- `fields` (_array_): An array of data model fields.
- `constraints` (_array_): An array of data model constraints.
- `calculations` (_array_): An array of data model calculations.
- `baseSearch` (_string_): The search query wrapped by this data model object; exclusive to BaseSearch (optional)
- `groupByFields` (_array_): The fields that will be used to group events into transactions; exclusive to BaseTransaction (optional)
- `objectsToGroup` (_array_): Names of the data model objects that should be unioned
and split into transactions; exclusive to BaseTransaction (optional)
- `maxSpan` (_string_): The maximum time span of a transaction; exclusive to BaseTransaction (optional)
- `maxPause` (_string_): The maximum pause time of a transaction; exclusive to BaseTransaction (optional)

@param {splunkjs.Service.DataModel} parentDataModel The `DataModel` that owns this data model object.

@method splunkjs.Service.DataModelObject
Constructor for a data model object . SDK users are not expected to invoke this constructor directly .