/*
 * 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 NotificationConfig class.
 * @constructor
 * Generic notification configuration.
 *
 * @member {string} type Polymorphic Discriminator
 */
export interface NotificationConfig {
  type: string;
}

/**
 * @class
 * Initializes a new instance of the NotificationConfigResult class.
 * @constructor
 * Generic notification configuration result.
 *
 * @member {string} type Polymorphic Discriminator
 */
export interface NotificationConfigResult {
  type: string;
}

/**
 * @class
 * Initializes a new instance of the NotificationContent class.
 * @constructor
 * Notification definition object
 *
 * @member {string} name Notification name
 * @member {string} [title] Notification title
 * @member {string} body Notification body
 * @member {object} [customData] Notification custom data(priority, expiration,
 * etc.)
 */
export interface NotificationContent {
  name: string;
  title?: string;
  body: string;
  customData?: { [propertyName: string]: string };
}

/**
 * @class
 * Initializes a new instance of the NotificationTarget class.
 * @constructor
 * Generic notification target.
 *
 * @member {string} type Polymorphic Discriminator
 */
export interface NotificationTarget {
  type: string;
}

/**
 * @class
 * Initializes a new instance of the NotificationDefinition class.
 * @constructor
 * Notification definition object
 *
 * @member {object} [notificationTarget]
 * @member {string} [notificationTarget.type] Polymorphic Discriminator
 * @member {object} notificationContent
 * @member {string} [notificationContent.name] Notification name
 * @member {string} [notificationContent.title] Notification title
 * @member {string} [notificationContent.body] Notification body
 * @member {object} [notificationContent.customData] Notification custom
 * data(priority, expiration, etc.)
 */
export interface NotificationDefinition {
  notificationTarget?: NotificationTarget;
  notificationContent: NotificationContent;
}

/**
 * @class
 * Initializes a new instance of the NotificationFailureOutcomeCount class.
 * @constructor
 * Notification failure outcome count
 *
 * @member {string} [failureReason] The reason of the notification failure
 * @member {number} [count] count of this type of failure
 */
export interface NotificationFailureOutcomeCount {
  failureReason?: string;
  count?: number;
}

/**
 * @class
 * Initializes a new instance of the NotificationOverviewResult class.
 * @constructor
 * Notification statistics
 *
 * @member {string} notificationId Notification id.
 * @member {string} [name] Notification name
 * @member {object} [notificationTarget]
 * @member {string} [notificationTarget.type] Polymorphic Discriminator
 * @member {date} [sendTime] Notification send time
 * @member {number} [pnsSendFailure] Number of the notifications failed to send
 * to the push provider.
 * @member {number} [pnsSendSuccess] Number of the notifications successfully
 * sent to push the provider.
 * @member {string} state State of the notification. Possible values include:
 * 'Cancelled', 'Completed', 'Enqueued', 'Processing', 'Unknown'
 */
export interface NotificationOverviewResult {
  notificationId: string;
  name?: string;
  notificationTarget?: NotificationTarget;
  sendTime?: Date;
  pnsSendFailure?: number;
  pnsSendSuccess?: number;
  state: string;
}

/**
 * @class
 * Initializes a new instance of the NotificationDetailsResult class.
 * @constructor
 * Notification statistics
 *
 * @member {object} notificationContent
 * @member {string} [notificationContent.name] Notification name
 * @member {string} [notificationContent.title] Notification title
 * @member {string} [notificationContent.body] Notification body
 * @member {object} [notificationContent.customData] Notification custom
 * data(priority, expiration, etc.)
 * @member {array} [failureOutcomes] Failture outcome counts
 */
export interface NotificationDetailsResult extends NotificationOverviewResult {
  notificationContent: NotificationContent;
  failureOutcomes?: NotificationFailureOutcomeCount[];
}

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

/**
 * @class
 * Initializes a new instance of the NotificationsListResult class.
 * @constructor
 * List of notifications
 *
 * @member {array} values
 * @member {number} [total] the total count of notifications
 * @member {string} [nextLink]
 */
export interface NotificationsListResult {
  values: NotificationOverviewResult[];
  total?: number;
  nextLink?: string;
}
