@atomist/cortex
Version: 
Atomist Cortex model TypeScript typings
115 lines (101 loc) • 3.25 kB
text/typescript
/*
 * 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 * as pullRequestImpactApi from "../PullRequestImpact";
import { PullRequest } from "./PullRequest";
export { PullRequestImpact };
/**
 * Type PullRequestImpact
 * Generated class exposing Atomist Cortex.
 * Fluent builder style class for use in testing and query by example.
 */
class PullRequestImpact implements pullRequestImpactApi.PullRequestImpact {
    private _data: string;
    private _pullRequest: PullRequest;
    private _url: string;
    private _nodeName = "PullRequestImpact";
    private _nodeTags = [ "PullRequestImpact", "-dynamic" ];
    /**
     * Implementation of GraphNode interface method.
     * For infrastructure, not user use
     */
    public nodeName(): string {
        return this._nodeName;
    }
    /**
     * Implementation of GraphNode interface method.
     * For infrastructure, not user use
     */
    public nodeTags(): string[] {
        return this._nodeTags;
    }
    /**
     * data
     *
     * @property {string} data
     */
    get data(): string {
        if (this._data === undefined) {
            throw new Error(`Please use the relevant builder method to set property [data] on stub ` +
                `[PullRequestImpact] before accessing it. It's probably called [withData]`);
        }
        return this._data;
    }
    /**
     * Fluent builder method to set the data property
     */
    public withData(data_: string) {
        this._data = data_;
        return this;
    }
    /**
     * pullRequest - PullRequestImpact -> PullRequest
     *
     * @property {PullRequest} pullRequest
     */
    get pullRequest(): PullRequest {
        if (this._pullRequest === undefined) {
            throw new Error(`Please use the relevant builder method to set property [pullRequest] on stub ` +
                `[PullRequestImpact] before accessing it. It's probably called [withPullRequest]`);
        }
        return this._pullRequest;
    }
    /**
     * Fluent builder method to set the pullRequest property
     */
    public withPullRequest(pullRequest_: PullRequest) {
        this._pullRequest = pullRequest_;
        return this;
    }
    /**
     * url
     *
     * @property {string} url
     */
    get url(): string {
        if (this._url === undefined) {
            throw new Error(`Please use the relevant builder method to set property [url] on stub ` +
                `[PullRequestImpact] before accessing it. It's probably called [withUrl]`);
        }
        return this._url;
    }
    /**
     * Fluent builder method to set the url property
     */
    public withUrl(url_: string) {
        this._url = url_;
        return this;
    }
}