@atomist/cortex
Version:
Atomist Cortex model TypeScript typings
190 lines (189 loc) • 5.94 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 K8Pod
* Generated class exposing Atomist Cortex.
* Fluent builder style class for use in testing and query by example.
*/
var K8Pod = (function () {
function K8Pod() {
this._nodeName = "K8Pod";
this._nodeTags = ["K8Pod", "-dynamic"];
}
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
K8Pod.prototype.nodeName = function () {
return this._nodeName;
};
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
K8Pod.prototype.nodeTags = function () {
return this._nodeTags;
};
Object.defineProperty(K8Pod.prototype, "host", {
/**
* host
*
* @property {string} host
*/
get: function () {
if (this._host === undefined) {
throw new Error("Please use the relevant builder method to set property [host] on stub " +
"[K8Pod] before accessing it. It's probably called [withHost]");
}
return this._host;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the host property
*/
K8Pod.prototype.withHost = function (host_) {
this._host = host_;
return this;
};
Object.defineProperty(K8Pod.prototype, "images", {
/**
* images - K8Pod -> DockerImage
*
* @property {DockerImage[]} images
*/
get: function () {
if (this._images === undefined) {
throw new Error("Please use the relevant builder method to set property [images] on stub " +
"[K8Pod] before accessing it. It's probably called [withImages]");
}
return this._images;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the images array
*/
K8Pod.prototype.addImages = function () {
var images_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
images_[_i] = arguments[_i];
}
if (this._images === undefined) {
this._images = [];
}
this._images = this._images.concat(images_);
return this;
};
Object.defineProperty(K8Pod.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 " +
"[K8Pod] before accessing it. It's probably called [withName]");
}
return this._name;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the name property
*/
K8Pod.prototype.withName = function (name_) {
this._name = name_;
return this;
};
Object.defineProperty(K8Pod.prototype, "spec", {
/**
* spec - K8Pod -> K8Spec
*
* @property {K8Spec} spec
*/
get: function () {
if (this._spec === undefined) {
throw new Error("Please use the relevant builder method to set property [spec] on stub " +
"[K8Pod] before accessing it. It's probably called [withSpec]");
}
return this._spec;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the spec property
*/
K8Pod.prototype.withSpec = function (spec_) {
this._spec = spec_;
return this;
};
Object.defineProperty(K8Pod.prototype, "state", {
/**
* state
*
* @property {string} state
*/
get: function () {
if (this._state === undefined) {
throw new Error("Please use the relevant builder method to set property [state] on stub " +
"[K8Pod] before accessing it. It's probably called [withState]");
}
return this._state;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the state property
*/
K8Pod.prototype.withState = function (state_) {
this._state = state_;
return this;
};
Object.defineProperty(K8Pod.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 " +
"[K8Pod] before accessing it. It's probably called [withTimestamp]");
}
return this._timestamp;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the timestamp property
*/
K8Pod.prototype.withTimestamp = function (timestamp_) {
this._timestamp = timestamp_;
return this;
};
return K8Pod;
}());
exports.K8Pod = K8Pod;