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

import { ServiceClientOptions, RequestOptions, ServiceCallback, HttpOperationResponse } from 'ms-rest';
import * as stream from 'stream';
import * as models from '../models';


/**
 * @class
 * CodePushAcquisition
 * __NOTE__: An instance of this class is automatically created for an
 * instance of the CodepushClient.
 */
export interface CodePushAcquisition {


    /**
     * Report Deployment status metric
     *
     * @param {object} releaseMetadata Deployment status metric properties
     *
     * @param {string} releaseMetadata.deploymentKey
     *
     * @param {string} [releaseMetadata.label]
     *
     * @param {string} [releaseMetadata.appVersion]
     *
     * @param {string} [releaseMetadata.previousDeploymentKey]
     *
     * @param {string} [releaseMetadata.previousLabelOrAppVersion]
     *
     * @param {string} [releaseMetadata.status]
     *
     * @param {string} [releaseMetadata.clientUniqueId]
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<null>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    updateDeployStatusWithHttpOperationResponse(releaseMetadata: models.CodePushStatusMetricMetadata, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;

    /**
     * Report Deployment status metric
     *
     * @param {object} releaseMetadata Deployment status metric properties
     *
     * @param {string} releaseMetadata.deploymentKey
     *
     * @param {string} [releaseMetadata.label]
     *
     * @param {string} [releaseMetadata.appVersion]
     *
     * @param {string} [releaseMetadata.previousDeploymentKey]
     *
     * @param {string} [releaseMetadata.previousLabelOrAppVersion]
     *
     * @param {string} [releaseMetadata.status]
     *
     * @param {string} [releaseMetadata.clientUniqueId]
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {null} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {null} [result]   - The deserialized result object if an error did not occur.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    updateDeployStatus(releaseMetadata: models.CodePushStatusMetricMetadata, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
    updateDeployStatus(releaseMetadata: models.CodePushStatusMetricMetadata, callback: ServiceCallback<void>): void;
    updateDeployStatus(releaseMetadata: models.CodePushStatusMetricMetadata, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;


    /**
     * Report download of specified release
     *
     * @param {object} releaseMetadata Deployment status metric properties
     *
     * @param {string} releaseMetadata.deploymentKey
     *
     * @param {string} [releaseMetadata.label]
     *
     * @param {string} [releaseMetadata.appVersion]
     *
     * @param {string} [releaseMetadata.previousDeploymentKey]
     *
     * @param {string} [releaseMetadata.previousLabelOrAppVersion]
     *
     * @param {string} [releaseMetadata.status]
     *
     * @param {string} [releaseMetadata.clientUniqueId]
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<null>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    updateDownloadStatusWithHttpOperationResponse(releaseMetadata: models.CodePushStatusMetricMetadata, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;

    /**
     * Report download of specified release
     *
     * @param {object} releaseMetadata Deployment status metric properties
     *
     * @param {string} releaseMetadata.deploymentKey
     *
     * @param {string} [releaseMetadata.label]
     *
     * @param {string} [releaseMetadata.appVersion]
     *
     * @param {string} [releaseMetadata.previousDeploymentKey]
     *
     * @param {string} [releaseMetadata.previousLabelOrAppVersion]
     *
     * @param {string} [releaseMetadata.status]
     *
     * @param {string} [releaseMetadata.clientUniqueId]
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {null} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {null} [result]   - The deserialized result object if an error did not occur.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    updateDownloadStatus(releaseMetadata: models.CodePushStatusMetricMetadata, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
    updateDownloadStatus(releaseMetadata: models.CodePushStatusMetricMetadata, callback: ServiceCallback<void>): void;
    updateDownloadStatus(releaseMetadata: models.CodePushStatusMetricMetadata, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;


    /**
     * Check for updates
     *
     * @param {string} appVersion
     *
     * @param {string} deploymentKey
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {string} [options.clientUniqueId]
     *
     * @param {boolean} [options.isCompanion]
     *
     * @param {string} [options.label]
     *
     * @param {string} [options.packageHash]
     *
     * @param {string} [options.previousDeploymentKey]
     *
     * @param {string} [options.previousLabelOrAppVersion]
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<UpdateCheckResponse>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    updateCheckWithHttpOperationResponse(appVersion: string, deploymentKey: string, options?: { clientUniqueId? : string, isCompanion? : boolean, label? : string, packageHash? : string, previousDeploymentKey? : string, previousLabelOrAppVersion? : string, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.UpdateCheckResponse>>;

    /**
     * Check for updates
     *
     * @param {string} appVersion
     *
     * @param {string} deploymentKey
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {string} [options.clientUniqueId]
     *
     * @param {boolean} [options.isCompanion]
     *
     * @param {string} [options.label]
     *
     * @param {string} [options.packageHash]
     *
     * @param {string} [options.previousDeploymentKey]
     *
     * @param {string} [options.previousLabelOrAppVersion]
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {UpdateCheckResponse} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {UpdateCheckResponse} [result]   - The deserialized result object if an error did not occur.
     *                      See {@link UpdateCheckResponse} for more information.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    updateCheck(appVersion: string, deploymentKey: string, options?: { clientUniqueId? : string, isCompanion? : boolean, label? : string, packageHash? : string, previousDeploymentKey? : string, previousLabelOrAppVersion? : string, customHeaders? : { [headerName: string]: string; } }): Promise<models.UpdateCheckResponse>;
    updateCheck(appVersion: string, deploymentKey: string, callback: ServiceCallback<models.UpdateCheckResponse>): void;
    updateCheck(appVersion: string, deploymentKey: string, options: { clientUniqueId? : string, isCompanion? : boolean, label? : string, packageHash? : string, previousDeploymentKey? : string, previousLabelOrAppVersion? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.UpdateCheckResponse>): void;
}

/**
 * @class
 * CodePushDeployments
 * __NOTE__: An instance of this class is automatically created for an
 * instance of the CodepushClient.
 */
export interface CodePushDeployments {


