/*
 * 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 BlobInfo class.
 * @constructor
 * @member {number} size
 * @member {string} url
 */
export interface BlobInfo {
  size: number;
  url: string;
}

/**
 * @class
 * Initializes a new instance of the CodePushReleaseInfo class.
 * @constructor
 * @member {string} [targetBinaryRange]
 * @member {string} [description]
 * @member {boolean} [isDisabled]
 * @member {boolean} [isMandatory]
 * @member {number} [rollout]
 */
export interface CodePushReleaseInfo {
  targetBinaryRange?: string;
  description?: string;
  isDisabled?: boolean;
  isMandatory?: boolean;
  rollout?: number;
}

/**
 * @class
 * Initializes a new instance of the CodePushRelease class.
 * @constructor
 * @member {string} [label]
 * @member {string} [packageHash]
 * @member {string} [blobUrl]
 * @member {object} [diffPackageMap]
 * @member {string} [originalDeployment] Set on 'Promote'
 * @member {string} [originalLabel] Set on 'Promote' and 'Rollback'
 * @member {string} [releasedBy]
 * @member {string} [releaseMethod] The release method is unknown if
 * unspecified. Possible values include: 'Upload', 'Promote', 'Rollback'
 * @member {number} [size]
 * @member {number} [uploadTime]
 */
export interface CodePushRelease extends CodePushReleaseInfo {
  label?: string;
  packageHash?: string;
  blobUrl?: string;
  diffPackageMap?: { [propertyName: string]: BlobInfo };
  originalDeployment?: string;
  originalLabel?: string;
  releasedBy?: string;
  releaseMethod?: string;
  size?: number;
  uploadTime?: number;
}

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

/**
 * @class
 * Initializes a new instance of the CodePushReleaseMetric class.
 * @constructor
 * @member {string} label
 * @member {number} active
 * @member {number} [downloaded]
 * @member {number} [failed]
 * @member {number} [installed]
 */
export interface CodePushReleaseMetric {
  label: string;
  active: number;
  downloaded?: number;
  failed?: number;
  installed?: number;
}

/**
 * @class
 * Initializes a new instance of the CodePushReleaseModification class.
 * @constructor
 */
export interface CodePushReleaseModification extends CodePushReleaseInfo {
}

/**
 * @class
 * Initializes a new instance of the CodePushReleasePromote class.
 * @constructor
 * @member {string} [label]
 */
export interface CodePushReleasePromote extends CodePushReleaseInfo {
  label?: string;
}

/**
 * @class
 * Initializes a new instance of the CodePushStatusMetricMetadata class.
 * @constructor
 * @member {string} deploymentKey
 * @member {string} [label]
 * @member {string} [appVersion]
 * @member {string} [previousDeploymentKey]
 * @member {string} [previousLabelOrAppVersion]
 * @member {string} [status]
 * @member {string} [clientUniqueId]
 */
export interface CodePushStatusMetricMetadata {
  deploymentKey: string;
  label?: string;
  appVersion?: string;
  previousDeploymentKey?: string;
  previousLabelOrAppVersion?: string;
  status?: string;
  clientUniqueId?: string;
}

/**
 * @class
 * Initializes a new instance of the Deployment class.
 * @constructor
 * @member {string} [key]
 * @member {string} name
 * @member {object} [latestRelease]
 * @member {string} [latestRelease.label]
 * @member {string} [latestRelease.packageHash]
 * @member {string} [latestRelease.blobUrl]
 * @member {object} [latestRelease.diffPackageMap]
 * @member {string} [latestRelease.originalDeployment] Set on 'Promote'
 * @member {string} [latestRelease.originalLabel] Set on 'Promote' and
 * 'Rollback'
 * @member {string} [latestRelease.releasedBy]
 * @member {string} [latestRelease.releaseMethod] The release method is unknown
 * if unspecified. Possible values include: 'Upload', 'Promote', 'Rollback'
 * @member {number} [latestRelease.size]
 * @member {number} [latestRelease.uploadTime]
 */
export interface Deployment {
  key?: string;
  name: string;
  latestRelease?: CodePushRelease;
}

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

/**
 * @class
 * Initializes a new instance of the UpdateCheckResponse class.
 * @constructor
 * @member {string} [downloadUrl]
 * @member {boolean} [isAvailable]
 * @member {number} [packageSize]
 * @member {boolean} [shouldRunBinaryVersion]
 * @member {boolean} [updateAppVersion]
 * @member {string} [packageHash]
 * @member {string} [label]
 */
export interface UpdateCheckResponse extends CodePushReleaseInfo {
  downloadUrl?: string;
  isAvailable?: boolean;
  packageSize?: number;
  shouldRunBinaryVersion?: boolean;
  updateAppVersion?: boolean;
  packageHash?: string;
  label?: string;
}
