/*
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

import * as moment from "moment";


/**
 * @class
 * Initializes a new instance of the DateTimeCounts class.
 * @constructor
 * @member {string} [datetime] the ISO 8601 datetime
 * @member {number} [count] count of the object
 */
export interface DateTimeCounts {
  datetime?: string;
  count?: number;
}

/**
 * @class
 * Initializes a new instance of the ActiveDeviceCounts class.
 * @constructor
 * @member {array} [daily] the active device count for each interval
 * @member {array} [weekly] the active device count for each interval with a
 * week's retention
 * @member {array} [monthly] the active device count for each interval with a
 * month's retention
 */
export interface ActiveDeviceCounts {
  daily?: DateTimeCounts[];
  weekly?: DateTimeCounts[];
  monthly?: DateTimeCounts[];
}

/**
 * @class
 * Initializes a new instance of the Model class.
 * @constructor
 * @member {string} [modelName] model's name
 * @member {number} [count] count current of model
 * @member {number} [previousCount] count of previous model
 */
export interface Model {
  modelName?: string;
  count?: number;
  previousCount?: number;
}

/**
 * @class
 * Initializes a new instance of the AnalyticsModels class.
 * @constructor
 * @member {number} [total]
 * @member {array} [modelsProperty]
 */
export interface AnalyticsModels {
  total?: number;
  modelsProperty?: Model[];
}

/**
 * @class
 * Initializes a new instance of the AudienceSummary class.
 * @constructor
 * Audience definition.
 *
 * @member {string} [name] Audience name.
 * @member {string} [description] Audience description.
 * @member {number} [estimatedCount] Estimated audience size.
 * @member {string} [definition] Audience definition in OData format.
 * @member {string} [state] Audience state. Possible values include:
 * 'Calculating', 'Ready', 'Disabled'
 */
export interface AudienceSummary {
  name?: string;
  description?: string;
  estimatedCount?: number;
  definition?: string;
  state?: string;
}

/**
 * @class
 * Initializes a new instance of the Audience class.
 * @constructor
 * Audience with details.
 *
 * @member {boolean} [enabled] Default value: true .
 * @member {object} [customProperties] Custom properties used in the
 * definition.
 * @member {number} [estimatedTotalCount] Estimated total audience size.
 * @member {date} [timestamp] Date the audience was last refreshed.
 */
export interface Audience extends AudienceSummary {
  enabled?: boolean;
  customProperties?: { [propertyName: string]: string };
  estimatedTotalCount?: number;
  timestamp?: Date;
}

/**
 * @class
 * Initializes a new instance of the AudienceDefinition class.
 * @constructor
 * Audience definition.
 *
 * @member {string} [description] Audience description.
 * @member {string} definition Audience definition in OData format.
 * @member {boolean} [enabled] Default value: true .
 * @member {object} [customProperties] Custom properties used in the
 * definition.
 */
export interface AudienceDefinition {
  description?: string;
  definition: string;
  enabled?: boolean;
  customProperties?: { [propertyName: string]: string };
}

/**
 * @class
 * Initializes a new instance of the AudienceDevicePropertiesListResult class.
 * @constructor
 * List of device properties.
 *
 * @member {object} values List of device properties.
 */
export interface AudienceDevicePropertiesListResult {
  values: { [propertyName: string]: string };
}

/**
 * @class
 * Initializes a new instance of the AudienceDevicePropertyValuesListResult class.
 * @constructor
 * List of device property values.
 *
 * @member {array} values List of device property values.
 */
export interface AudienceDevicePropertyValuesListResult {
  values: string[];
}

/**
 * @class
 * Initializes a new instance of the AudienceListResult class.
 * @constructor
 * List of audiences.
 *
 * @member {array} values List of audiences.
 * @member {string} [nextLink]
 */
export interface AudienceListResult {
  values: AudienceSummary[];
  nextLink?: string;
}

/**
 * @class
 * Initializes a new instance of the AudienceTestResult class.
 * @constructor
 * Audience test result.
 *
 * @member {string} [definition] Audience definition in OData format.
 * @member {object} [customProperties] Custom properties used in the
 * definition.
 * @member {number} [estimatedCount] Estimated audience size.
 * @member {number} [estimatedTotalCount] Estimated total audience size.
 */
export interface AudienceTestResult {
  definition?: string;
  customProperties?: { [propertyName: string]: string };
  estimatedCount?: number;
  estimatedTotalCount?: number;
}

/**
 * @class
 * Initializes a new instance of the CrashCounts class.
 * @constructor
 * @member {number} [count] total crash count
 * @member {array} [crashes] the total crash count for day
 */
export interface CrashCounts {
  count?: number;
  crashes?: DateTimeCounts[];
}

/**
 * @class
 * Initializes a new instance of the DateTimePercentages class.
 * @constructor
 * @member {string} [datetime] the ISO 8601 datetime
 * @member {number} [percentage] percentage of the object
 */
export interface DateTimePercentages {
  datetime?: string;
  percentage?: number;
}