    /**
     * Gets a list of CodePush deployments for the given app
     *
     * @param {string} appName The name of the application
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<Array>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    listWithHttpOperationResponse(appName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.Deployment[]>>;

    /**
     * Gets a list of CodePush deployments for the given app
     *
     * @param {string} appName The name of the application
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {Array} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {Array} [result]   - The deserialized result object if an error did not occur.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    list(appName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.Deployment[]>;
    list(appName: string, ownerName: string, callback: ServiceCallback<models.Deployment[]>): void;
    list(appName: string, ownerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.Deployment[]>): void;


    /**
     * Creates a CodePush Deployment for the given app
     *
     * @param {string} appName The name of the application
     *
     * @param {object} deployment Deployment to be created
     *
     * @param {string} [deployment.key]
     *
     * @param {string} deployment.name
     *
     * @param {object} [deployment.latestRelease]
     *
     * @param {string} [deployment.latestRelease.label]
     *
     * @param {string} [deployment.latestRelease.packageHash]
     *
     * @param {string} [deployment.latestRelease.blobUrl]
     *
     * @param {object} [deployment.latestRelease.diffPackageMap]
     *
     * @param {string} [deployment.latestRelease.originalDeployment] Set on
     * 'Promote'
     *
     * @param {string} [deployment.latestRelease.originalLabel] Set on 'Promote'
     * and 'Rollback'
     *
     * @param {string} [deployment.latestRelease.releasedBy]
     *
     * @param {string} [deployment.latestRelease.releaseMethod] The release method
     * is unknown if unspecified. Possible values include: 'Upload', 'Promote',
     * 'Rollback'
     *
     * @param {number} [deployment.latestRelease.size]
     *
     * @param {number} [deployment.latestRelease.uploadTime]
     *
     * @param {string} [deployment.latestRelease.targetBinaryRange]
     *
     * @param {string} [deployment.latestRelease.description]
     *
     * @param {boolean} [deployment.latestRelease.isDisabled]
     *
     * @param {boolean} [deployment.latestRelease.isMandatory]
     *
     * @param {number} [deployment.latestRelease.rollout]
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<Deployment>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    createWithHttpOperationResponse(appName: string, deployment: models.Deployment, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.Deployment>>;

    /**
     * Creates a CodePush Deployment for the given app
     *
     * @param {string} appName The name of the application
     *
     * @param {object} deployment Deployment to be created
     *
     * @param {string} [deployment.key]
     *
     * @param {string} deployment.name
     *
     * @param {object} [deployment.latestRelease]
     *
     * @param {string} [deployment.latestRelease.label]
     *
     * @param {string} [deployment.latestRelease.packageHash]
     *
     * @param {string} [deployment.latestRelease.blobUrl]
     *
     * @param {object} [deployment.latestRelease.diffPackageMap]
     *
     * @param {string} [deployment.latestRelease.originalDeployment] Set on
     * 'Promote'
     *
     * @param {string} [deployment.latestRelease.originalLabel] Set on 'Promote'
     * and 'Rollback'
     *
     * @param {string} [deployment.latestRelease.releasedBy]
     *
     * @param {string} [deployment.latestRelease.releaseMethod] The release method
     * is unknown if unspecified. Possible values include: 'Upload', 'Promote',
     * 'Rollback'
     *
     * @param {number} [deployment.latestRelease.size]
     *
     * @param {number} [deployment.latestRelease.uploadTime]
     *
     * @param {string} [deployment.latestRelease.targetBinaryRange]
     *
     * @param {string} [deployment.latestRelease.description]
     *
     * @param {boolean} [deployment.latestRelease.isDisabled]
     *
     * @param {boolean} [deployment.latestRelease.isMandatory]
     *
     * @param {number} [deployment.latestRelease.rollout]
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {Deployment} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {Deployment} [result]   - The deserialized result object if an error did not occur.
     *                      See {@link Deployment} for more information.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    create(appName: string, deployment: models.Deployment, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.Deployment>;
    create(appName: string, deployment: models.Deployment, ownerName: string, callback: ServiceCallback<models.Deployment>): void;
    create(appName: string, deployment: models.Deployment, ownerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.Deployment>): void;


    /**
     * Deletes a CodePush Deployment for the given app
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<null>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    deleteMethodWithHttpOperationResponse(appName: string, deploymentName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;

    /**
     * Deletes a CodePush Deployment for the given app
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {null} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {null} [result]   - The deserialized result object if an error did not occur.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    deleteMethod(appName: string, deploymentName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
    deleteMethod(appName: string, deploymentName: string, ownerName: string, callback: ServiceCallback<void>): void;
    deleteMethod(appName: string, deploymentName: string, ownerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;


    /**
     * Gets a CodePush Deployment for the given app
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<Deployment>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    getWithHttpOperationResponse(appName: string, deploymentName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.Deployment>>;

    /**
     * Gets a CodePush Deployment for the given app
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {Deployment} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {Deployment} [result]   - The deserialized result object if an error did not occur.
     *                      See {@link Deployment} for more information.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    get(appName: string, deploymentName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.Deployment>;
    get(appName: string, deploymentName: string, ownerName: string, callback: ServiceCallback<models.Deployment>): void;
    get(appName: string, deploymentName: string, ownerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.Deployment>): void;


    /**
     * Modifies a CodePush Deployment for the given app
     *
     * @param {string} appName The name of the application
     *
     * @param {object} deployment Deployment modification. All fields are optional
     * and only provided fields will get updated.
     *
     * @param {string} deployment.name
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<null>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    updateWithHttpOperationResponse(appName: string, deployment: models.DeploymentModification, deploymentName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;

    /**
     * Modifies a CodePush Deployment for the given app
     *
     * @param {string} appName The name of the application
     *
     * @param {object} deployment Deployment modification. All fields are optional
     * and only provided fields will get updated.
     *
     * @param {string} deployment.name
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {null} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {null} [result]   - The deserialized result object if an error did not occur.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    update(appName: string, deployment: models.DeploymentModification, deploymentName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
    update(appName: string, deployment: models.DeploymentModification, deploymentName: string, ownerName: string, callback: ServiceCallback<void>): void;
    update(appName: string, deployment: models.DeploymentModification, deploymentName: string, ownerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;


    /**
     * Promote one release (default latest one) from one deployment to another
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {string} promoteDeploymentName deployment name
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.release] Release to be promoted, only needs to
     * provide optional fields, description, label, disabled, mandatory, rollout,
     * targetBinaryVersion
     *
     * @param {string} [options.release.label]
     *
     * @param {string} [options.release.targetBinaryRange]
     *
     * @param {string} [options.release.description]
     *
     * @param {boolean} [options.release.isDisabled]
     *
     * @param {boolean} [options.release.isMandatory]
     *
     * @param {number} [options.release.rollout]
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<CodePushRelease>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    promoteWithHttpOperationResponse(appName: string, deploymentName: string, ownerName: string, promoteDeploymentName: string, options?: { release? : models.CodePushReleasePromote, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.CodePushRelease>>;

    /**
     * Promote one release (default latest one) from one deployment to another
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {string} promoteDeploymentName deployment name
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.release] Release to be promoted, only needs to
     * provide optional fields, description, label, disabled, mandatory, rollout,
     * targetBinaryVersion
     *
     * @param {string} [options.release.label]
     *
     * @param {string} [options.release.targetBinaryRange]
     *
     * @param {string} [options.release.description]
     *
     * @param {boolean} [options.release.isDisabled]
     *
     * @param {boolean} [options.release.isMandatory]
     *
     * @param {number} [options.release.rollout]
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {CodePushRelease} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {CodePushRelease} [result]   - The deserialized result object if an error did not occur.
     *                      See {@link CodePushRelease} for more information.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    promote(appName: string, deploymentName: string, ownerName: string, promoteDeploymentName: string, options?: { release? : models.CodePushReleasePromote, customHeaders? : { [headerName: string]: string; } }): Promise<models.CodePushRelease>;
    promote(appName: string, deploymentName: string, ownerName: string, promoteDeploymentName: string, callback: ServiceCallback<models.CodePushRelease>): void;
    promote(appName: string, deploymentName: string, ownerName: string, promoteDeploymentName: string, options: { release? : models.CodePushReleasePromote, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.CodePushRelease>): void;
}

/**
 * @class
 * CodePushDeploymentMetrics
 * __NOTE__: An instance of this class is automatically created for an
 * instance of the CodepushClient.
 */
export interface CodePushDeploymentMetrics {


