UNPKG

@atomist/cortex

Version:

Atomist Cortex model TypeScript typings

321 lines (320 loc) 10.3 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 Comment * Generated class exposing Atomist Cortex. * Fluent builder style class for use in testing and query by example. */ var Comment = (function () { function Comment() { this._nodeName = "Comment"; this._nodeTags = ["Comment", "-dynamic"]; } /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ Comment.prototype.nodeName = function () { return this._nodeName; }; /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ Comment.prototype.nodeTags = function () { return this._nodeTags; }; Object.defineProperty(Comment.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 " + "[Comment] before accessing it. It's probably called [withBody]"); } return this._body; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the body property */ Comment.prototype.withBody = function (body_) { this._body = body_; return this; }; Object.defineProperty(Comment.prototype, "by", { /** * by - Comment -> GitHubId * * @property {GitHubId} by */ get: function () { if (this._by === undefined) { throw new Error("Please use the relevant builder method to set property [by] on stub " + "[Comment] before accessing it. It's probably called [withBy]"); } return this._by; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the by property */ Comment.prototype.withBy = function (by_) { this._by = by_; return this; }; Object.defineProperty(Comment.prototype, "commentType", { /** * commentType * * @property {"review" | "pullRequest" | "issue"} commentType */ get: function () { if (this._commentType === undefined) { throw new Error("Please use the relevant builder method to set property [commentType] on stub " + "[Comment] before accessing it. It's probably called [withCommentType]"); } return this._commentType; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the commentType property */ Comment.prototype.withCommentType = function (commentType_) { this._commentType = commentType_; return this; }; Object.defineProperty(Comment.prototype, "gitHubId", { /** * gitHubId * * @property {string} gitHubId */ get: function () { if (this._gitHubId === undefined) { throw new Error("Please use the relevant builder method to set property [gitHubId] on stub " + "[Comment] before accessing it. It's probably called [withGitHubId]"); } return this._gitHubId; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the gitHubId property */ Comment.prototype.withGitHubId = function (gitHubId_) { this._gitHubId = gitHubId_; return this; }; Object.defineProperty(Comment.prototype, "htmlUrl", { /** * htmlUrl * * @property {string} htmlUrl */ get: function () { if (this._htmlUrl === undefined) { throw new Error("Please use the relevant builder method to set property [htmlUrl] on stub " + "[Comment] before accessing it. It's probably called [withHtmlUrl]"); } return this._htmlUrl; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the htmlUrl property */ Comment.prototype.withHtmlUrl = function (htmlUrl_) { this._htmlUrl = htmlUrl_; return this; }; Object.defineProperty(Comment.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 " + "[Comment] before accessing it. It's probably called [withId]"); } return this._id; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the id property */ Comment.prototype.withId = function (id_) { this._id = id_; return this; }; Object.defineProperty(Comment.prototype, "issue", { /** * issue - Comment -> Issue * * @property {Issue} issue */ get: function () { if (this._issue === undefined) { throw new Error("Please use the relevant builder method to set property [issue] on stub " + "[Comment] before accessing it. It's probably called [withIssue]"); } return this._issue; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the issue property */ Comment.prototype.withIssue = function (issue_) { this._issue = issue_; return this; }; Object.defineProperty(Comment.prototype, "path", { /** * path * * @property {string} path */ get: function () { if (this._path === undefined) { throw new Error("Please use the relevant builder method to set property [path] on stub " + "[Comment] before accessing it. It's probably called [withPath]"); } return this._path; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the path property */ Comment.prototype.withPath = function (path_) { this._path = path_; return this; }; Object.defineProperty(Comment.prototype, "position", { /** * position * * @property {string} position */ get: function () { if (this._position === undefined) { throw new Error("Please use the relevant builder method to set property [position] on stub " + "[Comment] before accessing it. It's probably called [withPosition]"); } return this._position; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the position property */ Comment.prototype.withPosition = function (position_) { this._position = position_; return this; }; Object.defineProperty(Comment.prototype, "pullRequest", { /** * pullRequest - Comment -> PullRequest * * @property {PullRequest} pullRequest */ get: function () { if (this._pullRequest === undefined) { throw new Error("Please use the relevant builder method to set property [pullRequest] on stub " + "[Comment] before accessing it. It's probably called [withPullRequest]"); } return this._pullRequest; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the pullRequest property */ Comment.prototype.withPullRequest = function (pullRequest_) { this._pullRequest = pullRequest_; return this; }; Object.defineProperty(Comment.prototype, "review", { /** * review - Comment -> Review * * @property {Review} review */ get: function () { if (this._review === undefined) { throw new Error("Please use the relevant builder method to set property [review] on stub " + "[Comment] before accessing it. It's probably called [withReview]"); } return this._review; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the review property */ Comment.prototype.withReview = function (review_) { this._review = review_; return this; }; Object.defineProperty(Comment.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 " + "[Comment] before accessing it. It's probably called [withTimestamp]"); } return this._timestamp; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the timestamp property */ Comment.prototype.withTimestamp = function (timestamp_) { this._timestamp = timestamp_; return this; }; return Comment; }()); exports.Comment = Comment;