/**
 * @class
 * Initializes a new instance of the CrashFreeDevicePercentages class.
 * @constructor
 * @member {number} [averagePercentage] Average percentage
 * @member {array} [dailyPercentages] The crash-free percentage per day.
 */
export interface CrashFreeDevicePercentages {
  averagePercentage?: number;
  dailyPercentages?: DateTimePercentages[];
}

/**
 * @class
 * Initializes a new instance of the CrashGroupAndVersion class.
 * @constructor
 * @member {string} [crashGroupId]
 * @member {string} [appVersion]
 */
export interface CrashGroupAndVersion {
  crashGroupId?: string;
  appVersion?: string;
}

/**
 * @class
 * Initializes a new instance of the CrashGroupContainer class.
 * @constructor
 * @member {array} crashGroups
 */
export interface CrashGroupContainer {
  crashGroups: CrashGroupAndVersion[];
}

/**
 * @class
 * Initializes a new instance of the CrashGroupModel class.
 * @constructor
 * @member {string} [modelName] model's name
 * @member {number} [crashCount] count of model
 */
export interface CrashGroupModel {
  modelName?: string;
  crashCount?: number;
}

/**
 * @class
 * Initializes a new instance of the CrashGroupModels class.
 * @constructor
 * @member {number} [crashCount]
 * @member {array} [modelsProperty]
 */
export interface CrashGroupModels {
  crashCount?: number;
  modelsProperty?: CrashGroupModel[];
}

/**
 * @class
 * Initializes a new instance of the CrashGroupOperatingSystem class.
 * @constructor
 * @member {string} [operatingSystemName] OS name
 * @member {number} [crashCount] count of OS
 */
export interface CrashGroupOperatingSystem {
  operatingSystemName?: string;
  crashCount?: number;
}

/**
 * @class
 * Initializes a new instance of the CrashGroupOperatingSystems class.
 * @constructor
 * @member {number} [crashCount]
 * @member {array} [operatingSystems]
 */
export interface CrashGroupOperatingSystems {
  crashCount?: number;
  operatingSystems?: CrashGroupOperatingSystem[];
}

/**
 * @class
 * Initializes a new instance of the CrashOverall class.
 * @constructor
 * @member {number} [crashCount]
 * @member {number} [deviceCount]
 */
export interface CrashOverall {
  crashCount?: number;
  deviceCount?: number;
}

/**
 * @class
 * Initializes a new instance of the CrashesOverallItem class.
 * @constructor
 * @member {string} [crashGroupId]
 * @member {string} [appVersion]
 * @member {object} [overall]
 * @member {number} [overall.crashCount]
 * @member {number} [overall.deviceCount]
 */
export interface CrashesOverallItem {
  crashGroupId?: string;
  appVersion?: string;
  overall?: CrashOverall;
}

/**
 * @class
 * Initializes a new instance of the DateTimeDecimalCounts class.
 * @constructor
 * @member {string} [datetime] the ISO 8601 datetime
 * @member {number} [count] decimal count of the object
 */
export interface DateTimeDecimalCounts {
  datetime?: string;
  count?: number;
}

/**
 * @class
 * Initializes a new instance of the Device class.
 * @constructor
 * Device characteristics.
 *
 * @member {string} sdkName Name of the SDK. Consists of the name of the SDK
 * and the platform, e.g. "appcenter.ios", "hockeysdk.android".
 * @member {string} sdkVersion Version of the SDK in semver format, e.g.
 * "1.2.0" or "0.12.3-alpha.1".
 * @member {string} [wrapperSdkVersion] Version of the wrapper SDK in semver
 * format. When the SDK is embedding another base SDK (for example
 * Xamarin.Android wraps Android), the Xamarin specific version is populated
 * into this field while sdkVersion refers to the original Android SDK.
 * @member {string} [wrapperSdkName] Name of the wrapper SDK. Consists of the
 * name of the SDK and the wrapper platform, e.g. "appcenter.xamarin",
 * "hockeysdk.cordova".
 * @member {string} [model] Device model (example: iPad2,3).
 * @member {string} [oemName] Device manufacturer (example: HTC).
 * @member {string} osName OS name (example: iOS). The following OS names are
 * standardized (non-exclusive): Android, iOS, macOS, tvOS, Windows.
 * @member {string} osVersion OS version (example: 9.3.0).
 * @member {string} [osBuild] OS build code (example: LMY47X).
 * @member {number} [osApiLevel] API level when applicable like in Android
 * (example: 15).
 * @member {string} locale Language code (example: en_US).
 * @member {number} timeZoneOffset The offset in minutes from UTC for the
 * device time zone, including daylight savings time.
 * @member {string} [screenSize] Screen size of the device in pixels (example:
 * 640x480).
 * @member {string} appVersion Application version name, e.g. 1.1.0
 * @member {string} [carrierName] Carrier name (for mobile devices).
 * @member {string} [carrierCode] Carrier country code (for mobile devices).
 * @member {string} [carrierCountry] Carrier country.
 * @member {string} appBuild The app's build number, e.g. 42.
 * @member {string} [appNamespace] The bundle identifier, package identifier,
 * or namespace, depending on what the individual plattforms use,  .e.g
 * com.microsoft.example.
 * @member {string} [liveUpdateReleaseLabel] Label that is used to identify
 * application code 'version' released via Live Update beacon running on device
 * @member {string} [liveUpdateDeploymentKey] Identifier of environment that
 * current application release belongs to, deployment key then maps to
 * environment like Production, Staging.
 * @member {string} [liveUpdatePackageHash] Hash of all files (ReactNative or
 * Cordova) deployed to device via LiveUpdate beacon. Helps identify the
 * Release version on device or need to download updates in future.
 * @member {string} [wrapperRuntimeVersion] Version of the wrapper technology
 * framework (Xamarin runtime version or ReactNative or Cordova etc...). See
 * wrapper_sdk_name to see if this version refers to Xamarin or ReactNative or
 * other.
 */
