@atomist/cortex
Version:
Atomist Cortex model TypeScript typings
137 lines (136 loc) • 4.36 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 Email
* Generated class exposing Atomist Cortex.
* Fluent builder style class for use in testing and query by example.
*/
var Email = (function () {
function Email() {
this._nodeName = "Email";
this._nodeTags = ["Email", "-dynamic"];
}
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
Email.prototype.nodeName = function () {
return this._nodeName;
};
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
Email.prototype.nodeTags = function () {
return this._nodeTags;
};
Object.defineProperty(Email.prototype, "address", {
/**
* address
*
* @property {string} address
*/
get: function () {
if (this._address === undefined) {
throw new Error("Please use the relevant builder method to set property [address] on stub " +
"[Email] before accessing it. It's probably called [withAddress]");
}
return this._address;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the address property
*/
Email.prototype.withAddress = function (address_) {
this._address = address_;
return this;
};
Object.defineProperty(Email.prototype, "chatId", {
/**
* chatId - Email -> ChatId
*
* @property {ChatId} chatId
*/
get: function () {
if (this._chatId === undefined) {
throw new Error("Please use the relevant builder method to set property [chatId] on stub " +
"[Email] before accessing it. It's probably called [withChatId]");
}
return this._chatId;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the chatId property
*/
Email.prototype.withChatId = function (chatId_) {
this._chatId = chatId_;
return this;
};
Object.defineProperty(Email.prototype, "gitHubId", {
/**
* gitHubId - Email -> GitHubId
*
* @property {GitHubId} gitHubId
*/
get: function () {
if (this._gitHubId === undefined) {
throw new Error("Please use the relevant builder method to set property [gitHubId] on stub " +
"[Email] before accessing it. It's probably called [withGitHubId]");
}
return this._gitHubId;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the gitHubId property
*/
Email.prototype.withGitHubId = function (gitHubId_) {
this._gitHubId = gitHubId_;
return this;
};
Object.defineProperty(Email.prototype, "person", {
/**
* person - Email -> 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 " +
"[Email] before accessing it. It's probably called [withPerson]");
}
return this._person;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the person property
*/
Email.prototype.withPerson = function (person_) {
this._person = person_;
return this;
};
return Email;
}());
exports.Email = Email;
;