@atomist/cortex
Version:
Atomist Cortex model TypeScript typings
243 lines (242 loc) • 7.73 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 K8Spec
* Generated class exposing Atomist Cortex.
* Fluent builder style class for use in testing and query by example.
*/
var K8Spec = (function () {
function K8Spec() {
this._nodeName = "K8Spec";
this._nodeTags = ["K8Spec", "-dynamic"];
}
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
K8Spec.prototype.nodeName = function () {
return this._nodeName;
};
/**
* Implementation of GraphNode interface method.
* For infrastructure, not user use
*/
K8Spec.prototype.nodeTags = function () {
return this._nodeTags;
};
Object.defineProperty(K8Spec.prototype, "curHash", {
/**
* curHash
*
* @property {string} curHash
*/
get: function () {
if (this._curHash === undefined) {
throw new Error("Please use the relevant builder method to set property [curHash] on stub " +
"[K8Spec] before accessing it. It's probably called [withCurHash]");
}
return this._curHash;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the curHash property
*/
K8Spec.prototype.withCurHash = function (curHash_) {
this._curHash = curHash_;
return this;
};
Object.defineProperty(K8Spec.prototype, "environment", {
/**
* environment - K8Spec -> Environment
*
* @property {Environment} environment
*/
get: function () {
if (this._environment === undefined) {
throw new Error("Please use the relevant builder method to set property [environment] on stub " +
"[K8Spec] before accessing it. It's probably called [withEnvironment]");
}
return this._environment;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the environment property
*/
K8Spec.prototype.withEnvironment = function (environment_) {
this._environment = environment_;
return this;
};
Object.defineProperty(K8Spec.prototype, "fsha", {
/**
* fsha
*
* @property {string} fsha
*/
get: function () {
if (this._fsha === undefined) {
throw new Error("Please use the relevant builder method to set property [fsha] on stub " +
"[K8Spec] before accessing it. It's probably called [withFsha]");
}
return this._fsha;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the fsha property
*/
K8Spec.prototype.withFsha = function (fsha_) {
this._fsha = fsha_;
return this;
};
Object.defineProperty(K8Spec.prototype, "images", {
/**
* images - K8Spec -> 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 " +
"[K8Spec] 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
*/
K8Spec.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(K8Spec.prototype, "kind", {
/**
* kind
*
* @property {string} kind
*/
get: function () {
if (this._kind === undefined) {
throw new Error("Please use the relevant builder method to set property [kind] on stub " +
"[K8Spec] before accessing it. It's probably called [withKind]");
}
return this._kind;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the kind property
*/
K8Spec.prototype.withKind = function (kind_) {
this._kind = kind_;
return this;
};
Object.defineProperty(K8Spec.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 " +
"[K8Spec] before accessing it. It's probably called [withName]");
}
return this._name;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the name property
*/
K8Spec.prototype.withName = function (name_) {
this._name = name_;
return this;
};
Object.defineProperty(K8Spec.prototype, "pods", {
/**
* pods - K8Spec -> K8Pod
*
* @property {K8Pod[]} pods
*/
get: function () {
if (this._pods === undefined) {
throw new Error("Please use the relevant builder method to set property [pods] on stub " +
"[K8Spec] before accessing it. It's probably called [withPods]");
}
return this._pods;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to add an element to the pods array
*/
K8Spec.prototype.addPods = function () {
var pods_ = [];
for (var _i = 0; _i < arguments.length; _i++) {
pods_[_i] = arguments[_i];
}
if (this._pods === undefined) {
this._pods = [];
}
this._pods = this._pods.concat(pods_);
return this;
};
Object.defineProperty(K8Spec.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 " +
"[K8Spec] before accessing it. It's probably called [withTimestamp]");
}
return this._timestamp;
},
enumerable: true,
configurable: true
});
/**
* Fluent builder method to set the timestamp property
*/
K8Spec.prototype.withTimestamp = function (timestamp_) {
this._timestamp = timestamp_;
return this;
};
return K8Spec;
}());
exports.K8Spec = K8Spec;