@atomist/cortex
Version:
Atomist Cortex model TypeScript typings
411 lines (410 loc) • 13.7 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 ChatId
* Generated class exposing Atomist Cortex.
* Fluent builder style class for use in testing and query by example.
*/
var ChatId = (function () {
function ChatId() {
this._nodeName = "ChatId";
this._nodeTags = ["ChatId", "-dynamic"];
}
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
ChatId.prototype.nodeName = function () {
return this._nodeName;
};
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
ChatId.prototype.nodeTags = function () {
return this._nodeTags;
};
Object.defineProperty(ChatId.prototype, "channels", {
/**
* channels - ChatId -> 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 " +
"[ChatId] 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
*/
ChatId.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(ChatId.prototype, "channelsCreated", {
/**
* channelsCreated - ChatId -> ChatChannel
*
* @property {ChatChannel[]} channelsCreated
*/
get: function () {
if (this._channelsCreated === undefined) {
throw new Error("Please use the relevant builder method to set property [channelsCreated] on stub " +
"[ChatId] before accessing it. It's probably called [withChannelsCreated]");
}
return this._channelsCreated;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the channelsCreated array
*/
ChatId.prototype.addChannelsCreated = function () {
var channelsCreated_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
channelsCreated_[_i] = arguments[_i];
}
if (this._channelsCreated === undefined) {
this._channelsCreated = [];
}
this._channelsCreated = this._channelsCreated.concat(channelsCreated_);
return this;
};
Object.defineProperty(ChatId.prototype, "chatTeam", {
/**
* chatTeam - ChatId -> 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 " +
"[ChatId] before accessing it. It's probably called [withChatTeam]");
}
return this._chatTeam;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the chatTeam property
*/
ChatId.prototype.withChatTeam = function (chatTeam_) {
this._chatTeam = chatTeam_;
return this;
};
Object.defineProperty(ChatId.prototype, "emails", {
/**
* emails - ChatId -> Email
*
* @property {Email[]} emails
*/
get: function () {
if (this._emails === undefined) {
throw new Error("Please use the relevant builder method to set property [emails] on stub " +
"[ChatId] before accessing it. It's probably called [withEmails]");
}
return this._emails;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the emails array
*/
ChatId.prototype.addEmails = function () {
var emails_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
emails_[_i] = arguments[_i];
}
if (this._emails === undefined) {
this._emails = [];
}
this._emails = this._emails.concat(emails_);
return this;
};
Object.defineProperty(ChatId.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 " +
"[ChatId] before accessing it. It's probably called [withId]");
}
return this._id;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the id property
*/
ChatId.prototype.withId = function (id_) {
this._id = id_;
return this;
};
Object.defineProperty(ChatId.prototype, "isAdmin", {
/**
* isAdmin
*
* @property {boolean} isAdmin
*/
get: function () {
if (this._isAdmin === undefined) {
throw new Error("Please use the relevant builder method to set property [isAdmin] on stub " +
"[ChatId] before accessing it. It's probably called [withIsAdmin]");
}
return this._isAdmin;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the isAdmin property
*/
ChatId.prototype.withIsAdmin = function (isAdmin_) {
this._isAdmin = isAdmin_;
return this;
};
Object.defineProperty(ChatId.prototype, "isAtomistBot", {
/**
* isAtomistBot
*
* @property {boolean} isAtomistBot
*/
get: function () {
if (this._isAtomistBot === undefined) {
throw new Error("Please use the relevant builder method to set property [isAtomistBot] on stub " +
"[ChatId] before accessing it. It's probably called [withIsAtomistBot]");
}
return this._isAtomistBot;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the isAtomistBot property
*/
ChatId.prototype.withIsAtomistBot = function (isAtomistBot_) {
this._isAtomistBot = isAtomistBot_;
return this;
};
Object.defineProperty(ChatId.prototype, "isBot", {
/**
* isBot
*
* @property {boolean} isBot
*/
get: function () {
if (this._isBot === undefined) {
throw new Error("Please use the relevant builder method to set property [isBot] on stub " +
"[ChatId] before accessing it. It's probably called [withIsBot]");
}
return this._isBot;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the isBot property
*/
ChatId.prototype.withIsBot = function (isBot_) {
this._isBot = isBot_;
return this;
};
Object.defineProperty(ChatId.prototype, "isOwner", {
/**
* isOwner
*
* @property {boolean} isOwner
*/
get: function () {
if (this._isOwner === undefined) {
throw new Error("Please use the relevant builder method to set property [isOwner] on stub " +
"[ChatId] before accessing it. It's probably called [withIsOwner]");
}
return this._isOwner;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the isOwner property
*/
ChatId.prototype.withIsOwner = function (isOwner_) {
this._isOwner = isOwner_;
return this;
};
Object.defineProperty(ChatId.prototype, "isPrimaryOwner", {
/**
* isPrimaryOwner
*
* @property {boolean} isPrimaryOwner
*/
get: function () {
if (this._isPrimaryOwner === undefined) {
throw new Error("Please use the relevant builder method to set property [isPrimaryOwner] on stub " +
"[ChatId] before accessing it. It's probably called [withIsPrimaryOwner]");
}
return this._isPrimaryOwner;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the isPrimaryOwner property
*/
ChatId.prototype.withIsPrimaryOwner = function (isPrimaryOwner_) {
this._isPrimaryOwner = isPrimaryOwner_;
return this;
};
Object.defineProperty(ChatId.prototype, "person", {
/**
* person - ChatId -> Person
*
* @property {Person} person
*/
get: function () {
if (this._person === undefined) {
throw new Error("Please use the relevant builder method to set property [person] on stub " +
"[ChatId] before accessing it. It's probably called [withPerson]");
}
return this._person;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the person property
*/
ChatId.prototype.withPerson = function (person_) {
this._person = person_;
return this;
};
Object.defineProperty(ChatId.prototype, "preferences", {
/**
* preferences - ChatId -> UserPreferences
*
* @property {UserPreferences} preferences
*/
get: function () {
if (this._preferences === undefined) {
throw new Error("Please use the relevant builder method to set property [preferences] on stub " +
"[ChatId] before accessing it. It's probably called [withPreferences]");
}
return this._preferences;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the preferences property
*/
ChatId.prototype.withPreferences = function (preferences_) {
this._preferences = preferences_;
return this;
};
Object.defineProperty(ChatId.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 " +
"[ChatId] before accessing it. It's probably called [withProvider]");
}
return this._provider;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the provider property
*/
ChatId.prototype.withProvider = function (provider_) {
this._provider = provider_;
return this;
};
Object.defineProperty(ChatId.prototype, "screenName", {
/**
* screenName
*
* @property {string} screenName
*/
get: function () {
if (this._screenName === undefined) {
throw new Error("Please use the relevant builder method to set property [screenName] on stub " +
"[ChatId] before accessing it. It's probably called [withScreenName]");
}
return this._screenName;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the screenName property
*/
ChatId.prototype.withScreenName = function (screenName_) {
this._screenName = screenName_;
return this;
};
Object.defineProperty(ChatId.prototype, "timezoneLabel", {
/**
* timezoneLabel
*
* @property {string} timezoneLabel
*/
get: function () {
if (this._timezoneLabel === undefined) {
throw new Error("Please use the relevant builder method to set property [timezoneLabel] on stub " +
"[ChatId] before accessing it. It's probably called [withTimezoneLabel]");
}
return this._timezoneLabel;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the timezoneLabel property
*/
ChatId.prototype.withTimezoneLabel = function (timezoneLabel_) {
this._timezoneLabel = timezoneLabel_;
return this;
};
return ChatId;
}());
exports.ChatId = ChatId;