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 | */
|
10 | import { ChaosStrategy } from "./ChaosStrategy";
|
11 | import { MiddlewareOptions } from "./IMiddlewareOptions";
|
12 | /**
|
13 | * Class representing ChaosHandlerOptions
|
14 | * @class
|
15 | * Class
|
16 | * @implements MiddlewareOptions
|
17 | */
|
18 | export 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 | * The response headers to be returned in the response
|
52 | *
|
53 | * @public
|
54 | */
|
55 | headers: Headers;
|
56 | /**
|
57 | * @public
|
58 | * @constructor
|
59 | * To create an instance of Testing Handler Options
|
60 | * @param {ChaosStrategy} chaosStrategy - Specifies the startegy used for the Testing Handler -> RAMDOM/MANUAL
|
61 | * @param {string} statusMessage - The Message to be returned in the response
|
62 | * @param {number?} statusCode - The statusCode to be returned in the response
|
63 | * @param {number?} chaosPercentage - The percentage of randomness/chaos in the handler
|
64 | * @param {any?} responseBody - The response body to be returned in the response
|
65 | * @returns An instance of ChaosHandlerOptions
|
66 | */
|
67 | constructor(chaosStrategy?: ChaosStrategy, statusMessage?: string, statusCode?: number, chaosPercentage?: number, responseBody?: any, headers?: Headers);
|
68 | }
|