UNPKG

@atomist/cortex

Version:

Atomist Cortex model TypeScript typings

213 lines (212 loc) 6.81 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 Application * Generated class exposing Atomist Cortex. * Fluent builder style class for use in testing and query by example. */ var Application = (function () { function Application() { this._nodeName = "Application"; this._nodeTags = ["Application", "-dynamic"]; } /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ Application.prototype.nodeName = function () { return this._nodeName; }; /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ Application.prototype.nodeTags = function () { return this._nodeTags; }; Object.defineProperty(Application.prototype, "commits", { /** * commits - Application -> Commit * * @property {Commit[]} commits */ get: function () { if (this._commits === undefined) { throw new Error("Please use the relevant builder method to set property [commits] on stub " + "[Application] before accessing it. It's probably called [withCommits]"); } return this._commits; }, enumerable: true, configurable: true }); /** * Fluent builder method to add an element to the commits array */ Application.prototype.addCommits = function () { var commits_ = []; for (var _i = 0; _i < arguments.length; _i++) { commits_[_i] = arguments[_i]; } if (this._commits === undefined) { this._commits = []; } this._commits = this._commits.concat(commits_); return this; }; Object.defineProperty(Application.prototype, "data", { /** * data * * @property {string} data */ get: function () { if (this._data === undefined) { throw new Error("Please use the relevant builder method to set property [data] on stub " + "[Application] before accessing it. It's probably called [withData]"); } return this._data; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the data property */ Application.prototype.withData = function (data_) { this._data = data_; return this; }; Object.defineProperty(Application.prototype, "domain", { /** * domain * * @property {string} domain */ get: function () { if (this._domain === undefined) { throw new Error("Please use the relevant builder method to set property [domain] on stub " + "[Application] before accessing it. It's probably called [withDomain]"); } return this._domain; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the domain property */ Application.prototype.withDomain = function (domain_) { this._domain = domain_; return this; }; Object.defineProperty(Application.prototype, "host", { /** * host * * @property {string} host */ get: function () { if (this._host === undefined) { throw new Error("Please use the relevant builder method to set property [host] on stub " + "[Application] before accessing it. It's probably called [withHost]"); } return this._host; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the host property */ Application.prototype.withHost = function (host_) { this._host = host_; return this; }; Object.defineProperty(Application.prototype, "id", { /** * id * * @property {string} id */ get: function () { if (this._id === undefined) { throw new Error("Please use the relevant builder method to set property [id] on stub " + "[Application] before accessing it. It's probably called [withId]"); } return this._id; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the id property */ Application.prototype.withId = function (id_) { this._id = id_; return this; }; Object.defineProperty(Application.prototype, "state", { /** * state * * @property {string} state */ get: function () { if (this._state === undefined) { throw new Error("Please use the relevant builder method to set property [state] on stub " + "[Application] before accessing it. It's probably called [withState]"); } return this._state; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the state property */ Application.prototype.withState = function (state_) { this._state = state_; return this; }; Object.defineProperty(Application.prototype, "timestamp", { /** * timestamp * * @property {string} timestamp */ get: function () { if (this._timestamp === undefined) { throw new Error("Please use the relevant builder method to set property [timestamp] on stub " + "[Application] before accessing it. It's probably called [withTimestamp]"); } return this._timestamp; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the timestamp property */ Application.prototype.withTimestamp = function (timestamp_) { this._timestamp = timestamp_; return this; }; return Application; }()); exports.Application = Application;