@atomist/cortex
Version:
Atomist Cortex model TypeScript typings
476 lines (475 loc) • 15.7 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 Commit
* Generated class exposing Atomist Cortex.
* Fluent builder style class for use in testing and query by example.
*/
var Commit = (function () {
function Commit() {
this._nodeName = "Commit";
this._nodeTags = ["Commit", "-dynamic"];
}
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
Commit.prototype.nodeName = function () {
return this._nodeName;
};
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
Commit.prototype.nodeTags = function () {
return this._nodeTags;
};
Object.defineProperty(Commit.prototype, "apps", {
/**
* apps - Commit -> Application
*
* @property {Application[]} apps
*/
get: function () {
if (this._apps === undefined) {
throw new Error("Please use the relevant builder method to set property [apps] on stub " +
"[Commit] before accessing it. It's probably called [withApps]");
}
return this._apps;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the apps array
*/
Commit.prototype.addApps = function () {
var apps_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
apps_[_i] = arguments[_i];
}
if (this._apps === undefined) {
this._apps = [];
}
this._apps = this._apps.concat(apps_);
return this;
};
Object.defineProperty(Commit.prototype, "author", {
/**
* author - Commit -> GitHubId
*
* @property {GitHubId} author
*/
get: function () {
if (this._author === undefined) {
throw new Error("Please use the relevant builder method to set property [author] on stub " +
"[Commit] before accessing it. It's probably called [withAuthor]");
}
return this._author;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the author property
*/
Commit.prototype.withAuthor = function (author_) {
this._author = author_;
return this;
};
Object.defineProperty(Commit.prototype, "builds", {
/**
* builds - Commit -> Build
*
* @property {Build[]} builds
*/
get: function () {
if (this._builds === undefined) {
throw new Error("Please use the relevant builder method to set property [builds] on stub " +
"[Commit] before accessing it. It's probably called [withBuilds]");
}
return this._builds;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the builds array
*/
Commit.prototype.addBuilds = function () {
var builds_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
builds_[_i] = arguments[_i];
}
if (this._builds === undefined) {
this._builds = [];
}
this._builds = this._builds.concat(builds_);
return this;
};
Object.defineProperty(Commit.prototype, "committer", {
/**
* committer - Commit -> GitHubId
*
* @property {GitHubId} committer
*/
get: function () {
if (this._committer === undefined) {
throw new Error("Please use the relevant builder method to set property [committer] on stub " +
"[Commit] before accessing it. It's probably called [withCommitter]");
}
return this._committer;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the committer property
*/
Commit.prototype.withCommitter = function (committer_) {
this._committer = committer_;
return this;
};
Object.defineProperty(Commit.prototype, "fingerprints", {
/**
* fingerprints - Commit -> Fingerprint
*
* @property {Fingerprint[]} fingerprints
*/
get: function () {
if (this._fingerprints === undefined) {
throw new Error("Please use the relevant builder method to set property [fingerprints] on stub " +
"[Commit] before accessing it. It's probably called [withFingerprints]");
}
return this._fingerprints;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the fingerprints array
*/
Commit.prototype.addFingerprints = function () {
var fingerprints_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
fingerprints_[_i] = arguments[_i];
}
if (this._fingerprints === undefined) {
this._fingerprints = [];
}
this._fingerprints = this._fingerprints.concat(fingerprints_);
return this;
};
Object.defineProperty(Commit.prototype, "herokuApps", {
/**
* herokuApps - Commit -> HerokuApp
*
* @property {HerokuApp[]} herokuApps
*/
get: function () {
if (this._herokuApps === undefined) {
throw new Error("Please use the relevant builder method to set property [herokuApps] on stub " +
"[Commit] before accessing it. It's probably called [withHerokuApps]");
}
return this._herokuApps;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the herokuApps array
*/
Commit.prototype.addHerokuApps = function () {
var herokuApps_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
herokuApps_[_i] = arguments[_i];
}
if (this._herokuApps === undefined) {
this._herokuApps = [];
}
this._herokuApps = this._herokuApps.concat(herokuApps_);
return this;
};
Object.defineProperty(Commit.prototype, "impact", {
/**
* impact - Commit -> ParentImpact
*
* @property {ParentImpact} impact
*/
get: function () {
if (this._impact === undefined) {
throw new Error("Please use the relevant builder method to set property [impact] on stub " +
"[Commit] before accessing it. It's probably called [withImpact]");
}
return this._impact;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the impact property
*/
Commit.prototype.withImpact = function (impact_) {
this._impact = impact_;
return this;
};
Object.defineProperty(Commit.prototype, "message", {
/**
* message
*
* @property {string} message
*/
get: function () {
if (this._message === undefined) {
throw new Error("Please use the relevant builder method to set property [message] on stub " +
"[Commit] before accessing it. It's probably called [withMessage]");
}
return this._message;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the message property
*/
Commit.prototype.withMessage = function (message_) {
this._message = message_;
return this;
};
Object.defineProperty(Commit.prototype, "pullRequests", {
/**
* pullRequests - Commit -> PullRequest
*
* @property {PullRequest[]} pullRequests
*/
get: function () {
if (this._pullRequests === undefined) {
throw new Error("Please use the relevant builder method to set property [pullRequests] on stub " +
"[Commit] before accessing it. It's probably called [withPullRequests]");
}
return this._pullRequests;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the pullRequests array
*/
Commit.prototype.addPullRequests = function () {
var pullRequests_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
pullRequests_[_i] = arguments[_i];
}
if (this._pullRequests === undefined) {
this._pullRequests = [];
}
this._pullRequests = this._pullRequests.concat(pullRequests_);
return this;
};
Object.defineProperty(Commit.prototype, "pushes", {
/**
* pushes - Commit -> Push
*
* @property {Push[]} pushes
*/
get: function () {
if (this._pushes === undefined) {
throw new Error("Please use the relevant builder method to set property [pushes] on stub " +
"[Commit] before accessing it. It's probably called [withPushes]");
}
return this._pushes;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the pushes array
*/
Commit.prototype.addPushes = function () {
var pushes_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
pushes_[_i] = arguments[_i];
}
if (this._pushes === undefined) {
this._pushes = [];
}
this._pushes = this._pushes.concat(pushes_);
return this;
};
Object.defineProperty(Commit.prototype, "repo", {
/**
* repo - Commit -> Repo
*
* @property {Repo} repo
*/
get: function () {
if (this._repo === undefined) {
throw new Error("Please use the relevant builder method to set property [repo] on stub " +
"[Commit] before accessing it. It's probably called [withRepo]");
}
return this._repo;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the repo property
*/
Commit.prototype.withRepo = function (repo_) {
this._repo = repo_;
return this;
};
Object.defineProperty(Commit.prototype, "resolves", {
/**
* resolves - Commit -> Issue
*
* @property {Issue[]} resolves
*/
get: function () {
if (this._resolves === undefined) {
throw new Error("Please use the relevant builder method to set property [resolves] on stub " +
"[Commit] before accessing it. It's probably called [withResolves]");
}
return this._resolves;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the resolves array
*/
Commit.prototype.addResolves = function () {
var resolves_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
resolves_[_i] = arguments[_i];
}
if (this._resolves === undefined) {
this._resolves = [];
}
this._resolves = this._resolves.concat(resolves_);
return this;
};
Object.defineProperty(Commit.prototype, "sha", {
/**
* sha
*
* @property {string} sha
*/
get: function () {
if (this._sha === undefined) {
throw new Error("Please use the relevant builder method to set property [sha] on stub " +
"[Commit] before accessing it. It's probably called [withSha]");
}
return this._sha;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the sha property
*/
Commit.prototype.withSha = function (sha_) {
this._sha = sha_;
return this;
};
Object.defineProperty(Commit.prototype, "statuses", {
/**
* statuses - Commit -> Status
*
* @property {Status[]} statuses
*/
get: function () {
if (this._statuses === undefined) {
throw new Error("Please use the relevant builder method to set property [statuses] on stub " +
"[Commit] before accessing it. It's probably called [withStatuses]");
}
return this._statuses;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the statuses array
*/
Commit.prototype.addStatuses = function () {
var statuses_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
statuses_[_i] = arguments[_i];
}
if (this._statuses === undefined) {
this._statuses = [];
}
this._statuses = this._statuses.concat(statuses_);
return this;
};
Object.defineProperty(Commit.prototype, "tags", {
/**
* tags - Commit -> Tag
*
* @property {Tag[]} tags
*/
get: function () {
if (this._tags === undefined) {
throw new Error("Please use the relevant builder method to set property [tags] on stub " +
"[Commit] before accessing it. It's probably called [withTags]");
}
return this._tags;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the tags array
*/
Commit.prototype.addTags = function () {
var tags_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
tags_[_i] = arguments[_i];
}
if (this._tags === undefined) {
this._tags = [];
}
this._tags = this._tags.concat(tags_);
return this;
};
Object.defineProperty(Commit.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 " +
"[Commit] before accessing it. It's probably called [withTimestamp]");
}
return this._timestamp;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the timestamp property
*/
Commit.prototype.withTimestamp = function (timestamp_) {
this._timestamp = timestamp_;
return this;
};
return Commit;
}());
exports.Commit = Commit;