export interface Device {
  sdkName: string;
  sdkVersion: string;
  wrapperSdkVersion?: string;
  wrapperSdkName?: string;
  model?: string;
  oemName?: string;
  osName: string;
  osVersion: string;
  osBuild?: string;
  osApiLevel?: number;
  locale: string;
  timeZoneOffset: number;
  screenSize?: string;
  appVersion: string;
  carrierName?: string;
  carrierCode?: string;
  carrierCountry?: string;
  appBuild: string;
  appNamespace?: string;
  liveUpdateReleaseLabel?: string;
  liveUpdateDeploymentKey?: string;
  liveUpdatePackageHash?: string;
  wrapperRuntimeVersion?: string;
}

/**
 * @class
 * Initializes a new instance of the ErrorCounts class.
 * @constructor
 * @member {number} [count] total error count
 * @member {array} [crashes] the total error count for day
 */
export interface ErrorCounts {
  count?: number;
  crashes?: DateTimeCounts[];
}

/**
 * @class
 * Initializes a new instance of the ErrorStackFrame class.
 * @constructor
 * frame belonging to the reason of the crash
 *
 * @member {string} [className] name of the class
 * @member {string} [method] name of the method
 * @member {boolean} [classMethod] is a class method
 * @member {string} [file] name of the file
 * @member {number} [line] line number
 * @member {boolean} [appCode] this line isn't from any framework
 * @member {string} [frameworkName] Name of the framework
 * @member {string} [codeFormatted] Formatted frame string
 * @member {string} [codeRaw] Unformatted Frame string
 * @member {string} [language] programming language of the frame. Possible
 * values include: 'JavaScript', 'CSharp', 'Objective-C', 'Objective-Cpp',
 * 'Cpp', 'C', 'Swift', 'Java', 'Unknown'
 * @member {string} [methodParams] parameters of the frames method
 * @member {string} [exceptionType] Exception type.
 * @member {string} [osExceptionType] OS exception type. (aka. SIGNAL)
 */
export interface ErrorStackFrame {
  className?: string;
  method?: string;
  classMethod?: boolean;
  file?: string;
  line?: number;
  appCode?: boolean;
  frameworkName?: string;
  codeFormatted?: string;
  codeRaw?: string;
  language?: string;
  methodParams?: string;
  exceptionType?: string;
  osExceptionType?: string;
}

/**
 * @class
 * Initializes a new instance of the ErrorGroup class.
 * @constructor
 * @member {string} errorGroupId
 * @member {string} appVersion
 * @member {string} status Possible values include: 'open', 'closed', 'ignored'
 * @member {number} count
 * @member {number} deviceCount
 * @member {date} firstOccurrence
 * @member {date} lastOccurrence
 * @member {string} [summary]
 * @member {object} [reasonFrame]
 * @member {string} [reasonFrame.className] name of the class
 * @member {string} [reasonFrame.method] name of the method
 * @member {boolean} [reasonFrame.classMethod] is a class method
 * @member {string} [reasonFrame.file] name of the file
 * @member {number} [reasonFrame.line] line number
 * @member {boolean} [reasonFrame.appCode] this line isn't from any framework
 * @member {string} [reasonFrame.frameworkName] Name of the framework
 * @member {string} [reasonFrame.codeFormatted] Formatted frame string
 * @member {string} [reasonFrame.codeRaw] Unformatted Frame string
 * @member {string} [reasonFrame.language] programming language of the frame.
 * Possible values include: 'JavaScript', 'CSharp', 'Objective-C',
 * 'Objective-Cpp', 'Cpp', 'C', 'Swift', 'Java', 'Unknown'
 * @member {string} [reasonFrame.methodParams] parameters of the frames method
 * @member {string} [reasonFrame.exceptionType] Exception type.
 * @member {string} [reasonFrame.osExceptionType] OS exception type. (aka.
 * SIGNAL)
 */
export interface ErrorGroup {
  errorGroupId: string;
  appVersion: string;
  status: string;
  count: number;
  deviceCount: number;
  firstOccurrence: Date;
  lastOccurrence: Date;
  summary?: string;
  reasonFrame?: ErrorStackFrame;
}

/**
 * @class
 * Initializes a new instance of the ErrorGroups class.
 * @constructor
 * @member {array} [errorGroups]
 */
