/*
 * 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 AppFeatures class.
 * @constructor
 * @member {boolean} [crashgroupModifyStatus] App supports modification of
 * crashgroup status
 * @member {boolean} [crashgroupModifyAnnotation] App supports modification of
 * crashgroup annotation
 * @member {boolean} [search] App supports search API
 * @member {boolean} [crashgroupAnalyticsCrashfreeusers] App supports the
 * 'crash free user' metric
 * @member {boolean} [crashgroupAnalyticsImpactedusers] App supports the
 * 'impacted users' metric
 * @member {boolean} [crashDownloadRaw] App supports download of raw crashes
 */
export interface AppFeatures {
  crashgroupModifyStatus?: boolean;
  crashgroupModifyAnnotation?: boolean;
  search?: boolean;
  crashgroupAnalyticsCrashfreeusers?: boolean;
  crashgroupAnalyticsImpactedusers?: boolean;
  crashDownloadRaw?: boolean;
}

/**
 * @class
 * Initializes a new instance of the AppCrashesInfo class.
 * @constructor
 * @member {boolean} hasCrashes
 * @member {object} features
 * @member {boolean} [features.crashgroupModifyStatus] App supports
 * modification of crashgroup status
 * @member {boolean} [features.crashgroupModifyAnnotation] App supports
 * modification of crashgroup annotation
 * @member {boolean} [features.search] App supports search API
 * @member {boolean} [features.crashgroupAnalyticsCrashfreeusers] App supports
 * the 'crash free user' metric
 * @member {boolean} [features.crashgroupAnalyticsImpactedusers] App supports
 * the 'impacted users' metric
 * @member {boolean} [features.crashDownloadRaw] App supports download of raw
 * crashes
 */
export interface AppCrashesInfo {
  hasCrashes: boolean;
  features: AppFeatures;
}

/**
 * @class
 * Initializes a new instance of the AppVersion class.
 * @constructor
 * @member {string} appVersionId
 * @member {string} appId
 * @member {string} displayName
 * @member {string} appVersion
 * @member {string} [buildNumber]
 */
export interface AppVersion {
  appVersionId: string;
  appId: string;
  displayName: string;
  appVersion: string;
  buildNumber?: string;
}

/**
 * @class
 * Initializes a new instance of the CrashDetails class.
 * @constructor
 * @member {string} [carrierCountry] Carrier country code (for mobile devices).
 * @member {string} [carrierName] Carrier name (for mobile devices).
 * @member {string} locale Language code (example: en_US).
 * @member {string} [osBuild] OS build code (example: LMY47X).
 * @member {boolean} rooted Whether the device where the crash occurred is
 * rooted or jailbroken
 * @member {string} screenSize Screen size of the device in pixels (example:
 * 640x480).
 * @member {date} [appStartTimestamp] Application launch timestamp (example:
 * 1985-04-12T23:20:50.52Z).
 */
export interface CrashDetails {
  carrierCountry?: string;
  carrierName?: string;
  locale: string;
  osBuild?: string;
  rooted: boolean;
  screenSize: string;
  appStartTimestamp?: Date;
}

/**
 * @class
 * Initializes a new instance of the StackFrame class.
 * @constructor
 * a single frame of a stack trace
 *
 * @member {string} [address] address of the frame
 * @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} codeRaw Raw frame string
 * @member {string} codeFormatted Formatted 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 {boolean} [relevant] frame should be shown always
 * @member {string} [methodParams] parameters of the frames method
 */
export interface StackFrame {
  address?: string;
  className?: string;
  method?: string;
  classMethod?: boolean;
  file?: string;
  line?: number;
  appCode: boolean;
  frameworkName?: string;
  codeRaw: string;
  codeFormatted: string;
  language?: string;
  relevant?: boolean;
  methodParams?: string;
}

/**
 * @class
 * Initializes a new instance of the Exception class.
 * @constructor
 * a exception
 *
 * @member {string} [reason] Reason of the exception
 * @member {string} [type] Type of the exception (NSSomethingException,
 * NullPointerException)
 * @member {array} frames frames of the excetpion
 * @member {boolean} [relevant] relevant exception (crashed)
 * @member {array} [innerExceptions]
 * @member {string} [platform] SDK/Platform this thread is beeing generated
 * from. Possible values include: 'ios', 'android', 'xamarin', 'react-native',
 * 'ndk', 'unity', 'other'
 */
