blib/lib/Paws/WAFV2/JsonBody.pm untested

filter: Statementstmt 0.0% 0 / 6 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 7 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # Generated by default/object.tt
2 package Paws::WAFV2::JsonBody;
3 use Moose;
4 has InvalidFallbackBehavior => (is => 'ro', isa => 'Str');
5 has MatchPattern => (is => 'ro', isa => 'Paws::WAFV2::JsonMatchPattern', required => 1);
6 has MatchScope => (is => 'ro', isa => 'Str', required => 1);
7  
8 1;
9  
10 ### main pod documentation begin ###
11  
12 =head1 NAME
13  
14 Paws::WAFV2::JsonBody
15  
16 =head1 USAGE
17  
18 This class represents one of two things:
19  
20 =head3 Arguments in a call to a service
21  
22 Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
23 Each attribute should be used as a named argument in the calls that expect this type of object.
24  
25 As an example, if Att1 is expected to be a Paws::WAFV2::JsonBody object:
26  
27 $service_obj->Method(Att1 => { InvalidFallbackBehavior => $value, ..., MatchScope => $value });
28  
29 =head3 Results returned from an API call
30  
31 Use accessors for each attribute. If Att1 is expected to be an Paws::WAFV2::JsonBody object:
32  
33 $result = $service_obj->Method(...);
34 $result->Att1->InvalidFallbackBehavior
35  
36 =head1 DESCRIPTION
37  
38 The body of a web request, inspected as JSON. The body immediately
39 follows the request headers. This is used in the FieldToMatch
40 specification.
41  
42 Use the specifications in this object to indicate which parts of the
43 JSON body to inspect using the rule's inspection criteria. WAF inspects
44 only the parts of the JSON that result from the matches that you
45 indicate.
46  
47 =head1 ATTRIBUTES
48  
49  
50 =head2 InvalidFallbackBehavior => Str
51  
52 What WAF should do if it fails to completely parse the JSON body. The
53 options are the following:
54  
55 =over
56  
57 =item *
58  
59 C<EVALUATE_AS_STRING> - Inspect the body as plain text. WAF applies the
60 text transformations and inspection criteria that you defined for the
61 JSON inspection to the body text string.
62  
63 =item *
64  
65 C<MATCH> - Treat the web request as matching the rule statement. WAF
66 applies the rule action to the request.
67  
68 =item *
69  
70 C<NO_MATCH> - Treat the web request as not matching the rule statement.
71  
72 =back
73  
74 If you don't provide this setting, WAF parses and evaluates the content
75 only up to the first parsing failure that it encounters.
76  
77 WAF does its best to parse the entire JSON body, but might be forced to
78 stop for reasons such as characters that aren't valid, duplicate keys,
79 truncation, and any content whose root node isn't an object or an
80 array.
81  
82 WAF parses the JSON in the following examples as two valid key, value
83 pairs:
84  
85 =over
86  
87 =item *
88  
89 Missing comma: C<{"key1":"value1""key2":"value2"}>
90  
91 =item *
92  
93 Missing colon: C<{"key1":"value1","key2""value2"}>
94  
95 =item *
96  
97 Extra colons: C<{"key1"::"value1","key2""value2"}>
98  
99 =back
100  
101  
102  
103 =head2 B<REQUIRED> MatchPattern => L<Paws::WAFV2::JsonMatchPattern>
104  
105 The patterns to look for in the JSON body. WAF inspects the results of
106 these pattern matches against the rule inspection criteria.
107  
108  
109 =head2 B<REQUIRED> MatchScope => Str
110  
111 The parts of the JSON to match against using the C<MatchPattern>. If
112 you specify C<All>, WAF matches against keys and values.
113  
114  
115  
116 =head1 SEE ALSO
117  
118 This class forms part of L<Paws>, describing an object used in L<Paws::WAFV2>
119  
120 =head1 BUGS and CONTRIBUTIONS
121  
122 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
123  
124 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
125  
126 =cut
127