export interface ErrorGroups {
  errorGroups?: ErrorGroup[];
}

/**
 * @class
 * Initializes a new instance of the Event class.
 * @constructor
 * @member {string} [id]
 * @member {string} [name]
 * @member {number} [deviceCount]
 * @member {number} [previousDeviceCount] the device count of previous time
 * range of the event
 * @member {number} [count]
 * @member {number} [previousCount] the event count of previous time range of
 * the event
 * @member {number} [countPerDevice]
 * @member {number} [countPerSession]
 */
export interface Event {
  id?: string;
  name?: string;
  deviceCount?: number;
  previousDeviceCount?: number;
  count?: number;
  previousCount?: number;
  countPerDevice?: number;
  countPerSession?: number;
}

/**
 * @class
 * Initializes a new instance of the EventCount class.
 * @constructor
 * @member {number} [totalCount]
 * @member {number} [previousTotalCount]
 * @member {array} [count]
 */
export interface EventCount {
  totalCount?: number;
  previousTotalCount?: number;
  count?: DateTimeCounts[];
}

/**
 * @class
 * Initializes a new instance of the EventCountPerDevice class.
 * @constructor
 * @member {number} [avgCountPerDevice]
 * @member {number} [previousAvgCountPerDevice]
 * @member {array} [countPerDevice]
 */
export interface EventCountPerDevice {
  avgCountPerDevice?: number;
  previousAvgCountPerDevice?: number;
  countPerDevice?: DateTimeDecimalCounts[];
}

/**
 * @class
 * Initializes a new instance of the EventCountPerSession class.
 * @constructor
 * @member {number} [avgCountPerSession]
 * @member {number} [previousAvgCountPerSession]
 * @member {array} [countPerSession]
 */
export interface EventCountPerSession {
  avgCountPerSession?: number;
  previousAvgCountPerSession?: number;
  countPerSession?: DateTimeDecimalCounts[];
}

/**
 * @class
 * Initializes a new instance of the EventDeviceCount class.
 * @constructor
 * @member {number} [totalDevices]
 * @member {number} [totalDevicesWithEvent]
 * @member {number} [previousTotalDevicesWithEvent]
 * @member {array} [devicesCount]
 */
export interface EventDeviceCount {
  totalDevices?: number;
  totalDevicesWithEvent?: number;
  previousTotalDevicesWithEvent?: number;
  devicesCount?: DateTimeCounts[];
}

/**
 * @class
 * Initializes a new instance of the EventProperties class.
 * @constructor
 * Event properties during the time range
 *
 * @member {array} [eventProperties]
 */
export interface EventProperties {
  eventProperties?: string[];
}

/**
 * @class
 * Initializes a new instance of the EventPropertyValue class.
 * @constructor
 * An event property value with counts
 *
 * @member {string} [name] The event property value name
 * @member {number} [count] The count of the the event property value
 * @member {number} [previousCount] The count of previous time range of the
 * event property value
 */
export interface EventPropertyValue {
  name?: string;
  count?: number;
  previousCount?: number;
}

/**
 * @class
 * Initializes a new instance of the EventPropertyValues class.
 * @constructor
 * Event property value counts during the time range in descending order
 *
 * @member {number} [total] The total property value counts
 * @member {array} [values] The event property values
 */
export interface EventPropertyValues {
  total?: number;
  values?: EventPropertyValue[];
}

/**
 * @class
 * Initializes a new instance of the Events class.
 * @constructor
 * @member {array} [events]
 * @member {number} [total] the total count of events
 * @member {number} [totalDevices] the active device over this period
 */
export interface Events {
  events?: Event[];
  total?: number;
  totalDevices?: number;
}

