text: ﻿'use strict';
  /** @namespace DevKit */
  var DevKit;
  (function (DevKit) {
  	'use strict';
  	DevKit.msdyn_dataanalyticsreport_csrmanagerApi = function (e) {
  		var EMPTY_STRING = '';
  		var f = '@OData.Community.Display.V1.FormattedValue';
          function webApiField(entity, logicalName, schemaName, entityLogicalCollectionName, entityLogicalName, readOnly, upsertEntity, isMultiOptionSet) {
              var l = '@Microsoft.Dynamics.CRM.lookuplogicalname';
              var property = {};
              var getFormattedValue = function () {
                  if (entity[logicalName + f] === undefined || entity[logicalName + f] === null) {
                      return EMPTY_STRING;
                  }
                  if (entityLogicalCollectionName !== undefined && entityLogicalCollectionName.length > 0) {
                      if (entity[logicalName + l] === entityLogicalName) {
                          return entity[logicalName + f];
                      }
                      return EMPTY_STRING;
                  }
                  if (isMultiOptionSet) {
                      return entity[logicalName + f].toString().split(';').map(function (item) { return item.trim(); });
                  }
                  return entity[logicalName + f];
              };
              var getValue = function () {
                  if (entity[logicalName] === undefined || entity[logicalName] === null) {
                      return null;
                  }
                  if (entityLogicalCollectionName !== undefined && entityLogicalCollectionName.length > 0) {
                      if (entity[logicalName + l] === undefined || entity[logicalName + l] === entityLogicalName) {
                          return entity[logicalName];
                      }
                      return null;
                  }
                  if (isMultiOptionSet) {
                      return entity[logicalName].toString().split(',').map(function (item) { return parseInt(item, 10); });
                  }
                  return entity[logicalName];
              };
              var setValue = function (value) {
                  if (isMultiOptionSet) value = value.join(',');
                  if (entityLogicalCollectionName !== undefined && entityLogicalCollectionName.length > 0) {
                      value = value.replace('{', EMPTY_STRING).replace('}', EMPTY_STRING);
                      upsertEntity[schemaName + '@odata.bind'] = '/' + entityLogicalCollectionName + '(' + value + ')';
                  } else {
                      upsertEntity[logicalName] = value;
                  }
                  entity[logicalName] = value;
              };
              Object.defineProperty(property, 'FormattedValue', {
                  get: getFormattedValue
              });
              if (readOnly) {
                  Object.defineProperty(property, 'Value', {
                      get: getValue
                  });
              }
              else {
                  Object.defineProperty(property, 'Value', {
                      get: getValue,
                      set: setValue
                  });
              }
              return property;
          }
  		var msdyn_dataanalyticsreport_csrmanager = {
  			ComponentIdUnique: { a: 'componentidunique', r: true },
  			ComponentState: { a: 'componentstate', r: true },
  			CreatedBy: { b: 'createdby', a: '_createdby_value', c: 'systemusers', d: 'systemuser', r: true },
  			CreatedOn_UtcDateAndTime: { a: 'createdon', r: true },
  			CreatedOnBehalfBy: { b: 'createdonbehalfby', a: '_createdonbehalfby_value', c: 'systemusers', d: 'systemuser', r: true },
  			ImportSequenceNumber: { a: 'importsequencenumber' },
  			IsCustomizable: { a: 'iscustomizable' },
  			IsManaged: { a: 'ismanaged', r: true },
  			ModifiedBy: { b: 'modifiedby', a: '_modifiedby_value', c: 'systemusers', d: 'systemuser', r: true },
  			ModifiedOn_UtcDateAndTime: { a: 'modifiedon', r: true },
  			ModifiedOnBehalfBy: { b: 'modifiedonbehalfby', a: '_modifiedonbehalfby_value', c: 'systemusers', d: 'systemuser', r: true },
  			msdyn_dataanalyticsreport_csrmanagerId: { a: 'msdyn_dataanalyticsreport_csrmanagerid' },
  			msdyn_dataanalyticsreportId: { a: 'msdyn_dataanalyticsreportid' },
  			msdyn_datainsightsandanalyticsfeatureId: { b: 'msdyn_datainsightsandanalyticsfeatureId', a: '_msdyn_datainsightsandanalyticsfeatureid_value', c: 'msdyn_datainsightsandanalyticsfeatures', d: 'msdyn_datainsightsandanalyticsfeature' },
  			msdyn_displayorder: { a: 'msdyn_displayorder' },
  			msdyn_IsVisible: { a: 'msdyn_isvisible' },
  			msdyn_name: { a: 'msdyn_name' },
  			OrganizationId: { b: 'organizationid', a: '_organizationid_value', c: 'organizations', d: 'organization', r: true },
  			OverriddenCreatedOn_UtcDateOnly: { a: 'overriddencreatedon' },
  			OverwriteTime_UtcDateAndTime: { a: 'overwritetime', r: true },
  			SolutionId: { a: 'solutionid', r: true },
  			statecode: { a: 'statecode' },
  			statuscode: { a: 'statuscode' },
  			SupportingSolutionId: { a: 'supportingsolutionid', r: true },
  			TimeZoneRuleVersionNumber: { a: 'timezoneruleversionnumber' },
  			UTCConversionTimeZoneCode: { a: 'utcconversiontimezonecode' },
  			VersionNumber: { a: 'versionnumber', r: true }
  		};
  		if (e === undefined) e = {};
  		var u = {};
  		for (var field in msdyn_dataanalyticsreport_csrmanager) {
  			var a = msdyn_dataanalyticsreport_csrmanager[field].a;
  			var b = msdyn_dataanalyticsreport_csrmanager[field].b;
  			var c = msdyn_dataanalyticsreport_csrmanager[field].c;
  			var d = msdyn_dataanalyticsreport_csrmanager[field].d;
  			var g = msdyn_dataanalyticsreport_csrmanager[field].g;
  			var r = msdyn_dataanalyticsreport_csrmanager[field].r;
  			msdyn_dataanalyticsreport_csrmanager[field] = webApiField(e, a, b, c, d, r, u, g);
  		}
  		msdyn_dataanalyticsreport_csrmanager.Entity = u;
  		msdyn_dataanalyticsreport_csrmanager.EntityName = 'msdyn_dataanalyticsreport_csrmanager';
  		msdyn_dataanalyticsreport_csrmanager.EntityCollectionName = 'msdyn_dataanalyticsreport_csrmanagers';
  		msdyn_dataanalyticsreport_csrmanager['@odata.etag'] = e['@odata.etag'];
  		msdyn_dataanalyticsreport_csrmanager.getAliasedValue = function (alias, isMultiOptionSet) {
  			if (e[alias] === undefined || e[alias] === null) {
  				return null;
  			}
  			if (isMultiOptionSet) {
  				return e[alias].toString().split(',').map(function (item) { return parseInt(item, 10); });
  			}
  			return e[alias];
  		}
  		msdyn_dataanalyticsreport_csrmanager.getAliasedFormattedValue = function (alias, isMultiOptionSet) {
  			if (e[alias + f] === undefined || e[alias + f] === null) {
  				return EMPTY_STRING;
  			}
  			if (isMultiOptionSet) {
  				return e[alias + f].toString().split(';').map(function (item) { return item.trim(); });
  			}
  			return e[alias + f];
  		}
  		return msdyn_dataanalyticsreport_csrmanager;
  	};
  })(DevKit || (DevKit = {}));
  /** @namespace OptionSet */
  var OptionSet;
  (function (OptionSet) {
  	OptionSet.msdyn_dataanalyticsreport_csrmanager = {
  		ComponentState : {
  			Deleted: 2,
  			Deleted_Unpublished: 3,
  			Published: 0,
  			Unpublished: 1
  		},
  		statecode : {
  			Active: 0,
  			Inactive: 1
  		},
  		statuscode : {
  			Active: 1,
  			Inactive: 2
  		},
          RollupState : {
              NotCalculated: 0,
              Calculated: 1,
              OverflowError: 2,
              OtherError: 3,
              RetryLimitExceeded: 4,
              HierarchicalRecursionLimitReached: 5,
              LoopDetected: 6
          }
  
  	};
  })(OptionSet || (OptionSet = {}));