@atomist/cortex
Version:
Atomist Cortex model TypeScript typings
761 lines (760 loc) • 25.3 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 PullRequest
* Generated class exposing Atomist Cortex.
* Fluent builder style class for use in testing and query by example.
*/
var PullRequest = (function () {
function PullRequest() {
this._nodeName = "PullRequest";
this._nodeTags = ["PullRequest", "-dynamic"];
}
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
PullRequest.prototype.nodeName = function () {
return this._nodeName;
};
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
PullRequest.prototype.nodeTags = function () {
return this._nodeTags;
};
Object.defineProperty(PullRequest.prototype, "assignees", {
/**
* assignees - PullRequest -> GitHubId
*
* @property {GitHubId[]} assignees
*/
get: function () {
if (this._assignees === undefined) {
throw new Error("Please use the relevant builder method to set property [assignees] on stub " +
"[PullRequest] before accessing it. It's probably called [withAssignees]");
}
return this._assignees;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the assignees array
*/
PullRequest.prototype.addAssignees = function () {
var assignees_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
assignees_[_i] = arguments[_i];
}
if (this._assignees === undefined) {
this._assignees = [];
}
this._assignees = this._assignees.concat(assignees_);
return this;
};
Object.defineProperty(PullRequest.prototype, "author", {
/**
* author - PullRequest -> 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 " +
"[PullRequest] before accessing it. It's probably called [withAuthor]");
}
return this._author;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the author property
*/
PullRequest.prototype.withAuthor = function (author_) {
this._author = author_;
return this;
};
Object.defineProperty(PullRequest.prototype, "base", {
/**
* base - PullRequest -> Commit
*
* @property {Commit} base
*/
get: function () {
if (this._base === undefined) {
throw new Error("Please use the relevant builder method to set property [base] on stub " +
"[PullRequest] before accessing it. It's probably called [withBase]");
}
return this._base;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the base property
*/
PullRequest.prototype.withBase = function (base_) {
this._base = base_;
return this;
};
Object.defineProperty(PullRequest.prototype, "baseBranchName", {
/**
* baseBranchName
*
* @property {string} baseBranchName
*/
get: function () {
if (this._baseBranchName === undefined) {
throw new Error("Please use the relevant builder method to set property [baseBranchName] on stub " +
"[PullRequest] before accessing it. It's probably called [withBaseBranchName]");
}
return this._baseBranchName;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the baseBranchName property
*/
PullRequest.prototype.withBaseBranchName = function (baseBranchName_) {
this._baseBranchName = baseBranchName_;
return this;
};
Object.defineProperty(PullRequest.prototype, "body", {
/**
* body
*
* @property {string} body
*/
get: function () {
if (this._body === undefined) {
throw new Error("Please use the relevant builder method to set property [body] on stub " +
"[PullRequest] before accessing it. It's probably called [withBody]");
}
return this._body;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the body property
*/
PullRequest.prototype.withBody = function (body_) {
this._body = body_;
return this;
};
Object.defineProperty(PullRequest.prototype, "branch", {
/**
* branch - PullRequest -> Branch
*
* @property {Branch} branch
*/
get: function () {
if (this._branch === undefined) {
throw new Error("Please use the relevant builder method to set property [branch] on stub " +
"[PullRequest] before accessing it. It's probably called [withBranch]");
}
return this._branch;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the branch property
*/
PullRequest.prototype.withBranch = function (branch_) {
this._branch = branch_;
return this;
};
Object.defineProperty(PullRequest.prototype, "branchName", {
/**
* branchName
*
* @property {string} branchName
*/
get: function () {
if (this._branchName === undefined) {
throw new Error("Please use the relevant builder method to set property [branchName] on stub " +
"[PullRequest] before accessing it. It's probably called [withBranchName]");
}
return this._branchName;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the branchName property
*/
PullRequest.prototype.withBranchName = function (branchName_) {
this._branchName = branchName_;
return this;
};
Object.defineProperty(PullRequest.prototype, "builds", {
/**
* builds - PullRequest -> 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 " +
"[PullRequest] 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
*/
PullRequest.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(PullRequest.prototype, "closedAt", {
/**
* closedAt
*
* @property {string} closedAt
*/
get: function () {
if (this._closedAt === undefined) {
throw new Error("Please use the relevant builder method to set property [closedAt] on stub " +
"[PullRequest] before accessing it. It's probably called [withClosedAt]");
}
return this._closedAt;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the closedAt property
*/
PullRequest.prototype.withClosedAt = function (closedAt_) {
this._closedAt = closedAt_;
return this;
};
Object.defineProperty(PullRequest.prototype, "comments", {
/**
* comments - PullRequest -> Comment
*
* @property {Comment[]} comments
*/
get: function () {
if (this._comments === undefined) {
throw new Error("Please use the relevant builder method to set property [comments] on stub " +
"[PullRequest] before accessing it. It's probably called [withComments]");
}
return this._comments;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the comments array
*/
PullRequest.prototype.addComments = function () {
var comments_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
comments_[_i] = arguments[_i];
}
if (this._comments === undefined) {
this._comments = [];
}
this._comments = this._comments.concat(comments_);
return this;
};
Object.defineProperty(PullRequest.prototype, "commits", {
/**
* commits - PullRequest -> 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 " +
"[PullRequest] 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
*/
PullRequest.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(PullRequest.prototype, "createdAt", {
/**
* createdAt
*
* @property {string} createdAt
*/
get: function () {
if (this._createdAt === undefined) {
throw new Error("Please use the relevant builder method to set property [createdAt] on stub " +
"[PullRequest] before accessing it. It's probably called [withCreatedAt]");
}
return this._createdAt;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the createdAt property
*/
PullRequest.prototype.withCreatedAt = function (createdAt_) {
this._createdAt = createdAt_;
return this;
};
Object.defineProperty(PullRequest.prototype, "head", {
/**
* head - PullRequest -> Commit
*
* @property {Commit} head
*/
get: function () {
if (this._head === undefined) {
throw new Error("Please use the relevant builder method to set property [head] on stub " +
"[PullRequest] before accessing it. It's probably called [withHead]");
}
return this._head;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the head property
*/
PullRequest.prototype.withHead = function (head_) {
this._head = head_;
return this;
};
Object.defineProperty(PullRequest.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 " +
"[PullRequest] before accessing it. It's probably called [withId]");
}
return this._id;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the id property
*/
PullRequest.prototype.withId = function (id_) {
this._id = id_;
return this;
};
Object.defineProperty(PullRequest.prototype, "labels", {
/**
* labels - PullRequest -> Label
*
* @property {Label[]} labels
*/
get: function () {
if (this._labels === undefined) {
throw new Error("Please use the relevant builder method to set property [labels] on stub " +
"[PullRequest] before accessing it. It's probably called [withLabels]");
}
return this._labels;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the labels array
*/
PullRequest.prototype.addLabels = function () {
var labels_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
labels_[_i] = arguments[_i];
}
if (this._labels === undefined) {
this._labels = [];
}
this._labels = this._labels.concat(labels_);
return this;
};
Object.defineProperty(PullRequest.prototype, "lastAssignedBy", {
/**
* lastAssignedBy - PullRequest -> GitHubId
*
* @property {GitHubId} lastAssignedBy
*/
get: function () {
if (this._lastAssignedBy === undefined) {
throw new Error("Please use the relevant builder method to set property [lastAssignedBy] on stub " +
"[PullRequest] before accessing it. It's probably called [withLastAssignedBy]");
}
return this._lastAssignedBy;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the lastAssignedBy property
*/
PullRequest.prototype.withLastAssignedBy = function (lastAssignedBy_) {
this._lastAssignedBy = lastAssignedBy_;
return this;
};
Object.defineProperty(PullRequest.prototype, "mergeCommit", {
/**
* mergeCommit - PullRequest -> Commit
*
* @property {Commit} mergeCommit
*/
get: function () {
if (this._mergeCommit === undefined) {
throw new Error("Please use the relevant builder method to set property [mergeCommit] on stub " +
"[PullRequest] before accessing it. It's probably called [withMergeCommit]");
}
return this._mergeCommit;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the mergeCommit property
*/
PullRequest.prototype.withMergeCommit = function (mergeCommit_) {
this._mergeCommit = mergeCommit_;
return this;
};
Object.defineProperty(PullRequest.prototype, "merged", {
/**
* merged
*
* @property {boolean} merged
*/
get: function () {
if (this._merged === undefined) {
throw new Error("Please use the relevant builder method to set property [merged] on stub " +
"[PullRequest] before accessing it. It's probably called [withMerged]");
}
return this._merged;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the merged property
*/
PullRequest.prototype.withMerged = function (merged_) {
this._merged = merged_;
return this;
};
Object.defineProperty(PullRequest.prototype, "mergedAt", {
/**
* mergedAt
*
* @property {string} mergedAt
*/
get: function () {
if (this._mergedAt === undefined) {
throw new Error("Please use the relevant builder method to set property [mergedAt] on stub " +
"[PullRequest] before accessing it. It's probably called [withMergedAt]");
}
return this._mergedAt;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the mergedAt property
*/
PullRequest.prototype.withMergedAt = function (mergedAt_) {
this._mergedAt = mergedAt_;
return this;
};
Object.defineProperty(PullRequest.prototype, "merger", {
/**
* merger - PullRequest -> GitHubId
*
* @property {GitHubId} merger
*/
get: function () {
if (this._merger === undefined) {
throw new Error("Please use the relevant builder method to set property [merger] on stub " +
"[PullRequest] before accessing it. It's probably called [withMerger]");
}
return this._merger;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the merger property
*/
PullRequest.prototype.withMerger = function (merger_) {
this._merger = merger_;
return this;
};
Object.defineProperty(PullRequest.prototype, "name", {
/**
* name
*
* @property {string} name
*/
get: function () {
if (this._name === undefined) {
throw new Error("Please use the relevant builder method to set property [name] on stub " +
"[PullRequest] before accessing it. It's probably called [withName]");
}
return this._name;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the name property
*/
PullRequest.prototype.withName = function (name_) {
this._name = name_;
return this;
};
Object.defineProperty(PullRequest.prototype, "number", {
/**
* number
*
* @property {number} number
*/
get: function () {
if (this._number === undefined) {
throw new Error("Please use the relevant builder method to set property [number] on stub " +
"[PullRequest] before accessing it. It's probably called [withNumber]");
}
return this._number;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the number property
*/
PullRequest.prototype.withNumber = function (number_) {
this._number = number_;
return this;
};
Object.defineProperty(PullRequest.prototype, "repo", {
/**
* repo - PullRequest -> 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 " +
"[PullRequest] before accessing it. It's probably called [withRepo]");
}
return this._repo;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the repo property
*/
PullRequest.prototype.withRepo = function (repo_) {
this._repo = repo_;
return this;
};
Object.defineProperty(PullRequest.prototype, "reviewers", {
/**
* reviewers - PullRequest -> GitHubId
*
* @property {GitHubId[]} reviewers
*/
get: function () {
if (this._reviewers === undefined) {
throw new Error("Please use the relevant builder method to set property [reviewers] on stub " +
"[PullRequest] before accessing it. It's probably called [withReviewers]");
}
return this._reviewers;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the reviewers array
*/
PullRequest.prototype.addReviewers = function () {
var reviewers_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
reviewers_[_i] = arguments[_i];
}
if (this._reviewers === undefined) {
this._reviewers = [];
}
this._reviewers = this._reviewers.concat(reviewers_);
return this;
};
Object.defineProperty(PullRequest.prototype, "reviews", {
/**
* reviews - PullRequest -> Review
*
* @property {Review[]} reviews
*/
get: function () {
if (this._reviews === undefined) {
throw new Error("Please use the relevant builder method to set property [reviews] on stub " +
"[PullRequest] before accessing it. It's probably called [withReviews]");
}
return this._reviews;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the reviews array
*/
PullRequest.prototype.addReviews = function () {
var reviews_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
reviews_[_i] = arguments[_i];
}
if (this._reviews === undefined) {
this._reviews = [];
}
this._reviews = this._reviews.concat(reviews_);
return this;
};
Object.defineProperty(PullRequest.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 " +
"[PullRequest] before accessing it. It's probably called [withState]");
}
return this._state;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the state property
*/
PullRequest.prototype.withState = function (state_) {
this._state = state_;
return this;
};
Object.defineProperty(PullRequest.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 " +
"[PullRequest] before accessing it. It's probably called [withTimestamp]");
}
return this._timestamp;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the timestamp property
*/
PullRequest.prototype.withTimestamp = function (timestamp_) {
this._timestamp = timestamp_;
return this;
};
Object.defineProperty(PullRequest.prototype, "title", {
/**
* title
*
* @property {string} title
*/
get: function () {
if (this._title === undefined) {
throw new Error("Please use the relevant builder method to set property [title] on stub " +
"[PullRequest] before accessing it. It's probably called [withTitle]");
}
return this._title;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the title property
*/
PullRequest.prototype.withTitle = function (title_) {
this._title = title_;
return this;
};
Object.defineProperty(PullRequest.prototype, "updatedAt", {
/**
* updatedAt
*
* @property {string} updatedAt
*/
get: function () {
if (this._updatedAt === undefined) {
throw new Error("Please use the relevant builder method to set property [updatedAt] on stub " +
"[PullRequest] before accessing it. It's probably called [withUpdatedAt]");
}
return this._updatedAt;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the updatedAt property
*/
PullRequest.prototype.withUpdatedAt = function (updatedAt_) {
this._updatedAt = updatedAt_;
return this;
};
return PullRequest;
}());
exports.PullRequest = PullRequest;