/**
 * @class
 * Initializes a new instance of the GenericLog class.
 * @constructor
 * Generic log.
 *
 * @member {string} type Log type.
 * . Possible values include: 'event', 'page', 'start_session', 'error',
 * 'push_installation', 'start_service', 'custom_properties'
 * @member {date} timestamp Log creation timestamp.
 * @member {uuid} installId Install ID.
 * @member {uuid} [sessionId] Session ID.
 * @member {string} [eventId] Event ID.
 * @member {string} [eventName] Event name.
 * @member {string} [messageId] Message ID.
 * @member {object} [properties] event specific properties.
 * @member {object} device
 * @member {string} [device.sdkName] Name of the SDK. Consists of the name of
 * the SDK and the platform, e.g. "appcenter.ios", "hockeysdk.android".
 * @member {string} [device.sdkVersion] Version of the SDK in semver format,
 * e.g. "1.2.0" or "0.12.3-alpha.1".
 * @member {string} [device.wrapperSdkVersion] Version of the wrapper SDK in
 * semver format. When the SDK is embedding another base SDK (for example
 * Xamarin.Android wraps Android), the Xamarin specific version is populated
 * into this field while sdkVersion refers to the original Android SDK.
 * @member {string} [device.wrapperSdkName] Name of the wrapper SDK. Consists
 * of the name of the SDK and the wrapper platform, e.g. "appcenter.xamarin",
 * "hockeysdk.cordova".
 * @member {string} [device.model] Device model (example: iPad2,3).
 * @member {string} [device.oemName] Device manufacturer (example: HTC).
 * @member {string} [device.osName] OS name (example: iOS). The following OS
 * names are standardized (non-exclusive): Android, iOS, macOS, tvOS, Windows.
 * @member {string} [device.osVersion] OS version (example: 9.3.0).
 * @member {string} [device.osBuild] OS build code (example: LMY47X).
 * @member {number} [device.osApiLevel] API level when applicable like in
 * Android (example: 15).
 * @member {string} [device.locale] Language code (example: en_US).
 * @member {number} [device.timeZoneOffset] The offset in minutes from UTC for
 * the device time zone, including daylight savings time.
 * @member {string} [device.screenSize] Screen size of the device in pixels
 * (example: 640x480).
 * @member {string} [device.appVersion] Application version name, e.g. 1.1.0
 * @member {string} [device.carrierName] Carrier name (for mobile devices).
 * @member {string} [device.carrierCode] Carrier country code (for mobile
 * devices).
 * @member {string} [device.carrierCountry] Carrier country.
 * @member {string} [device.appBuild] The app's build number, e.g. 42.
 * @member {string} [device.appNamespace] The bundle identifier, package
 * identifier, or namespace, depending on what the individual plattforms use,
 * .e.g com.microsoft.example.
 * @member {string} [device.liveUpdateReleaseLabel] Label that is used to
 * identify application code 'version' released via Live Update beacon running
 * on device
 * @member {string} [device.liveUpdateDeploymentKey] Identifier of environment
 * that current application release belongs to, deployment key then maps to
 * environment like Production, Staging.
 * @member {string} [device.liveUpdatePackageHash] Hash of all files
 * (ReactNative or Cordova) deployed to device via LiveUpdate beacon. Helps
 * identify the Release version on device or need to download updates in
 * future.
 * @member {string} [device.wrapperRuntimeVersion] Version of the wrapper
 * technology framework (Xamarin runtime version or ReactNative or Cordova
 * etc...). See wrapper_sdk_name to see if this version refers to Xamarin or
 * ReactNative or other.
 */
export interface GenericLog {
  type: string;
  timestamp: Date;
  installId: string;
  sessionId?: string;
  eventId?: string;
  eventName?: string;
  messageId?: string;
  properties?: { [propertyName: string]: string };
  device: Device;
}

/**
 * @class
 * Initializes a new instance of the GenericLogContainer class.
 * @constructor
 * @member {boolean} [exceededMaxLimit] indicates if the number of available
 * logs are more than the max allowed return limit(100).
 * @member {date} [lastReceivedLogTimestamp] the timestamp of the last log
 * received. This value can be used as the start time parameter in the
 * consecutive API call.
 * @member {array} logs the list of logs
 */
export interface GenericLogContainer {
  exceededMaxLimit?: boolean;
  lastReceivedLogTimestamp?: Date;
  logs: GenericLog[];
}

/**
 * @class
 * Initializes a new instance of the Release class.
 * @constructor
 * @member {string} release Release Id.
 */
export interface Release {
  release: string;
}

/**
 * @class
 * Initializes a new instance of the ReleaseWithDistributionGroup class.
 * @constructor
 * @member {string} [distributionGroup] Distribution group Id.
 */
export interface ReleaseWithDistributionGroup extends Release {
  distributionGroup?: string;
}

/**
 * @class
 * Initializes a new instance of the GetReleasesContainer class.
 * @constructor
 * @member {array} releases
 */
export interface GetReleasesContainer {
  releases: ReleaseWithDistributionGroup[];
}

/**
 * @class
 * Initializes a new instance of the Language class.
 * @constructor
 * @member {string} [languageName] language's name
 * @member {number} [count] count current of language
 * @member {number} [previousCount] count of previous lanugage
 */
export interface Language {
  languageName?: string;
  count?: number;
  previousCount?: number;
}

/**
 * @class
 * Initializes a new instance of the Languages class.
 * @constructor
 * @member {number} [total]
 * @member {array} [languages]
 */
export interface Languages {
  total?: number;
  languages?: Language[];
}

