@atomist/cortex
Version:
Atomist Cortex model TypeScript typings
213 lines (212 loc) • 6.76 kB
JavaScript
"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 HerokuApp
* Generated class exposing Atomist Cortex.
* Fluent builder style class for use in testing and query by example.
*/
var HerokuApp = (function () {
function HerokuApp() {
this._nodeName = "HerokuApp";
this._nodeTags = ["HerokuApp", "-dynamic"];
}
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
HerokuApp.prototype.nodeName = function () {
return this._nodeName;
};
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
HerokuApp.prototype.nodeTags = function () {
return this._nodeTags;
};
Object.defineProperty(HerokuApp.prototype, "app", {
/**
* app
*
* @property {string} app
*/
get: function () {
if (this._app === undefined) {
throw new Error("Please use the relevant builder method to set property [app] on stub " +
"[HerokuApp] before accessing it. It's probably called [withApp]");
}
return this._app;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the app property
*/
HerokuApp.prototype.withApp = function (app_) {
this._app = app_;
return this;
};
Object.defineProperty(HerokuApp.prototype, "appId", {
/**
* appId
*
* @property {string} appId
*/
get: function () {
if (this._appId === undefined) {
throw new Error("Please use the relevant builder method to set property [appId] on stub " +
"[HerokuApp] before accessing it. It's probably called [withAppId]");
}
return this._appId;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the appId property
*/
HerokuApp.prototype.withAppId = function (appId_) {
this._appId = appId_;
return this;
};
Object.defineProperty(HerokuApp.prototype, "commits", {
/**
* commits - HerokuApp -> 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 " +
"[HerokuApp] 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
*/
HerokuApp.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(HerokuApp.prototype, "release", {
/**
* release
*
* @property {string} release
*/
get: function () {
if (this._release === undefined) {
throw new Error("Please use the relevant builder method to set property [release] on stub " +
"[HerokuApp] before accessing it. It's probably called [withRelease]");
}
return this._release;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the release property
*/
HerokuApp.prototype.withRelease = function (release_) {
this._release = release_;
return this;
};
Object.defineProperty(HerokuApp.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 " +
"[HerokuApp] before accessing it. It's probably called [withTimestamp]");
}
return this._timestamp;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the timestamp property
*/
HerokuApp.prototype.withTimestamp = function (timestamp_) {
this._timestamp = timestamp_;
return this;
};
Object.defineProperty(HerokuApp.prototype, "url", {
/**
* url
*
* @property {string} url
*/
get: function () {
if (this._url === undefined) {
throw new Error("Please use the relevant builder method to set property [url] on stub " +
"[HerokuApp] before accessing it. It's probably called [withUrl]");
}
return this._url;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the url property
*/
HerokuApp.prototype.withUrl = function (url_) {
this._url = url_;
return this;
};
Object.defineProperty(HerokuApp.prototype, "user", {
/**
* user
*
* @property {string} user
*/
get: function () {
if (this._user === undefined) {
throw new Error("Please use the relevant builder method to set property [user] on stub " +
"[HerokuApp] before accessing it. It's probably called [withUser]");
}
return this._user;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the user property
*/
HerokuApp.prototype.withUser = function (user_) {
this._user = user_;
return this;
};
return HerokuApp;
}());
exports.HerokuApp = HerokuApp;