    /**
     * Gets all releases metrics for specified Deployment
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<Array>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    getWithHttpOperationResponse(appName: string, deploymentName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.CodePushReleaseMetric[]>>;

    /**
     * Gets all releases metrics for specified Deployment
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {Array} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {Array} [result]   - The deserialized result object if an error did not occur.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    get(appName: string, deploymentName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.CodePushReleaseMetric[]>;
    get(appName: string, deploymentName: string, ownerName: string, callback: ServiceCallback<models.CodePushReleaseMetric[]>): void;
    get(appName: string, deploymentName: string, ownerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.CodePushReleaseMetric[]>): void;
}

/**
 * @class
 * CodePushDeploymentReleases
 * __NOTE__: An instance of this class is automatically created for an
 * instance of the CodepushClient.
 */
export interface CodePushDeploymentReleases {


    /**
     * Clears a Deployment of releases
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<null>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    deleteMethodWithHttpOperationResponse(appName: string, deploymentName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;

    /**
     * Clears a Deployment of releases
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {null} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {null} [result]   - The deserialized result object if an error did not occur.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    deleteMethod(appName: string, deploymentName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
    deleteMethod(appName: string, deploymentName: string, ownerName: string, callback: ServiceCallback<void>): void;
    deleteMethod(appName: string, deploymentName: string, ownerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;


    /**
     * Gets the history of releases on a Deployment
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<Array>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    getWithHttpOperationResponse(appName: string, deploymentName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.CodePushRelease[]>>;

    /**
     * Gets the history of releases on a Deployment
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {Array} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {Array} [result]   - The deserialized result object if an error did not occur.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    get(appName: string, deploymentName: string, ownerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.CodePushRelease[]>;
    get(appName: string, deploymentName: string, ownerName: string, callback: ServiceCallback<models.CodePushRelease[]>): void;
    get(appName: string, deploymentName: string, ownerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.CodePushRelease[]>): void;


    /**
     * Create a new CodePush release for the specified deployment
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName1 deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {string} targetBinaryVersion the binary version of the application
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {string} [options.deploymentName] This specifies which deployment you
     * want to release the update to. Default is Staging.
     *
     * @param {string} [options.description] This provides an optional "change log"
     * for the deployment.
     *
     * @param {boolean} [options.disabled] This specifies whether an update should
     * be downloadable by end users or not.
     *
     * @param {boolean} [options.mandatory] This specifies whether the update
     * should be considered mandatory or not (e.g. it includes a critical security
     * fix).
     *
     * @param {boolean} [options.noDuplicateReleaseError] This specifies that if
     * the update is identical to the latest release on the deployment, the CLI
     * should generate a warning instead of an error.
     *
     * @param {object} [options.packageProperty] The upload zip file
     *
     * @param {number} [options.rollout] This specifies the percentage of users (as
     * an integer between 1 and 100) that should be eligible to receive this
     * update.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<CodePushRelease>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    createWithHttpOperationResponse(appName: string, deploymentName1: string, ownerName: string, targetBinaryVersion: string, options?: { deploymentName? : string, description? : string, disabled? : boolean, mandatory? : boolean, noDuplicateReleaseError? : boolean, packageProperty? : stream.Readable, rollout? : number, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.CodePushRelease>>;

    /**
     * Create a new CodePush release for the specified deployment
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName1 deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {string} targetBinaryVersion the binary version of the application
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {string} [options.deploymentName] This specifies which deployment you
     * want to release the update to. Default is Staging.
     *
     * @param {string} [options.description] This provides an optional "change log"
     * for the deployment.
     *
     * @param {boolean} [options.disabled] This specifies whether an update should
     * be downloadable by end users or not.
     *
     * @param {boolean} [options.mandatory] This specifies whether the update
     * should be considered mandatory or not (e.g. it includes a critical security
     * fix).
     *
     * @param {boolean} [options.noDuplicateReleaseError] This specifies that if
     * the update is identical to the latest release on the deployment, the CLI
     * should generate a warning instead of an error.
     *
     * @param {object} [options.packageProperty] The upload zip file
     *
     * @param {number} [options.rollout] This specifies the percentage of users (as
     * an integer between 1 and 100) that should be eligible to receive this
     * update.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {CodePushRelease} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {CodePushRelease} [result]   - The deserialized result object if an error did not occur.
     *                      See {@link CodePushRelease} for more information.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    create(appName: string, deploymentName1: string, ownerName: string, targetBinaryVersion: string, options?: { deploymentName? : string, description? : string, disabled? : boolean, mandatory? : boolean, noDuplicateReleaseError? : boolean, packageProperty? : stream.Readable, rollout? : number, customHeaders? : { [headerName: string]: string; } }): Promise<models.CodePushRelease>;
    create(appName: string, deploymentName1: string, ownerName: string, targetBinaryVersion: string, callback: ServiceCallback<models.CodePushRelease>): void;
    create(appName: string, deploymentName1: string, ownerName: string, targetBinaryVersion: string, options: { deploymentName? : string, description? : string, disabled? : boolean, mandatory? : boolean, noDuplicateReleaseError? : boolean, packageProperty? : stream.Readable, rollout? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.CodePushRelease>): void;
}

/**
 * @class
 * DeploymentReleases
 * __NOTE__: An instance of this class is automatically created for an
 * instance of the CodepushClient.
 */
export interface DeploymentReleases {


