/*
 * Copyright 2015-2017 Atomist Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import { TreeNode, GraphNode, FormatInfo, PathExpressionEngine } from "@atomist/rug/tree/PathExpression";
import { ProjectContext } from "@atomist/rug/operations/ProjectEditor";
import { FileArtifactBacked } from "./FileArtifactBacked";
import { MutableView } from "./MutableView";
export { DockerFile };

/**
 * Docker file type
 */
interface DockerFile extends FileArtifactBacked, MutableView {

    /**
     * Add ADD directive
     *
     * @param addContents {string} The contents of the ADD directive
     */
    addAdd(addContents: string): void;

    /**
     * Add COPY directive
     *
     * @param copyContents {string} The contents of the COPY directive
     */
    addCopy(copyContents: string): void;

    /**
     * Add Env directive
     *
     * @param envContents {string} The contents of the Env directive
     */
    addEnv(envContents: string): void;

    /**
     * Add EXPOSE directive
     *
     * @param exposeContents {string} The contents of the EXPOSE directive
     */
    addExpose(exposeContents: string): void;

    /**
     * Add LABEL directive
     *
     * @param labelContents {string} The contents of the LABEL directive
     */
    addLabel(labelContents: string): void;

    /**
     * Add MAINTAINER directive
     *
     * @param maintainerName {string} The name of the MAINTAINER directive
     * @param maintainerEmail {string} The email of the MAINTAINER directive
     */
    addMaintainer(maintainerName: string, maintainerEmail: string): void;

    /**
     * Add or update CMD directive
     *
     * @param cmdContents {string} The contents of the CMD directive
     */
    addOrUpdateCmd(cmdContents: string): void;

    /**
     * Add or update ENTRYPOINT directive
     *
     * @param entrypointContent {string} The contents of the ENTRYPOINT directive
     */
    addOrUpdateEntryPoint(entrypointContent: string): void;

    /**
     * Add or update EXPOSE directive
     *
     * @param exposeContents {string} The contents of the EXPOSE directive
     */
    addOrUpdateExpose(exposeContents: string): void;

    /**
     * Add or update FROM directive
     *
     * @param fromContents {string} The contents of the FROM directive
     */
    addOrUpdateFrom(fromContents: string): void;

    /**
     * Add or update HEALTHCHECK directive
     *
     * @param healthcheckContent {string} The contents of the HEALTHCHECK directive
     */
    addOrUpdateHealthcheck(healthcheckContent: string): void;

    /**
     * Add or update LABEL directive
     *
     * @param labelContents {string} The contents of the LABEL directive
     */
    addOrUpdateLabel(labelContents: string): void;

    /**
     * Add or update MAINTAINER directive
     *
     * @param maintainerName {string} The name of the MAINTAINER directive
     * @param maintainerEmail {string} The email of the MAINTAINER directive
     */
    addOrUpdateMaintainer(maintainerName: string, maintainerEmail: string): void;

    /**
     * Add or update WORKDIR directive
     *
     * @param workdirContents {string} The contents of the WORKDIR directive
     */
    addOrUpdateWorkdir(workdirContents: string): void;

    /**
     * Add RUN directive
     *
     * @param runContents {string} The contents of the RUN directive
     */
    addRun(runContents: string): void;

    /**
     * Add VOLUME directive
     *
     * @param volumeContents {string} The contents of the VOLUME directive
     */
    addVolume(volumeContents: string): void;

    /**
     * 
     *
     * @returns {any[]}
     */
    getExposedPorts(): any[];

}