export interface Exception {
  reason?: string;
  type?: string;
  frames: StackFrame[];
  relevant?: boolean;
  innerExceptions?: Exception[];
  platform?: string;
}

/**
 * @class
 * Initializes a new instance of the Thread class.
 * @constructor
 * a thread representation
 *
 * @member {string} title name of the thread
 * @member {array} frames frames of that thread
 * @member {object} [exception] potential additional exception happened in that
 * thread (Last Exception Backtrace)
 * @member {string} [exception.reason] Reason of the exception
 * @member {string} [exception.type] Type of the exception
 * (NSSomethingException, NullPointerException)
 * @member {array} [exception.frames] frames of the excetpion
 * @member {boolean} [exception.relevant] relevant exception (crashed)
 * @member {array} [exception.innerExceptions]
 * @member {string} [exception.platform] SDK/Platform this thread is beeing
 * generated from. Possible values include: 'ios', 'android', 'xamarin',
 * 'react-native', 'ndk', 'unity', 'other'
 * @member {boolean} [relevant] Shows if a thread is relevant or not. Is false
 * if all frames are non relevant, otherwise true
 * @member {string} [platform] SDK/Platform this thread is beeing generated
 * from. Possible values include: 'ios', 'android', 'xamarin', 'react-native',
 * 'ndk', 'unity', 'other'
 * @member {boolean} [crashed] True if this thread crashed
 */
export interface Thread {
  title: string;
  frames: StackFrame[];
  exception?: Exception;
  relevant?: boolean;
  platform?: string;
  crashed?: boolean;
}

/**
 * @class
 * Initializes a new instance of the Stacktrace class.
 * @constructor
 * a stacktrace in a processed and prettyfied way
 *
 * @member {string} [title]
 * @member {string} [reason]
 * @member {array} [threads]
 * @member {object} [exception]
 * @member {string} [exception.reason] Reason of the exception
 * @member {string} [exception.type] Type of the exception
 * (NSSomethingException, NullPointerException)
 * @member {array} [exception.frames] frames of the excetpion
 * @member {boolean} [exception.relevant] relevant exception (crashed)
 * @member {array} [exception.innerExceptions]
 * @member {string} [exception.platform] SDK/Platform this thread is beeing
 * generated from. Possible values include: 'ios', 'android', 'xamarin',
 * 'react-native', 'ndk', 'unity', 'other'
 */
export interface Stacktrace {
  title?: string;
  reason?: string;
  threads?: Thread[];
  exception?: Exception;
}

/**
 * @class
 * Initializes a new instance of the Crash class.
 * @constructor
 * @member {object} [details]
 * @member {string} [details.carrierCountry] Carrier country code (for mobile
 * devices).
 * @member {string} [details.carrierName] Carrier name (for mobile devices).
 * @member {string} [details.locale] Language code (example: en_US).
 * @member {string} [details.osBuild] OS build code (example: LMY47X).
 * @member {boolean} [details.rooted] Whether the device where the crash
 * occurred is rooted or jailbroken
 * @member {string} [details.screenSize] Screen size of the device in pixels
 * (example: 640x480).
 * @member {date} [details.appStartTimestamp] Application launch timestamp
 * (example: 1985-04-12T23:20:50.52Z).
 * @member {string} crashId
 * @member {string} [displayId]
 * @member {date} timestamp
 * @member {string} version
 * @member {string} build
 * @member {string} device
 * @member {string} [deviceName]
 * @member {string} osVersion
 * @member {string} [osType]
 * @member {object} [stacktrace]
 * @member {string} [stacktrace.title]
 * @member {string} [stacktrace.reason]
 * @member {array} [stacktrace.threads]
 * @member {object} [stacktrace.exception]
 * @member {string} [stacktrace.exception.reason] Reason of the exception
 * @member {string} [stacktrace.exception.type] Type of the exception
 * (NSSomethingException, NullPointerException)
 * @member {array} [stacktrace.exception.frames] frames of the excetpion
 * @member {boolean} [stacktrace.exception.relevant] relevant exception
 * (crashed)
 * @member {array} [stacktrace.exception.innerExceptions]
 * @member {string} [stacktrace.exception.platform] SDK/Platform this thread is
 * beeing generated from. Possible values include: 'ios', 'android', 'xamarin',
 * 'react-native', 'ndk', 'unity', 'other'
 * @member {string} userName
 * @member {string} [userEmail]
 */
