UNPKG

@eclipse-ditto/ditto-javascript-client-node

Version:

Node.js(r) implementation of Eclipse Ditto JavaScript API.

46 lines 1.38 kB
"use strict"; /*! * Copyright (c) 2019 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0 * * SPDX-License-Identifier: EPL-2.0 */ Object.defineProperty(exports, "__esModule", { value: true }); exports.AbstractBuilder = void 0; const ditto_protocol_1 = require("../model/ditto-protocol"); /** * Abstract implementation of the relevant builder steps that are probably the same for all builder implementations. */ class AbstractBuilder { constructor() { this.apiVersion = ditto_protocol_1.ApiVersion.V2; } withTls() { this.tls = true; return this; } withoutTls() { this.tls = false; return this; } withCustomPath(path) { this.customPath = path; return this; } withDomain(url) { this.domain = url; return this; } withAuthProvider(authProvider, ...additionalAuthProviders) { this.authProviders = [authProvider, ...additionalAuthProviders]; return this.finalize(); } } exports.AbstractBuilder = AbstractBuilder; //# sourceMappingURL=builder-steps.js.map