@atomist/cortex
Version:
Atomist Cortex model TypeScript typings
289 lines (288 loc) • 10.1 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 SpinnakerPipeline
* Generated class exposing Atomist Cortex.
* Fluent builder style class for use in testing and query by example.
*/
var SpinnakerPipeline = (function () {
function SpinnakerPipeline() {
this._nodeName = "SpinnakerPipeline";
this._nodeTags = ["SpinnakerPipeline", "-dynamic"];
}
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
SpinnakerPipeline.prototype.nodeName = function () {
return this._nodeName;
};
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
SpinnakerPipeline.prototype.nodeTags = function () {
return this._nodeTags;
};
Object.defineProperty(SpinnakerPipeline.prototype, "application", {
/**
* application
*
* @property {string} application
*/
get: function () {
if (this._application === undefined) {
throw new Error("Please use the relevant builder method to set property [application] on stub " +
"[SpinnakerPipeline] before accessing it. It's probably called [withApplication]");
}
return this._application;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the application property
*/
SpinnakerPipeline.prototype.withApplication = function (application_) {
this._application = application_;
return this;
};
Object.defineProperty(SpinnakerPipeline.prototype, "builds", {
/**
* builds - SpinnakerPipeline -> Build
*
* @property {Build[]} builds
*/
get: function () {
if (this._builds === undefined) {
throw new Error("Please use the relevant builder method to set property [builds] on stub " +
"[SpinnakerPipeline] before accessing it. It's probably called [withBuilds]");
}
return this._builds;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the builds array
*/
SpinnakerPipeline.prototype.addBuilds = function () {
var builds_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
builds_[_i] = arguments[_i];
}
if (this._builds === undefined) {
this._builds = [];
}
this._builds = this._builds.concat(builds_);
return this;
};
Object.defineProperty(SpinnakerPipeline.prototype, "commit", {
/**
* commit - SpinnakerPipeline -> 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 " +
"[SpinnakerPipeline] before accessing it. It's probably called [withCommit]");
}
return this._commit;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the commit property
*/
SpinnakerPipeline.prototype.withCommit = function (commit_) {
this._commit = commit_;
return this;
};
Object.defineProperty(SpinnakerPipeline.prototype, "eventType", {
/**
* eventType
*
* @property {string} eventType
*/
get: function () {
if (this._eventType === undefined) {
throw new Error("Please use the relevant builder method to set property [eventType] on stub " +
"[SpinnakerPipeline] before accessing it. It's probably called [withEventType]");
}
return this._eventType;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the eventType property
*/
SpinnakerPipeline.prototype.withEventType = function (eventType_) {
this._eventType = eventType_;
return this;
};
Object.defineProperty(SpinnakerPipeline.prototype, "executionId", {
/**
* executionId
*
* @property {string} executionId
*/
get: function () {
if (this._executionId === undefined) {
throw new Error("Please use the relevant builder method to set property [executionId] on stub " +
"[SpinnakerPipeline] before accessing it. It's probably called [withExecutionId]");
}
return this._executionId;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the executionId property
*/
SpinnakerPipeline.prototype.withExecutionId = function (executionId_) {
this._executionId = executionId_;
return this;
};
Object.defineProperty(SpinnakerPipeline.prototype, "stageName", {
/**
* stageName
*
* @property {string} stageName
*/
get: function () {
if (this._stageName === undefined) {
throw new Error("Please use the relevant builder method to set property [stageName] on stub " +
"[SpinnakerPipeline] before accessing it. It's probably called [withStageName]");
}
return this._stageName;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the stageName property
*/
SpinnakerPipeline.prototype.withStageName = function (stageName_) {
this._stageName = stageName_;
return this;
};
Object.defineProperty(SpinnakerPipeline.prototype, "stageType", {
/**
* stageType
*
* @property {string} stageType
*/
get: function () {
if (this._stageType === undefined) {
throw new Error("Please use the relevant builder method to set property [stageType] on stub " +
"[SpinnakerPipeline] before accessing it. It's probably called [withStageType]");
}
return this._stageType;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the stageType property
*/
SpinnakerPipeline.prototype.withStageType = function (stageType_) {
this._stageType = stageType_;
return this;
};
Object.defineProperty(SpinnakerPipeline.prototype, "stages", {
/**
* stages - SpinnakerPipeline -> SpinnakerStage
*
* @property {SpinnakerStage[]} stages
*/
get: function () {
if (this._stages === undefined) {
throw new Error("Please use the relevant builder method to set property [stages] on stub " +
"[SpinnakerPipeline] before accessing it. It's probably called [withStages]");
}
return this._stages;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the stages array
*/
SpinnakerPipeline.prototype.addStages = function () {
var stages_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
stages_[_i] = arguments[_i];
}
if (this._stages === undefined) {
this._stages = [];
}
this._stages = this._stages.concat(stages_);
return this;
};
Object.defineProperty(SpinnakerPipeline.prototype, "taskName", {
/**
* taskName
*
* @property {string} taskName
*/
get: function () {
if (this._taskName === undefined) {
throw new Error("Please use the relevant builder method to set property [taskName] on stub " +
"[SpinnakerPipeline] before accessing it. It's probably called [withTaskName]");
}
return this._taskName;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the taskName property
*/
SpinnakerPipeline.prototype.withTaskName = function (taskName_) {
this._taskName = taskName_;
return this;
};
Object.defineProperty(SpinnakerPipeline.prototype, "waitingForJudgement", {
/**
* waitingForJudgement
*
* @property {boolean} waitingForJudgement
*/
get: function () {
if (this._waitingForJudgement === undefined) {
throw new Error("Please use the relevant builder method to set property [waitingForJudgement] on stub " +
"[SpinnakerPipeline] before accessing it. It's probably called [withWaitingForJudgement]");
}
return this._waitingForJudgement;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the waitingForJudgement property
*/
SpinnakerPipeline.prototype.withWaitingForJudgement = function (waitingForJudgement_) {
this._waitingForJudgement = waitingForJudgement_;
return this;
};
return SpinnakerPipeline;
}());
exports.SpinnakerPipeline = SpinnakerPipeline;