/**
 * @class
 * Initializes a new instance of the LogFlowDevice class.
 * @constructor
 * Device characteristics.
 *
 * @member {string} sdkName Name of the SDK. Consists of the name of the SDK
 * and the platform, e.g. "appcenter.ios", "hockeysdk.android".
 * @member {string} sdkVersion Version of the SDK in semver format, e.g.
 * "1.2.0" or "0.12.3-alpha.1".
 * @member {string} [wrapperSdkVersion] Version of the wrapper SDK in semver
 * format. When the SDK is embedding another base SDK (for example
 * Xamarin.Android wraps Android), the Xamarin specific version is populated
 * into this field while sdkVersion refers to the original Android SDK.
 * @member {string} [wrapperSdkName] Name of the wrapper SDK. Consists of the
 * name of the SDK and the wrapper platform, e.g. "appcenter.xamarin",
 * "hockeysdk.cordova".
 * @member {string} [model] Device model (example: iPad2,3).
 * @member {string} [oemName] Device manufacturer (example: HTC).
 * @member {string} osName OS name (example: iOS). The following OS names are
 * standardized (non-exclusive): Android, iOS, macOS, tvOS, Windows.
 * @member {string} osVersion OS version (example: 9.3.0).
 * @member {string} [osBuild] OS build code (example: LMY47X).
 * @member {number} [osApiLevel] API level when applicable like in Android
 * (example: 15).
 * @member {string} locale Language code (example: en_US).
 * @member {number} timeZoneOffset The offset in minutes from UTC for the
 * device time zone, including daylight savings time.
 * @member {string} [screenSize] Screen size of the device in pixels (example:
 * 640x480).
 * @member {string} appVersion Application version name, e.g. 1.1.0
 * @member {string} [carrierName] Carrier name (for mobile devices).
 * @member {string} [carrierCode] Carrier country code (for mobile devices).
 * @member {string} [carrierCountry] Carrier country.
 * @member {string} appBuild The app's build number, e.g. 42.
 * @member {string} [appNamespace] The bundle identifier, package identifier,
 * or namespace, depending on what the individual plattforms use,  .e.g
 * com.microsoft.example.
 * @member {string} [liveUpdateReleaseLabel] Label that is used to identify
 * application code 'version' released via Live Update beacon running on device
 * @member {string} [liveUpdateDeploymentKey] Identifier of environment that
 * current application release belongs to, deployment key then maps to
 * environment like Production, Staging.
 * @member {string} [liveUpdatePackageHash] Hash of all files (ReactNative or
 * Cordova) deployed to device via LiveUpdate beacon. Helps identify the
 * Release version on device or need to download updates in future.
 * @member {string} [wrapperRuntimeVersion] Version of the wrapper technology
 * framework (Xamarin runtime version or ReactNative or Cordova etc...). See
 * wrapper_sdk_name to see if this version refers to Xamarin or ReactNative or
 * other.
 */
export interface LogFlowDevice {
  sdkName: string;
  sdkVersion: string;
  wrapperSdkVersion?: string;
  wrapperSdkName?: string;
  model?: string;
  oemName?: string;
  osName: string;
  osVersion: string;
  osBuild?: string;
  osApiLevel?: number;
  locale: string;
  timeZoneOffset: number;
  screenSize?: string;
  appVersion: string;
  carrierName?: string;
  carrierCode?: string;
  carrierCountry?: string;
  appBuild: string;
  appNamespace?: string;
  liveUpdateReleaseLabel?: string;
  liveUpdateDeploymentKey?: string;
  liveUpdatePackageHash?: string;
  wrapperRuntimeVersion?: string;
}

/**
 * @class
 * Initializes a new instance of the LogFlowGenericLog class.
 * @constructor
 * Generic log.
 *
 * @member {string} type Log type.
 * . Possible values include: 'event', 'page', 'start_session', 'error',
 * 'push_installation', 'start_service', 'custom_properties'
 * @member {date} timestamp Log creation timestamp.
 * @member {uuid} installId Install ID.
 * @member {uuid} [sessionId] Session ID.
 * @member {string} [eventId] Event ID.
 * @member {string} [eventName] Event name.
 * @member {string} [messageId] Message ID.
 * @member {object} [properties] event specific properties.
 * @member {object} device
 * @member {string} [device.sdkName] Name of the SDK. Consists of the name of
 * the SDK and the platform, e.g. "appcenter.ios", "hockeysdk.android".
 * @member {string} [device.sdkVersion] Version of the SDK in semver format,
 * e.g. "1.2.0" or "0.12.3-alpha.1".
 * @member {string} [device.wrapperSdkVersion] Version of the wrapper SDK in
 * semver format. When the SDK is embedding another base SDK (for example
 * Xamarin.Android wraps Android), the Xamarin specific version is populated
 * into this field while sdkVersion refers to the original Android SDK.
 * @member {string} [device.wrapperSdkName] Name of the wrapper SDK. Consists
 * of the name of the SDK and the wrapper platform, e.g. "appcenter.xamarin",
 * "hockeysdk.cordova".
 * @member {string} [device.model] Device model (example: iPad2,3).
 * @member {string} [device.oemName] Device manufacturer (example: HTC).
 * @member {string} [device.osName] OS name (example: iOS). The following OS
 * names are standardized (non-exclusive): Android, iOS, macOS, tvOS, Windows.
 * @member {string} [device.osVersion] OS version (example: 9.3.0).
 * @member {string} [device.osBuild] OS build code (example: LMY47X).
 * @member {number} [device.osApiLevel] API level when applicable like in
 * Android (example: 15).
 * @member {string} [device.locale] Language code (example: en_US).
 * @member {number} [device.timeZoneOffset] The offset in minutes from UTC for
 * the device time zone, including daylight savings time.
 * @member {string} [device.screenSize] Screen size of the device in pixels
 * (example: 640x480).
 * @member {string} [device.appVersion] Application version name, e.g. 1.1.0
 * @member {string} [device.carrierName] Carrier name (for mobile devices).
 * @member {string} [device.carrierCode] Carrier country code (for mobile
 * devices).
 * @member {string} [device.carrierCountry] Carrier country.
 * @member {string} [device.appBuild] The app's build number, e.g. 42.
 * @member {string} [device.appNamespace] The bundle identifier, package
 * identifier, or namespace, depending on what the individual plattforms use,
 * .e.g com.microsoft.example.
 * @member {string} [device.liveUpdateReleaseLabel] Label that is used to
 * identify application code 'version' released via Live Update beacon running
 * on device
 * @member {string} [device.liveUpdateDeploymentKey] Identifier of environment
 * that current application release belongs to, deployment key then maps to
 * environment like Production, Staging.
 * @member {string} [device.liveUpdatePackageHash] Hash of all files
 * (ReactNative or Cordova) deployed to device via LiveUpdate beacon. Helps
 * identify the Release version on device or need to download updates in
 * future.
 * @member {string} [device.wrapperRuntimeVersion] Version of the wrapper
 * technology framework (Xamarin runtime version or ReactNative or Cordova
 * etc...). See wrapper_sdk_name to see if this version refers to Xamarin or
 * ReactNative or other.
 */
