/*
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT License.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is regenerated.
 */

import {
  AnalyticsVersionsOptionalParams,
  AnalyticsVersionsResponse,
  AnalyticsPerDeviceCountsOptionalParams,
  AnalyticsPerDeviceCountsResponse,
  AnalyticsSessionDurationsDistributionOptionalParams,
  AnalyticsSessionDurationsDistributionResponse,
  AnalyticsSessionCountsOptionalParams,
  AnalyticsSessionCountsResponse,
  AnalyticsPlaceCountsOptionalParams,
  AnalyticsPlaceCountsResponse,
  AnalyticsOperatingSystemCountsOptionalParams,
  AnalyticsOperatingSystemCountsResponse,
  AnalyticsModelCountsOptionalParams,
  AnalyticsModelCountsResponse,
  AnalyticsLogFlowOptionalParams,
  AnalyticsLogFlowResponse,
  AnalyticsLanguageCountsOptionalParams,
  AnalyticsLanguageCountsResponse,
  AnalyticsGenericLogFlowOptionalParams,
  AnalyticsGenericLogFlowResponse,
  AnalyticsEventPropertyCountsOptionalParams,
  AnalyticsEventPropertyCountsResponse,
  AnalyticsEventPropertiesOptionalParams,
  AnalyticsEventPropertiesResponse,
  AnalyticsEventCountOptionalParams,
  AnalyticsEventCountResponse,
  AnalyticsEventDeviceCountOptionalParams,
  AnalyticsEventDeviceCountResponse,
  AnalyticsEventPerSessionCountOptionalParams,
  AnalyticsEventPerSessionCountResponse,
  AnalyticsEventPerDeviceCountOptionalParams,
  AnalyticsEventPerDeviceCountResponse,
  AnalyticsEventsDeleteOptionalParams,
  AnalyticsEventsOptionalParams,
  AnalyticsEventsResponse,
  AnalyticsEventsDeleteLogsOptionalParams,
  PostContentSchemaReleasesItem,
  AnalyticsDistributionReleaseCountsOptionalParams,
  AnalyticsDistributionReleaseCountsResponse,
  AnalyticsCrashFreeDevicePercentagesOptionalParams,
  AnalyticsCrashFreeDevicePercentagesResponse,
  AnalyticsCrashGroupTotalsOptionalParams,
  AnalyticsCrashGroupTotalsResponse,
  AnalyticsCrashGroupOperatingSystemCountsOptionalParams,
  AnalyticsCrashGroupOperatingSystemCountsResponse,
  AnalyticsCrashGroupModelCountsOptionalParams,
  AnalyticsCrashGroupModelCountsResponse,
  AnalyticsCrashGroupCountsOptionalParams,
  AnalyticsCrashGroupCountsResponse,
  PostContentSchemaCrashGroupsItem,
  AnalyticsCrashGroupsTotalsOptionalParams,
  AnalyticsCrashGroupsTotalsResponse,
  AnalyticsCrashCountsOptionalParams,
  AnalyticsCrashCountsResponse,
  AnalyticsAudienceNameExistsOptionalParams,
  AnalyticsDeleteAudienceOptionalParams,
  AnalyticsGetAudienceOptionalParams,
  AnalyticsGetAudienceResponse,
  Paths2Mes8QV01AppsOwnerNameAppNameAnalyticsAudiencesAudienceNamePutRequestbodyContentApplicationJsonSchema,
  AnalyticsCreateOrUpdateAudienceOptionalParams,
  AnalyticsCreateOrUpdateAudienceResponse,
  AnalyticsListDevicePropertyValuesOptionalParams,
  AnalyticsListDevicePropertyValuesResponse,
  AnalyticsListDevicePropertiesOptionalParams,
  AnalyticsListDevicePropertiesResponse,
  AnalyticsListCustomPropertiesOptionalParams,
  AnalyticsListCustomPropertiesResponse,
  Paths16F7ScgV01AppsOwnerNameAppNameAnalyticsAudiencesDefinitionTestPostRequestbodyContentApplicationJsonSchema,
  AnalyticsTestAudienceOptionalParams,
  AnalyticsTestAudienceResponse,
  AnalyticsListAudiencesOptionalParams,
  AnalyticsListAudiencesResponse,
  AnalyticsDeviceCountsOptionalParams,
  AnalyticsDeviceCountsResponse
} from "../models";