export interface Crash {
  details?: CrashDetails;
  crashId: string;
  displayId?: string;
  timestamp: Date;
  version: string;
  build: string;
  device: string;
  deviceName?: string;
  osVersion: string;
  osType?: string;
  stacktrace?: Stacktrace;
  userName: string;
  userEmail?: string;
}

/**
 * @class
 * Initializes a new instance of the CrashAttachment class.
 * @constructor
 * @member {string} appId
 * @member {string} attachmentId
 * @member {string} crashId
 * @member {string} blobLocation
 * @member {string} contentType
 * @member {string} fileName
 * @member {date} createdTime
 * @member {number} size
 */
export interface CrashAttachment {
  appId: string;
  attachmentId: string;
  crashId: string;
  blobLocation: string;
  contentType: string;
  fileName: string;
  createdTime: Date;
  size: number;
}

/**
 * @class
 * Initializes a new instance of the CrashAttachmentLocation class.
 * @constructor
 * Location for downloading crash attachment
 *
 * @member {string} uri
 */
export interface CrashAttachmentLocation {
  uri: string;
}

/**
 * @class
 * Initializes a new instance of the ReasonStackFrame 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 ReasonStackFrame {
  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 CrashGroup class.
 * @constructor
 * @member {string} crashGroupId
 * @member {string} displayId
 * @member {string} appVersion
 * @member {string} build
 * @member {string} status Possible values include: 'open', 'closed', 'ignored'
 * @member {number} count
 * @member {number} [impactedUsers]
 * @member {date} firstOccurrence
 * @member {date} lastOccurrence
 * @member {string} [exception]
 * @member {string} crashReason
 * @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)
 * @member {boolean} fatal Crash or handled exception
 * @member {string} annotation
 */
export interface CrashGroup {
  crashGroupId: string;
  displayId: string;
  appVersion: string;
  build: string;
  status: string;
  count: number;
  impactedUsers?: number;
  firstOccurrence: Date;
  lastOccurrence: Date;
  exception?: string;
  crashReason: string;
  reasonFrame?: ReasonStackFrame;
  fatal: boolean;
  annotation: string;
}

/**
 * @class
 * Initializes a new instance of the CrashGroupChange class.
 * @constructor
 * @member {object} [status]
 * @member {string} [annotation]
 */
export interface CrashGroupChange {
  status?: any;
  annotation?: string;
}

/**
 * @class
 * Initializes a new instance of the CrashGroupsContainer class.
 * @constructor
 * @member {boolean} limitedResultSet
 * @member {string} [continuationToken] Cassandra request continuation token.
 * The token is used for pagination.
 * @member {array} crashGroups
 */
export interface CrashGroupsContainer {
  limitedResultSet: boolean;
  continuationToken?: string;
  crashGroups: CrashGroup[];
}

/**
 * @class
 * Initializes a new instance of the CrashRawLocation class.
 * @constructor
 * Location for downloading crash raw
 *
 * @member {string} uri
 */
export interface CrashRawLocation {
  uri: string;
}

/**
 * @class
 * Initializes a new instance of the HockeyAppCrashForwardingChange class.
 * @constructor
 * @member {boolean} [enableForwarding]
 */
export interface HockeyAppCrashForwardingChange {
  enableForwarding?: boolean;
}

/**
 * @class
 * Initializes a new instance of the HockeyAppCrashForwardingInfo class.
 * @constructor
 * @member {boolean} forwardingEnabled
 */
export interface HockeyAppCrashForwardingInfo {
  forwardingEnabled: boolean;
}

