UNPKG

@atomist/cortex

Version:

Atomist Cortex model TypeScript typings

510 lines (509 loc) 16.6 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 Issue * Generated class exposing Atomist Cortex. * Fluent builder style class for use in testing and query by example. */ var Issue = (function () { function Issue() { this._nodeName = "Issue"; this._nodeTags = ["Issue", "-dynamic"]; } /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ Issue.prototype.nodeName = function () { return this._nodeName; }; /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ Issue.prototype.nodeTags = function () { return this._nodeTags; }; Object.defineProperty(Issue.prototype, "action", { /** * action * * @property {string} action */ get: function () { if (this._action === undefined) { throw new Error("Please use the relevant builder method to set property [action] on stub " + "[Issue] before accessing it. It's probably called [withAction]"); } return this._action; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the action property */ Issue.prototype.withAction = function (action_) { this._action = action_; return this; }; Object.defineProperty(Issue.prototype, "assignees", { /** * assignees - Issue -> 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 " + "[Issue] 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 */ Issue.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(Issue.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 " + "[Issue] before accessing it. It's probably called [withBody]"); } return this._body; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the body property */ Issue.prototype.withBody = function (body_) { this._body = body_; return this; }; Object.defineProperty(Issue.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 " + "[Issue] before accessing it. It's probably called [withClosedAt]"); } return this._closedAt; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the closedAt property */ Issue.prototype.withClosedAt = function (closedAt_) { this._closedAt = closedAt_; return this; }; Object.defineProperty(Issue.prototype, "closedBy", { /** * closedBy - Issue -> GitHubId * * @property {GitHubId} closedBy */ get: function () { if (this._closedBy === undefined) { throw new Error("Please use the relevant builder method to set property [closedBy] on stub " + "[Issue] before accessing it. It's probably called [withClosedBy]"); } return this._closedBy; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the closedBy property */ Issue.prototype.withClosedBy = function (closedBy_) { this._closedBy = closedBy_; return this; }; Object.defineProperty(Issue.prototype, "comments", { /** * comments - Issue -> 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 " + "[Issue] 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 */ Issue.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(Issue.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 " + "[Issue] before accessing it. It's probably called [withCreatedAt]"); } return this._createdAt; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the createdAt property */ Issue.prototype.withCreatedAt = function (createdAt_) { this._createdAt = createdAt_; return this; }; Object.defineProperty(Issue.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 " + "[Issue] before accessing it. It's probably called [withId]"); } return this._id; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the id property */ Issue.prototype.withId = function (id_) { this._id = id_; return this; }; Object.defineProperty(Issue.prototype, "labels", { /** * labels - Issue -> 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 " + "[Issue] 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 */ Issue.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(Issue.prototype, "lastAssignedBy", { /** * lastAssignedBy - Issue -> 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 " + "[Issue] before accessing it. It's probably called [withLastAssignedBy]"); } return this._lastAssignedBy; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the lastAssignedBy property */ Issue.prototype.withLastAssignedBy = function (lastAssignedBy_) { this._lastAssignedBy = lastAssignedBy_; return this; }; Object.defineProperty(Issue.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 " + "[Issue] before accessing it. It's probably called [withName]"); } return this._name; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the name property */ Issue.prototype.withName = function (name_) { this._name = name_; return this; }; Object.defineProperty(Issue.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 " + "[Issue] before accessing it. It's probably called [withNumber]"); } return this._number; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the number property */ Issue.prototype.withNumber = function (number_) { this._number = number_; return this; }; Object.defineProperty(Issue.prototype, "openedBy", { /** * openedBy - Issue -> GitHubId * * @property {GitHubId} openedBy */ get: function () { if (this._openedBy === undefined) { throw new Error("Please use the relevant builder method to set property [openedBy] on stub " + "[Issue] before accessing it. It's probably called [withOpenedBy]"); } return this._openedBy; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the openedBy property */ Issue.prototype.withOpenedBy = function (openedBy_) { this._openedBy = openedBy_; return this; }; Object.defineProperty(Issue.prototype, "repo", { /** * repo - Issue -> 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 " + "[Issue] before accessing it. It's probably called [withRepo]"); } return this._repo; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the repo property */ Issue.prototype.withRepo = function (repo_) { this._repo = repo_; return this; }; Object.defineProperty(Issue.prototype, "resolvingCommits", { /** * resolvingCommits - Issue -> Commit * * @property {Commit[]} resolvingCommits */ get: function () { if (this._resolvingCommits === undefined) { throw new Error("Please use the relevant builder method to set property [resolvingCommits] on stub " + "[Issue] before accessing it. It's probably called [withResolvingCommits]"); } return this._resolvingCommits; }, enumerable: true, configurable: true }); /** * Fluent builder method to add an element to the resolvingCommits array */ Issue.prototype.addResolvingCommits = function () { var resolvingCommits_ = []; for (var _i = 0; _i < arguments.length; _i++) { resolvingCommits_[_i] = arguments[_i]; } if (this._resolvingCommits === undefined) { this._resolvingCommits = []; } this._resolvingCommits = this._resolvingCommits.concat(resolvingCommits_); return this; }; Object.defineProperty(Issue.prototype, "state", { /** * state * * @property {"open" | "closed"} state */ get: function () { if (this._state === undefined) { throw new Error("Please use the relevant builder method to set property [state] on stub " + "[Issue] before accessing it. It's probably called [withState]"); } return this._state; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the state property */ Issue.prototype.withState = function (state_) { this._state = state_; return this; }; Object.defineProperty(Issue.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 " + "[Issue] before accessing it. It's probably called [withTimestamp]"); } return this._timestamp; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the timestamp property */ Issue.prototype.withTimestamp = function (timestamp_) { this._timestamp = timestamp_; return this; }; Object.defineProperty(Issue.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 " + "[Issue] before accessing it. It's probably called [withTitle]"); } return this._title; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the title property */ Issue.prototype.withTitle = function (title_) { this._title = title_; return this; }; Object.defineProperty(Issue.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 " + "[Issue] before accessing it. It's probably called [withUpdatedAt]"); } return this._updatedAt; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the updatedAt property */ Issue.prototype.withUpdatedAt = function (updatedAt_) { this._updatedAt = updatedAt_; return this; }; return Issue; }()); exports.Issue = Issue;