export interface LogFlowGenericLog {
  type: string;
  timestamp: Date;
  installId: string;
  sessionId?: string;
  eventId?: string;
  eventName?: string;
  messageId?: string;
  properties?: { [propertyName: string]: string };
  device: LogFlowDevice;
}

/**
 * @class
 * Initializes a new instance of the LogFlowGenericLogContainer class.
 * @constructor
 * @member {boolean} [exceededMaxLimit] indicates if the number of available
 * logs are more than the max allowed return limit(100).
 * @member {date} [lastReceivedLogTimestamp] the timestamp of the last log
 * received. This value can be used as the start time parameter in the
 * consecutive API call.
 * @member {array} logs the list of logs
 */
export interface LogFlowGenericLogContainer {
  exceededMaxLimit?: boolean;
  lastReceivedLogTimestamp?: Date;
  logs: LogFlowGenericLog[];
}

/**
 * @class
 * Initializes a new instance of the LogFlowLog class.
 * @constructor
 * @member {date} timestamp Log creation timestamp.
 * @member {uuid} installId Install ID.
 * @member {object} device
 * @member {string} [device.sdkName] Name of the SDK. Consists of the name of
 * the SDK and the platform, e.g. "appcenter.ios", "hockeysdk.android".
 * @member {string} [device.sdkVersion] Version of the SDK in semver format,
 * e.g. "1.2.0" or "0.12.3-alpha.1".
 * @member {string} [device.wrapperSdkVersion] Version of the wrapper SDK in
 * semver format. When the SDK is embedding another base SDK (for example
 * Xamarin.Android wraps Android), the Xamarin specific version is populated
 * into this field while sdkVersion refers to the original Android SDK.
 * @member {string} [device.wrapperSdkName] Name of the wrapper SDK. Consists
 * of the name of the SDK and the wrapper platform, e.g. "appcenter.xamarin",
 * "hockeysdk.cordova".
 * @member {string} [device.model] Device model (example: iPad2,3).
 * @member {string} [device.oemName] Device manufacturer (example: HTC).
 * @member {string} [device.osName] OS name (example: iOS). The following OS
 * names are standardized (non-exclusive): Android, iOS, macOS, tvOS, Windows.
 * @member {string} [device.osVersion] OS version (example: 9.3.0).
 * @member {string} [device.osBuild] OS build code (example: LMY47X).
 * @member {number} [device.osApiLevel] API level when applicable like in
 * Android (example: 15).
 * @member {string} [device.locale] Language code (example: en_US).
 * @member {number} [device.timeZoneOffset] The offset in minutes from UTC for
 * the device time zone, including daylight savings time.
 * @member {string} [device.screenSize] Screen size of the device in pixels
 * (example: 640x480).
 * @member {string} [device.appVersion] Application version name, e.g. 1.1.0
 * @member {string} [device.carrierName] Carrier name (for mobile devices).
 * @member {string} [device.carrierCode] Carrier country code (for mobile
 * devices).
 * @member {string} [device.carrierCountry] Carrier country.
 * @member {string} [device.appBuild] The app's build number, e.g. 42.
 * @member {string} [device.appNamespace] The bundle identifier, package
 * identifier, or namespace, depending on what the individual plattforms use,
 * .e.g com.microsoft.example.
 * @member {string} [device.liveUpdateReleaseLabel] Label that is used to
 * identify application code 'version' released via Live Update beacon running
 * on device
 * @member {string} [device.liveUpdateDeploymentKey] Identifier of environment
 * that current application release belongs to, deployment key then maps to
 * environment like Production, Staging.
 * @member {string} [device.liveUpdatePackageHash] Hash of all files
 * (ReactNative or Cordova) deployed to device via LiveUpdate beacon. Helps
 * identify the Release version on device or need to download updates in
 * future.
 * @member {string} [device.wrapperRuntimeVersion] Version of the wrapper
 * technology framework (Xamarin runtime version or ReactNative or Cordova
 * etc...). See wrapper_sdk_name to see if this version refers to Xamarin or
 * ReactNative or other.
 * @member {string} type Polymorphic Discriminator
 */
