UNPKG

@atomist/cortex

Version:

Atomist Cortex model TypeScript typings

174 lines (173 loc) 5.53 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 Org * Generated class exposing Atomist Cortex. * Fluent builder style class for use in testing and query by example. */ var Org = (function () { function Org() { this._nodeName = "Org"; this._nodeTags = ["Org", "-dynamic"]; } /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ Org.prototype.nodeName = function () { return this._nodeName; }; /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ Org.prototype.nodeTags = function () { return this._nodeTags; }; Object.defineProperty(Org.prototype, "chatTeam", { /** * chatTeam - Org -> ChatTeam * * @property {ChatTeam} chatTeam */ get: function () { if (this._chatTeam === undefined) { throw new Error("Please use the relevant builder method to set property [chatTeam] on stub " + "[Org] before accessing it. It's probably called [withChatTeam]"); } return this._chatTeam; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the chatTeam property */ Org.prototype.withChatTeam = function (chatTeam_) { this._chatTeam = chatTeam_; return this; }; Object.defineProperty(Org.prototype, "owner", { /** * owner * * @property {string} owner */ get: function () { if (this._owner === undefined) { throw new Error("Please use the relevant builder method to set property [owner] on stub " + "[Org] before accessing it. It's probably called [withOwner]"); } return this._owner; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the owner property */ Org.prototype.withOwner = function (owner_) { this._owner = owner_; return this; }; Object.defineProperty(Org.prototype, "provider", { /** * provider - Org -> GitHubProvider * * @property {GitHubProvider} provider */ get: function () { if (this._provider === undefined) { throw new Error("Please use the relevant builder method to set property [provider] on stub " + "[Org] before accessing it. It's probably called [withProvider]"); } return this._provider; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the provider property */ Org.prototype.withProvider = function (provider_) { this._provider = provider_; return this; }; Object.defineProperty(Org.prototype, "repo", { /** * repo - Org -> 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 " + "[Org] before accessing it. It's probably called [withRepo]"); } return this._repo; }, enumerable: true, configurable: true }); /** * Fluent builder method to add an element to the repo array */ Org.prototype.addRepo = function () { var repo_ = []; for (var _i = 0; _i < arguments.length; _i++) { repo_[_i] = arguments[_i]; } if (this._repo === undefined) { this._repo = []; } this._repo = this._repo.concat(repo_); return this; }; Object.defineProperty(Org.prototype, "webhook", { /** * webhook - Org -> GitHubOrgWebhook * * @property {GitHubOrgWebhook[]} webhook */ get: function () { if (this._webhook === undefined) { throw new Error("Please use the relevant builder method to set property [webhook] on stub " + "[Org] before accessing it. It's probably called [withWebhook]"); } return this._webhook; }, enumerable: true, configurable: true }); /** * Fluent builder method to add an element to the webhook array */ Org.prototype.addWebhook = function () { var webhook_ = []; for (var _i = 0; _i < arguments.length; _i++) { webhook_[_i] = arguments[_i]; } if (this._webhook === undefined) { this._webhook = []; } this._webhook = this._webhook.concat(webhook_); return this; }; return Org; }()); exports.Org = Org;