UNPKG

@atomist/cortex

Version:

Atomist Cortex model TypeScript typings

93 lines (81 loc) 2.65 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 userPreferencesApi from "../UserPreferences"; import { ChatId } from "./ChatId"; export { UserPreferences }; /** * Type UserPreferences * Generated class exposing Atomist Cortex. * Fluent builder style class for use in testing and query by example. */ class UserPreferences implements userPreferencesApi.UserPreferences { private _chatId: ChatId; private _updatedAt: string; private _nodeName = "UserPreferences"; private _nodeTags = [ "UserPreferences", "-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; } /** * chatId - UserPreferences -> ChatId * * @property {ChatId} chatId */ get chatId(): ChatId { if (this._chatId === undefined) { throw new Error(`Please use the relevant builder method to set property [chatId] on stub ` + `[UserPreferences] before accessing it. It's probably called [withChatId]`); } return this._chatId; } /** * Fluent builder method to set the chatId property */ public withChatId(chatId_: ChatId) { this._chatId = chatId_; return this; } /** * updatedAt * * @property {string} updatedAt */ get updatedAt(): string { if (this._updatedAt === undefined) { throw new Error(`Please use the relevant builder method to set property [updatedAt] on stub ` + `[UserPreferences] before accessing it. It's probably called [withUpdatedAt]`); } return this._updatedAt; } /** * Fluent builder method to set the updatedAt property */ public withUpdatedAt(updatedAt_: string) { this._updatedAt = updatedAt_; return this; } }