@atomist/cortex
Version:
Atomist Cortex model TypeScript typings
319 lines (318 loc) • 10.6 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 ChatChannel
* Generated class exposing Atomist Cortex.
* Fluent builder style class for use in testing and query by example.
*/
var ChatChannel = (function () {
function ChatChannel() {
this._nodeName = "ChatChannel";
this._nodeTags = ["ChatChannel", "-dynamic"];
}
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
ChatChannel.prototype.nodeName = function () {
return this._nodeName;
};
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
ChatChannel.prototype.nodeTags = function () {
return this._nodeTags;
};
Object.defineProperty(ChatChannel.prototype, "botInvitedSelf", {
/**
* botInvitedSelf
*
* @property {boolean} botInvitedSelf
*/
get: function () {
if (this._botInvitedSelf === undefined) {
throw new Error("Please use the relevant builder method to set property [botInvitedSelf] on stub " +
"[ChatChannel] before accessing it. It's probably called [withBotInvitedSelf]");
}
return this._botInvitedSelf;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the botInvitedSelf property
*/
ChatChannel.prototype.withBotInvitedSelf = function (botInvitedSelf_) {
this._botInvitedSelf = botInvitedSelf_;
return this;
};
Object.defineProperty(ChatChannel.prototype, "createdBy", {
/**
* createdBy - ChatChannel -> ChatId
*
* @property {ChatId} createdBy
*/
get: function () {
if (this._createdBy === undefined) {
throw new Error("Please use the relevant builder method to set property [createdBy] on stub " +
"[ChatChannel] before accessing it. It's probably called [withCreatedBy]");
}
return this._createdBy;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the createdBy property
*/
ChatChannel.prototype.withCreatedBy = function (createdBy_) {
this._createdBy = createdBy_;
return this;
};
Object.defineProperty(ChatChannel.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 " +
"[ChatChannel] before accessing it. It's probably called [withId]");
}
return this._id;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the id property
*/
ChatChannel.prototype.withId = function (id_) {
this._id = id_;
return this;
};
Object.defineProperty(ChatChannel.prototype, "isDefault", {
/**
* isDefault
*
* @property {boolean} isDefault
*/
get: function () {
if (this._isDefault === undefined) {
throw new Error("Please use the relevant builder method to set property [isDefault] on stub " +
"[ChatChannel] before accessing it. It's probably called [withIsDefault]");
}
return this._isDefault;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the isDefault property
*/
ChatChannel.prototype.withIsDefault = function (isDefault_) {
this._isDefault = isDefault_;
return this;
};
Object.defineProperty(ChatChannel.prototype, "links", {
/**
* links - ChatChannel -> ChannelLink
*
* @property {ChannelLink[]} links
*/
get: function () {
if (this._links === undefined) {
throw new Error("Please use the relevant builder method to set property [links] on stub " +
"[ChatChannel] before accessing it. It's probably called [withLinks]");
}
return this._links;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the links array
*/
ChatChannel.prototype.addLinks = function () {
var links_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
links_[_i] = arguments[_i];
}
if (this._links === undefined) {
this._links = [];
}
this._links = this._links.concat(links_);
return this;
};
Object.defineProperty(ChatChannel.prototype, "members", {
/**
* members - ChatChannel -> 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 " +
"[ChatChannel] 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
*/
ChatChannel.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(ChatChannel.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 " +
"[ChatChannel] before accessing it. It's probably called [withName]");
}
return this._name;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the name property
*/
ChatChannel.prototype.withName = function (name_) {
this._name = name_;
return this;
};
Object.defineProperty(ChatChannel.prototype, "normalizedName", {
/**
* normalizedName
*
* @property {string} normalizedName
*/
get: function () {
if (this._normalizedName === undefined) {
throw new Error("Please use the relevant builder method to set property [normalizedName] on stub " +
"[ChatChannel] before accessing it. It's probably called [withNormalizedName]");
}
return this._normalizedName;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the normalizedName property
*/
ChatChannel.prototype.withNormalizedName = function (normalizedName_) {
this._normalizedName = normalizedName_;
return this;
};
Object.defineProperty(ChatChannel.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 " +
"[ChatChannel] before accessing it. It's probably called [withProvider]");
}
return this._provider;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the provider property
*/
ChatChannel.prototype.withProvider = function (provider_) {
this._provider = provider_;
return this;
};
Object.defineProperty(ChatChannel.prototype, "repos", {
/**
* repos - ChatChannel -> Repo
*
* @property {Repo[]} repos
*/
get: function () {
if (this._repos === undefined) {
throw new Error("Please use the relevant builder method to set property [repos] on stub " +
"[ChatChannel] before accessing it. It's probably called [withRepos]");
}
return this._repos;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the repos array
*/
ChatChannel.prototype.addRepos = function () {
var repos_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
repos_[_i] = arguments[_i];
}
if (this._repos === undefined) {
this._repos = [];
}
this._repos = this._repos.concat(repos_);
return this;
};
Object.defineProperty(ChatChannel.prototype, "team", {
/**
* team - ChatChannel -> ChatTeam
*
* @property {ChatTeam} team
*/
get: function () {
if (this._team === undefined) {
throw new Error("Please use the relevant builder method to set property [team] on stub " +
"[ChatChannel] before accessing it. It's probably called [withTeam]");
}
return this._team;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the team property
*/
ChatChannel.prototype.withTeam = function (team_) {
this._team = team_;
return this;
};
return ChatChannel;
}());
exports.ChatChannel = ChatChannel;