Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Use this operation to test a rules pattern that you plan to use to create an audience segment. For more information about segments, see CreateSegment.
Synopsis
- data TestSegmentPattern = TestSegmentPattern' {}
- newTestSegmentPattern :: Text -> Text -> TestSegmentPattern
- testSegmentPattern_pattern :: Lens' TestSegmentPattern Text
- testSegmentPattern_payload :: Lens' TestSegmentPattern Text
- data TestSegmentPatternResponse = TestSegmentPatternResponse' {
- httpStatus :: Int
- match :: Bool
- newTestSegmentPatternResponse :: Int -> Bool -> TestSegmentPatternResponse
- testSegmentPatternResponse_httpStatus :: Lens' TestSegmentPatternResponse Int
- testSegmentPatternResponse_match :: Lens' TestSegmentPatternResponse Bool
Creating a Request
data TestSegmentPattern Source #
See: newTestSegmentPattern
smart constructor.
Instances
newTestSegmentPattern Source #
Create a value of TestSegmentPattern
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
TestSegmentPattern
, testSegmentPattern_pattern
- The pattern to test.
$sel:payload:TestSegmentPattern'
, testSegmentPattern_payload
- A sample evaluationContext
JSON block to test against the specified
pattern.
Request Lenses
testSegmentPattern_pattern :: Lens' TestSegmentPattern Text Source #
The pattern to test.
testSegmentPattern_payload :: Lens' TestSegmentPattern Text Source #
A sample evaluationContext
JSON block to test against the specified
pattern.
Destructuring the Response
data TestSegmentPatternResponse Source #
See: newTestSegmentPatternResponse
smart constructor.
TestSegmentPatternResponse' | |
|
Instances
newTestSegmentPatternResponse Source #
:: Int | |
-> Bool | |
-> TestSegmentPatternResponse |
Create a value of TestSegmentPatternResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:TestSegmentPatternResponse'
, testSegmentPatternResponse_httpStatus
- The response's http status code.
$sel:match:TestSegmentPatternResponse'
, testSegmentPatternResponse_match
- Returns true
if the pattern matches the payload.
Response Lenses
testSegmentPatternResponse_httpStatus :: Lens' TestSegmentPatternResponse Int Source #
The response's http status code.
testSegmentPatternResponse_match :: Lens' TestSegmentPatternResponse Bool Source #
Returns true
if the pattern matches the payload.