UNPKG

@atomist/cortex

Version:

Atomist Cortex model TypeScript typings

93 lines (80 loc) 2.58 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 k8ClusterApi from "../K8Cluster"; export { K8Cluster }; /** * Type K8Cluster * Generated class exposing Atomist Cortex. * Fluent builder style class for use in testing and query by example. */ class K8Cluster implements k8ClusterApi.K8Cluster { private _availabilityZone: string; private _name: string; private _nodeName = "K8Cluster"; private _nodeTags = [ "K8Cluster", "-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; } /** * availabilityZone * * @property {string} availabilityZone */ get availabilityZone(): string { if (this._availabilityZone === undefined) { throw new Error(`Please use the relevant builder method to set property [availabilityZone] on stub ` + `[K8Cluster] before accessing it. It's probably called [withAvailabilityZone]`); } return this._availabilityZone; } /** * Fluent builder method to set the availabilityZone property */ public withAvailabilityZone(availabilityZone_: string) { this._availabilityZone = availabilityZone_; 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 ` + `[K8Cluster] 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; } }