@atomist/cortex
Version:
Atomist Cortex model TypeScript typings
174 lines (173 loc) • 5.61 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 GitHubId
* Generated class exposing Atomist Cortex.
* Fluent builder style class for use in testing and query by example.
*/
var GitHubId = (function () {
function GitHubId() {
this._nodeName = "GitHubId";
this._nodeTags = ["GitHubId", "-dynamic"];
}
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
GitHubId.prototype.nodeName = function () {
return this._nodeName;
};
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
GitHubId.prototype.nodeTags = function () {
return this._nodeTags;
};
Object.defineProperty(GitHubId.prototype, "emails", {
/**
* emails - GitHubId -> 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 " +
"[GitHubId] 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
*/
GitHubId.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(GitHubId.prototype, "login", {
/**
* login
*
* @property {string} login
*/
get: function () {
if (this._login === undefined) {
throw new Error("Please use the relevant builder method to set property [login] on stub " +
"[GitHubId] before accessing it. It's probably called [withLogin]");
}
return this._login;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the login property
*/
GitHubId.prototype.withLogin = function (login_) {
this._login = login_;
return this;
};
Object.defineProperty(GitHubId.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 " +
"[GitHubId] before accessing it. It's probably called [withName]");
}
return this._name;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the name property
*/
GitHubId.prototype.withName = function (name_) {
this._name = name_;
return this;
};
Object.defineProperty(GitHubId.prototype, "person", {
/**
* person - GitHubId -> 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 " +
"[GitHubId] before accessing it. It's probably called [withPerson]");
}
return this._person;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the person property
*/
GitHubId.prototype.withPerson = function (person_) {
this._person = person_;
return this;
};
Object.defineProperty(GitHubId.prototype, "provider", {
/**
* provider - GitHubId -> GitHubProvider
*
* @property {GitHubProvider[]} provider
*/
get: function () {
if (this._provider === undefined) {
throw new Error("Please use the relevant builder method to set property [provider] on stub " +
"[GitHubId] before accessing it. It's probably called [withProvider]");
}
return this._provider;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the provider array
*/
GitHubId.prototype.addProvider = function () {
var provider_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
provider_[_i] = arguments[_i];
}
if (this._provider === undefined) {
this._provider = [];
}
this._provider = this._provider.concat(provider_);
return this;
};
return GitHubId;
}());
exports.GitHubId = GitHubId;