/** Interface representing a Analytics. */
export interface Analytics {
  /**
   * Count of active versions in the time range ordered by version.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  versions(
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsVersionsOptionalParams
  ): Promise<AnalyticsVersionsResponse>;
  /**
   * Count of sessions per device in the time range.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param interval Size of interval in ISO 8601 duration format. (PnYnMnDTnHnMnS|PnW|P<date>T<time>).
   *                 The valid durations are 1 day (P1D), 1 week (P1W), and 30 days (P30D).
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  perDeviceCounts(
    start: Date,
    interval: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsPerDeviceCountsOptionalParams
  ): Promise<AnalyticsPerDeviceCountsResponse>;
  /**
   * Gets session duration.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  sessionDurationsDistribution(
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsSessionDurationsDistributionOptionalParams
  ): Promise<AnalyticsSessionDurationsDistributionResponse>;
  /**
   * Count of sessions in the time range.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param interval Size of interval in ISO 8601 duration format. (PnYnMnDTnHnMnS|PnW|P<date>T<time>).
   *                 The valid durations are 1 day (P1D), 1 week (P1W), and 30 days (P30D).
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  sessionCounts(
    start: Date,
    interval: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsSessionCountsOptionalParams
  ): Promise<AnalyticsSessionCountsResponse>;
  /**
   * Places in the time range.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  placeCounts(
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsPlaceCountsOptionalParams
  ): Promise<AnalyticsPlaceCountsResponse>;
  /**
   * OSes in the time range.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  operatingSystemCounts(
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsOperatingSystemCountsOptionalParams
  ): Promise<AnalyticsOperatingSystemCountsResponse>;
  /**
   * Models in the time range.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  modelCounts(
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsModelCountsOptionalParams
  ): Promise<AnalyticsModelCountsResponse>;
  /**
   * Logs received between the specified start time and the current time. The API will return a maximum
   * of 100 logs per call.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  logFlow(
    ownerName: string,
    appName: string,
    options?: AnalyticsLogFlowOptionalParams
  ): Promise<AnalyticsLogFlowResponse>;
  /**
   * Languages in the time range.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  languageCounts(
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsLanguageCountsOptionalParams
  ): Promise<AnalyticsLanguageCountsResponse>;
  /**
   * Logs received between the specified start time and the current time. The API will return a maximum
   * of 100 logs per call.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  genericLogFlow(
    ownerName: string,
    appName: string,
    options?: AnalyticsGenericLogFlowOptionalParams
  ): Promise<AnalyticsGenericLogFlowResponse>;
  /**
   * Event properties value counts during the time range in descending order.
   * @param eventName The id of the event.
   * @param eventPropertyName The id of the event property.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  eventPropertyCounts(
    eventName: string,
    eventPropertyName: string,
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsEventPropertyCountsOptionalParams
  ): Promise<AnalyticsEventPropertyCountsResponse>;
  /**
   * Event properties.
   * @param eventName The id of the event.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  eventProperties(
    eventName: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsEventPropertiesOptionalParams
  ): Promise<AnalyticsEventPropertiesResponse>;
  /**
   * Count of events by interval in the time range.
   * @param eventName The id of the event.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  eventCount(
    eventName: string,
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsEventCountOptionalParams
  ): Promise<AnalyticsEventCountResponse>;
  /**
   * Count of devices for an event by interval in the time range.
   * @param eventName The id of the event.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  eventDeviceCount(
    eventName: string,
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsEventDeviceCountOptionalParams
  ): Promise<AnalyticsEventDeviceCountResponse>;
  /**
   * Count of events per session by interval in the time range.
   * @param eventName The id of the event.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  eventPerSessionCount(
    eventName: string,
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsEventPerSessionCountOptionalParams
  ): Promise<AnalyticsEventPerSessionCountResponse>;
  /**
   * Count of events per device by interval in the time range.
   * @param eventName The id of the event.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  eventPerDeviceCount(
    eventName: string,
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsEventPerDeviceCountOptionalParams
  ): Promise<AnalyticsEventPerDeviceCountResponse>;
  /**
   * Delete the set of Events with the specified event names.
   * @param eventName The id of the event.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  eventsDelete(
    eventName: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsEventsDeleteOptionalParams
  ): Promise<void>;
  /**
   * Count of active events in the time range ordered by event.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  events(
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsEventsOptionalParams
  ): Promise<AnalyticsEventsResponse>;
  /**
   * Delete the set of Events with the specified event names.
   * @param eventName The id of the event.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  eventsDeleteLogs(
    eventName: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsEventsDeleteLogsOptionalParams
  ): Promise<void>;
  /**
   * Count of total downloads for the provided distribution releases.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param releases Array of post-content-schema-releasesItem
   * @param options The options parameters.
   */
  distributionReleaseCounts(
    ownerName: string,
    appName: string,
    releases: PostContentSchemaReleasesItem[],
    options?: AnalyticsDistributionReleaseCountsOptionalParams
  ): Promise<AnalyticsDistributionReleaseCountsResponse>;
  /**
   * Percentage of crash-free device by day in the time range based on the selected versions. Api will
   * return -1 if crash devices is greater than active devices.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param version test
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  crashFreeDevicePercentages(
    start: Date,
    version: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsCrashFreeDevicePercentagesOptionalParams
  ): Promise<AnalyticsCrashFreeDevicePercentagesResponse>;
  /**
   * Overall crashes and affected users count of the selected crash group with selected version.
   * Available for UWP apps only.
   * @param crashGroupId The id of the crash group.
   * @param version test
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  crashGroupTotals(
    crashGroupId: string,
    version: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsCrashGroupTotalsOptionalParams
  ): Promise<AnalyticsCrashGroupTotalsResponse>;
  /**
   * Top OSes of the selected crash group with selected version. Available for UWP apps only.
   * @param crashGroupId The id of the crash group.
   * @param version test
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  crashGroupOperatingSystemCounts(
    crashGroupId: string,
    version: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsCrashGroupOperatingSystemCountsOptionalParams
  ): Promise<AnalyticsCrashGroupOperatingSystemCountsResponse>;
  /**
   * Top models of the selected crash group with selected version. Available for UWP apps only.
   * @param crashGroupId The id of the crash group.
   * @param version test
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  crashGroupModelCounts(
    crashGroupId: string,
    version: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsCrashGroupModelCountsOptionalParams
  ): Promise<AnalyticsCrashGroupModelCountsResponse>;
  /**
   * Count of crashes by day in the time range of the selected crash group with selected version.
   * Available for UWP apps only.
   * @param crashGroupId The id of the crash group.
   * @param version test
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  crashGroupCounts(
    crashGroupId: string,
    version: string,
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsCrashGroupCountsOptionalParams
  ): Promise<AnalyticsCrashGroupCountsResponse>;
  /**
   * Overall crashes and affected users count of the selected crash groups with selected versions.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param crashGroups Array of post-content-schema-crash_groupsItem
   * @param options The options parameters.
   */
  crashGroupsTotals(
    ownerName: string,
    appName: string,
    crashGroups: PostContentSchemaCrashGroupsItem[],
    options?: AnalyticsCrashGroupsTotalsOptionalParams
  ): Promise<AnalyticsCrashGroupsTotalsResponse>;
  /**
   * Count of crashes by day in the time range based the selected versions. Available for UWP apps only.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  crashCounts(
    start: Date,
    ownerName: string,
    appName: string,
    options?: AnalyticsCrashCountsOptionalParams
  ): Promise<AnalyticsCrashCountsResponse>;
  /**
   * Returns whether audience definition exists.
   * @param audienceName The name of the audience
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  audienceNameExists(
    audienceName: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsAudienceNameExistsOptionalParams
  ): Promise<void>;
  /**
   * Deletes audience definition.
   * @param audienceName The name of the audience
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  deleteAudience(
    audienceName: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsDeleteAudienceOptionalParams
  ): Promise<void>;
  /**
   * Gets audience definition.
   * @param audienceName The name of the audience
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  getAudience(
    audienceName: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsGetAudienceOptionalParams
  ): Promise<AnalyticsGetAudienceResponse>;
  /**
   * Creates or updates audience definition.
   * @param audienceName The name of the audience
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param audience Audience definition
   * @param options The options parameters.
   */
  createOrUpdateAudience(
    audienceName: string,
    ownerName: string,
    appName: string,
    audience: Paths2Mes8QV01AppsOwnerNameAppNameAnalyticsAudiencesAudienceNamePutRequestbodyContentApplicationJsonSchema,
    options?: AnalyticsCreateOrUpdateAudienceOptionalParams
  ): Promise<AnalyticsCreateOrUpdateAudienceResponse>;
  /**
   * Get list of device property values.
   * @param propertyName Device property
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  listDevicePropertyValues(
    propertyName: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsListDevicePropertyValuesOptionalParams
  ): Promise<AnalyticsListDevicePropertyValuesResponse>;
  /**
   * Get list of device properties.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  listDeviceProperties(
    ownerName: string,
    appName: string,
    options?: AnalyticsListDevicePropertiesOptionalParams
  ): Promise<AnalyticsListDevicePropertiesResponse>;
  /**
   * Get list of custom properties.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  listCustomProperties(
    ownerName: string,
    appName: string,
    options?: AnalyticsListCustomPropertiesOptionalParams
  ): Promise<AnalyticsListCustomPropertiesResponse>;
  /**
   * Tests audience definition.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param audience Audience definition
   * @param options The options parameters.
   */
  testAudience(
    ownerName: string,
    appName: string,
    audience: Paths16F7ScgV01AppsOwnerNameAppNameAnalyticsAudiencesDefinitionTestPostRequestbodyContentApplicationJsonSchema,
    options?: AnalyticsTestAudienceOptionalParams
  ): Promise<AnalyticsTestAudienceResponse>;
  /**
   * Get list of audiences.
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  listAudiences(
    ownerName: string,
    appName: string,
    options?: AnalyticsListAudiencesOptionalParams
  ): Promise<AnalyticsListAudiencesResponse>;
  /**
   * Count of active devices by interval in the time range.
   * @param start Start date time in data in ISO 8601 date time format.
   * @param appBuild test
   * @param ownerName The name of the owner
   * @param appName The name of the application
   * @param options The options parameters.
   */
  deviceCounts(
    start: Date,
    appBuild: string,
    ownerName: string,
    appName: string,
    options?: AnalyticsDeviceCountsOptionalParams
  ): Promise<AnalyticsDeviceCountsResponse>;
}
