UNPKG

2.15 kBTypeScriptView Raw
1/**
2 * -------------------------------------------------------------------------------------------
3 * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
4 * See License in the project root for license information.
5 * -------------------------------------------------------------------------------------------
6 */
7/**
8 * @module ChaosHandlerOptions
9 */
10import { ChaosStrategy } from "./ChaosStrategy";
11import { MiddlewareOptions } from "./IMiddlewareOptions";
12/**
13 * Class representing ChaosHandlerOptions
14 * @class
15 * Class
16 * @implements MiddlewareOptions
17 */
18export declare class ChaosHandlerOptions implements MiddlewareOptions {
19 /**
20 * Specifies the startegy used for the Testing Handler -> RANDOM/MANUAL
21 *
22 * @public
23 */
24 chaosStrategy: ChaosStrategy;
25 /**
26 * Status code to be returned in the response
27 *
28 * @public
29 */
30 statusCode: number;
31 /**
32 * The Message to be returned in the response
33 *
34 * @public
35 */
36 statusMessage: string;
37 /**
38 * The percentage of randomness/chaos in the handler
39 *
40 * Setting the default value as 10%
41 * @public
42 */
43 chaosPercentage: number;
44 /**
45 * The response body to be returned in the response
46 *
47 * @public
48 */
49 responseBody: any;
50 /**
51 * @public
52 * @constructor
53 * To create an instance of Testing Handler Options
54 * @param {ChaosStrategy} ChaosStrategy - Specifies the startegy used for the Testing Handler -> RAMDOM/MANUAL
55 * @param {string} statusMessage - The Message to be returned in the response
56 * @param {number?} statusCode - The statusCode to be returned in the response
57 * @param {number?} chaosPercentage - The percentage of randomness/chaos in the handler
58 * @param {any?} responseBody - The response body to be returned in the response
59 * @returns An instance of ChaosHandlerOptions
60 */
61 constructor(chaosStrategy?: ChaosStrategy, statusMessage?: string, statusCode?: number, chaosPercentage?: number, responseBody?: any);
62}