    /**
     * Modifies a CodePush release metadata under the given Deployment
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} release Release modification. All fields are optional and
     * only provided fields will get updated.
     *
     * @param {string} [release.targetBinaryRange]
     *
     * @param {string} [release.description]
     *
     * @param {boolean} [release.isDisabled]
     *
     * @param {boolean} [release.isMandatory]
     *
     * @param {number} [release.rollout]
     *
     * @param {string} releaseLabel release label
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<CodePushRelease>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    updateWithHttpOperationResponse(appName: string, deploymentName: string, ownerName: string, release: models.CodePushReleaseModification, releaseLabel: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.CodePushRelease>>;

    /**
     * Modifies a CodePush release metadata under the given Deployment
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} release Release modification. All fields are optional and
     * only provided fields will get updated.
     *
     * @param {string} [release.targetBinaryRange]
     *
     * @param {string} [release.description]
     *
     * @param {boolean} [release.isDisabled]
     *
     * @param {boolean} [release.isMandatory]
     *
     * @param {number} [release.rollout]
     *
     * @param {string} releaseLabel release label
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {CodePushRelease} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {CodePushRelease} [result]   - The deserialized result object if an error did not occur.
     *                      See {@link CodePushRelease} for more information.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    update(appName: string, deploymentName: string, ownerName: string, release: models.CodePushReleaseModification, releaseLabel: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.CodePushRelease>;
    update(appName: string, deploymentName: string, ownerName: string, release: models.CodePushReleaseModification, releaseLabel: string, callback: ServiceCallback<models.CodePushRelease>): void;
    update(appName: string, deploymentName: string, ownerName: string, release: models.CodePushReleaseModification, releaseLabel: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.CodePushRelease>): void;
}

/**
 * @class
 * CodePushDeploymentRelease
 * __NOTE__: An instance of this class is automatically created for an
 * instance of the CodepushClient.
 */
export interface CodePushDeploymentRelease {