/**
 * @class
 * Initializes a new instance of the MissingSymbol class.
 * @constructor
 * missing symbol
 *
 * @member {string} symbolId symbol id
 * @member {string} name symbol name
 * @member {string} [platform] symbol plarform
 * @member {string} status symbol status. Possible values include: 'missing',
 * 'ignored', 'available'
 */
export interface MissingSymbol {
  symbolId: string;
  name: string;
  platform?: string;
  status: string;
}

/**
 * @class
 * Initializes a new instance of the MissingSymbolCrashGroup class.
 * @constructor
 * missing symbol crash group object
 *
 * @member {string} symbolGroupId id of the symbol group
 * @member {number} [crashCount] number of crashes that belong to this group
 * @member {string} appId application id
 * @member {string} appVer application version
 * @member {string} appBuild application build
 * @member {date} lastModified last update date for the group
 * @member {array} missingSymbols list of missing symbols
 * @member {string} status group status. Possible values include: 'active',
 * 'pending', 'closed'
 */
export interface MissingSymbolCrashGroup {
  symbolGroupId: string;
  crashCount?: number;
  appId: string;
  appVer: string;
  appBuild: string;
  lastModified: Date;
  missingSymbols: MissingSymbol[];
  status: string;
}

/**
 * @class
 * Initializes a new instance of the MissingSymbolCrashGroupsInfoResponse class.
 * @constructor
 * missing symbol groups
 *
 * @member {number} totalCrashCount total number of crashes for all missing
 * symbol groups
 */
export interface MissingSymbolCrashGroupsInfoResponse {
  totalCrashCount: number;
}

/**
 * @class
 * Initializes a new instance of the MissingSymbolCrashGroupsResponse class.
 * @constructor
 * grouped by missing symbols crashes response object
 *
 * @member {number} totalCrashCount total number of cashes for all the groups
 * @member {array} groups list of crash groups formed by missing symbols
 * combination
 */
export interface MissingSymbolCrashGroupsResponse {
  totalCrashCount: number;
  groups: MissingSymbolCrashGroup[];
}

/**
 * @class
 * Initializes a new instance of the SearchItem class.
 * @constructor
 * @member {string} crashId
 * @member {string} [displayId]
 * @member {date} timestamp
 * @member {string} version
 * @member {string} build
 * @member {string} device
 * @member {string} osVersion
 * @member {string} [osType]
 * @member {string} userName
 * @member {string} [userEmail]
 */
export interface SearchItem {
  crashId: string;
  displayId?: string;
  timestamp: Date;
  version: string;
  build: string;
  device: string;
  osVersion: string;
  osType?: string;
  userName: string;
  userEmail?: string;
}

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

/**
 * @class
 * Initializes a new instance of the Symbol class.
 * @constructor
 * @member {string} symbolId The unique id for this symbol (uuid)
 * @member {string} type The type of the symbol for the current symbol upload.
 * Possible values include: 'Apple', 'JavaScript', 'Breakpad',
 * 'AndroidProguard'
 * @member {string} appId The application that this symbol belongs to
 * @member {string} platform The platform that this symbol is associated with
 * @member {string} url The URL at which the client may download the symbol
 * file
 * @member {string} origin The origin of the symbol file. Possible values
 * include: 'System', 'User'
 * @member {array} alternateSymbolIds The other symbols in the same file
 * @member {string} status Whether the symbol is ignored. Possible values
 * include: 'available', 'ignored'
 * @member {string} [version] App version. Optional.
 * @member {string} [build] App build. Optional.
 */
export interface Symbol {
  symbolId: string;
  type: string;
  appId: string;
  platform: string;
  url: string;
  origin: string;
  alternateSymbolIds: string[];
  status: string;
  version?: string;
  build?: string;
}

/**
 * @class
 * Initializes a new instance of the SymbolStatusResponse class.
 * @constructor
 * A response containing information pertaining to a symbol status
 *
 * @member {string} symbolId The unique id for this symbol (uuid)
 * @member {string} appId The application that this symbol belongs to
 * @member {string} status Whether the symbol is ignored. Possible values
 * include: 'available', 'ignored', 'missing'
 */
