UNPKG

@atomist/cortex

Version:

Atomist Cortex model TypeScript typings

225 lines (201 loc) 6.14 kB
/* * 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. */ import * as spinnakerStageApi from "../SpinnakerStage"; import { SpinnakerPipeline } from "./SpinnakerPipeline"; export { SpinnakerStage }; /** * Type SpinnakerStage * Generated class exposing Atomist Cortex. * Fluent builder style class for use in testing and query by example. */ class SpinnakerStage implements spinnakerStageApi.SpinnakerStage { private _endTime: string; private _id: string; private _name: string; private _pipeline: SpinnakerPipeline; private _refId: string; private _startTime: string; private _status: string; private _type: string; private _nodeName = "SpinnakerStage"; private _nodeTags = [ "SpinnakerStage", "-dynamic" ]; /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ public nodeName(): string { return this._nodeName; } /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ public nodeTags(): string[] { return this._nodeTags; } /** * endTime * * @property {string} endTime */ get endTime(): string { if (this._endTime === undefined) { throw new Error(`Please use the relevant builder method to set property [endTime] on stub ` + `[SpinnakerStage] before accessing it. It's probably called [withEndTime]`); } return this._endTime; } /** * Fluent builder method to set the endTime property */ public withEndTime(endTime_: string) { this._endTime = endTime_; return this; } /** * id * * @property {string} id */ get id(): string { if (this._id === undefined) { throw new Error(`Please use the relevant builder method to set property [id] on stub ` + `[SpinnakerStage] before accessing it. It's probably called [withId]`); } return this._id; } /** * Fluent builder method to set the id property */ public withId(id_: string) { this._id = id_; return this; } /** * name * * @property {string} name */ get name(): string { if (this._name === undefined) { throw new Error(`Please use the relevant builder method to set property [name] on stub ` + `[SpinnakerStage] before accessing it. It's probably called [withName]`); } return this._name; } /** * Fluent builder method to set the name property */ public withName(name_: string) { this._name = name_; return this; } /** * pipeline - SpinnakerStage -> SpinnakerPipeline * * @property {SpinnakerPipeline} pipeline */ get pipeline(): SpinnakerPipeline { if (this._pipeline === undefined) { throw new Error(`Please use the relevant builder method to set property [pipeline] on stub ` + `[SpinnakerStage] before accessing it. It's probably called [withPipeline]`); } return this._pipeline; } /** * Fluent builder method to set the pipeline property */ public withPipeline(pipeline_: SpinnakerPipeline) { this._pipeline = pipeline_; return this; } /** * refId * * @property {string} refId */ get refId(): string { if (this._refId === undefined) { throw new Error(`Please use the relevant builder method to set property [refId] on stub ` + `[SpinnakerStage] before accessing it. It's probably called [withRefId]`); } return this._refId; } /** * Fluent builder method to set the refId property */ public withRefId(refId_: string) { this._refId = refId_; return this; } /** * startTime * * @property {string} startTime */ get startTime(): string { if (this._startTime === undefined) { throw new Error(`Please use the relevant builder method to set property [startTime] on stub ` + `[SpinnakerStage] before accessing it. It's probably called [withStartTime]`); } return this._startTime; } /** * Fluent builder method to set the startTime property */ public withStartTime(startTime_: string) { this._startTime = startTime_; return this; } /** * status * * @property {string} status */ get status(): string { if (this._status === undefined) { throw new Error(`Please use the relevant builder method to set property [status] on stub ` + `[SpinnakerStage] before accessing it. It's probably called [withStatus]`); } return this._status; } /** * Fluent builder method to set the status property */ public withStatus(status_: string) { this._status = status_; return this; } /** * type * * @property {string} type */ get type(): string { if (this._type === undefined) { throw new Error(`Please use the relevant builder method to set property [type] on stub ` + `[SpinnakerStage] before accessing it. It's probably called [withType]`); } return this._type; } /** * Fluent builder method to set the type property */ public withType(type_: string) { this._type = type_; return this; } }