@atomist/cortex
Version:
Atomist Cortex model TypeScript typings
91 lines (90 loc) • 3.07 kB
JavaScript
/*
* 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 UserJoinedChannel
* Generated class exposing Atomist Cortex.
* Fluent builder style class for use in testing and query by example.
*/
var UserJoinedChannel = (function () {
function UserJoinedChannel() {
this._nodeName = "UserJoinedChannel";
this._nodeTags = ["UserJoinedChannel", "-dynamic"];
}
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
UserJoinedChannel.prototype.nodeName = function () {
return this._nodeName;
};
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
UserJoinedChannel.prototype.nodeTags = function () {
return this._nodeTags;
};
Object.defineProperty(UserJoinedChannel.prototype, "channel", {
/**
* channel - UserJoinedChannel -> ChatChannel
*
* @property {ChatChannel} channel
*/
get: function () {
if (this._channel === undefined) {
throw new Error("Please use the relevant builder method to set property [channel] on stub " +
"[UserJoinedChannel] before accessing it. It's probably called [withChannel]");
}
return this._channel;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the channel property
*/
UserJoinedChannel.prototype.withChannel = function (channel_) {
this._channel = channel_;
return this;
};
Object.defineProperty(UserJoinedChannel.prototype, "user", {
/**
* user - UserJoinedChannel -> ChatId
*
* @property {ChatId} user
*/
get: function () {
if (this._user === undefined) {
throw new Error("Please use the relevant builder method to set property [user] on stub " +
"[UserJoinedChannel] before accessing it. It's probably called [withUser]");
}
return this._user;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the user property
*/
UserJoinedChannel.prototype.withUser = function (user_) {
this._user = user_;
return this;
};
return UserJoinedChannel;
}());
exports.UserJoinedChannel = UserJoinedChannel;
;