UNPKG

@atomist/cortex

Version:

Atomist Cortex model TypeScript typings

144 lines (143 loc) 4.59 kB
"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 DockerImage * Generated class exposing Atomist Cortex. * Fluent builder style class for use in testing and query by example. */ var DockerImage = (function () { function DockerImage() { this._nodeName = "DockerImage"; this._nodeTags = ["DockerImage", "-dynamic"]; } /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ DockerImage.prototype.nodeName = function () { return this._nodeName; }; /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ DockerImage.prototype.nodeTags = function () { return this._nodeTags; }; Object.defineProperty(DockerImage.prototype, "image", { /** * image * * @property {string} image */ get: function () { if (this._image === undefined) { throw new Error("Please use the relevant builder method to set property [image] on stub " + "[DockerImage] before accessing it. It's probably called [withImage]"); } return this._image; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the image property */ DockerImage.prototype.withImage = function (image_) { this._image = image_; return this; }; Object.defineProperty(DockerImage.prototype, "pods", { /** * pods - DockerImage -> 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 " + "[DockerImage] 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 */ DockerImage.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(DockerImage.prototype, "spec", { /** * spec - DockerImage -> 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 " + "[DockerImage] before accessing it. It's probably called [withSpec]"); } return this._spec; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the spec property */ DockerImage.prototype.withSpec = function (spec_) { this._spec = spec_; return this; }; Object.defineProperty(DockerImage.prototype, "tag", { /** * tag - DockerImage -> Tag * * @property {Tag} tag */ get: function () { if (this._tag === undefined) { throw new Error("Please use the relevant builder method to set property [tag] on stub " + "[DockerImage] before accessing it. It's probably called [withTag]"); } return this._tag; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the tag property */ DockerImage.prototype.withTag = function (tag_) { this._tag = tag_; return this; }; return DockerImage; }()); exports.DockerImage = DockerImage;