@atomist/cortex
Version:
Atomist Cortex model TypeScript typings
413 lines (412 loc) • 13.5 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 Build
* Generated class exposing Atomist Cortex.
* Fluent builder style class for use in testing and query by example.
*/
var Build = (function () {
function Build() {
this._nodeName = "Build";
this._nodeTags = ["Build", "-dynamic"];
}
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
Build.prototype.nodeName = function () {
return this._nodeName;
};
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
Build.prototype.nodeTags = function () {
return this._nodeTags;
};
Object.defineProperty(Build.prototype, "buildUrl", {
/**
* buildUrl
*
* @property {string} buildUrl
*/
get: function () {
if (this._buildUrl === undefined) {
throw new Error("Please use the relevant builder method to set property [buildUrl] on stub " +
"[Build] before accessing it. It's probably called [withBuildUrl]");
}
return this._buildUrl;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the buildUrl property
*/
Build.prototype.withBuildUrl = function (buildUrl_) {
this._buildUrl = buildUrl_;
return this;
};
Object.defineProperty(Build.prototype, "commit", {
/**
* commit - Build -> Commit
*
* @property {Commit} commit
*/
get: function () {
if (this._commit === undefined) {
throw new Error("Please use the relevant builder method to set property [commit] on stub " +
"[Build] before accessing it. It's probably called [withCommit]");
}
return this._commit;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the commit property
*/
Build.prototype.withCommit = function (commit_) {
this._commit = commit_;
return this;
};
Object.defineProperty(Build.prototype, "compareUrl", {
/**
* compareUrl
*
* @property {string} compareUrl
*/
get: function () {
if (this._compareUrl === undefined) {
throw new Error("Please use the relevant builder method to set property [compareUrl] on stub " +
"[Build] before accessing it. It's probably called [withCompareUrl]");
}
return this._compareUrl;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the compareUrl property
*/
Build.prototype.withCompareUrl = function (compareUrl_) {
this._compareUrl = compareUrl_;
return this;
};
Object.defineProperty(Build.prototype, "finishedAt", {
/**
* finishedAt
*
* @property {string} finishedAt
*/
get: function () {
if (this._finishedAt === undefined) {
throw new Error("Please use the relevant builder method to set property [finishedAt] on stub " +
"[Build] before accessing it. It's probably called [withFinishedAt]");
}
return this._finishedAt;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the finishedAt property
*/
Build.prototype.withFinishedAt = function (finishedAt_) {
this._finishedAt = finishedAt_;
return this;
};
Object.defineProperty(Build.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 " +
"[Build] before accessing it. It's probably called [withId]");
}
return this._id;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the id property
*/
Build.prototype.withId = function (id_) {
this._id = id_;
return this;
};
Object.defineProperty(Build.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 " +
"[Build] before accessing it. It's probably called [withName]");
}
return this._name;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the name property
*/
Build.prototype.withName = function (name_) {
this._name = name_;
return this;
};
Object.defineProperty(Build.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 " +
"[Build] before accessing it. It's probably called [withProvider]");
}
return this._provider;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the provider property
*/
Build.prototype.withProvider = function (provider_) {
this._provider = provider_;
return this;
};
Object.defineProperty(Build.prototype, "pullRequest", {
/**
* pullRequest - Build -> PullRequest
*
* @property {PullRequest} pullRequest
*/
get: function () {
if (this._pullRequest === undefined) {
throw new Error("Please use the relevant builder method to set property [pullRequest] on stub " +
"[Build] before accessing it. It's probably called [withPullRequest]");
}
return this._pullRequest;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the pullRequest property
*/
Build.prototype.withPullRequest = function (pullRequest_) {
this._pullRequest = pullRequest_;
return this;
};
Object.defineProperty(Build.prototype, "pullRequestNumber", {
/**
* pullRequestNumber
*
* @property {number} pullRequestNumber
*/
get: function () {
if (this._pullRequestNumber === undefined) {
throw new Error("Please use the relevant builder method to set property [pullRequestNumber] on stub " +
"[Build] before accessing it. It's probably called [withPullRequestNumber]");
}
return this._pullRequestNumber;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the pullRequestNumber property
*/
Build.prototype.withPullRequestNumber = function (pullRequestNumber_) {
this._pullRequestNumber = pullRequestNumber_;
return this;
};
Object.defineProperty(Build.prototype, "push", {
/**
* push - Build -> Push
*
* @property {Push} push
*/
get: function () {
if (this._push === undefined) {
throw new Error("Please use the relevant builder method to set property [push] on stub " +
"[Build] before accessing it. It's probably called [withPush]");
}
return this._push;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the push property
*/
Build.prototype.withPush = function (push_) {
this._push = push_;
return this;
};
Object.defineProperty(Build.prototype, "repo", {
/**
* repo - Build -> Repo
*
* @property {Repo} repo
*/
get: function () {
if (this._repo === undefined) {
throw new Error("Please use the relevant builder method to set property [repo] on stub " +
"[Build] before accessing it. It's probably called [withRepo]");
}
return this._repo;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the repo property
*/
Build.prototype.withRepo = function (repo_) {
this._repo = repo_;
return this;
};
Object.defineProperty(Build.prototype, "spinnakerPipeline", {
/**
* spinnakerPipeline - Build -> SpinnakerPipeline
*
* @property {SpinnakerPipeline} spinnakerPipeline
*/
get: function () {
if (this._spinnakerPipeline === undefined) {
throw new Error("Please use the relevant builder method to set property [spinnakerPipeline] on stub " +
"[Build] before accessing it. It's probably called [withSpinnakerPipeline]");
}
return this._spinnakerPipeline;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the spinnakerPipeline property
*/
Build.prototype.withSpinnakerPipeline = function (spinnakerPipeline_) {
this._spinnakerPipeline = spinnakerPipeline_;
return this;
};
Object.defineProperty(Build.prototype, "startedAt", {
/**
* startedAt
*
* @property {string} startedAt
*/
get: function () {
if (this._startedAt === undefined) {
throw new Error("Please use the relevant builder method to set property [startedAt] on stub " +
"[Build] before accessing it. It's probably called [withStartedAt]");
}
return this._startedAt;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the startedAt property
*/
Build.prototype.withStartedAt = function (startedAt_) {
this._startedAt = startedAt_;
return this;
};
Object.defineProperty(Build.prototype, "status", {
/**
* status
*
* @property {"passed" | "broken" | "failed" | "started" | "canceled"} status
*/
get: function () {
if (this._status === undefined) {
throw new Error("Please use the relevant builder method to set property [status] on stub " +
"[Build] before accessing it. It's probably called [withStatus]");
}
return this._status;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the status property
*/
Build.prototype.withStatus = function (status_) {
this._status = status_;
return this;
};
Object.defineProperty(Build.prototype, "timestamp", {
/**
* timestamp
*
* @property {string} timestamp
*/
get: function () {
if (this._timestamp === undefined) {
throw new Error("Please use the relevant builder method to set property [timestamp] on stub " +
"[Build] before accessing it. It's probably called [withTimestamp]");
}
return this._timestamp;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the timestamp property
*/
Build.prototype.withTimestamp = function (timestamp_) {
this._timestamp = timestamp_;
return this;
};
Object.defineProperty(Build.prototype, "trigger", {
/**
* trigger
*
* @property {"pull_request" | "push"} trigger
*/
get: function () {
if (this._trigger === undefined) {
throw new Error("Please use the relevant builder method to set property [trigger] on stub " +
"[Build] before accessing it. It's probably called [withTrigger]");
}
return this._trigger;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the trigger property
*/
Build.prototype.withTrigger = function (trigger_) {
this._trigger = trigger_;
return this;
};
return Build;
}());
exports.Build = Build;