export interface SymbolStatusResponse {
  symbolId: string;
  appId: string;
  status: string;
}

/**
 * @class
 * Initializes a new instance of the SymbolUploadUserInfo class.
 * @constructor
 * @member {string} [email] The email of the user
 * @member {string} [displayName] The full name of the user. Might for example
 * be first and last name
 */
export interface SymbolUploadUserInfo {
  email?: string;
  displayName?: string;
}

/**
 * @class
 * Initializes a new instance of the UploadedSymbolInfo class.
 * @constructor
 * @member {string} symbolId The symbol id of the symbol binary
 * @member {string} platform The platform the symbol is associated with
 */
export interface UploadedSymbolInfo {
  symbolId: string;
  platform: string;
}

/**
 * @class
 * Initializes a new instance of the SymbolUpload class.
 * @constructor
 * A single symbol upload entity
 *
 * @member {string} symbolUploadId The id for the current symbol upload
 * @member {string} appId The application that this symbol upload belongs to
 * @member {object} [user] User information of the one who intitiated the
 * symbol upload
 * @member {string} [user.email] The email of the user
 * @member {string} [user.displayName] The full name of the user. Might for
 * example be first and last name
 * @member {string} status The current status for the symbol upload. Possible
 * values include: 'created', 'committed', 'aborted', 'processing', 'indexed',
 * 'failed'
 * @member {string} symbolType The type of the symbol for the current symbol
 * upload. Possible values include: 'Apple', 'Breakpad', 'AndroidProguard'
 * @member {array} [symbolsUploaded] The symbols found in the upload
 * @member {string} [origin] The origin of the symbol upload. Possible values
 * include: 'User', 'System'
 * @member {string} [fileName] The file name for the symbol upload
 * @member {number} [fileSize] The size of the file in Mebibytes
 * @member {date} [timestamp] When the symbol upload was committed, or last
 * transaction time if not committed
 */
export interface SymbolUpload {
  symbolUploadId: string;
  appId: string;
  user?: SymbolUploadUserInfo;
  status: string;
  symbolType: string;
  symbolsUploaded?: UploadedSymbolInfo[];
  origin?: string;
  fileName?: string;
  fileSize?: number;
  timestamp?: Date;
}

/**
 * @class
 * Initializes a new instance of the SymbolUploadBeginRequest class.
 * @constructor
 * A request containing information pertaining to starting a symbol upload
 * process
 *
 * @member {string} symbolType The type of the symbol for the current symbol
 * upload. Possible values include: 'Apple', 'Breakpad', 'AndroidProguard'
 * @member {string} [clientCallback] The callback URL that the client can
 * optionally provide to get status updates for the current symbol upload
 * @member {string} [fileName] The file name for the symbol upload
 * @member {string} [build] The build number. Optional for Apple platforms.
 * @member {string} [version] the version number.  Optional for Apple
 * platforms.
 */
export interface SymbolUploadBeginRequest {
  symbolType: string;
  clientCallback?: string;
  fileName?: string;
  build?: string;
  version?: string;
}

/**
 * @class
 * Initializes a new instance of the SymbolUploadBeginResponse class.
 * @constructor
 * A response containing information pertaining to starting a symbol upload
 * process
 *
 * @member {string} symbolUploadId The id for the current upload
 * @member {string} uploadUrl The URL where the client needs to upload the
 * symbol blob to
 * @member {date} expirationDate Describes how long the upload_url is valid
 */
export interface SymbolUploadBeginResponse {
  symbolUploadId: string;
  uploadUrl: string;
  expirationDate: Date;
}

/**
 * @class
 * Initializes a new instance of the SymbolUploadEndRequest class.
 * @constructor
 * A request containing information pertaining to completing a symbol upload
 * process
 *
 * @member {string} status The desired operation for the symbol upload.
 * Possible values include: 'committed', 'aborted'
 */
export interface SymbolUploadEndRequest {
  status: string;
}

/**
 * @class
 * Initializes a new instance of the SymbolUploadLocation class.
 * @constructor
 * Location for downloading symbol
 *
 * @member {string} uri
 */
export interface SymbolUploadLocation {
  uri: string;
}
