@adobe/pdfservices-node-sdk
Version:
The Adobe PDF Services Node.js SDK provides APIs for creating, combining, exporting and manipulating PDFs.
76 lines • 2.41 kB
JavaScript
;
/*
* Copyright 2024 Adobe
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it. If you have received this file from a source other than Adobe,
* then your use, modification, or distribution of it requires the prior
* written permission of Adobe.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProxyServerConfig = void 0;
const ProxyScheme_1 = require("./ProxyScheme");
const ValidationUtil_1 = require("../../internal/util/ValidationUtil");
/**
* Encapsulates the proxy server configurations.
*/
class ProxyServerConfig {
/**
* Constructs a new `ProxyServerConfig` instance.
*
* @param params
* Parameters for constructing a new {@link ProxyServerConfig} instance.
* @param params.host
* Host name of the proxy server. Cannot be undefined.
* @param params.port
* Port number of proxy server. It should be >= 0 and < 65536.
* @param [params.scheme]
* Scheme of proxy server.
* See {@link ProxyScheme} for scheme values. Default value is {@link ProxyScheme#HTTP HTTP}.
* @param [params.credentials]
* Credentials for authenticating with the proxy server.
*/
constructor(params) {
ValidationUtil_1.ValidationUtil.validateProxyServerConfigParams(params);
this._host = params.host;
this._port = params.port;
this._scheme = params.scheme ?? ProxyScheme_1.ProxyScheme.HTTP;
this._credentials = params.credentials;
}
/**
* Gets the host name of proxy server.
*
* @returns A String denoting host
*/
get host() {
return this._host;
}
/**
* Gets the port of proxy server.
*
* @returns An integer denoting port
*/
get port() {
return this._port;
}
/**
* Gets the scheme of proxy server.
*
* @returns A {@link ProxyScheme} denoting scheme
*/
get scheme() {
return this._scheme;
}
/**
* Gets the credentials for authenticating with a proxy server.
*
* @returns A {@link ProxyAuthenticationCredentials} denoting credentials
*/
get credentials() {
return this._credentials;
}
}
exports.ProxyServerConfig = ProxyServerConfig;
//# sourceMappingURL=ProxyServerConfig.js.map