export interface LogFlowLog {
  timestamp: Date;
  installId: string;
  device: LogFlowDevice;
  type: string;
}

/**
 * @class
 * Initializes a new instance of the LogFlowLogContainer class.
 * @constructor
 * @member {boolean} [exceededMaxLimit] indicates if the number of available
 * logs are more than the max allowed return limit(100).
 * @member {date} [lastReceivedLogTimestamp] the timestamp of the last log
 * received. This value can be used as the start time parameter in the
 * consecutive API call.
 * @member {array} logs the list of logs
 */
export interface LogFlowLogContainer {
  exceededMaxLimit?: boolean;
  lastReceivedLogTimestamp?: Date;
  logs: LogFlowLog[];
}

/**
 * @class
 * Initializes a new instance of the OS class.
 * @constructor
 * @member {string} [osName] OS name
 * @member {number} [count] count current of OS
 * @member {number} [previousCount] count of previous OS
 */
export interface OS {
  osName?: string;
  count?: number;
  previousCount?: number;
}

/**
 * @class
 * Initializes a new instance of the OSes class.
 * @constructor
 * @member {number} [total]
 * @member {array} [oses]
 */
export interface OSes {
  total?: number;
  oses?: OS[];
}

/**
 * @class
 * Initializes a new instance of the Place class.
 * @constructor
 * The place code and the count
 *
 * @member {string} [code] the place code
 * @member {number} [count] the count of the this place
 * @member {number} [previousCount] the count of previous time range of the
 * place
 */
export interface Place {
  code?: string;
  count?: number;
  previousCount?: number;
}

/**
 * @class
 * Initializes a new instance of the Places class.
 * @constructor
 * Places and count during the time range in descending order
 *
 * @member {number} [total]
 * @member {array} [places]
 */
export interface Places {
  total?: number;
  places?: Place[];
}

/**
 * @class
 * Initializes a new instance of the ReleaseCount class.
 * @constructor
 * @member {string} releaseId
 * @member {string} [distributionGroup] Distribution group queried.
 * @member {number} uniqueCount Count of unique downloads against user id.
 * @member {number} totalCount Total count of downloads.
 */
export interface ReleaseCount {
  releaseId: string;
  distributionGroup?: string;
  uniqueCount: number;
  totalCount: number;
}

/**
 * @class
 * Initializes a new instance of the ReleaseCounts class.
 * @constructor
 * @member {number} [total]
 * @member {array} counts
 */
export interface ReleaseCounts {
  total?: number;
  counts: ReleaseCount[];
}

/**
 * @class
 * Initializes a new instance of the SessionDurationsDistributionDistributionItem class.
 * @constructor
 * @member {string} [bucket] the bucket name
 * @member {number} [count] the count of sessions in current bucket
 */
export interface SessionDurationsDistributionDistributionItem {
  bucket?: string;
  count?: number;
}

/**
 * @class
 * Initializes a new instance of the SessionDurationsDistribution class.
 * @constructor
 * @member {array} [distribution] the count of sessions in these buckets
 * @member {string} [previousAverageDuration] the previous average session
 * duration for previous time range
 * @member {string} [averageDuration] the average session duration for current
 * time range
 */
export interface SessionDurationsDistribution {
  distribution?: SessionDurationsDistributionDistributionItem[];
  previousAverageDuration?: string;
  averageDuration?: string;
}

/**
 * @class
 * Initializes a new instance of the SessionsPerDeviceSessionsPerUserItem class.
 * @constructor
 * @member {string} [datetime] the ISO 8601 datetime
 * @member {number} [count] count
 */
export interface SessionsPerDeviceSessionsPerUserItem {
  datetime?: string;
  count?: number;
}

/**
 * @class
 * Initializes a new instance of the SessionsPerDevice class.
 * @constructor
 * @member {number} [averageSessionsPerUser] average seesion per user
 * @member {number} [previousAverageSessionsPerUser] previous average session
 * per user
 * @member {number} [totalCount] total session per device count
 * @member {number} [previousTotalCount] previous total count
 * @member {array} [sessionsPerUser] the session count for each interval per
 * device
 */
export interface SessionsPerDevice {
  averageSessionsPerUser?: number;
  previousAverageSessionsPerUser?: number;
  totalCount?: number;
  previousTotalCount?: number;
  sessionsPerUser?: SessionsPerDeviceSessionsPerUserItem[];
}

/**
 * @class
 * Initializes a new instance of the Version class.
 * @constructor
 * @member {string} [version] version
 * @member {number} [count] version count
 * @member {number} [previousCount] the count of previous time range of the
 * version
 */
export interface Version {
  version?: string;
  count?: number;
  previousCount?: number;
}

/**
 * @class
 * Initializes a new instance of the Versions class.
 * @constructor
 * @member {array} [versions] list of version count
 * @member {number} [total] the total count of versions
 */
export interface Versions {
  versions?: Version[];
  total?: number;
}
