UNPKG

@atomist/cortex

Version:

Atomist Cortex model TypeScript typings

160 lines (159 loc) 5.16 kB
"use strict"; /* * 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. */ Object.defineProperty(exports, "__esModule", { value: true }); /** * Type Status * Generated class exposing Atomist Cortex. * Fluent builder style class for use in testing and query by example. */ var Status = (function () { function Status() { this._nodeName = "Status"; this._nodeTags = ["Status", "-dynamic"]; } /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ Status.prototype.nodeName = function () { return this._nodeName; }; /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ Status.prototype.nodeTags = function () { return this._nodeTags; }; Object.defineProperty(Status.prototype, "commit", { /** * commit - Status -> Commit * * @property {Commit} commit */ get: function () { if (this._commit === undefined) { throw new Error("Please use the relevant builder method to set property [commit] on stub " + "[Status] before accessing it. It's probably called [withCommit]"); } return this._commit; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the commit property */ Status.prototype.withCommit = function (commit_) { this._commit = commit_; return this; }; Object.defineProperty(Status.prototype, "context", { /** * context * * @property {string} context */ get: function () { if (this._context === undefined) { throw new Error("Please use the relevant builder method to set property [context] on stub " + "[Status] before accessing it. It's probably called [withContext]"); } return this._context; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the context property */ Status.prototype.withContext = function (context_) { this._context = context_; return this; }; Object.defineProperty(Status.prototype, "description", { /** * description * * @property {string} description */ get: function () { if (this._description === undefined) { throw new Error("Please use the relevant builder method to set property [description] on stub " + "[Status] before accessing it. It's probably called [withDescription]"); } return this._description; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the description property */ Status.prototype.withDescription = function (description_) { this._description = description_; return this; }; Object.defineProperty(Status.prototype, "state", { /** * state * * @property {"pending" | "success" | "error" | "failure"} state */ get: function () { if (this._state === undefined) { throw new Error("Please use the relevant builder method to set property [state] on stub " + "[Status] before accessing it. It's probably called [withState]"); } return this._state; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the state property */ Status.prototype.withState = function (state_) { this._state = state_; return this; }; Object.defineProperty(Status.prototype, "targetUrl", { /** * targetUrl * * @property {string} targetUrl */ get: function () { if (this._targetUrl === undefined) { throw new Error("Please use the relevant builder method to set property [targetUrl] on stub " + "[Status] before accessing it. It's probably called [withTargetUrl]"); } return this._targetUrl; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the targetUrl property */ Status.prototype.withTargetUrl = function (targetUrl_) { this._targetUrl = targetUrl_; return this; }; return Status; }()); exports.Status = Status;