    /**
     * Rollback the latest or a specific release for an app deployment
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.releaseLabel] The specific release label that you
     * want to rollback to
     *
     * @param {string} [options.releaseLabel.label]
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @returns {Promise} A promise is returned
     *
     * @resolve {HttpOperationResponse<CodePushRelease>} - The deserialized result object.
     *
     * @reject {Error|ServiceError} - The error object.
     */
    rollbackWithHttpOperationResponse(appName: string, deploymentName: string, ownerName: string, options?: { releaseLabel? : models.CodePushReleaseLabel, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.CodePushRelease>>;

    /**
     * Rollback the latest or a specific release for an app deployment
     *
     * @param {string} appName The name of the application
     *
     * @param {string} deploymentName deployment name
     *
     * @param {string} ownerName The name of the owner
     *
     * @param {object} [options] Optional Parameters.
     *
     * @param {object} [options.releaseLabel] The specific release label that you
     * want to rollback to
     *
     * @param {string} [options.releaseLabel.label]
     *
     * @param {object} [options.customHeaders] Headers that will be added to the
     * request
     *
     * @param {ServiceCallback} [optionalCallback] - The optional callback.
     *
     * @returns {ServiceCallback|Promise} If a callback was passed as the last
     * parameter then it returns the callback else returns a Promise.
     *
     * {Promise} A promise is returned.
     *
     *                      @resolve {CodePushRelease} - The deserialized result object.
     *
     *                      @reject {Error|ServiceError} - The error object.
     *
     * {ServiceCallback} optionalCallback(err, result, request, response)
     *
     *                      {Error|ServiceError}  err        - The Error object if an error occurred, null otherwise.
     *
     *                      {CodePushRelease} [result]   - The deserialized result object if an error did not occur.
     *                      See {@link CodePushRelease} for more information.
     *
     *                      {WebResource} [request]  - The HTTP Request object if an error did not occur.
     *
     *                      {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
     */
    rollback(appName: string, deploymentName: string, ownerName: string, options?: { releaseLabel? : models.CodePushReleaseLabel, customHeaders? : { [headerName: string]: string; } }): Promise<models.CodePushRelease>;
    rollback(appName: string, deploymentName: string, ownerName: string, callback: ServiceCallback<models.CodePushRelease>): void;
    rollback(appName: string, deploymentName: string, ownerName: string, options: { releaseLabel? : models.CodePushReleaseLabel, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.CodePushRelease>): void;
}
