UNPKG

@atomist/cortex

Version:

Atomist Cortex model TypeScript typings

303 lines (302 loc) 9.91 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 ChatTeam * Generated class exposing Atomist Cortex. * Fluent builder style class for use in testing and query by example. */ var ChatTeam = (function () { function ChatTeam() { this._nodeName = "ChatTeam"; this._nodeTags = ["ChatTeam", "-dynamic"]; } /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ ChatTeam.prototype.nodeName = function () { return this._nodeName; }; /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ ChatTeam.prototype.nodeTags = function () { return this._nodeTags; }; Object.defineProperty(ChatTeam.prototype, "channels", { /** * channels - ChatTeam -> ChatChannel * * @property {ChatChannel[]} channels */ get: function () { if (this._channels === undefined) { throw new Error("Please use the relevant builder method to set property [channels] on stub " + "[ChatTeam] before accessing it. It's probably called [withChannels]"); } return this._channels; }, enumerable: true, configurable: true }); /** * Fluent builder method to add an element to the channels array */ ChatTeam.prototype.addChannels = function () { var channels_ = []; for (var _i = 0; _i < arguments.length; _i++) { channels_[_i] = arguments[_i]; } if (this._channels === undefined) { this._channels = []; } this._channels = this._channels.concat(channels_); return this; }; Object.defineProperty(ChatTeam.prototype, "domain", { /** * domain * * @property {string} domain */ get: function () { if (this._domain === undefined) { throw new Error("Please use the relevant builder method to set property [domain] on stub " + "[ChatTeam] before accessing it. It's probably called [withDomain]"); } return this._domain; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the domain property */ ChatTeam.prototype.withDomain = function (domain_) { this._domain = domain_; return this; }; Object.defineProperty(ChatTeam.prototype, "emailDomain", { /** * emailDomain * * @property {string} emailDomain */ get: function () { if (this._emailDomain === undefined) { throw new Error("Please use the relevant builder method to set property [emailDomain] on stub " + "[ChatTeam] before accessing it. It's probably called [withEmailDomain]"); } return this._emailDomain; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the emailDomain property */ ChatTeam.prototype.withEmailDomain = function (emailDomain_) { this._emailDomain = emailDomain_; return this; }; Object.defineProperty(ChatTeam.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 " + "[ChatTeam] before accessing it. It's probably called [withId]"); } return this._id; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the id property */ ChatTeam.prototype.withId = function (id_) { this._id = id_; return this; }; Object.defineProperty(ChatTeam.prototype, "members", { /** * members - ChatTeam -> ChatId * * @property {ChatId[]} members */ get: function () { if (this._members === undefined) { throw new Error("Please use the relevant builder method to set property [members] on stub " + "[ChatTeam] before accessing it. It's probably called [withMembers]"); } return this._members; }, enumerable: true, configurable: true }); /** * Fluent builder method to add an element to the members array */ ChatTeam.prototype.addMembers = function () { var members_ = []; for (var _i = 0; _i < arguments.length; _i++) { members_[_i] = arguments[_i]; } if (this._members === undefined) { this._members = []; } this._members = this._members.concat(members_); return this; }; Object.defineProperty(ChatTeam.prototype, "messageCount", { /** * messageCount * * @property {number} messageCount */ get: function () { if (this._messageCount === undefined) { throw new Error("Please use the relevant builder method to set property [messageCount] on stub " + "[ChatTeam] before accessing it. It's probably called [withMessageCount]"); } return this._messageCount; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the messageCount property */ ChatTeam.prototype.withMessageCount = function (messageCount_) { this._messageCount = messageCount_; return this; }; Object.defineProperty(ChatTeam.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 " + "[ChatTeam] before accessing it. It's probably called [withName]"); } return this._name; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the name property */ ChatTeam.prototype.withName = function (name_) { this._name = name_; return this; }; Object.defineProperty(ChatTeam.prototype, "orgs", { /** * orgs - ChatTeam -> Org * * @property {Org[]} orgs */ get: function () { if (this._orgs === undefined) { throw new Error("Please use the relevant builder method to set property [orgs] on stub " + "[ChatTeam] before accessing it. It's probably called [withOrgs]"); } return this._orgs; }, enumerable: true, configurable: true }); /** * Fluent builder method to add an element to the orgs array */ ChatTeam.prototype.addOrgs = function () { var orgs_ = []; for (var _i = 0; _i < arguments.length; _i++) { orgs_[_i] = arguments[_i]; } if (this._orgs === undefined) { this._orgs = []; } this._orgs = this._orgs.concat(orgs_); return this; }; Object.defineProperty(ChatTeam.prototype, "provider", { /** * provider * * @property {string} provider */ get: function () { if (this._provider === undefined) { throw new Error("Please use the relevant builder method to set property [provider] on stub " + "[ChatTeam] before accessing it. It's probably called [withProvider]"); } return this._provider; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the provider property */ ChatTeam.prototype.withProvider = function (provider_) { this._provider = provider_; return this; }; Object.defineProperty(ChatTeam.prototype, "providers", { /** * providers - ChatTeam -> GitHubProvider * * @property {GitHubProvider[]} providers */ get: function () { if (this._providers === undefined) { throw new Error("Please use the relevant builder method to set property [providers] on stub " + "[ChatTeam] before accessing it. It's probably called [withProviders]"); } return this._providers; }, enumerable: true, configurable: true }); /** * Fluent builder method to add an element to the providers array */ ChatTeam.prototype.addProviders = function () { var providers_ = []; for (var _i = 0; _i < arguments.length; _i++) { providers_[_i] = arguments[_i]; } if (this._providers === undefined) { this._providers = []; } this._providers = this._providers.concat(providers_); return this; }; return ChatTeam; }()); exports.ChatTeam = ChatTeam;