UNPKG

@atomist/cortex

Version:

Atomist Cortex model TypeScript typings

236 lines (235 loc) 7.43 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 Tag * Generated class exposing Atomist Cortex. * Fluent builder style class for use in testing and query by example. */ var Tag = (function () { function Tag() { this._nodeName = "Tag"; this._nodeTags = ["Tag", "-dynamic"]; } /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ Tag.prototype.nodeName = function () { return this._nodeName; }; /** * Implementation of GraphNode interface method. * For infrastructure, not user use */ Tag.prototype.nodeTags = function () { return this._nodeTags; }; Object.defineProperty(Tag.prototype, "commit", { /** * commit - Tag -> 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 " + "[Tag] before accessing it. It's probably called [withCommit]"); } return this._commit; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the commit property */ Tag.prototype.withCommit = function (commit_) { this._commit = commit_; return this; }; Object.defineProperty(Tag.prototype, "containers", { /** * containers - Tag -> DockerImage * * @property {DockerImage[]} containers */ get: function () { if (this._containers === undefined) { throw new Error("Please use the relevant builder method to set property [containers] on stub " + "[Tag] before accessing it. It's probably called [withContainers]"); } return this._containers; }, enumerable: true, configurable: true }); /** * Fluent builder method to add an element to the containers array */ Tag.prototype.addContainers = function () { var containers_ = []; for (var _i = 0; _i < arguments.length; _i++) { containers_[_i] = arguments[_i]; } if (this._containers === undefined) { this._containers = []; } this._containers = this._containers.concat(containers_); return this; }; Object.defineProperty(Tag.prototype, "description", { /** * description * * @property {string} description */ get: function () { if (this._description === undefined) { throw new Error("Please use the relevant builder method to set property [description] on stub " + "[Tag] before accessing it. It's probably called [withDescription]"); } return this._description; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the description property */ Tag.prototype.withDescription = function (description_) { this._description = description_; return this; }; Object.defineProperty(Tag.prototype, "id", { /** * id * * @property {string} id */ get: function () { if (this._id === undefined) { throw new Error("Please use the relevant builder method to set property [id] on stub " + "[Tag] before accessing it. It's probably called [withId]"); } return this._id; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the id property */ Tag.prototype.withId = function (id_) { this._id = id_; return this; }; Object.defineProperty(Tag.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 " + "[Tag] before accessing it. It's probably called [withName]"); } return this._name; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the name property */ Tag.prototype.withName = function (name_) { this._name = name_; return this; }; Object.defineProperty(Tag.prototype, "ref", { /** * ref * * @property {string} ref */ get: function () { if (this._ref === undefined) { throw new Error("Please use the relevant builder method to set property [ref] on stub " + "[Tag] before accessing it. It's probably called [withRef]"); } return this._ref; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the ref property */ Tag.prototype.withRef = function (ref_) { this._ref = ref_; return this; }; Object.defineProperty(Tag.prototype, "release", { /** * release - Tag -> Release * * @property {Release} release */ get: function () { if (this._release === undefined) { throw new Error("Please use the relevant builder method to set property [release] on stub " + "[Tag] before accessing it. It's probably called [withRelease]"); } return this._release; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the release property */ Tag.prototype.withRelease = function (release_) { this._release = release_; return this; }; Object.defineProperty(Tag.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 " + "[Tag] before accessing it. It's probably called [withTimestamp]"); } return this._timestamp; }, enumerable: true, configurable: true }); /** * Fluent builder method to set the timestamp property */ Tag.prototype.withTimestamp = function (timestamp_) { this._timestamp = timestamp_; return this; }; return Tag; }()); exports.Tag = Tag;